From 4f8119490666220ab1c067cbc0a0331ee607f011 Mon Sep 17 00:00:00 2001 From: Margo Date: Tue, 12 Mar 2024 21:05:29 +0100 Subject: [PATCH] Fix nil pointer --- api/behaviors.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/behaviors.lua b/api/behaviors.lua index 8493603..2c7d5b4 100644 --- a/api/behaviors.lua +++ b/api/behaviors.lua @@ -196,7 +196,7 @@ creatura.register_movement_method("draconis:fly_simple", function(self) local steer_to local steer_timer = 0.25 local width = self.width - local wayp_threshold = width + (width / self.turn_rate) + local wayp_threshold = width + (width / (self.turn_rate or 6)) self:set_gravity(0) local function func(_self, goal, speed_factor)