aboutsummaryrefslogtreecommitdiff
path: root/wagons.lua
diff options
context:
space:
mode:
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()