mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
Merge branch 'master' of https://github.com/Edward850/zdoom
This commit is contained in:
commit
4e683d360d
3 changed files with 13 additions and 2 deletions
|
@ -76,6 +76,7 @@ struct FState
|
||||||
BYTE SameFrame:1; // Ignore Frame (except when spawning actor)
|
BYTE SameFrame:1; // Ignore Frame (except when spawning actor)
|
||||||
BYTE Fast:1;
|
BYTE Fast:1;
|
||||||
BYTE NoDelay:1; // Spawn states executes its action normally
|
BYTE NoDelay:1; // Spawn states executes its action normally
|
||||||
|
BYTE CanRaise:1; // Allows a monster to be resurrected without waiting for an infinate frame
|
||||||
int ParameterIndex;
|
int ParameterIndex;
|
||||||
|
|
||||||
inline int GetFrame() const
|
inline int GetFrame() const
|
||||||
|
@ -114,6 +115,10 @@ struct FState
|
||||||
{
|
{
|
||||||
return NoDelay;
|
return NoDelay;
|
||||||
}
|
}
|
||||||
|
inline bool GetCanRaise() const
|
||||||
|
{
|
||||||
|
return CanRaise;
|
||||||
|
}
|
||||||
inline void SetFrame(BYTE frame)
|
inline void SetFrame(BYTE frame)
|
||||||
{
|
{
|
||||||
Frame = frame - 'A';
|
Frame = frame - 'A';
|
||||||
|
|
|
@ -2527,8 +2527,9 @@ static bool P_CheckForResurrection(AActor *self, bool usevilestates)
|
||||||
if (!(corpsehit->flags & MF_CORPSE) )
|
if (!(corpsehit->flags & MF_CORPSE) )
|
||||||
continue; // not a monster
|
continue; // not a monster
|
||||||
|
|
||||||
if (corpsehit->tics != -1)
|
if (corpsehit->tics != -1 && // not lying still yet
|
||||||
continue; // not lying still yet
|
!corpsehit->state->GetCanRaise()) // or not ready to be raised yet
|
||||||
|
continue;
|
||||||
|
|
||||||
raisestate = corpsehit->FindState(NAME_Raise);
|
raisestate = corpsehit->FindState(NAME_Raise);
|
||||||
if (raisestate == NULL)
|
if (raisestate == NULL)
|
||||||
|
|
|
@ -313,6 +313,11 @@ do_stop:
|
||||||
sc.MustGetStringName(")");
|
sc.MustGetStringName(")");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (sc.Compare("CANRAISE"))
|
||||||
|
{
|
||||||
|
state.CanRaise = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Make the action name lowercase
|
// Make the action name lowercase
|
||||||
strlwr (sc.String);
|
strlwr (sc.String);
|
||||||
|
|
Loading…
Reference in a new issue