From 7fb300896a14df2016db32d474dde6c05873032f Mon Sep 17 00:00:00 2001 From: Maikel de Vries Date: Thu, 19 Jan 2017 19:57:31 +0100 Subject: [PATCH] fix AI SetGuardRange --- planet/Objects.ocd/Helpers.ocd/AI.ocd/Script.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/planet/Objects.ocd/Helpers.ocd/AI.ocd/Script.c b/planet/Objects.ocd/Helpers.ocd/AI.ocd/Script.c index 752589b3f..f67a91db4 100644 --- a/planet/Objects.ocd/Helpers.ocd/AI.ocd/Script.c +++ b/planet/Objects.ocd/Helpers.ocd/AI.ocd/Script.c @@ -160,10 +160,10 @@ public func SetGuardRange(object clonk, int x, int y, int wdt, int hgt) wdt += x; x = 0; } - if (y < 0) // TODO: seems wrong! + if (y < 0) { - wdt += x; - x = 0; + hgt += y; + y = 0; } wdt = Min(wdt, LandscapeWidth() - x); hgt = Min(hgt, LandscapeHeight() - y);