aboutsummaryrefslogtreecommitdiff
path: root/advtrains/wagons.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2018-12-16 20:39:55 +0100
committerorwell96 <orwell@bleipb.de>2018-12-16 20:39:55 +0100
commit36357bd444106282890278092c474eaf397bd8a9 (patch)
treeeff46d972d9dc936d5299a2ba9b5dc1724ec0a8b /advtrains/wagons.lua
parentfb10420c38d09b7f60682c55a98c85359bc50eb0 (diff)
downloadadvtrains-36357bd444106282890278092c474eaf397bd8a9.tar.gz
advtrains-36357bd444106282890278092c474eaf397bd8a9.tar.bz2
advtrains-36357bd444106282890278092c474eaf397bd8a9.zip
Fix player_to_train_mapping (H#74)
Entries were not inserted, thus neither damage protection nor teleport-to-train did work
Diffstat (limited to 'advtrains/wagons.lua')
-rw-r--r--advtrains/wagons.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/advtrains/wagons.lua b/advtrains/wagons.lua
index 4c254a8..2f9ab65 100644
--- a/advtrains/wagons.lua
+++ b/advtrains/wagons.lua
@@ -636,7 +636,7 @@ function wagon:get_on(clicker, seatno)
atprint("get_on: attaching",clicker:get_player_name())
data.seatp[seatno] = clicker:get_player_name()
self.seatpc[seatno] = clicker:get_player_control_bits()
- advtrains.player_to_train_mapping[clicker:get_player_name()]=self.train_id
+ advtrains.player_to_train_mapping[clicker:get_player_name()]=data.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