From 7dc3f659abb5a7cc04314ef34c9cbe92ffedbe02 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 4 Aug 2019 15:43:52 +1000 Subject: [PATCH] Fix allow_jumpoff code so 2D monsters can turn around at ledges --- qcsrc/common/monsters/sv_monsters.qc | 7 ++----- qcsrc/common/monsters/sv_spawner.qc | 1 + 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index 97a68b5f8..0619a5ded 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -1095,15 +1095,12 @@ void Monster_Move_2D(entity this, float mspeed, bool allow_jumpoff) if(trace_ent && IS_MONSTER(trace_ent)) reverse = true; - // TODO: fix this... tracing is broken if the floor is thin - /* if(!allow_jumpoff) { - a = b - '0 0 32'; - traceline(b, a, MOVE_WORLDONLY, this); + traceline(b, b - '0 0 32', MOVE_NORMAL, this); if(trace_fraction == 1.0) reverse = true; - } */ + } if(reverse) { diff --git a/qcsrc/common/monsters/sv_spawner.qc b/qcsrc/common/monsters/sv_spawner.qc index d3f4ee740..13c98e93f 100644 --- a/qcsrc/common/monsters/sv_spawner.qc +++ b/qcsrc/common/monsters/sv_spawner.qc @@ -16,6 +16,7 @@ void spawner_use(entity this, entity actor, entity trigger) e.noalign = this.noalign; e.angles = this.angles; e.monster_skill = this.monster_skill; + e.skin = this.skin; e = spawnmonster(e, this.spawnmob, 0, this, this, this.origin, false, true, this.monster_moveflags); } -- 2.39.2