mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-01-18 15:11:46 +00:00
- expose a monster's 'friendlyseeblocks' to UDMF
This commit is contained in:
parent
be82f3ef56
commit
9c189e5d4b
5 changed files with 9 additions and 0 deletions
|
@ -371,6 +371,7 @@ struct FMapThing
|
|||
int16_t roll;
|
||||
uint32_t RenderStyle;
|
||||
int FloatbobPhase;
|
||||
int friendlyseeblocks;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -502,6 +502,7 @@ xx(Roll)
|
|||
xx(Scale)
|
||||
xx(ScaleX)
|
||||
xx(ScaleY)
|
||||
xx(FriendlySeeBlocks)
|
||||
xx(Floatbobphase)
|
||||
xx(Floatbobstrength)
|
||||
xx(Target)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue