Do not crash when player gets on a train while it`s turning
parent
c93a5bf390
commit
06cdb14f3d
|
@ -526,7 +526,7 @@ function wagon:on_step(dtime)
|
||||||
self.player_yaw[name] = p:get_look_horizontal()-self.old_yaw
|
self.player_yaw[name] = p:get_look_horizontal()-self.old_yaw
|
||||||
end
|
end
|
||||||
-- set player looking direction using calculated offset
|
-- 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
|
||||||
end
|
end
|
||||||
self.turning = true
|
self.turning = true
|
||||||
|
|
Loading…
Reference in New Issue