aboutsummaryrefslogtreecommitdiff
path: root/advtrains_train_steam/init.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2017-11-29 17:20:46 +0100
committerorwell96 <orwell@bleipb.de>2017-11-29 17:20:46 +0100
commit83df46d7865aa762afda2bdb6b786cd04bf9480d (patch)
treec8abb20ac97bb3e3813855349c7904803196cc03 /advtrains_train_steam/init.lua
parent7681de96c95a716f7910a42b0f2beb5b23b1df47 (diff)
downloadadvtrains-83df46d7865aa762afda2bdb6b786cd04bf9480d.tar.gz
advtrains-83df46d7865aa762afda2bdb6b786cd04bf9480d.tar.bz2
advtrains-83df46d7865aa762afda2bdb6b786cd04bf9480d.zip
Change name of update_animation function
I will use this for sounds, and so it needs to be changed to a more general name
Diffstat (limited to 'advtrains_train_steam/init.lua')
-rwxr-xr-xadvtrains_train_steam/init.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/advtrains_train_steam/init.lua b/advtrains_train_steam/init.lua
index 315104a..37c63a0 100755
--- a/advtrains_train_steam/init.lua
+++ b/advtrains_train_steam/init.lua
@@ -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)