mirror of
https://github.com/halpz/re3.git
synced 2025-06-30 04:26:20 +00:00
Fixes for Serge's review
This commit is contained in:
@ -7642,21 +7642,21 @@ CPed::Flee(void)
|
||||
else if (PI + angleToFleeEntity < angleToFleeDamagingThing)
|
||||
angleToFleeDamagingThing -= TWOPI;
|
||||
|
||||
if (damagingThingPriorityMult <= 1.0) {
|
||||
if (damagingThingPriorityMult <= 1.0f) {
|
||||
// Range [0.0, 1.0]
|
||||
|
||||
double angleToFleeBoth = (angleToFleeDamagingThing + angleToFleeEntity) * 0.5;
|
||||
float angleToFleeBoth = (angleToFleeDamagingThing + angleToFleeEntity) * 0.5f;
|
||||
|
||||
if (m_fRotationDest - PI > angleToFleeBoth)
|
||||
angleToFleeBoth += TWOPI;
|
||||
else if (PI + m_fRotationDest < angleToFleeBoth)
|
||||
angleToFleeBoth -= TWOPI;
|
||||
|
||||
m_fRotationDest = (1.0 - damagingThingPriorityMult) * m_fRotationDest + damagingThingPriorityMult * angleToFleeBoth;
|
||||
m_fRotationDest = (1.0f - damagingThingPriorityMult) * m_fRotationDest + damagingThingPriorityMult * angleToFleeBoth;
|
||||
} else {
|
||||
// Range (1.0, 1.5]
|
||||
|
||||
double adjustedMult = (damagingThingPriorityMult - 1.0) * 2.0;
|
||||
double adjustedMult = (damagingThingPriorityMult - 1.0f) * 2.0f;
|
||||
m_fRotationDest = angleToFleeEntity * (1.0 - adjustedMult) + adjustedMult * angleToFleeDamagingThing;
|
||||
}
|
||||
} else {
|
||||
@ -17676,4 +17676,4 @@ STARTPATCHES
|
||||
InjectHook(0x4E52A0, &CPed::WarpPedToNearLeaderOffScreen, PATCH_JUMP);
|
||||
InjectHook(0x4E0220, &CPed::SetCarJack, PATCH_JUMP);
|
||||
InjectHook(0x4D6780, &CPed::Solicit, PATCH_JUMP);
|
||||
ENDPATCHES
|
||||
ENDPATCHES
|
||||
|
@ -1170,4 +1170,4 @@ STARTPATCHES
|
||||
InjectHook(0x4F4690, &CPopulation::TestRoomForDummyObject, PATCH_JUMP);
|
||||
InjectHook(0x4F45A0, &CPopulation::ConvertToDummyObject, PATCH_JUMP);
|
||||
InjectHook(0x4F4410, &CPopulation::ConvertAllObjectsToDummyObjects, PATCH_JUMP);
|
||||
ENDPATCHES
|
||||
ENDPATCHES
|
||||
|
Reference in New Issue
Block a user