aboutsummaryrefslogtreecommitdiff
path: root/advtrains/couple.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2018-05-29 12:27:02 +0200
committerorwell96 <orwell@bleipb.de>2018-06-14 17:39:42 +0200
commit2a76d4a960aa29621dc8020f84eee241b41e10c0 (patch)
treea832307a81752012ed19f946281c64fc7e72e2ed /advtrains/couple.lua
parent254c32e304a4f279bf99e460727daf1b78050c47 (diff)
downloadadvtrains-2a76d4a960aa29621dc8020f84eee241b41e10c0.tar.gz
advtrains-2a76d4a960aa29621dc8020f84eee241b41e10c0.tar.bz2
advtrains-2a76d4a960aa29621dc8020f84eee241b41e10c0.zip
Fix final bugs and to-do's (u.a.save/load system)
Diffstat (limited to 'advtrains/couple.lua')
-rw-r--r--advtrains/couple.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/advtrains/couple.lua b/advtrains/couple.lua
index a4eecf4..1aac0b3 100644
--- a/advtrains/couple.lua
+++ b/advtrains/couple.lua
@@ -34,7 +34,7 @@ minetest.register_entity("advtrains:discouple", {
return advtrains.pcall(function()
local pname = player:get_player_name()
if pname and pname~="" and self.wagon then
- if self.wagon:safe_decouple(pname) then
+ if advtrains.safe_decouple_wagon(self.wagon.id, pname) then
self.object:remove()
else
minetest.add_entity(self.object:getpos(), "advtrains:lockmarker")
@@ -53,7 +53,7 @@ minetest.register_entity("advtrains:discouple", {
self.object:remove()
return
end
- if not self.wagon:train() and self.wagon:train().velocity > 0 then
+ if not self.wagon:train() or self.wagon:train().velocity > 0 then
self.object:remove()
return
end