diff options
author | Filip Gawin <filip.gawin@zoho.com> | 2020-02-25 20:01:56 +0100 |
---|---|---|
committer | Filip Gawin <filip.gawin@zoho.com> | 2020-03-22 17:30:54 +0100 |
commit | 8f01eab5ab97c498fd308c091ad9c555b2f67b56 (patch) | |
tree | c7b9b88d8b77ab3559be411dbbfeda98e3294c7b /src/peds/Ped.cpp | |
parent | Implement ProcessGarages + small cleanup (diff) | |
download | re3-8f01eab5ab97c498fd308c091ad9c555b2f67b56.tar re3-8f01eab5ab97c498fd308c091ad9c555b2f67b56.tar.gz re3-8f01eab5ab97c498fd308c091ad9c555b2f67b56.tar.bz2 re3-8f01eab5ab97c498fd308c091ad9c555b2f67b56.tar.lz re3-8f01eab5ab97c498fd308c091ad9c555b2f67b56.tar.xz re3-8f01eab5ab97c498fd308c091ad9c555b2f67b56.tar.zst re3-8f01eab5ab97c498fd308c091ad9c555b2f67b56.zip |
Diffstat (limited to '')
-rw-r--r-- | src/peds/Ped.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp index b7dbab82..45590b07 100644 --- a/src/peds/Ped.cpp +++ b/src/peds/Ped.cpp @@ -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
\ No newline at end of file +ENDPATCHES |