- Fixed: The check in P_SpawnBlood() to avoid advancing the state to something not owned by

the spawned blood actor was backwards and would only advance to state's NOT owned by it.

SVN r3861 (trunk)
This commit is contained in:
Randy Heit 2012-09-01 22:34:09 +00:00
parent 6a91335841
commit 111b5c60c1

View file

@ -4864,14 +4864,15 @@ void P_SpawnBlood (fixed_t x, fixed_t y, fixed_t z, angle_t dir, int damage, AAc
while (cls != RUNTIME_CLASS(AActor)) while (cls != RUNTIME_CLASS(AActor))
{ {
FActorInfo *ai = cls->ActorInfo; FActorInfo *ai = cls->ActorInfo;
int checked_advance = advance;
if (ai->OwnsState(th->SpawnState)) if (ai->OwnsState(th->SpawnState))
{ {
for (; advance > 0; --advance) for (; checked_advance > 0; --checked_advance)
{ {
// [RH] Do not set to a state we do not own. // [RH] Do not set to a state we do not own.
if (!ai->OwnsState(th->SpawnState + advance)) if (ai->OwnsState(th->SpawnState + checked_advance))
{ {
th->SetState(th->SpawnState + advance); th->SetState(th->SpawnState + checked_advance);
goto statedone; goto statedone;
} }
} }