From e53670904127c8493e13b587e507407f2beac8b3 Mon Sep 17 00:00:00 2001 From: 1F616EMO Date: Sun, 29 Sep 2024 06:37:40 +0800 Subject: Fix depercated functions --- advtrains/couple.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'advtrains/couple.lua') diff --git a/advtrains/couple.lua b/advtrains/couple.lua index cbeb661..795419c 100644 --- a/advtrains/couple.lua +++ b/advtrains/couple.lua @@ -453,7 +453,7 @@ minetest.register_entity("advtrains:discouple", { self.object:remove() return end - --getyaw seems to be a reliable method to check if an object is loaded...if it returns nil, it is not. + --get_yaw seems to be a reliable method to check if an object is loaded...if it returns nil, it is not. if not self.wagon.object:get_yaw() then self.object:remove() return @@ -500,7 +500,7 @@ minetest.register_entity("advtrains:couple", { self.object:remove() end, on_step=function(self, dtime) - if advtrains.wagon_outside_range(self.object:getpos()) then + if advtrains.wagon_outside_range(self.object:get_pos()) then --atdebug("Couple Removing outside range") self.object:remove() return @@ -539,7 +539,7 @@ minetest.register_entity("advtrains:couple", { tp2=advtrains.path_get_interpolated(train2, train2.end_index) end local pos_median=advtrains.pos_median(tp1, tp2) - if not vector.equals(pos_median, self.object:getpos()) then + if not vector.equals(pos_median, self.object:get_pos()) then self.object:set_pos(pos_median) end self.position_set=true -- cgit v1.2.3