From cec38eba56a406decb051c3de7c70aa4225f6f22 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 10 Mar 2017 04:31:11 +1000 Subject: [PATCH] Fix jumping ability on custom monster type --- qcsrc/common/monsters/monster/monster.qc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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()); } -- 2.39.2