aboutsummaryrefslogtreecommitdiff
path: root/advtrains
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains')
-rw-r--r--advtrains/wagons.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/advtrains/wagons.lua b/advtrains/wagons.lua
index ee668ac..fd01abd 100644
--- a/advtrains/wagons.lua
+++ b/advtrains/wagons.lua
@@ -526,7 +526,7 @@ function wagon:on_step(dtime)
self.player_yaw[name] = p:get_look_horizontal()-self.old_yaw
end
-- set player looking direction using calculated offset
- p:set_look_horizontal(self.player_yaw[name]+yaw)
+ p:set_look_horizontal((self.player_yaw[name] or 0)+yaw)
end
end
self.turning = true