From: Mario Date: Thu, 9 Mar 2017 18:31:11 +0000 (+1000) Subject: Fix jumping ability on custom monster type X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=cec38eba56a406decb051c3de7c70aa4225f6f22;p=xonotic%2Fxonotic-data.pk3dir.git Fix jumping ability on custom monster type --- diff --git a/qcsrc/common/monsters/monster/monster.qc b/qcsrc/common/monsters/monster/monster.qc index a6a1abd3a..5fcfbd516 100644 --- a/qcsrc/common/monsters/monster/monster.qc +++ b/qcsrc/common/monsters/monster/monster.qc @@ -139,8 +139,9 @@ spawnfunc(monster_custom) { Monster_Spawn(this, true, MON_MONSTER.monsterid); } METHOD(CustomMonster, mr_think, bool(CustomMonster this, entity actor)) { TC(CustomMonster, this); - if((actor.mon_movetype & MON_MOVE_JUMP) && time >= actor.jump_delay) + if((actor.mon_movetype & MON_MOVE_JUMP) && time >= actor.jump_delay && IS_ONGROUND(actor)) { + UNSET_ONGROUND(actor); actor.velocity_z += actor.mon_jumpheight; actor.jump_delay = time + (actor.mon_jumpdelay * random()); }