mirror of
https://github.com/rh-hideout/pokeemerald-expansion.git
synced 2026-03-21 18:04:50 -05:00
Remove bounds check in IsBattlerAlive
There is no reason for us to check for `battler > gBattlersCount` since it would return false positives half the time. But also if you pass `battler > gBattlersCount` then something massively wrong happened and you would get a bug either way.
This commit is contained in:
parent
52455d2c59
commit
d50fb2dae6
|
|
@ -1074,9 +1074,7 @@ extern u8 gCategoryIconSpriteId;
|
|||
|
||||
static inline bool32 IsBattlerAlive(u32 battler)
|
||||
{
|
||||
if (battler >= gBattlersCount)
|
||||
return FALSE;
|
||||
else if (gBattleMons[battler].hp == 0)
|
||||
if (gBattleMons[battler].hp == 0)
|
||||
return FALSE;
|
||||
else if (gAbsentBattlerFlags & (1u << battler))
|
||||
return FALSE;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user