mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
[Fix] FixHeading Infinite Loop Fix (#4854)
Co-authored-by: KimLS <KimLS@peqtgc.com>
This commit is contained in:
parent
cc30c72538
commit
f9fe4ea2ec
@ -933,16 +933,11 @@ void MobMovementManager::SendCommandToClients(
|
||||
|
||||
float MobMovementManager::FixHeading(float in)
|
||||
{
|
||||
auto h = in;
|
||||
while (h > 512.0) {
|
||||
h -= 512.0;
|
||||
int h = static_cast<int>(in) % 512;
|
||||
if (h < 0) {
|
||||
h += 512;
|
||||
}
|
||||
|
||||
while (h < 0.0) {
|
||||
h += 512.0;
|
||||
}
|
||||
|
||||
return h;
|
||||
return static_cast<float>(h);
|
||||
}
|
||||
|
||||
void MobMovementManager::DumpStats(Client *client)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user