Merge branch 'master' into TimePath/global_self
authorTimePath <andrew.hardaker1995@gmail.com>
Sat, 5 Sep 2015 02:07:13 +0000 (12:07 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Sat, 5 Sep 2015 02:07:13 +0000 (12:07 +1000)
# Conflicts:
# qcsrc/server/mutators/mutator_instagib.qc
# qcsrc/server/mutators/mutator_instagib_items.qc

21 files changed:
defaultXonotic.cfg
mod/client/main.qc [deleted file]
mod/client/progs.inc [deleted file]
mod/menu/main.qc [deleted file]
mod/menu/progs.inc [deleted file]
mod/server/main.qc [deleted file]
mod/server/progs.inc [deleted file]
qcsrc/client/progs.src
qcsrc/common/movetypes/movetypes.qc
qcsrc/common/movetypes/walk.qc
qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc
qcsrc/menu/progs.src
qcsrc/mod/client/main.qc [new file with mode: 0644]
qcsrc/mod/client/progs.inc [new file with mode: 0644]
qcsrc/mod/menu/main.qc [new file with mode: 0644]
qcsrc/mod/menu/progs.inc [new file with mode: 0644]
qcsrc/mod/server/main.qc [new file with mode: 0644]
qcsrc/mod/server/progs.inc [new file with mode: 0644]
qcsrc/server/mutators/mutator_instagib.qc
qcsrc/server/mutators/mutator_instagib_items.qc
qcsrc/server/progs.src

index ede4ffe1135b6ecfe9e3b3020d5cb70ac8daddc8..338808f3d10aea1ea4819ca78be0fba2407c8f3d 100644 (file)
@@ -541,6 +541,7 @@ gl_picmip_sprites 0
 gl_picmip_other 1 // so, picmip -1 is best possible quality
 r_mipsprites 1
 r_mipskins 1
+gl_max_lightmapsize 4096
 r_shadow_realtime_world_lightmaps 1
 r_shadow_realtime_world_importlightentitiesfrommap 0 // Whether build process uses keepLights is nontransparent and may change, so better make keepLights not matter.
 cl_decals_fadetime 5
diff --git a/mod/client/main.qc b/mod/client/main.qc
deleted file mode 100644 (file)
index d84239c..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-REGISTER_MUTATOR(mutator_mod, cvar("g_mod"));
-
-MUTATOR_HOOKFUNCTION(mutator_mod, BuildMutatorsString) {
-    ret_string = strcat(ret_string, ":mod");
-}
-
-MUTATOR_HOOKFUNCTION(mutator_mod, BuildMutatorsPrettyString) {
-    ret_string = strcat(ret_string, ", Mod");
-}
diff --git a/mod/client/progs.inc b/mod/client/progs.inc
deleted file mode 100644 (file)
index ae91a9e..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#if BUILD_MOD
-#include "main.qc"
-#endif
diff --git a/mod/menu/main.qc b/mod/menu/main.qc
deleted file mode 100644 (file)
index d84239c..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-REGISTER_MUTATOR(mutator_mod, cvar("g_mod"));
-
-MUTATOR_HOOKFUNCTION(mutator_mod, BuildMutatorsString) {
-    ret_string = strcat(ret_string, ":mod");
-}
-
-MUTATOR_HOOKFUNCTION(mutator_mod, BuildMutatorsPrettyString) {
-    ret_string = strcat(ret_string, ", Mod");
-}
diff --git a/mod/menu/progs.inc b/mod/menu/progs.inc
deleted file mode 100644 (file)
index ae91a9e..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#if BUILD_MOD
-#include "main.qc"
-#endif
diff --git a/mod/server/main.qc b/mod/server/main.qc
deleted file mode 100644 (file)
index d84239c..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-REGISTER_MUTATOR(mutator_mod, cvar("g_mod"));
-
-MUTATOR_HOOKFUNCTION(mutator_mod, BuildMutatorsString) {
-    ret_string = strcat(ret_string, ":mod");
-}
-
-MUTATOR_HOOKFUNCTION(mutator_mod, BuildMutatorsPrettyString) {
-    ret_string = strcat(ret_string, ", Mod");
-}
diff --git a/mod/server/progs.inc b/mod/server/progs.inc
deleted file mode 100644 (file)
index ae91a9e..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#if BUILD_MOD
-#include "main.qc"
-#endif
index 5066696022308653a84774cbd84fc16494ef3d71..02e52fe0d1858aed9dad4a12a695e4064944ba58 100644 (file)
@@ -76,4 +76,4 @@ weapons/projectile.qc // TODO
 ../warpzonelib/common.qc
 ../warpzonelib/util_server.qc
 
-../../mod/client/progs.inc
+../mod/client/progs.inc
index 3de5bc9e3da82c7a6631ecaa95290b3138261258..cfa6346dc44178904f2003208d28e4a63198bb1e 100644 (file)
@@ -38,15 +38,11 @@ int _Movetype_FlyMove(float dt, bool applygravity, vector stepnormal, float step
        int i, j, numplanes = 0;
        float time_left = dt, grav = 0;
        vector push;
-       vector primal_velocity, original_velocity, new_velocity = '0 0 0', restore_velocity;
+       vector primal_velocity, original_velocity, restore_velocity;
 
-       for(i = 0; i <= MAX_CLIP_PLANES; ++i)
+       for(i = 0; i < MAX_CLIP_PLANES; ++i)
                planes[i] = '0 0 0';
 
-       grav = 0;
-
-       restore_velocity = self.move_velocity;
-
        if(applygravity)
        {
                self.move_didgravity = 1;
@@ -61,15 +57,17 @@ int _Movetype_FlyMove(float dt, bool applygravity, vector stepnormal, float step
                }
        }
 
-       original_velocity = primal_velocity = self.move_velocity;
+       original_velocity = primal_velocity = restore_velocity = self.move_velocity;
 
        for(bumpcount = 0;bumpcount < MAX_CLIP_PLANES;bumpcount++)
        {
-               if(!self.move_velocity_x && !self.move_velocity_y && !self.move_velocity_z)
+               if(self.move_velocity == '0 0 0')
                        break;
 
                push = self.move_velocity * time_left;
-               if(!_Movetype_PushEntity(push, false))
+               vector prev_origin = self.move_origin;
+               _Movetype_PushEntity(push, true);
+               if(trace_startsolid && self.move_origin != prev_origin)
                {
                        // we got teleported by a touch function
                        // let's abort the move
@@ -87,6 +85,10 @@ int _Movetype_FlyMove(float dt, bool applygravity, vector stepnormal, float step
 
                if(trace_fraction == 1)
                        break;
+
+               float my_trace_fraction = trace_fraction;
+               vector my_trace_plane_normal = trace_plane_normal;
+
                if(trace_plane_normal_z)
                {
                        if(trace_plane_normal_z > 0.7)
@@ -107,45 +109,40 @@ int _Movetype_FlyMove(float dt, bool applygravity, vector stepnormal, float step
                else if(stepheight)
                {
                        // step - handle it immediately
-                       vector org;
-                       vector steppush;
-                       //Con_Printf("step %f %f %f : ", self.move_origin_x, PRVM_serveredictvector(ent, origin)[1], PRVM_serveredictvector(ent, origin)[2]);
-                       steppush = '0 0 1' * stepheight;
-                       org = self.move_origin;
-                       if(!_Movetype_PushEntity(steppush, false))
+                       vector org = self.move_origin;
+                       vector steppush = '0 0 1' * stepheight;
+
+                       _Movetype_PushEntity(steppush, true);
+                       if(trace_startsolid && self.move_origin != org)
                        {
                                blocked |= 8;
                                break;
                        }
-                       //Con_Printf("%f %f %f : ", self.move_origin_x, PRVM_serveredictvector(ent, origin)[1], PRVM_serveredictvector(ent, origin)[2]);
-                       if(!_Movetype_PushEntity(push, false))
+                       _Movetype_PushEntity(push, true);
+                       if(trace_startsolid && self.move_origin != org)
                        {
                                blocked |= 8;
                                break;
                        }
                        float trace2_fraction = trace_fraction;
-                       //Con_Printf("%f %f %f : ", self.move_origin_x, PRVM_serveredictvector(ent, origin)[1], PRVM_serveredictvector(ent, origin)[2]);
                        steppush = '0 0 1' * (org_z - self.move_origin_z);
-                       if(!_Movetype_PushEntity(steppush, false))
+                       _Movetype_PushEntity(steppush, true);
+                       if(trace_startsolid && self.move_origin != org)
                        {
                                blocked |= 8;
                                break;
                        }
-                       //Con_Printf("%f %f %f : ", self.move_origin_x, PRVM_serveredictvector(ent, origin)[1], PRVM_serveredictvector(ent, origin)[2]);
+
                        // accept the new position if it made some progress...
                        if(fabs(self.move_origin_x - org_x) >= 0.03125 || fabs(self.move_origin_y - org_y) >= 0.03125)
                        {
-                               //Con_Printf("accepted (delta %f %f %f)\n", self.move_origin_x - org_x, PRVM_serveredictvector(ent, origin)[1] - org[1], PRVM_serveredictvector(ent, origin)[2] - org[2]);
                                trace_endpos = self.move_origin;
                                time_left *= 1 - trace2_fraction;
                                numplanes = 0;
                                continue;
                        }
                        else
-                       {
-                               //Con_Printf("REJECTED (delta %f %f %f)\n", self.move_origin_x - org_x, PRVM_serveredictvector(ent, origin)[1] - org[1], PRVM_serveredictvector(ent, origin)[2] - org[2]);
                                self.move_origin = org;
-                       }
                }
                else
                {
@@ -155,14 +152,15 @@ int _Movetype_FlyMove(float dt, bool applygravity, vector stepnormal, float step
                        if(stepnormal)
                                stepnormal = trace_plane_normal;
                }
-               if(trace_fraction >= 0.001)
+
+               if(my_trace_fraction >= 0.001)
                {
                        // actually covered some distance
                        original_velocity = self.move_velocity;
                        numplanes = 0;
                }
 
-               time_left *= 1 - trace_fraction;
+               time_left *= 1 - my_trace_fraction;
 
                // clipped to another plane
                if(numplanes >= MAX_CLIP_PLANES)
@@ -173,10 +171,11 @@ int _Movetype_FlyMove(float dt, bool applygravity, vector stepnormal, float step
                        break;
                }
 
-               planes[numplanes] = trace_plane_normal;
+               planes[numplanes] = my_trace_plane_normal;
                numplanes++;
 
                // modify original_velocity so it parallels all of the clip planes
+               vector new_velocity = '0 0 0';
                for (i = 0;i < numplanes;i++)
                {
                        new_velocity = _Movetype_ClipVelocity(original_velocity, planes[i], 1);
@@ -207,10 +206,7 @@ int _Movetype_FlyMove(float dt, bool applygravity, vector stepnormal, float step
                                blocked = 7;
                                break;
                        }
-                       vector dir;
-                       dir.x = planes[0].y * planes[1].z - planes[0].z * planes[1].y;
-                       dir.y = planes[0].z * planes[1].x - planes[0].x * planes[1].z;
-                       dir.z = planes[0].x * planes[1].y - planes[0].y * planes[1].x;
+                       vector dir = cross(planes[0], planes[1]);
                        // LordHavoc: thanks to taniwha of QuakeForge for pointing out this fix for slowed falling in corners
                        float ilength = sqrt((dir * dir));
                        if(ilength)
index fa376277c8808c282c95fe3bd0e5854021194d05..0f18a47bfc6ee4bcc487f464ddd6eeb625e615ef 100644 (file)
@@ -89,7 +89,11 @@ void _Movetype_Physics_Walk(float dt)  // SV_WalkMove
 
                // move up
                vector upmove = '0 0 1' * PHYS_STEPHEIGHT;
-               if (!_Movetype_PushEntity(upmove, true))
+               vector prev_origin = self.move_origin;
+               _Movetype_PushEntity(upmove, true);
+               if(wasfreed(self))
+                       return;
+               if(trace_startsolid && self.move_origin != prev_origin)
                {
                        // we got teleported when upstepping... must abort the move
                        return;
@@ -130,7 +134,7 @@ void _Movetype_Physics_Walk(float dt)  // SV_WalkMove
                // Con_Printf("step - ");
 
                // extra friction based on view angle
-               if (clip & 2 && PHYS_WALLFRICTION)
+               if ((clip & 2) && PHYS_WALLFRICTION)
                        _Movetype_WallFriction(stepnormal);
        }
        // don't do the down move if stepdown is disabled, moving upward, not in water, or the move started offground or ended onground
@@ -141,7 +145,12 @@ void _Movetype_Physics_Walk(float dt)  // SV_WalkMove
 
        // move down
        vector downmove = '0 0 1' * (-PHYS_STEPHEIGHT + start_velocity.z * dt);
-       if (!_Movetype_PushEntity(downmove, true))
+       vector prev_origin = self.move_origin;
+       _Movetype_PushEntity(downmove, true);
+       if(wasfreed(self))
+               return;
+
+       if(trace_startsolid && self.move_origin != prev_origin)
        {
                // we got teleported when downstepping... must abort the move
                return;
index c1bb62da15d699c1e488bc289409b93c46b3b1f1..2015acb5f8cda0d73408d9794465873fbf1b5aa6 100644 (file)
@@ -239,13 +239,7 @@ float spritelookupblinkvalue(string s)
     }
     if (s == WP_Item.netname) return ITEMS[self.wp_extra].m_waypointblink;
 
-    switch (s)
-    {
-        case "item-invis":       return 2;
-        case "item-extralife":   return 2;
-        case "item-speed":       return 2;
-        default:                 return 1;
-    }
+    return 1;
 }
 
 vector spritelookupcolor(string s, vector def)
@@ -269,13 +263,7 @@ string spritelookuptext(string s)
         return it.m_name;
     ));
 
-    switch (s)
-    {
-        case "item-invis": return _("Invisibility");
-        case "item-extralife": return _("Extra life");
-        case "item-speed": return _("Speed");
-        default: return s;
-    }
+    return s;
 }
 #endif
 
index 92b10fa4cf374a8b5658b5aa51cc7cf38db073c9..158d4f51b3dad4178ac10b55215412985b3183a9 100644 (file)
@@ -29,4 +29,4 @@ xonotic/util.qc
 ../common/weapons/all.qc
 
 
-../../mod/menu/progs.inc
+../mod/menu/progs.inc
diff --git a/qcsrc/mod/client/main.qc b/qcsrc/mod/client/main.qc
new file mode 100644 (file)
index 0000000..d84239c
--- /dev/null
@@ -0,0 +1,9 @@
+REGISTER_MUTATOR(mutator_mod, cvar("g_mod"));
+
+MUTATOR_HOOKFUNCTION(mutator_mod, BuildMutatorsString) {
+    ret_string = strcat(ret_string, ":mod");
+}
+
+MUTATOR_HOOKFUNCTION(mutator_mod, BuildMutatorsPrettyString) {
+    ret_string = strcat(ret_string, ", Mod");
+}
diff --git a/qcsrc/mod/client/progs.inc b/qcsrc/mod/client/progs.inc
new file mode 100644 (file)
index 0000000..ae91a9e
--- /dev/null
@@ -0,0 +1,3 @@
+#if BUILD_MOD
+#include "main.qc"
+#endif
diff --git a/qcsrc/mod/menu/main.qc b/qcsrc/mod/menu/main.qc
new file mode 100644 (file)
index 0000000..d84239c
--- /dev/null
@@ -0,0 +1,9 @@
+REGISTER_MUTATOR(mutator_mod, cvar("g_mod"));
+
+MUTATOR_HOOKFUNCTION(mutator_mod, BuildMutatorsString) {
+    ret_string = strcat(ret_string, ":mod");
+}
+
+MUTATOR_HOOKFUNCTION(mutator_mod, BuildMutatorsPrettyString) {
+    ret_string = strcat(ret_string, ", Mod");
+}
diff --git a/qcsrc/mod/menu/progs.inc b/qcsrc/mod/menu/progs.inc
new file mode 100644 (file)
index 0000000..ae91a9e
--- /dev/null
@@ -0,0 +1,3 @@
+#if BUILD_MOD
+#include "main.qc"
+#endif
diff --git a/qcsrc/mod/server/main.qc b/qcsrc/mod/server/main.qc
new file mode 100644 (file)
index 0000000..d84239c
--- /dev/null
@@ -0,0 +1,9 @@
+REGISTER_MUTATOR(mutator_mod, cvar("g_mod"));
+
+MUTATOR_HOOKFUNCTION(mutator_mod, BuildMutatorsString) {
+    ret_string = strcat(ret_string, ":mod");
+}
+
+MUTATOR_HOOKFUNCTION(mutator_mod, BuildMutatorsPrettyString) {
+    ret_string = strcat(ret_string, ", Mod");
+}
diff --git a/qcsrc/mod/server/progs.inc b/qcsrc/mod/server/progs.inc
new file mode 100644 (file)
index 0000000..ae91a9e
--- /dev/null
@@ -0,0 +1,3 @@
+#if BUILD_MOD
+#include "main.qc"
+#endif
index ee9c6de8cebe2c8e9319168997d24b6d97880b16..9aecd0e4e7e9917cbbd12bf1a04b359c8f9ad85e 100644 (file)
@@ -7,19 +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;
@@ -140,7 +150,7 @@ MUTATOR_HOOKFUNCTION(instagib_MonsterSpawn)
 
 MUTATOR_HOOKFUNCTION(instagib_BotShouldAttack)
 {
-       if(checkentity.items & ITEM_Strength.m_itemid)
+       if (checkentity.items & ITEM_Invisibility.m_itemid)
                return true;
 
        return false;
@@ -175,14 +185,14 @@ MUTATOR_HOOKFUNCTION(instagib_PlayerPowerups)
        if (!(self.effects & EF_FULLBRIGHT))
                self.effects |= EF_FULLBRIGHT;
 
-       if (self.items & ITEM_Strength.m_itemid)
+       if (self.items & ITEM_Invisibility.m_itemid)
        {
                play_countdown(self.strength_finished, "misc/poweroff.wav");
                if (time > self.strength_finished)
                {
                        self.alpha = default_player_alpha;
                        self.exteriorweaponentity.alpha = default_weapon_alpha;
-                       self.items &= ~ITEM_Strength.m_itemid;
+                       self.items &= ~ITEM_Invisibility.m_itemid;
                        Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_POWERDOWN_INVISIBILITY);
                }
        }
@@ -192,18 +202,18 @@ MUTATOR_HOOKFUNCTION(instagib_PlayerPowerups)
                {
                        self.alpha = autocvar_g_instagib_invis_alpha;
                        self.exteriorweaponentity.alpha = autocvar_g_instagib_invis_alpha;
-                       self.items |= ITEM_Strength.m_itemid;
+                       self.items |= ITEM_Invisibility.m_itemid;
                        Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_POWERUP_INVISIBILITY, self.netname);
                        Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_POWERUP_INVISIBILITY);
                }
        }
 
-       if (self.items & ITEM_Shield.m_itemid)
+       if (self.items & ITEM_Speed.m_itemid)
        {
                play_countdown(self.invincible_finished, "misc/poweroff.wav");
                if (time > self.invincible_finished)
                {
-                       self.items &= ~ITEM_Shield.m_itemid;
+                       self.items &= ~ITEM_Speed.m_itemid;
                        Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_POWERDOWN_SPEED);
                }
        }
@@ -211,7 +221,7 @@ MUTATOR_HOOKFUNCTION(instagib_PlayerPowerups)
        {
                if (time < self.invincible_finished)
                {
-                       self.items |= ITEM_Shield.m_itemid;
+                       self.items |= ITEM_Speed.m_itemid;
                        Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_POWERUP_SPEED, self.netname);
                        Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_POWERUP_SPEED);
                }
