- if (MUTATOR_RETURNVALUE) return false;
- if (!autocvar_g_powerups) return false;
- if (!autocvar_g_lms_extra_lives) return false;
-
- entity ent = M_ARGV(0, entity);
-
- // Can't use .itemdef here
- if (ent.classname != "item_health_mega") return false;
-
- entity e = spawn();
- setthink(e, lms_extralife);
-
- Item_CopyFields(ent, e);
-
- e.nextthink = time + 0.1;
+ entity item = M_ARGV(0, entity);
+ entity def = item.itemdef;
+ if(def == ITEM_HealthMega)
+ {
+ if(autocvar_g_powerups && autocvar_g_lms_extra_lives)
+ lms_replace_with_extralife(item);
+ return true;
+ }