From: TimePath Date: Sat, 5 Sep 2015 02:07:13 +0000 (+1000) Subject: Merge branch 'master' into TimePath/global_self X-Git-Tag: xonotic-v0.8.2~1931^2~1 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=ef74e1ba8e890befb4a4892a96d244a66c05fd48 Merge branch 'master' into TimePath/global_self # Conflicts: # qcsrc/server/mutators/mutator_instagib.qc # qcsrc/server/mutators/mutator_instagib_items.qc --- ef74e1ba8e890befb4a4892a96d244a66c05fd48 diff --cc qcsrc/server/mutators/mutator_instagib.qc index ee9c6de8ce,3055dbf539..9aecd0e4e7 --- a/qcsrc/server/mutators/mutator_instagib.qc +++ b/qcsrc/server/mutators/mutator_instagib.qc @@@ -7,19 -7,29 +7,29 @@@ #include "../../common/items/all.qc" - void spawnfunc_item_minst_cells (void) + void spawnfunc_item_minst_cells() -{ +{SELFPARAM(); if (!g_instagib) { remove(self); return; } - if (!self.ammo_cells) - self.ammo_cells = autocvar_g_instagib_ammo_drop; + if (!self.ammo_cells) self.ammo_cells = autocvar_g_instagib_ammo_drop; + StartItemA(ITEM_VaporizerCells); + } - StartItemA (ITEM_VaporizerCells); + void instagib_invisibility() + { + self.strength_finished = autocvar_g_balance_powerup_strength_time; + StartItemA(ITEM_Invisibility); } - void instagib_health_mega() + void instagib_extralife() -{ +{SELFPARAM(); self.max_health = 1; - StartItemA (ITEM_ExtraLife); + StartItemA(ITEM_ExtraLife); + } + + void instagib_speed() + { + self.invincible_finished = autocvar_g_balance_powerup_invincible_time; + StartItemA(ITEM_Speed); } .float instagib_nextthink; @@@ -220,8 -230,8 +230,8 @@@ MUTATOR_HOOKFUNCTION(instagib_PlayerPow } MUTATOR_HOOKFUNCTION(instagib_PlayerPhysics) -{ +{SELFPARAM(); - if(self.items & ITEM_Shield.m_itemid) + if(self.items & ITEM_Speed.m_itemid) self.stat_sv_maxspeed = self.stat_sv_maxspeed * autocvar_g_instagib_speed_highspeed; return false; @@@ -425,9 -427,10 +424,10 @@@ MUTATOR_HOOKFUNCTION(instagib_ItemTouch } MUTATOR_HOOKFUNCTION(instagib_OnEntityPreSpawn) -{ +{SELFPARAM(); if (!autocvar_g_powerups) { return false; } - if (!(self.classname == "item_strength" || self.classname == "item_invincible" || self.itemdef == ITEM_HealthMega)) + // Can't use .itemdef here + if (!(self.classname == "item_strength" || self.classname == "item_invincible" || self.classname == "item_health_mega")) return false; entity e = spawn();