Fix player_to_train_mapping (H#74)
Entries were not inserted, thus neither damage protection nor teleport-to-train did work
This commit is contained in:
parent
fb10420c38
commit
36357bd444
|
@ -108,7 +108,7 @@ function advtrains.tp_player_to_train(player)
|
|||
--set the player to the train position.
|
||||
--minetest will emerge the area and load the objects, which then will call reattach_all().
|
||||
--because player is in mapping, it will not be subject to dying.
|
||||
player:setpos(train.last_pos_prev)
|
||||
player:setpos(train.last_pos)
|
||||
end
|
||||
end
|
||||
minetest.register_on_joinplayer(function()
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue