Change name of update_animation function
I will use this for sounds, and so it needs to be changed to a more general name
This commit is contained in:
parent
81fbf3f6dd
commit
34429b8154
@ -37,7 +37,7 @@ advtrains.register_wagon("newlocomotive", {
|
||||
visual_size = {x=1, y=1},
|
||||
wagon_span=2.3,
|
||||
collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
|
||||
update_animation=function(self, velocity)
|
||||
custom_on_velocity_change=function(self, velocity)
|
||||
if self.old_anim_velocity~=advtrains.abs_ceil(velocity) then
|
||||
self.object:set_animation({x=1,y=80}, advtrains.abs_ceil(velocity)*15, 0, true)
|
||||
self.old_anim_velocity=advtrains.abs_ceil(velocity)
|
||||
@ -105,7 +105,7 @@ advtrains.register_wagon("detailed_steam_engine", {
|
||||
visual_size = {x=1, y=1},
|
||||
wagon_span=2.05,
|
||||
collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
|
||||
update_animation=function(self, velocity)
|
||||
custom_on_velocity_change=function(self, velocity)
|
||||
if self.old_anim_velocity~=advtrains.abs_ceil(velocity) then
|
||||
self.object:set_animation({x=1,y=80}, advtrains.abs_ceil(velocity)*15, 0, true)
|
||||
self.old_anim_velocity=advtrains.abs_ceil(velocity)
|
||||
|
Loading…
x
Reference in New Issue
Block a user