mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-11-23 17:49:16 +01:00
Saner loop
This commit is contained in:
parent
9f0daee186
commit
cac1c5bd42
@ -2080,13 +2080,13 @@ CPlayerPed::UpdateMeleeAttackers(void)
|
|||||||
void
|
void
|
||||||
CPlayerPed::RemovePedFromMeleeList(CPed *ped)
|
CPlayerPed::RemovePedFromMeleeList(CPed *ped)
|
||||||
{
|
{
|
||||||
int i = 0;
|
for (uint16 i = 0; i < ARRAY_SIZE(m_pMeleeList); i++) {
|
||||||
while (m_pMeleeList[i] != ped) {
|
if (m_pMeleeList[i] == ped) {
|
||||||
if (++i >= ARRAY_SIZE(m_pMeleeList))
|
m_pMeleeList[i] = nil;
|
||||||
|
ped->m_attackTimer = 0;
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
m_pMeleeList[i] = nil;
|
|
||||||
ped->m_attackTimer = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user