]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix jumping ability on custom monster type
authorMario <mario@smbclan.net>
Thu, 9 Mar 2017 18:31:11 +0000 (04:31 +1000)
committerMario <mario@smbclan.net>
Thu, 9 Mar 2017 18:31:11 +0000 (04:31 +1000)
qcsrc/common/monsters/monster/monster.qc

index a6a1abd3afbb7435dc55cf344fb829910b895952..5fcfbd516ff0062c385bbd2b6e8df8dba070b5fd 100644 (file)
@@ -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());
     }