summaryrefslogtreecommitdiff
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
commit34429b8154e45bc6acafd4d3af7a4f9b99f8b5c4 (patch)
treefa08c68f7f2d09286c9250e754383fca997e30d3
parent81fbf3f6dd8228ea1f97906c3b9dc4ff5ad7bac3 (diff)
downloadbasic_trains-34429b8154e45bc6acafd4d3af7a4f9b99f8b5c4.tar.gz
basic_trains-34429b8154e45bc6acafd4d3af7a4f9b99f8b5c4.tar.bz2
basic_trains-34429b8154e45bc6acafd4d3af7a4f9b99f8b5c4.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
-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)