- expose a monster's 'friendlyseeblocks' to UDMF

This commit is contained in:
Rachael Alexanderson 2018-01-09 15:30:45 -05:00
parent be82f3ef56
commit 9c189e5d4b
5 changed files with 9 additions and 0 deletions

View file

@ -371,6 +371,7 @@ struct FMapThing
int16_t roll;
uint32_t RenderStyle;
int FloatbobPhase;
int friendlyseeblocks;
};

View file

@ -502,6 +502,7 @@ xx(Roll)
xx(Scale)
xx(ScaleX)
xx(ScaleY)
xx(FriendlySeeBlocks)
xx(Floatbobphase)
xx(Floatbobstrength)
xx(Target)

View file

@ -6029,6 +6029,7 @@ 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->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;

View file

@ -1831,6 +1831,7 @@ void P_LoadThings2 (MapData * map)
mti[i].Alpha = -1;
mti[i].Health = 1;
mti[i].FloatbobPhase = -1;
mti[i].friendlyseeblocks = 10;
}
delete[] mtp;
}

View file

@ -799,6 +799,11 @@ public:
th->Scale.X = th->Scale.Y = CheckFloat(key);
break;
case NAME_FriendlySeeBlocks:
CHECK_N(Zd | Zdt)
th->friendlyseeblocks = CheckInt(key);
break;
default:
CHECK_N(Zd | Zdt)
if (0 == strnicmp("user_", key.GetChars(), 5))