From 6e73d9220adb726ecc75e75080ccdb8c8fb2bc1c Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Sat, 1 Feb 2020 15:10:46 +0200 Subject: Fix CTheScripts::AddToInvisibilitySwapArray --- src/control/Script.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/control/Script.cpp b/src/control/Script.cpp index 8c022765..4ddbfbf0 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -7200,7 +7200,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command) if (total == 0) CWorld::FindObjectsOfTypeInRangeSectorList(mi, CWorld::GetBigBuildingList(CTheZones::FindZoneForPoint(pos)), pos, range, true, &total, 16, apEntities); CEntity* pClosestEntity = nil; - float min_dist = 2 * range; + float min_dist = 2.0f * range; for (int i = 0; i < total; i++) { float dist = (apEntities[i]->GetPosition() - pos).Magnitude(); if (dist < min_dist) { @@ -7859,7 +7859,7 @@ void CTheScripts::AddToInvisibilitySwapArray(CEntity* pEntity, bool remove) InvisibilitySettingArray[i] = nil; } else if (!remove) { - int j = 0; + i = 0; while (i < MAX_NUM_INVISIBILITY_SETTINGS && !found) { if (InvisibilitySettingArray[i] == nil) found = true; -- cgit v1.2.3