]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'Lyberta/BlockInstagibPowerups' into 'master'
authorMirio <opivy@hotmail.de>
Sun, 31 Dec 2017 14:54:53 +0000 (14:54 +0000)
committerMirio <opivy@hotmail.de>
Sun, 31 Dec 2017 14:54:53 +0000 (14:54 +0000)
Made Invisibility and Speed to be instagib only for now.

Closes #1970

See merge request xonotic/xonotic-data.pk3dir!514

mutators.cfg
qcsrc/common/t_items.qc
qcsrc/common/t_items.qh

index 79ac41791ade308fde3b9371f47757b23b2656b0..af0fa9e68477e1b05e3366e6dddb57a1f3547677 100644 (file)
@@ -40,7 +40,7 @@ set g_instagib_ammo_convert_bullets 0 "convert bullet ammo packs to insta cell a
 set g_instagib_ammo_convert_cells 0 "convert normal cell ammo packs to insta cell ammo packs"
 set g_instagib_ammo_convert_rockets 0 "convert rocket ammo packs to insta cell ammo packs"
 set g_instagib_ammo_convert_shells 0 "convert shell ammo packs to insta cell ammo packs"
-set g_instagib_invisibility_time 30 "Time of ivisibility powerup in seconds."
+set g_instagib_invisibility_time 30 "Time of invisibility powerup in seconds."
 set g_instagib_invis_alpha 0.15
 set g_instagib_speed_time 30 "Time of speed powerup in seconds."
 set g_instagib_speed_highspeed 1.5 "speed-multiplier that applies while you carry the invincibility powerup"
index f4431eed2887f84e812e7bd61bcc46dac87eb6c7..fa6d0f6f313510dd1bc6a8e1a6e921a425d7e1b0 100644 (file)
@@ -533,7 +533,7 @@ void Item_Respawn (entity this)
 
 void Item_RespawnCountdown (entity this)
 {
-       if(this.count >= ITEM_RESPAWN_TICKS)
+       if(this.item_respawncounter >= ITEM_RESPAWN_TICKS)
        {
                if(this.waypointsprite_attached)
                        WaypointSprite_Kill(this.waypointsprite_attached);
@@ -542,8 +542,8 @@ void Item_RespawnCountdown (entity this)
        else
        {
                this.nextthink = time + 1;
-               this.count += 1;
-               if(this.count == 1)
+               this.item_respawncounter += 1;
+               if(this.item_respawncounter == 1)
                {
                        do {
                                {
@@ -584,7 +584,7 @@ void Item_RespawnCountdown (entity this)
                        });
 
                        WaypointSprite_Ping(this.waypointsprite_attached);
-                       //WaypointSprite_UpdateHealth(this.waypointsprite_attached, this.count);
+                       //WaypointSprite_UpdateHealth(this.waypointsprite_attached, this.item_respawncounter);
                }
        }
 }
@@ -607,7 +607,7 @@ void Item_ScheduleRespawnIn(entity e, float t)
                setthink(e, Item_RespawnCountdown);
                e.nextthink = time + max(0, t - ITEM_RESPAWN_TICKS);
                e.scheduledrespawntime = e.nextthink + ITEM_RESPAWN_TICKS;
-               e.count = 0;
+               e.item_respawncounter = 0;
                if(Item_ItemsTime_Allow(e.itemdef) || (e.weapons & WEPSET_SUPERWEAPONS))
                {
                        t = Item_ItemsTime_UpdateTime(e, e.scheduledrespawntime);
index 5ecbe548824bef246be9e2ccf45b5b95882df09d..3740c9a576d5ee045a8d80660fbbbc6170399cc1 100644 (file)
@@ -62,6 +62,8 @@ const float ITEM_RESPAWN_TICKS = 10;
 .float max_armorvalue;
 .float pickup_anyway;
 
+.float item_respawncounter;
+
 void Item_Show (entity e, float mode);
 
 void Item_Respawn (entity this);