]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/mutator/instagib/sv_instagib.qc
Merge branch 'master' into Mario/strength_stat_field
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / instagib / sv_instagib.qc
index 1952dc09a3163026e67e0de171064d4669cc649c..272680fb20351adf6de41097db683967036ce2e2 100644 (file)
@@ -14,7 +14,6 @@ bool autocvar_g_instagib_ammo_convert_cells;
 bool autocvar_g_instagib_ammo_convert_rockets;
 bool autocvar_g_instagib_ammo_convert_shells;
 bool autocvar_g_instagib_ammo_convert_bullets;
-int autocvar_g_instagib_extralives;
 float autocvar_g_instagib_speed_highspeed;
 
 IntrusiveList g_instagib_items;
@@ -233,8 +232,8 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerPowerups)
 
        if (player.items & ITEM_Invisibility.m_itemid)
        {
-               play_countdown(player, player.strength_finished, SND_POWEROFF);
-               if (time > player.strength_finished)
+               play_countdown(player, STAT(STRENGTH_FINISHED, player), SND_POWEROFF);
+               if (time > STAT(STRENGTH_FINISHED, player))
                {
                        player.alpha = default_player_alpha;
                        player.exteriorweaponentity.alpha = default_weapon_alpha;
@@ -244,7 +243,7 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerPowerups)
        }
        else
        {
-               if (time < player.strength_finished)
+               if (time < STAT(STRENGTH_FINISHED, player))
                {
                        player.alpha = autocvar_g_instagib_invis_alpha;
                        player.exteriorweaponentity.alpha = autocvar_g_instagib_invis_alpha;
@@ -385,7 +384,7 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, Damage_Calculate)
        M_ARGV(6, vector) = frag_force;
 }
 
-MUTATOR_HOOKFUNCTION(mutator_instagib, SetStartItems)
+MUTATOR_HOOKFUNCTION(mutator_instagib, SetStartItems, CBC_ORDER_LAST)
 {
        start_health       = warmup_start_health       = 100;
        start_armorvalue   = warmup_start_armorvalue   = 0;
@@ -528,7 +527,7 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, ItemTouch)
        if(item.itemdef == ITEM_ExtraLife)
        {
                GiveResource(toucher, RES_ARMOR, autocvar_g_instagib_extralives);
-               Send_Notification(NOTIF_ONE, toucher, MSG_CENTER, CENTER_EXTRALIVES);
+               Send_Notification(NOTIF_ONE, toucher, MSG_CENTER, CENTER_EXTRALIVES, autocvar_g_instagib_extralives);
                return MUT_ITEMTOUCH_PICKUP;
        }