@@ -221,7 +231,7 @@ MUTATOR_HOOKFUNCTION(instagib_PlayerPowerups)
 
 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;
@@ -305,7 +315,7 @@ MUTATOR_HOOKFUNCTION(instagib_PlayerDamage)
                frag_mirrordamage = 0;
        }
 
-       if((frag_target.buffs & BUFF_INVISIBLE.m_itemid) || (frag_target.items & ITEM_Strength.m_itemid))
+       if((frag_target.buffs & BUFF_INVISIBLE.m_itemid) || (frag_target.items & ITEM_Invisibility.m_itemid))
                yoda = 1;
 
        return false;
@@ -369,24 +379,13 @@ MUTATOR_HOOKFUNCTION(instagib_CustomizeWaypoint)
 
        // if you have the invisibility powerup, sprites ALWAYS are restricted to your team
        // but only apply this to real players, not to spectators
-       if((self.owner.flags & FL_CLIENT) && (self.owner.items & ITEM_Strength.m_itemid) && (e == other))
+       if((self.owner.flags & FL_CLIENT) && (self.owner.items & ITEM_Invisibility.m_itemid) && (e == other))
        if(DIFF_TEAM(self.owner, e))
                return true;
 
        return false;
 }
 
-MUTATOR_HOOKFUNCTION(instagib_ItemCountdown)
-{SELFPARAM();
-       switch (self.items)
-       {
-               case ITEM_Strength.m_itemid:  item_name = "item-invis";     item_color = '0 0 1'; break;
-               case ITEM_ExtraLife.m_itemid: item_name = "item-extralife"; item_color = '1 0 0'; break;
-               case ITEM_Shield.m_itemid:    item_name = "item-speed";     item_color = '1 0 1'; break;
-       }
-       return false;
-}
-
 MUTATOR_HOOKFUNCTION(instagib_PlayerDies)
 {      
        if(DEATH_ISWEAPON(frag_deathtype, WEP_VAPORIZER.m_id))
@@ -427,17 +426,19 @@ 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();
 
-       if(random() < 0.3)
-               e.think = spawnfunc_item_strength;
-       else if(random() < 0.6)
-               e.think = instagib_health_mega;
+       float r = random();
+       if (r < 0.3)
+               e.think = instagib_invisibility;
+       else if (r < 0.6)
+               e.think = instagib_extralife;
        else
-               e.think = spawnfunc_item_invincible;
+               e.think = instagib_speed;
 
        e.nextthink = time + 0.1;
        e.spawnflags = self.spawnflags;
@@ -479,7 +480,6 @@ MUTATOR_DEFINITION(mutator_instagib)
        MUTATOR_HOOK(ItemTouch, instagib_ItemTouch, CBC_ORDER_ANY);
        MUTATOR_HOOK(FilterItem, instagib_FilterItem, CBC_ORDER_ANY);
        MUTATOR_HOOK(CustomizeWaypoint, instagib_CustomizeWaypoint, CBC_ORDER_ANY);
-       MUTATOR_HOOK(Item_RespawnCountdown, instagib_ItemCountdown, CBC_ORDER_ANY);
        MUTATOR_HOOK(PlayerDies, instagib_PlayerDies, CBC_ORDER_ANY);
        MUTATOR_HOOK(PlayerDamage_SplitHealthArmor, instagib_SplitHealthArmor, CBC_ORDER_ANY);
        MUTATOR_HOOK(PlayerPowerups, instagib_PlayerPowerups, CBC_ORDER_ANY);
index 7a6f255efe3dc051f6f4d131a5bbc362f8add97a..8beec7db2de94177af6921f1592058842cc9d704 100644 (file)
@@ -21,10 +21,32 @@ REGISTER_ITEM(VaporizerCells, Ammo) {
 REGISTER_ITEM(ExtraLife, Powerup) {
     this.m_model                =   "g_h100.md3";
     this.m_sound                =   "misc/megahealth.wav";
-    this.m_name                 =   "Extralife";
+    this.m_name                 =   "Extra life";
     this.m_icon                 =   "item_mega_health";
-#ifdef SVQC
+    this.m_color                =   '1 0 0';
+    this.m_waypoint             =   _("Extra life");
+    this.m_waypointblink        =   2;
     this.m_itemid               =   IT_NAILS;
-    this.m_botvalue             =   BOT_PICKUP_RATING_HIGH;
-#endif
+}
+
+REGISTER_ITEM(Invisibility, Powerup) {
+    this.m_model            =   "g_strength.md3";
+    this.m_sound            =   "misc/powerup.wav";
+    this.m_name             =   "Invisibility";
+    this.m_icon             =   "strength";
+    this.m_color            =   '0 0 1';
+    this.m_waypoint         =   _("Invisibility");
+    this.m_waypointblink    =   2;
+    this.m_itemid           =   IT_STRENGTH;
+}
+
+REGISTER_ITEM(Speed, Powerup) {
+    this.m_model            =   "g_invincible.md3";
+    this.m_sound            =   "misc/powerup_shield.wav";
+    this.m_name             =   "Speed";
+    this.m_icon             =   "shield";
+    this.m_color            =   '1 0 1';
+    this.m_waypoint         =   _("Speed");
+    this.m_waypointblink    =   2;
+    this.m_itemid           =   IT_INVINCIBLE;
 }
index 22afdf4115d0f2b980107de653309720e4a68da5..f9193cbd005a6f405260b189f613e699eca40c01 100644 (file)
@@ -122,4 +122,4 @@ weapons/weaponsystem.qc
 ../warpzonelib/server.qc
 ../warpzonelib/util_server.qc
 
-../../mod/server/progs.inc
+../mod/server/progs.inc