Merge branch 'master' into TimePath/deathtypes 234/head
authorTimePath <andrew.hardaker1995@gmail.com>
Sun, 11 Oct 2015 22:38:36 +0000 (09:38 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Sun, 11 Oct 2015 22:39:59 +0000 (09:39 +1100)
# Conflicts:
# qcsrc/client/damage.qc
# qcsrc/client/hud.qc
# qcsrc/client/main.qc
# qcsrc/client/progs.inc
# qcsrc/common/vehicles/vehicle/raptor_weapons.qc
# qcsrc/common/weapons/all.qc
# qcsrc/server/cheats.qc
# qcsrc/server/g_world.qc
# qcsrc/server/teamplay.qc

53 files changed:
1  2 
qcsrc/client/damage.qc
qcsrc/client/hud.qc
qcsrc/client/main.qc
qcsrc/client/progs.inc
qcsrc/common/monsters/monster/mage.qc
qcsrc/common/monsters/monster/shambler.qc
qcsrc/common/monsters/monster/spider.qc
qcsrc/common/monsters/monster/wyvern.qc
qcsrc/common/monsters/monster/zombie.qc
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/mutators/mutator/instagib/instagib.qc
qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc
qcsrc/common/triggers/func/breakable.qc
qcsrc/common/triggers/misc/laser.qc
qcsrc/common/triggers/teleporters.qc
qcsrc/common/triggers/trigger/swamp.qc
qcsrc/common/util.qc
qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/common/vehicles/vehicle/racer.qc
qcsrc/common/vehicles/vehicle/raptor_weapons.qc
qcsrc/common/weapons/all.qc
qcsrc/server/cheats.qc
qcsrc/server/cl_client.qc
qcsrc/server/cl_player.qc
qcsrc/server/command/cmd.qc
qcsrc/server/command/common.qc
qcsrc/server/g_damage.qc
qcsrc/server/g_damage.qh
qcsrc/server/g_world.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/gamemode.qh
qcsrc/server/mutators/gamemode_ca.qc
qcsrc/server/mutators/gamemode_ctf.qc
qcsrc/server/mutators/gamemode_cts.qc
qcsrc/server/mutators/gamemode_freezetag.qc
qcsrc/server/mutators/gamemode_onslaught.qc
qcsrc/server/mutators/mutator.qh
qcsrc/server/mutators/mutator_bloodloss.qc
qcsrc/server/mutators/mutator_breakablehook.qc
qcsrc/server/mutators/mutator_buffs.qc
qcsrc/server/mutators/mutator_campcheck.qc
qcsrc/server/mutators/mutator_nades.qc
qcsrc/server/mutators/mutator_overkill.qc
qcsrc/server/mutators/mutator_rocketminsta.qc
qcsrc/server/mutators/mutator_touchexplode.qc
qcsrc/server/mutators/mutators_include.qc
qcsrc/server/portals.qc
qcsrc/server/progs.inc
qcsrc/server/race.qc
qcsrc/server/sv_main.qc
qcsrc/server/t_items.qc
qcsrc/server/teamplay.qc
qcsrc/server/weapons/common.qc

@@@ -1,16 -1,9 +1,9 @@@
  #include "damage.qh"
- #include "_all.qh"
  
  #include "gibs.qh"
- #include "../common/vehicles/all.qh"
- #include "../common/constants.qh"
 -#include "../common/deathtypes.qh"
 +#include "../common/deathtypes/all.qh"
- #include "../common/effects/effects.qh"
  #include "../common/movetypes/movetypes.qh"
- #include "../common/util.qh"
+ #include "../common/vehicles/all.qh"
  #include "../common/weapons/all.qh"
  
  .entity tag_entity;
@@@ -6,22 -5,15 +5,15 @@@
  #include "scoreboard.qh"
  #include "teamradar.qh"
  #include "t_items.qh"
- #include "../dpdefs/keycodes.qh"
  #include "../common/buffs/all.qh"
- #include "../common/constants.qh"
 -#include "../common/deathtypes.qh"
 +#include "../common/deathtypes/all.qh"
  #include "../common/items/all.qc"
  #include "../common/mapinfo.qh"
- #include "../common/nades/all.qh"
  #include "../common/mutators/mutator/waypoints/all.qh"
- #include "../server/mutators/gamemode_ctf.qh"
+ #include "../common/nades/all.qh"
  #include "../common/stats.qh"
- #include "../csqcmodellib/cl_player.qh"
+ #include "../lib/csqcmodel/cl_player.qh"
+ #include "../server/mutators/gamemode_ctf.qh"
  
  
  /*
  #include "tuba.qh"
  #include "t_items.qh"
  #include "wall.qh"
- #include "../common/vehicles/all.qh"
- #include "mutators/events.qh"
  #include "weapons/projectile.qh"
- #include "../common/buffs/all.qh"
 -#include "../common/deathtypes.qh"
 +#include "../common/deathtypes/all.qh"
- #include "../common/effects/effects.qh"
+ #include "../common/items/all.qh"
  #include "../common/mapinfo.qh"
- #include "../common/monsters/all.qh"
- #include "../common/nades/all.qh"
+ #include "../common/minigames/cl_minigames.qh"
+ #include "../common/minigames/cl_minigames_hud.qh"
  #include "../common/net_notice.qh"
- #include "../common/notifications.qh"
- #include "../common/stats.qh"
- #include "../common/teams.qh"
- #include "../common/items/all.qh"
- #include "../common/mutators/base.qh"
- #include "../common/weapons/all.qh"
- #include "../csqcmodellib/cl_model.qh"
- #include "../csqcmodellib/interpolate.qh"
  #include "../common/triggers/include.qh"
  #include "../common/turrets/cl_turrets.qh"
- #include "../warpzonelib/client.qh"
+ #include "../common/vehicles/all.qh"
+ #include "../lib/csqcmodel/cl_model.qh"
+ #include "../lib/csqcmodel/interpolate.qh"
+ #include "../lib/warpzone/client.qh"
  
  // --------------------------------------------------------------------------
  // BEGIN REQUIRED CSQC FUNCTIONS
@@@ -148,7 -130,7 +130,6 @@@ void CSQC_Init(void
  
        // needs to be done so early because of the constants they create
        static_init();
-       CALL_ACCUMULATED_FUNCTION(RegisterHUD_Panels);
 -      CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes);
  
        // precaches
  
@@@ -52,7 -48,8 +48,9 @@@
  #include "../common/minigames/cl_minigames.qc"
  
  #include "../common/buffs/all.qc"
 +#include "../common/deathtypes/all.qc"
+ #include "../common/effects/all.qc"
+ #include "../common/gamemodes/all.qc"
  #include "../common/items/all.qc"
  #include "../common/monsters/all.qc"
  #include "../common/mutators/all.qc"
Simple merge
Simple merge
index 0000000,cc6f405..2acb183
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,480 +1,480 @@@
 -                      Damage(self, self, self, 5, DEATH_NOAMMO, self.origin, '0 0 0');
+ #ifndef MUTATOR_INSTAGIB_H
+ #define MUTATOR_INSTAGIB_H
+ #include "items.qc"
+ #endif
+ #ifdef IMPLEMENTATION
+ #ifdef SVQC
+ #include "../../../../server/cl_client.qh"
+ #include "../../../buffs/all.qh"
+ #include "../../../items/all.qc"
+ REGISTER_MUTATOR(mutator_instagib, cvar("g_instagib") && !g_nexball);
+ spawnfunc(item_minst_cells)
+ {
+       if (!g_instagib) { remove(self); return; }
+       if (!self.ammo_cells) self.ammo_cells = autocvar_g_instagib_ammo_drop;
+       StartItemA(ITEM_VaporizerCells);
+ }
+ void instagib_invisibility()
+ {SELFPARAM();
+       self.strength_finished = autocvar_g_balance_powerup_strength_time;
+       StartItemA(ITEM_Invisibility);
+ }
+ void instagib_extralife()
+ {SELFPARAM();
+       self.max_health = 1;
+       StartItemA(ITEM_ExtraLife);
+ }
+ void instagib_speed()
+ {SELFPARAM();
+       self.invincible_finished = autocvar_g_balance_powerup_invincible_time;
+       StartItemA(ITEM_Speed);
+ }
+ .float instagib_nextthink;
+ .float instagib_needammo;
+ void instagib_stop_countdown(entity e)
+ {
+       if (!e.instagib_needammo)
+               return;
+       Kill_Notification(NOTIF_ONE_ONLY, e, MSG_CENTER_CPID, CPID_INSTAGIB_FINDAMMO);
+       e.instagib_needammo = false;
+ }
+ void instagib_ammocheck()
+ {SELFPARAM();
+       if(time < self.instagib_nextthink)
+               return;
+       if(!IS_PLAYER(self))
+               return; // not a player
+       if(self.deadflag || gameover)
+               instagib_stop_countdown(self);
+       else if (self.ammo_cells > 0 || (self.items & IT_UNLIMITED_WEAPON_AMMO) || (self.flags & FL_GODMODE))
+               instagib_stop_countdown(self);
+       else if(autocvar_g_rm && autocvar_g_rm_laser)
+       {
+               if(!self.instagib_needammo)
+               {
+                       Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_INSTAGIB_DOWNGRADE);
+                       self.instagib_needammo = true;
+               }
+       }
+       else
+       {
+               self.instagib_needammo = true;
+               if (self.health <= 5)
+               {
 -                      Damage(self, self, self, 5, DEATH_NOAMMO, self.origin, '0 0 0');
++                      Damage(self, self, self, 5, DEATH_NOAMMO.m_id, self.origin, '0 0 0');
+                       Send_Notification(NOTIF_ONE, self, MSG_ANNCE, ANNCE_INSTAGIB_TERMINATED);
+               }
+               else if (self.health <= 10)
+               {
 -                      Damage(self, self, self, 10, DEATH_NOAMMO, self.origin, '0 0 0');
++                      Damage(self, self, self, 5, DEATH_NOAMMO.m_id, self.origin, '0 0 0');
+                       Send_Notification(NOTIF_ONE, self, MSG_ANNCE, ANNCE_NUM_1);
+               }
+               else if (self.health <= 20)
+               {
 -                      Damage(self, self, self, 10, DEATH_NOAMMO, self.origin, '0 0 0');
++                      Damage(self, self, self, 10, DEATH_NOAMMO.m_id, self.origin, '0 0 0');
+                       Send_Notification(NOTIF_ONE, self, MSG_ANNCE, ANNCE_NUM_2);
+               }
+               else if (self.health <= 30)
+               {
 -                      Damage(self, self, self, 10, DEATH_NOAMMO, self.origin, '0 0 0');
++                      Damage(self, self, self, 10, DEATH_NOAMMO.m_id, self.origin, '0 0 0');
+                       Send_Notification(NOTIF_ONE, self, MSG_ANNCE, ANNCE_NUM_3);
+               }
+               else if (self.health <= 40)
+               {
 -                      Damage(self, self, self, 10, DEATH_NOAMMO, self.origin, '0 0 0');
++                      Damage(self, self, self, 10, DEATH_NOAMMO.m_id, self.origin, '0 0 0');
+                       Send_Notification(NOTIF_ONE, self, MSG_ANNCE, ANNCE_NUM_4);
+               }
+               else if (self.health <= 50)
+               {
 -                      Damage(self, self, self, 10, DEATH_NOAMMO, self.origin, '0 0 0');
++                      Damage(self, self, self, 10, DEATH_NOAMMO.m_id, self.origin, '0 0 0');
+                       Send_Notification(NOTIF_ONE, self, MSG_ANNCE, ANNCE_NUM_5);
+               }
+               else if (self.health <= 60)
+               {
 -                      Damage(self, self, self, 10, DEATH_NOAMMO, self.origin, '0 0 0');
++                      Damage(self, self, self, 10, DEATH_NOAMMO.m_id, self.origin, '0 0 0');
+                       Send_Notification(NOTIF_ONE, self, MSG_ANNCE, ANNCE_NUM_6);
+               }
+               else if (self.health <= 70)
+               {
 -                      Damage(self, self, self, 10, DEATH_NOAMMO, self.origin, '0 0 0');
++                      Damage(self, self, self, 10, DEATH_NOAMMO.m_id, self.origin, '0 0 0');
+                       Send_Notification(NOTIF_ONE, self, MSG_ANNCE, ANNCE_NUM_7);
+               }
+               else if (self.health <= 80)
+               {
 -                      Damage(self, self, self, 10, DEATH_NOAMMO, self.origin, '0 0 0');
++                      Damage(self, self, self, 10, DEATH_NOAMMO.m_id, self.origin, '0 0 0');
+                       Send_Notification(NOTIF_ONE, self, MSG_ANNCE, ANNCE_NUM_8);
+               }
+               else if (self.health <= 90)
+               {
+                       Send_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER, CENTER_INSTAGIB_FINDAMMO);
 -                      Damage(self, self, self, 10, DEATH_NOAMMO, self.origin, '0 0 0');
++                      Damage(self, self, self, 10, DEATH_NOAMMO.m_id, self.origin, '0 0 0');
+                       Send_Notification(NOTIF_ONE, self, MSG_ANNCE, ANNCE_NUM_9);
+               }
+               else
+               {
+                       Send_Notification(NOTIF_ONE_ONLY, self, MSG_MULTI, MULTI_INSTAGIB_FINDAMMO);
 -              if(frag_deathtype == DEATH_FALL)
++                      Damage(self, self, self, 10, DEATH_NOAMMO.m_id, self.origin, '0 0 0');
+               }
+       }
+       self.instagib_nextthink = time + 1;
+ }
+ MUTATOR_HOOKFUNCTION(mutator_instagib, MatchEnd)
+ {
+       entity head;
+       FOR_EACH_PLAYER(head)
+               instagib_stop_countdown(head);
+       return false;
+ }
+ MUTATOR_HOOKFUNCTION(mutator_instagib, MonsterDropItem)
+ {
+       other.monster_loot = spawnfunc_item_minst_cells;
+       return false;
+ }
+ MUTATOR_HOOKFUNCTION(mutator_instagib, MonsterSpawn)
+ {SELFPARAM();
+       // always refill ammo
+       if(self.monsterid == MON_MAGE.monsterid)
+               self.skin = 1;
+       return false;
+ }
+ MUTATOR_HOOKFUNCTION(mutator_instagib, BotShouldAttack)
+ {
+       if (checkentity.items & ITEM_Invisibility.m_itemid)
+               return true;
+       return false;
+ }
+ MUTATOR_HOOKFUNCTION(mutator_instagib, MakePlayerObserver)
+ {SELFPARAM();
+       instagib_stop_countdown(self);
+       return false;
+ }
+ MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerSpawn)
+ {SELFPARAM();
+       self.effects |= EF_FULLBRIGHT;
+       return false;
+ }
+ MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerPreThink)
+ {
+       instagib_ammocheck();
+       return false;
+ }
+ MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerRegen)
+ {
+       // no regeneration in instagib
+       return true;
+ }
+ MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerPowerups)
+ {SELFPARAM();
+       if (!(self.effects & EF_FULLBRIGHT))
+               self.effects |= EF_FULLBRIGHT;
+       if (self.items & ITEM_Invisibility.m_itemid)
+       {
+               play_countdown(self.strength_finished, SND(POWEROFF));
+               if (time > self.strength_finished)
+               {
+                       self.alpha = default_player_alpha;
+                       self.exteriorweaponentity.alpha = default_weapon_alpha;
+                       self.items &= ~ITEM_Invisibility.m_itemid;
+                       Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_POWERDOWN_INVISIBILITY);
+               }
+       }
+       else
+       {
+               if (time < self.strength_finished)
+               {
+                       self.alpha = autocvar_g_instagib_invis_alpha;
+                       self.exteriorweaponentity.alpha = autocvar_g_instagib_invis_alpha;
+                       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_Speed.m_itemid)
+       {
+               play_countdown(self.invincible_finished, SND(POWEROFF));
+               if (time > self.invincible_finished)
+               {
+                       self.items &= ~ITEM_Speed.m_itemid;
+                       Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_POWERDOWN_SPEED);
+               }
+       }
+       else
+       {
+               if (time < self.invincible_finished)
+               {
+                       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);
+               }
+       }
+       return false;
+ }
+ .float stat_sv_maxspeed;
+ MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerPhysics)
+ {SELFPARAM();
+       if(self.items & ITEM_Speed.m_itemid)
+               self.stat_sv_maxspeed = self.stat_sv_maxspeed * autocvar_g_instagib_speed_highspeed;
+       return false;
+ }
+ MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerDamage_SplitHealthArmor)
+ {
+       damage_save = 0;
+       damage_take = frag_damage;
+       return false;
+ }
+ MUTATOR_HOOKFUNCTION(mutator_instagib, ForbidThrowCurrentWeapon)
+ {
+       // weapon dropping on death handled by FilterItem
+       return true;
+ }
+ MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerDamage_Calculate)
+ {
+       if(autocvar_g_friendlyfire == 0 && SAME_TEAM(frag_target, frag_attacker) && IS_PLAYER(frag_target) && IS_PLAYER(frag_attacker))
+               frag_damage = 0;
+       if(IS_PLAYER(frag_target))
+       {
 -              switch(frag_deathtype)
++              if(frag_deathtype == DEATH_FALL.m_id)
+                       frag_damage = 0; // never count fall damage
+               if(!autocvar_g_instagib_damagedbycontents)
 -              if(DEATH_ISWEAPON(frag_deathtype, WEP_VAPORIZER.m_id))
++              switch(DEATH_ENT(frag_deathtype))
+               {
+                       case DEATH_DROWN:
+                       case DEATH_SLIME:
+                       case DEATH_LAVA:
+                               frag_damage = 0;
+                               break;
+               }
+               if(IS_PLAYER(frag_attacker))
 -              if(IS_PLAYER(frag_attacker) && DEATH_ISWEAPON(frag_deathtype, WEP_BLASTER.m_id))
++              if(DEATH_ISWEAPON(frag_deathtype, WEP_VAPORIZER))
+               {
+                       if(frag_target.armorvalue)
+                       {
+                               frag_target.armorvalue -= 1;
+                               frag_damage = 0;
+                               frag_target.damage_dealt += 1;
+                               frag_attacker.damage_dealt += 1; // TODO: change this to a specific hitsound for armor hit
+                               Send_Notification(NOTIF_ONE, frag_target, MSG_CENTER, CENTER_INSTAGIB_LIVES_REMAINING, frag_target.armorvalue);
+                       }
+               }
 -      if(DEATH_ISWEAPON(frag_deathtype, WEP_VAPORIZER.m_id))
++              if(IS_PLAYER(frag_attacker) && DEATH_ISWEAPON(frag_deathtype, WEP_BLASTER))
+               {
+                       if(frag_deathtype & HITTYPE_SECONDARY)
+                       {
+                               if(!autocvar_g_instagib_blaster_keepdamage)
+                                       frag_damage = frag_mirrordamage = 0;
+                               if(frag_target != frag_attacker)
+                               {
+                                       if(frag_damage <= 0 && frag_target.health > 0) { Send_Notification(NOTIF_ONE, frag_attacker, MSG_CENTER, CENTER_SECONDARY_NODAMAGE); }
+                                       if(!autocvar_g_instagib_blaster_keepforce)
+                                               frag_force = '0 0 0';
+                               }
+                       }
+               }
+       }
+       if(IS_PLAYER(frag_attacker))
+       if(frag_mirrordamage > 0)
+       {
+               // just lose extra LIVES, don't kill the player for mirror damage
+               if(frag_attacker.armorvalue > 0)
+               {
+                       frag_attacker.armorvalue -= 1;
+                       Send_Notification(NOTIF_ONE, frag_attacker, MSG_CENTER, CENTER_INSTAGIB_LIVES_REMAINING, frag_attacker.armorvalue);
+                       frag_attacker.damage_dealt += frag_mirrordamage;
+               }
+               frag_mirrordamage = 0;
+       }
+       if((frag_target.buffs & BUFF_INVISIBLE.m_itemid) || (frag_target.items & ITEM_Invisibility.m_itemid))
+               yoda = 1;
+       return false;
+ }
+ MUTATOR_HOOKFUNCTION(mutator_instagib, SetStartItems)
+ {
+       start_health       = warmup_start_health       = 100;
+       start_armorvalue   = warmup_start_armorvalue   = 0;
+       start_ammo_shells  = warmup_start_ammo_shells  = 0;
+       start_ammo_nails   = warmup_start_ammo_nails   = 0;
+       start_ammo_cells   = warmup_start_ammo_cells   = cvar("g_instagib_ammo_start");
+       start_ammo_plasma  = warmup_start_ammo_plasma  = 0;
+       start_ammo_rockets = warmup_start_ammo_rockets = 0;
+       start_ammo_fuel    = warmup_start_ammo_fuel    = 0;
+       start_weapons = warmup_start_weapons = WEPSET(VAPORIZER);
+       start_items |= IT_UNLIMITED_SUPERWEAPONS;
+       return false;
+ }
+ MUTATOR_HOOKFUNCTION(mutator_instagib, FilterItem)
+ {SELFPARAM();
+       if(self.classname == "item_cells")
+               return true; // no normal cells?
+       if(self.weapon == WEP_VAPORIZER.m_id && self.classname == "droppedweapon")
+       {
+               self.ammo_cells = autocvar_g_instagib_ammo_drop;
+               return false;
+       }
+       if(self.weapon == WEP_DEVASTATOR.m_id || self.weapon == WEP_VORTEX.m_id)
+       {
+               entity e = spawn();
+               setorigin(e, self.origin);
+               e.noalign = self.noalign;
+         e.cnt = self.cnt;
+         e.team = self.team;
+               WITH(entity, self, e, spawnfunc_item_minst_cells(e));
+               return true;
+       }
+       if(self.flags & FL_POWERUP)
+               return false;
+       if(self.ammo_cells > autocvar_g_instagib_ammo_drop && self.classname != "item_minst_cells")
+               self.ammo_cells = autocvar_g_instagib_ammo_drop;
+       if(self.ammo_cells && !self.weapon)
+               return false;
+       return true;
+ }
+ MUTATOR_HOOKFUNCTION(mutator_instagib, CustomizeWaypoint)
+ {SELFPARAM();
+       entity e = WaypointSprite_getviewentity(other);
+       // 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_Invisibility.m_itemid) && (e == other))
+       if(DIFF_TEAM(self.owner, e))
+               return true;
+       return false;
+ }
+ MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerDies)
+ {
++      if(DEATH_ISWEAPON(frag_deathtype, WEP_VAPORIZER))
+               frag_damage = 1000; // always gib if it was a vaporizer death
+       return FALSE;
+ }
+ MUTATOR_HOOKFUNCTION(mutator_instagib, ItemTouch)
+ {SELFPARAM();
+       if(self.ammo_cells)
+       {
+               // play some cool sounds ;)
+               if (IS_CLIENT(other))
+               {
+                       if(other.health <= 5)
+                               Send_Notification(NOTIF_ONE, other, MSG_ANNCE, ANNCE_INSTAGIB_LASTSECOND);
+                       else if(other.health < 50)
+                               Send_Notification(NOTIF_ONE, other, MSG_ANNCE, ANNCE_INSTAGIB_NARROWLY);
+               }
+               if(other.health < 100)
+                       other.health = 100;
+               return MUT_ITEMTOUCH_CONTINUE;
+       }
+       if(self.max_health)
+       {
+               other.armorvalue = bound(other.armorvalue, 999, other.armorvalue + autocvar_g_instagib_extralives);
+               Send_Notification(NOTIF_ONE, other, MSG_CENTER, CENTER_EXTRALIVES);
+               return MUT_ITEMTOUCH_PICKUP;
+       }
+       return MUT_ITEMTOUCH_CONTINUE;
+ }
+ MUTATOR_HOOKFUNCTION(mutator_instagib, OnEntityPreSpawn)
+ {SELFPARAM();
+       if (!autocvar_g_powerups) { return false; }
+       // Can't use .itemdef here
+       if (!(self.classname == "item_strength" || self.classname == "item_invincible" || self.classname == "item_health_mega"))
+               return false;
+       entity e = spawn();
+       float r = random();
+       if (r < 0.3)
+               e.think = instagib_invisibility;
+       else if (r < 0.6)
+               e.think = instagib_extralife;
+       else
+               e.think = instagib_speed;
+       e.nextthink = time + 0.1;
+       e.spawnflags = self.spawnflags;
+       e.noalign = self.noalign;
+       setorigin(e, self.origin);
+       return true;
+ }
+ MUTATOR_HOOKFUNCTION(mutator_instagib, BuildMutatorsString)
+ {
+       ret_string = strcat(ret_string, ":instagib");
+       return false;
+ }
+ MUTATOR_HOOKFUNCTION(mutator_instagib, BuildMutatorsPrettyString)
+ {
+       ret_string = strcat(ret_string, ", instagib");
+       return false;
+ }
+ MUTATOR_HOOKFUNCTION(mutator_instagib, SetModname)
+ {
+       modname = "instagib";
+       return true;
+ }
+ #endif
+ #endif
Simple merge
Simple merge
@@@ -1,11 -1,10 +1,10 @@@
  #if defined(CSQC)
  #elif defined(MENUQC)
  #elif defined(SVQC)
-       #include "../../../server/_all.qh"
-     #include "../../../warpzonelib/util_server.qh"
+     #include "../../../lib/warpzone/util_server.qh"
      #include "../../weapons/all.qh"
      #include "../../../server/defs.qh"
 -    #include "../../deathtypes.qh"
 +    #include "../../deathtypes/all.qh"
  #endif
  
  /*
@@@ -7,11 -6,9 +6,9 @@@
        #include "../client/mutators/events.qh"
      #include "mapinfo.qh"
      #include "notifications.qh"
 -    #include "deathtypes.qh"
 +    #include "deathtypes/all.qh"
  #elif defined(MENUQC)
  #elif defined(SVQC)
-       #include "../dpdefs/progsdefs.qh"
-     #include "../dpdefs/dpextensions.qh"
      #include "constants.qh"
      #include "../server/autocvars.qh"
      #include "../server/defs.qh"
Simple merge
@@@ -73,7 -73,7 +73,7 @@@ METHOD(RaptorCannon, wr_think, void(ent
          vehicles_projectile(EFFECT_RAPTOR_MUZZLEFLASH.eent_eff_name, SND(LASERGUN_FIRE),
                                 org, normalize(dir + randomvec() * autocvar_g_vehicle_raptor_cannon_spread) * autocvar_g_vehicle_raptor_cannon_speed,
                                 autocvar_g_vehicle_raptor_cannon_damage, autocvar_g_vehicle_raptor_cannon_radius, autocvar_g_vehicle_raptor_cannon_force,  0,
-                                DEATH_VH_RAPT_CANNON.m_id, PROJECTILE_RAPTORCANNON, 0, true, true, veh ? veh : player);
 -                               DEATH_VH_RAPT_CANNON, PROJECTILE_RAPTORCANNON, 0, true, true, player);
++                               DEATH_VH_RAPT_CANNON.m_id, PROJECTILE_RAPTORCANNON, 0, true, true, player);
          weapon_thinkf(player, WFRAME_FIRE1, 0, w_ready);
      }
  }
        #include "../util.qh"
        #include "../buffs/all.qh"
        #include "../../client/autocvars.qh"
 -      #include "../deathtypes.qh"
 +      #include "../deathtypes/all.qh"
-       #include "../../csqcmodellib/interpolate.qh"
+       #include "../../lib/csqcmodel/interpolate.qh"
        #include "../movetypes/movetypes.qh"
        #include "../../client/main.qh"
-       #include "../../csqcmodellib/cl_model.qh"
+       #include "../../lib/csqcmodel/cl_model.qh"
  #elif defined(MENUQC)
  #elif defined(SVQC)
-       #include "../../dpdefs/progsdefs.qh"
-     #include "../../dpdefs/dpextensions.qh"
-     #include "../../warpzonelib/anglestransform.qh"
-     #include "../../warpzonelib/common.qh"
-     #include "../../warpzonelib/util_server.qh"
-     #include "../../warpzonelib/server.qh"
+     #include "../../lib/warpzone/anglestransform.qh"
+     #include "../../lib/warpzone/common.qh"
+     #include "../../lib/warpzone/util_server.qh"
+     #include "../../lib/warpzone/server.qh"
      #include "../constants.qh"
      #include "../stats.qh"
      #include "../teams.qh"
@@@ -10,8 -9,7 +9,7 @@@
  #include "weapons/tracing.qh"
  
  #include "../common/constants.qh"
 -#include "../common/deathtypes.qh"
 +#include "../common/deathtypes/all.qh"
- #include "../common/effects/effects.qh"
  #include "../common/util.qh"
  
  #include "../common/monsters/all.qh"
Simple merge
  #include "command/common.qh"
  #include "../common/animdecide.qh"
  #include "../common/csqcmodel_settings.qh"
 -#include "../common/deathtypes.qh"
 +#include "../common/deathtypes/all.qh"
  #include "../common/triggers/subs.qh"
  #include "../common/playerstats.qh"
- #include "../csqcmodellib/sv_model.qh"
+ #include "../lib/csqcmodel/sv_model.qh"
  
  #include "../common/minigames/sv_minigames.qh"
  
  #endif
  
  #include "../../common/constants.qh"
 -#include "../../common/deathtypes.qh"
 +#include "../../common/deathtypes/all.qh"
  #include "../../common/mapinfo.qh"
  #include "../../common/notifications.qh"
+ #include "../../common/physics.qh"
  #include "../../common/teams.qh"
  #include "../../common/util.qh"
+ #include "../../common/triggers/triggers.qh"
+ #include "../../common/minigames/sv_minigames.qh"
  
  #include "../../common/monsters/all.qc"
  #include "../../common/monsters/spawn.qh"
Simple merge
Simple merge
Simple merge
@@@ -21,8 -20,7 +20,7 @@@
  #include "weapons/weaponstats.qh"
  #include "../common/buffs/all.qh"
  #include "../common/constants.qh"
 -#include "../common/deathtypes.qh"
 +#include "../common/deathtypes/all.qh"
- #include "../common/effects/effects.qh"
  #include "../common/mapinfo.qh"
  #include "../common/monsters/all.qh"
  #include "../common/monsters/sv_monsters.qh"
@@@ -601,7 -602,7 +601,6 @@@ spawnfunc(worldspawn
  
        // needs to be done so early because of the constants they create
        static_init();
-       CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
 -      CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes);
  
        ServerProgsDB = db_load(strcat("server.db", autocvar_sessionid));
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -1,3 -1,6 +1,6 @@@
 -#include "../../common/deathtypes.qh"
++#include "../../common/deathtypes/all.qh"
+ #include "../g_hook.qh"
  REGISTER_MUTATOR(bh, cvar("g_breakablehook"));
  
  bool autocvar_g_breakablehook; // allow toggling mid match?
@@@ -1,3 -1,6 +1,6 @@@
 -#include "../../common/deathtypes.qh"
++#include "../../common/deathtypes/all.qh"
+ #include "../round_handler.qh"
  REGISTER_MUTATOR(rm, cvar("g_instagib"));
  
  MUTATOR_HOOKFUNCTION(rm, PlayerDamage_Calculate)
Simple merge
  #include "../common/triggers/include.qc"
  #include "../common/util.qc"
  
 +#include "../common/deathtypes/all.qc"
  #include "../common/buffs/all.qc"
+ #include "../common/effects/all.qc"
+ #include "../common/gamemodes/all.qc"
  #include "../common/items/all.qc"
  #include "../common/monsters/all.qc"
  #include "../common/mutators/all.qc"
@@@ -8,10 -7,13 +7,13 @@@
  #include "bot/waypoints.qh"
  #include "bot/navigation.qh"
  #include "command/getreplies.qh"
 -#include "../common/deathtypes.qh"
 +#include "../common/deathtypes/all.qh"
  #include "../common/notifications.qh"
  #include "../common/mapinfo.qh"
- #include "../warpzonelib/util_server.qh"
+ #include "../common/triggers/subs.qh"
+ #include "../lib/warpzone/util_server.qh"
+ #include "../lib/warpzone/common.qh"
+ #include "../common/mutators/mutator/waypoints/waypointsprites.qh"
  
  void W_Porto_Fail(float failhard);
  
Simple merge
Simple merge
@@@ -12,7 -11,8 +11,8 @@@
  
  #include "mutators/mutators_include.qh"
  
 -#include "../common/deathtypes.qh"
 +#include "../common/deathtypes/all.qh"
+ #include "../common/gamemodes/all.qh"
  #include "../common/teams.qh"
  
  void TeamchangeFrags(entity e)
Simple merge