Fix warning

This commit is contained in:
ElCeejo 2022-08-06 21:50:50 -07:00 committed by GitHub
parent 27f4ffe167
commit 8ba75101ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -165,7 +165,7 @@ local function interp_rad(a, b, w)
end end
local function turn(self, tyaw, rate) local function turn(self, tyaw, rate)
local rate = rate or 5 rate = rate or 5
local rot = self.object:get_rotation() local rot = self.object:get_rotation()
local yaw = self.object:get_yaw() local yaw = self.object:get_yaw()
if not yaw then return end if not yaw then return end
@ -666,7 +666,7 @@ function mob:set_utility_score(n)
self._utility_data.score = n or 0 self._utility_data.score = n or 0
end end
function mob:get_utility_score(n) function mob:get_utility_score()
return (self._utility_data and self._utility_data.score) or 0 return (self._utility_data and self._utility_data.score) or 0
end end