X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmonsters%2Fmonster%2Fmage.qc;h=26bb0a9afda23c20909e5e35c5c7ed03a5df10a6;hp=6822363c56888742788beedd7e3af894caddc685;hb=13a42acaac2ee6b7f0494b0a02cefc1e270d9727;hpb=4a33100bf6a3b684157c104c39fd47f4a810a735 diff --git a/qcsrc/common/monsters/monster/mage.qc b/qcsrc/common/monsters/monster/mage.qc index 6822363c5..26bb0a9af 100644 --- a/qcsrc/common/monsters/monster/mage.qc +++ b/qcsrc/common/monsters/monster/mage.qc @@ -1,12 +1,12 @@ #ifdef REGISTER_MONSTER REGISTER_MONSTER( -/* MON_##id */ MAGE, -/* function */ m_mage, +/* MON_##id */ MAGE, +/* function */ m_mage, /* spawnflags */ MON_FLAG_MELEE | MON_FLAG_RANGED, /* mins,maxs */ '-36 -36 -24', '36 36 50', -/* model */ "mage.dpm", -/* netname */ "mage", -/* fullname */ _("Mage") +/* model */ "mage.dpm", +/* netname */ "mage", +/* fullname */ _("Mage") ); #else @@ -63,7 +63,7 @@ float friend_needshelp(entity e) if(e.frozen) return FALSE; if(!IS_PLAYER(e)) - return (e.flags & FL_MONSTER && e.health < e.max_health); + return ((e.flags & FL_MONSTER) && e.health < e.max_health); if(e.items & IT_INVINCIBLE) return FALSE; @@ -233,7 +233,8 @@ void mage_heal() { pointparticles(particleeffectnum("healing_fx"), head.origin, '0 0 0', 1); head.health = bound(0, head.health + (autocvar_g_monster_mage_heal_allies), head.max_health); - WaypointSprite_UpdateHealth(head.sprite, head.health); + if(!(head.spawnflags & MONSTERFLAG_INVINCIBLE)) + WaypointSprite_UpdateHealth(head.sprite, head.health); } } @@ -335,12 +336,7 @@ void spawnfunc_monster_mage() { self.classname = "monster_mage"; - self.monster_spawnfunc = spawnfunc_monster_mage; - - if(Monster_CheckAppearFlags(self)) - return; - - if(!monster_initialize(MON_MAGE, FALSE)) { remove(self); return; } + if(!monster_initialize(MON_MAGE)) { remove(self); return; } } // compatibility with old spawns @@ -397,7 +393,7 @@ float m_mage(float req) } case MR_PRECACHE: { - precache_model ("models/monsters/mage.dpm"); + precache_model("models/monsters/mage.dpm"); precache_sound ("weapons/grenade_impact.wav"); precache_sound ("weapons/tagexp1.wav"); return TRUE; @@ -415,7 +411,6 @@ float m_mage(float req) { case MR_PRECACHE: { - precache_model ("models/monsters/mage.dpm"); return TRUE; } }