mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 13:47:58 +03:00
Check for bHitPerson in MV0, MV1 and MV2
This checks if the sentient being hit is dead, and skip it when moving the vehicle so the vehicle doesn't get stuck for when a sentient is dying
This commit is contained in:
parent
dddedba721
commit
8b6b1597d7
1 changed files with 15 additions and 7 deletions
|
@ -4328,7 +4328,15 @@ void Vehicle::MoveVehicle(void)
|
|||
);
|
||||
}
|
||||
|
||||
break;
|
||||
// Added in OPM
|
||||
// Skip the entity if the sentient is dead.
|
||||
// This is a workaround against sentients getting in path of vehicles
|
||||
// and thus blocking them temporarily while dying.
|
||||
// For example in e1l1, the first tank would get stuck, because sometimes
|
||||
// there are too many actors moving in the path of the vehicle
|
||||
if (!bHitPerson || !tr.ent->entity->IsDead()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
pSkippedEntities[iNumSkippedEntities] = tr.ent->entity;
|
||||
|
@ -4411,11 +4419,7 @@ void Vehicle::MoveVehicle(void)
|
|||
}
|
||||
|
||||
// Added in OPM
|
||||
// Skip the entity if the sentient is dead.
|
||||
// This is a workaround against sentients getting in path of vehicles
|
||||
// and thus blocking them temporarily while dying.
|
||||
// For example in e1l1, the first tank would get stuck, because sometimes
|
||||
// there are too many actors moving in the path of the vehicle
|
||||
// (see the comment above)
|
||||
if (!bHitPerson || !tr.ent->entity->IsDead()) {
|
||||
break;
|
||||
}
|
||||
|
@ -4503,7 +4507,11 @@ void Vehicle::MoveVehicle(void)
|
|||
);
|
||||
}
|
||||
|
||||
break;
|
||||
// Added in OPM
|
||||
// (see the comment above)
|
||||
if (!bHitPerson || !tr.ent->entity->IsDead()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
pSkippedEntities[iNumSkippedEntities] = tr.ent->entity;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue