From: Mario Date: Sat, 13 May 2017 17:11:19 +0000 (+1000) Subject: Fix compile and use of .mins/.maxs on the monster registry entities X-Git-Tag: xonotic-v0.8.5~2786 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a4d0783ffcee158676f0f875be2b42737559a324;p=xonotic%2Fxonotic-data.pk3dir.git Fix compile and use of .mins/.maxs on the monster registry entities --- diff --git a/qcsrc/common/monsters/monster.qh b/qcsrc/common/monsters/monster.qh index a437e355d..841e7ef40 100644 --- a/qcsrc/common/monsters/monster.qh +++ b/qcsrc/common/monsters/monster.qh @@ -38,9 +38,9 @@ CLASS(Monster, Object) /** model */ ATTRIB(Monster, m_model, entity); /** hitbox size */ - ATTRIB(Monster, mins, vector, '-0 -0 -0'); + ATTRIB(Monster, m_mins, vector, '-0 -0 -0'); /** hitbox size */ - ATTRIB(Monster, maxs, vector, '0 0 0'); + ATTRIB(Monster, m_maxs, vector, '0 0 0'); /** (SERVER) setup monster data */ METHOD(Monster, mr_setup, bool(Monster this, entity actor)) { TC(Monster, this); return false; } diff --git a/qcsrc/common/monsters/monster/mage.qh b/qcsrc/common/monsters/monster/mage.qh index d78ee5ecf..194b6b2b2 100644 --- a/qcsrc/common/monsters/monster/mage.qh +++ b/qcsrc/common/monsters/monster/mage.qh @@ -8,8 +8,8 @@ MODEL(MON_MAGE, M_Model("mage.dpm")); CLASS(Mage, Monster) ATTRIB(Mage, spawnflags, int, MON_FLAG_MELEE | MON_FLAG_RANGED); - ATTRIB(Mage, mins, vector, '-36 -36 -24'); - ATTRIB(Mage, maxs, vector, '36 36 50'); + ATTRIB(Mage, m_mins, vector, '-36 -36 -24'); + ATTRIB(Mage, m_maxs, vector, '36 36 50'); #ifdef GAMEQC ATTRIB(Mage, m_model, Model, MDL_MON_MAGE); #endif diff --git a/qcsrc/common/monsters/monster/shambler.qh b/qcsrc/common/monsters/monster/shambler.qh index f7a3ce3a9..fde28e9f4 100644 --- a/qcsrc/common/monsters/monster/shambler.qh +++ b/qcsrc/common/monsters/monster/shambler.qh @@ -8,8 +8,8 @@ MODEL(MON_SHAMBLER, M_Model("shambler.mdl")); CLASS(Shambler, Monster) ATTRIB(Shambler, spawnflags, int, MONSTER_SIZE_BROKEN | MON_FLAG_SUPERMONSTER | MON_FLAG_MELEE | MON_FLAG_RANGED); - ATTRIB(Shambler, mins, vector, '-41 -41 -31'); - ATTRIB(Shambler, maxs, vector, '41 41 65'); + ATTRIB(Shambler, m_mins, vector, '-41 -41 -31'); + ATTRIB(Shambler, m_maxs, vector, '41 41 65'); #ifdef GAMEQC ATTRIB(Shambler, m_model, Model, MDL_MON_SHAMBLER); #endif diff --git a/qcsrc/common/monsters/monster/spider.qh b/qcsrc/common/monsters/monster/spider.qh index c54eb3a7a..cd7fa9e6b 100644 --- a/qcsrc/common/monsters/monster/spider.qh +++ b/qcsrc/common/monsters/monster/spider.qh @@ -8,8 +8,8 @@ MODEL(MON_SPIDER, M_Model("spider.dpm")); CLASS(Spider, Monster) ATTRIB(Spider, spawnflags, int, MON_FLAG_MELEE | MON_FLAG_RANGED | MON_FLAG_RIDE); - ATTRIB(Spider, mins, vector, '-18 -18 -25'); - ATTRIB(Spider, maxs, vector, '18 18 30'); + ATTRIB(Spider, m_mins, vector, '-18 -18 -25'); + ATTRIB(Spider, m_maxs, vector, '18 18 30'); #ifdef GAMEQC ATTRIB(Spider, m_model, Model, MDL_MON_SPIDER); #endif diff --git a/qcsrc/common/monsters/monster/wyvern.qh b/qcsrc/common/monsters/monster/wyvern.qh index 0af84c130..012c9c2a5 100644 --- a/qcsrc/common/monsters/monster/wyvern.qh +++ b/qcsrc/common/monsters/monster/wyvern.qh @@ -8,8 +8,8 @@ MODEL(MON_WYVERN, M_Model("wizard.mdl")); CLASS(Wyvern, Monster) ATTRIB(Wyvern, spawnflags, int, MONSTER_TYPE_FLY | MONSTER_SIZE_BROKEN | MON_FLAG_RANGED | MON_FLAG_RIDE); - ATTRIB(Wyvern, mins, vector, '-20 -20 -58'); - ATTRIB(Wyvern, maxs, vector, '20 20 20'); + ATTRIB(Wyvern, m_mins, vector, '-20 -20 -58'); + ATTRIB(Wyvern, m_maxs, vector, '20 20 20'); #ifdef GAMEQC ATTRIB(Wyvern, m_model, Model, MDL_MON_WYVERN); #endif diff --git a/qcsrc/common/monsters/monster/zombie.qh b/qcsrc/common/monsters/monster/zombie.qh index d3c94cd45..dfa37556d 100644 --- a/qcsrc/common/monsters/monster/zombie.qh +++ b/qcsrc/common/monsters/monster/zombie.qh @@ -8,8 +8,8 @@ MODEL(MON_ZOMBIE, M_Model("zombie.dpm")); CLASS(Zombie, Monster) ATTRIB(Zombie, spawnflags, int, MONSTER_TYPE_UNDEAD | MON_FLAG_MELEE | MON_FLAG_RIDE); - ATTRIB(Zombie, mins, vector, '-18 -18 -25'); - ATTRIB(Zombie, maxs, vector, '18 18 47'); + ATTRIB(Zombie, m_mins, vector, '-18 -18 -25'); + ATTRIB(Zombie, m_maxs, vector, '18 18 47'); #ifdef GAMEQC ATTRIB(Zombie, m_model, Model, MDL_MON_ZOMBIE); #endif diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index 6acbdaa51..469dd7b9c 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -1389,7 +1389,7 @@ bool Monster_Spawn(entity this, bool check_appear, int mon_id) this.scale *= 1.3; } - setsize(this, mon.mins * this.scale, mon.maxs * this.scale); + setsize(this, mon.m_mins * this.scale, mon.m_maxs * this.scale); this.ticrate = bound(sys_frametime, ((!this.ticrate) ? autocvar_g_monsters_think_delay : this.ticrate), 60); diff --git a/qcsrc/common/physics/player.qc b/qcsrc/common/physics/player.qc index c4ad8d2eb..b8a14a4ce 100644 --- a/qcsrc/common/physics/player.qc +++ b/qcsrc/common/physics/player.qc @@ -10,7 +10,7 @@ // client side physics bool Physics_Valid(string thecvar) { - return autocvar_g_physics_clientselect && thecvar != "" && thecvar && && thecvar != "default" strhasword(autocvar_g_physics_clientselect_options, thecvar); + return autocvar_g_physics_clientselect && thecvar != "" && thecvar && thecvar != "default" && strhasword(autocvar_g_physics_clientselect_options, thecvar); } float Physics_ClientOption(entity this, string option, float defaultval) diff --git a/qcsrc/server/mutators/mutator/gamemode_invasion.qc b/qcsrc/server/mutators/mutator/gamemode_invasion.qc index 1355134bb..cbff696fc 100644 --- a/qcsrc/server/mutators/mutator/gamemode_invasion.qc +++ b/qcsrc/server/mutators/mutator/gamemode_invasion.qc @@ -105,7 +105,7 @@ void invasion_SpawnChosenMonster(Monster mon) { LOG_TRACE("Warning: couldn't find any invasion_spawnpoint spawnpoints, attempting to spawn monsters in random locations"); entity e = spawn(); - setsize(e, mon.mins, mon.maxs); + setsize(e, mon.m_mins, mon.m_maxs); if(MoveToRandomMapLocation(e, DPCONTENTS_SOLID | DPCONTENTS_CORPSE | DPCONTENTS_PLAYERCLIP, DPCONTENTS_SLIME | DPCONTENTS_LAVA | DPCONTENTS_SKY | DPCONTENTS_BODY | DPCONTENTS_DONOTENTER, Q3SURFACEFLAG_SKY, 10, 1024, 256)) monster = spawnmonster(e, tospawn, mon.monsterid, NULL, NULL, e.origin, false, false, 2);