]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix allow_jumpoff code so 2D monsters can turn around at ledges
authorMario <mario@smbclan.net>
Sun, 4 Aug 2019 05:43:52 +0000 (15:43 +1000)
committerMario <mario@smbclan.net>
Sun, 4 Aug 2019 05:43:52 +0000 (15:43 +1000)
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/monsters/sv_spawner.qc

index 97a68b5f8f92877e95d115b0bf6c50d03b804088..0619a5dedce225ceab9294cc3786072d9eeb7207 100644 (file)
@@ -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)
        {
index d3f4ee740ab1543d2bf8fae2090e111842f251de..13c98e93fa1f64e75271e79cba146614c1b6dd94 100644 (file)
@@ -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);
 }