mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 13:41:05 +00:00
Added STOPRAILS actor flag.
- An actor with this flag will prevent railgun shots from penetrating further.
This commit is contained in:
parent
703686beee
commit
0b0984b88e
3 changed files with 4 additions and 1 deletions
|
@ -411,6 +411,7 @@ enum ActorFlag8
|
|||
MF8_NOFRICTIONBOUNCE = 0x00000040, // don't bounce off walls when on icy floors
|
||||
MF8_RETARGETAFTERSLAM = 0x00000080, // Forces jumping to the idle state after slamming into something
|
||||
MF8_RECREATELIGHTS = 0x00000100, // Internal flag that signifies that the light attachments need to be recreated at the
|
||||
MF8_STOPRAILS = 0x00000200, // [MC] Prevent rails from going further if an actor has this flag.
|
||||
};
|
||||
|
||||
// --- mobj.renderflags ---
|
||||
|
|
|
@ -5127,7 +5127,8 @@ static ETraceStatus ProcessRailHit(FTraceResults &res, void *userdata)
|
|||
{
|
||||
data->count++;
|
||||
}
|
||||
return (data->StopAtOne || (data->limit && (data->count >= data->limit))) ? TRACE_Stop : TRACE_Continue;
|
||||
return (data->StopAtOne || (data->limit && (data->count >= data->limit)) || (res.Actor->flags8 & MF8_STOPRAILS))
|
||||
? TRACE_Stop : TRACE_Continue;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
@ -323,6 +323,7 @@ static FFlagDef ActorFlagDefs[]=
|
|||
DEFINE_FLAG(MF8, NOFRICTION, AActor, flags8),
|
||||
DEFINE_FLAG(MF8, NOFRICTIONBOUNCE, AActor, flags8),
|
||||
DEFINE_FLAG(MF8, RETARGETAFTERSLAM, AActor, flags8),
|
||||
DEFINE_FLAG(MF8, STOPRAILS, AActor, flags8),
|
||||
|
||||
// Effect flags
|
||||
DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),
|
||||
|
|
Loading…
Reference in a new issue