]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'TimePath/spawnfunc' into 'master'
authorTimePath <andrew.hardaker1995@gmail.com>
Sat, 3 Oct 2015 08:10:34 +0000 (08:10 +0000)
committerTimePath <andrew.hardaker1995@gmail.com>
Sat, 3 Oct 2015 08:10:34 +0000 (08:10 +0000)
spawnfunc whitelist

So we know which entity fields are actually being used that we can't remove or rename.

When a field not listed is used, a warning is displayed. No official maps produce warnings. After enough community maps have been tested, can be changed to error instead.

For convenience, a cvar will be added as an additional whitelist.

See merge request !227

1  2 
qcsrc/common/monsters/sv_monsters.qc

index 64c26447495a77b571322e40b68d169bec4ca47a,af251215ba9d63e13e5cf8ee68689347ca0aa2c1..18bf6af2a9a64f238b39d94b3316337e56c862b6
@@@ -49,7 -49,7 +49,7 @@@ void monster_dropitem(
        {
                setself(e);
                e.noalign = true;
-               e.monster_loot();
+               e.monster_loot(e);
                e.gravity = 1;
                e.movetype = MOVETYPE_TOSS;
                e.reset = SUB_Remove;
@@@ -1045,7 -1045,7 +1045,7 @@@ void Monster_Dead(entity attacker, floa
  
  void Monster_Damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
  {SELFPARAM();
 -      if((self.spawnflags & MONSTERFLAG_INVINCIBLE) && deathtype != DEATH_KILL)
 +      if((self.spawnflags & MONSTERFLAG_INVINCIBLE) && deathtype != DEATH_KILL && !ITEM_DAMAGE_NEEDKILL(deathtype))
                return;
  
        if(self.frozen && deathtype != DEATH_KILL && deathtype != DEATH_NADE_ICE_FREEZE)