mirror of
https://github.com/GTAmodding/re3.git
synced 2025-02-19 22:34:54 +00:00
Saner loop
This commit is contained in:
parent
9f0daee186
commit
cac1c5bd42
1 changed files with 5 additions and 5 deletions
|
@ -2080,13 +2080,13 @@ CPlayerPed::UpdateMeleeAttackers(void)
|
|||
void
|
||||
CPlayerPed::RemovePedFromMeleeList(CPed *ped)
|
||||
{
|
||||
int i = 0;
|
||||
while (m_pMeleeList[i] != ped) {
|
||||
if (++i >= ARRAY_SIZE(m_pMeleeList))
|
||||
for (uint16 i = 0; i < ARRAY_SIZE(m_pMeleeList); i++) {
|
||||
if (m_pMeleeList[i] == ped) {
|
||||
m_pMeleeList[i] = nil;
|
||||
ped->m_attackTimer = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
m_pMeleeList[i] = nil;
|
||||
ped->m_attackTimer = 0;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Add table
Reference in a new issue