Skip to content

Commit

Permalink
- fixed crash in Last Warrior map 9.
Browse files Browse the repository at this point in the history
Really, asserts should not be used to test for errors that can actually happen!
  • Loading branch information
coelckers committed Jun 6, 2022
1 parent 998def2 commit f8aacb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/games/sw/src/weapon.cpp
Expand Up @@ -16999,7 +16999,7 @@ bool SpriteWarpToSurface(DSWActor* actor)
}
}

ASSERT(Found);
if (!Found) return false;

if (underActor->spr.lotag == 0)
return false;
Expand All @@ -17019,7 +17019,7 @@ bool SpriteWarpToSurface(DSWActor* actor)
}
}

ASSERT(Found);
if (!Found) return false;

// get the offset from the under sprite
sx = underActor->spr.pos.X - actor->spr.pos.X;
Expand Down

0 comments on commit f8aacb3

Please sign in to comment.