From: Mario Date: Fri, 30 Oct 2015 04:02:16 +0000 (+1000) Subject: Add a new spawnflag and cvar to control the resizing of old Quake monsters X-Git-Tag: xonotic-v0.8.2~1756 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=09ac135938edac7a9a5e821a0d8c89b8090008ab;p=xonotic%2Fxonotic-data.pk3dir.git Add a new spawnflag and cvar to control the resizing of old Quake monsters --- diff --git a/qcsrc/common/monsters/monster.qh b/qcsrc/common/monsters/monster.qh index b4559269d..bfbd544e5 100644 --- a/qcsrc/common/monsters/monster.qh +++ b/qcsrc/common/monsters/monster.qh @@ -22,6 +22,7 @@ const int MON_FLAG_RANGED = 512; // monster shoots projectiles const int MON_FLAG_MELEE = 1024; const int MON_FLAG_CRUSH = 2048; // monster can be stomped in special modes const int MON_FLAG_RIDE = 4096; // monster can be ridden in special modes +const int MONSTER_SIZE_QUAKE = 8192; // entity properties of monsterinfo: .bool(int, entity targ) monster_attackfunc; diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index f8294e3f5..c91d0d076 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -1377,9 +1377,15 @@ bool Monster_Spawn(int mon_id) self.movetype = MOVETYPE_FLY; } - if(mon.spawnflags & MONSTER_SIZE_BROKEN) if(!(self.spawnflags & MONSTERFLAG_RESPAWNED)) - self.scale *= 1.3; + { + if(mon.spawnflags & MONSTER_SIZE_BROKEN) + self.scale *= 1.3; + + if(mon.spawnflags & MONSTER_SIZE_QUAKE) + if(autocvar_g_monsters_quake_resize) + self.scale *= 1.3; + } setsize(self, mon.mins * self.scale, mon.maxs * self.scale); diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index 7a6082315..16f9898ad 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -523,6 +523,7 @@ float autocvar_g_monsters_miniboss_chance; float autocvar_g_monsters_miniboss_healthboost; float autocvar_g_monsters_drop_time; float autocvar_g_monsters_spawnshieldtime; +bool autocvar_g_monsters_quake_resize = true; bool autocvar_g_monsters_teams; float autocvar_g_monsters_respawn_delay; bool autocvar_g_monsters_respawn;