aboutsummaryrefslogtreecommitdiff
path: root/wagons.lua
diff options
context:
space:
mode:
authororwell96 <mono96.mml@gmail.com>2016-12-05 20:53:43 +0100
committerorwell96 <mono96.mml@gmail.com>2016-12-05 20:53:43 +0100
commit631636f75706659dba11afc3a9d8075d8278fe43 (patch)
tree7d560760666e94e91d903a0293717414ff86f449 /wagons.lua
parent8f5c0feb45555fc92578936a314b1d3a3422c60d (diff)
downloadadvtrains-631636f75706659dba11afc3a9d8075d8278fe43.tar.gz
advtrains-631636f75706659dba11afc3a9d8075d8278fe43.tar.bz2
advtrains-631636f75706659dba11afc3a9d8075d8278fe43.zip
try to fix damage bug
Diffstat (limited to 'wagons.lua')
-rw-r--r--wagons.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/wagons.lua b/wagons.lua
index 6b3780a..ca31590 100644
--- a/wagons.lua
+++ b/wagons.lua
@@ -416,7 +416,7 @@ function wagon:get_on(clicker, seatno)
self:get_off(seatno)
end
self.seatp[seatno] = clicker:get_player_name()
- advtrains.player_to_wagon_mapping[clicker:get_player_name()]={wagon=self, seatno=seatno}
+ advtrains.player_to_train_mapping[clicker:get_player_name()]=self.train_id
clicker:set_attach(self.object, "", self.seats[seatno].attach_offset, {x=0,y=0,z=0})
clicker:set_eye_offset(self.seats[seatno].view_offset, self.seats[seatno].view_offset)
end
@@ -438,7 +438,7 @@ function wagon:get_off(seatno)
if not self.seatp[seatno] then return end
local pname = self.seatp[seatno]
local clicker = minetest.get_player_by_name(pname)
- advtrains.player_to_wagon_mapping[pname]=nil
+ advtrains.player_to_train_mapping[pname]=nil
advtrains.clear_driver_hud(pname)
if clicker then
clicker:set_detach()