Code Error in CityArea.lua

Have some feedback for Life is Feudal: Forest Village? Post it here!

Axe22
 
Posts: 9
Joined: 01 Jan 2018, 11:07

Code Error in CityArea.lua

Post by Axe22 » 01 Jan 2018, 12:13

Since the bug report forum is locked I will report this here.

In CityArea.lua there is this function:

function CityArea:isValidPoint(p)
return p.x > 0 and p.y > 0 and p.x < self.landSize and p.x < self.landSize
end

which as you can see is checking p.x < self.landSize twice. I believe the second one ought to be p.y < self.landSize else the function will return true for all points whose x coordinate is between 0 and the landSize regardless of y coordinate. This is causing the function to mistakenly identify as valid many points which actually lie outside the city area.

Return to Feedback Section

cron