From ee9736fbb3ca52723c0a38f09cdef67eb72f1b7a Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Tue, 9 Jan 2018 15:48:19 -0500 Subject: [PATCH] - print out FriendlySeeBlocks on 'info' ccmd - not setting FriendlySeeBlocks on UDMF now causes the actor to use its ZScript default --- src/p_mobj.cpp | 4 +++- src/p_setup.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 5398971b9..2c05874ab 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -6029,7 +6029,8 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position) mobj->SpawnPoint = mthing->pos; mobj->SpawnAngle = mthing->angle; mobj->SpawnFlags = mthing->flags; - mobj->friendlyseeblocks = mthing->friendlyseeblocks; + if (mthing->friendlyseeblocks > 0) + mobj->friendlyseeblocks = mthing->friendlyseeblocks; if (mthing->FloatbobPhase >= 0 && mthing->FloatbobPhase < 64) mobj->FloatBobPhase = mthing->FloatbobPhase; if (mthing->Gravity < 0) mobj->Gravity = -mthing->Gravity; else if (mthing->Gravity > 0) mobj->Gravity *= mthing->Gravity; @@ -8466,5 +8467,6 @@ void PrintMiscActorInfo(AActor *query) Printf("\nSpeed= %f, velocity= x:%f, y:%f, z:%f, combined:%f.\n", query->Speed, query->Vel.X, query->Vel.Y, query->Vel.Z, query->Vel.Length()); Printf("Scale: x:%f, y:%f\n", query->Scale.X, query->Scale.Y); + Printf("FriendlySeeBlocks: %d\n", query->friendlyseeblocks); } } diff --git a/src/p_setup.cpp b/src/p_setup.cpp index f7db67c2e..937f77fa8 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -1831,7 +1831,7 @@ void P_LoadThings2 (MapData * map) mti[i].Alpha = -1; mti[i].Health = 1; mti[i].FloatbobPhase = -1; - mti[i].friendlyseeblocks = 10; + mti[i].friendlyseeblocks = -1; } delete[] mtp; }