Make sure an old_velocity is always passed
Fixes crash on placing a new subway wagon
This commit is contained in:
parent
dc67ff7226
commit
e9c51dfab4
|
@ -519,7 +519,7 @@ function wagon:on_step(dtime)
|
|||
self:update_animation(gp.velocity, self.old_velocity)
|
||||
end
|
||||
if self.custom_on_velocity_change then
|
||||
self:custom_on_velocity_change(gp.velocity, self.old_velocity)
|
||||
self:custom_on_velocity_change(gp.velocity, self.old_velocity or 0)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue