diff options
author | orwell96 <orwell@bleipb.de> | 2022-01-13 21:03:55 +0100 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2023-05-27 12:26:10 +0200 |
commit | f284d395d700ffb0fad29c18a9cfe466ed92961b (patch) | |
tree | c64f5310a9adf28ce8e6503c57ad4230386a9281 /advtrains/couple.lua | |
parent | 283efc44ce78001ebd17f64555eb795e36b27a61 (diff) | |
download | advtrains-f284d395d700ffb0fad29c18a9cfe466ed92961b.tar.gz advtrains-f284d395d700ffb0fad29c18a9cfe466ed92961b.tar.bz2 advtrains-f284d395d700ffb0fad29c18a9cfe466ed92961b.zip |
Add TrackIterator interface as a common framework for walking along tracks (also for third-party libs)
This will replace the interlocking traverser and will be used in the new itrainmap implementation
Diffstat (limited to 'advtrains/couple.lua')
-rw-r--r-- | advtrains/couple.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/advtrains/couple.lua b/advtrains/couple.lua index 3e6c432..49c8a5d 100644 --- a/advtrains/couple.lua +++ b/advtrains/couple.lua @@ -475,7 +475,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 @@ -514,7 +514,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 |