aboutsummaryrefslogtreecommitdiff
path: root/wagons.lua
diff options
context:
space:
mode:
authororwell96 <mono96.mml@gmail.com>2016-06-09 21:59:06 +0200
committerorwell96 <mono96.mml@gmail.com>2016-06-09 21:59:06 +0200
commitf9a7fa68b176f499375e1b6cbffcf5f2c52317e1 (patch)
treeb16435b16f52a93fd21e58288b252626dc3d6e81 /wagons.lua
parent77de1965f95924ffc9086786bcb22ec02d9a8e19 (diff)
downloadadvtrains-f9a7fa68b176f499375e1b6cbffcf5f2c52317e1.tar.gz
advtrains-f9a7fa68b176f499375e1b6cbffcf5f2c52317e1.tar.bz2
advtrains-f9a7fa68b176f499375e1b6cbffcf5f2c52317e1.zip
remove horizontal view offset on engine and try to fix damage when sitting in train
Diffstat (limited to 'wagons.lua')
-rw-r--r--wagons.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/wagons.lua b/wagons.lua
index 57553d5..6e737d5 100644
--- a/wagons.lua
+++ b/wagons.lua
@@ -37,12 +37,14 @@ function wagon:on_rightclick(clicker)
return
end
if self.driver and clicker == self.driver then
+ advtrains.player_to_wagon_mapping[self.driver:get_player_name()]=nil
advtrains.set_trainhud(self.driver:get_player_name(), "")
self.driver = nil
clicker:set_detach()
clicker:set_eye_offset({x=0,y=0,z=0}, {x=0,y=0,z=0})
elseif not self.driver then
self.driver = clicker
+ advtrains.player_to_wagon_mapping[clicker:get_player_name()]=self
clicker:set_attach(self.object, "", self.attach_offset, {x=0,y=0,z=0})
clicker:set_eye_offset(self.view_offset, self.view_offset)
end
@@ -355,7 +357,7 @@ advtrains.register_wagon("newlocomotive", "steam",{
textures = {"advtrains_newlocomotive.png"},
is_locomotive=true,
attach_offset={x=5, y=10, z=-10},
- view_offset={x=0, y=6, z=18},
+ view_offset={x=0, y=6, z=0},
visual_size = {x=1, y=1},
wagon_span=1.85,
collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},