Do not crash when player gets on a train while it`s turning

master
orwell96 2018-02-07 22:29:08 +01:00 committed by GitHub
parent c93a5bf390
commit 06cdb14f3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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