aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororwell96 <mono96.mml@gmail.com>2016-10-19 17:05:51 +0200
committerorwell96 <mono96.mml@gmail.com>2016-10-19 17:05:51 +0200
commit414ae45adc3343f01a6e3cb2d1b3d8c80b5b2319 (patch)
treefa27312a9df5c7660cffd0d7b01ef628d3dac7a2
parent8cae3cf9ee035757d5004389d12634f1a34f90bc (diff)
downloadadvtrains-414ae45adc3343f01a6e3cb2d1b3d8c80b5b2319.tar.gz
advtrains-414ae45adc3343f01a6e3cb2d1b3d8c80b5b2319.tar.bz2
advtrains-414ae45adc3343f01a6e3cb2d1b3d8c80b5b2319.zip
try to make engine animation work
-rw-r--r--models/advtrains_engine_steam.b3d (renamed from models/newlocomotive.b3d)bin298724 -> 298724 bytes
-rw-r--r--wagons.lua18
2 files changed, 9 insertions, 9 deletions
diff --git a/models/newlocomotive.b3d b/models/advtrains_engine_steam.b3d
index 9043b70..6a4d1bb 100644
--- a/models/newlocomotive.b3d
+++ b/models/advtrains_engine_steam.b3d
Binary files differ
diff --git a/wagons.lua b/wagons.lua
index 47d7aae..66c0411 100644
--- a/wagons.lua
+++ b/wagons.lua
@@ -418,7 +418,7 @@ advtrains.register_wagon("yellowwagon", "steam",{textures = {"yellow.png"}})
this function will be called when the velocity vector changes or every 2 seconds.
]]
advtrains.register_wagon("newlocomotive", "steam",{
- mesh="newlocomotive.b3d",
+ mesh="advtrains_engine_steam.b3d",
textures = {"advtrains_newlocomotive.png"},
is_locomotive=true,
attach_offset={x=5, y=10, z=-10},
@@ -426,12 +426,12 @@ advtrains.register_wagon("newlocomotive", "steam",{
visual_size = {x=1, y=1},
wagon_span=1.85,
collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
- --[[update_animation=function(self, velocity)
- if self.old_anim_velocity~=advtrains.abs_ceil(velocity) then
- self.object:set_animation({x=1,y=60}, math.floor(velocity))
- self.old_anim_velocity=advtrains.abs_ceil(velocity)
- end
- end]]
+ update_animation=function(self, velocity)
+ --if self.old_anim_velocity~=advtrains.abs_ceil(velocity) then
+ self.object:set_animation({x=1,y=60}, 100)--math.floor(velocity))
+ --self.old_anim_velocity=advtrains.abs_ceil(velocity)
+ --end
+ end,
drops={"default:steelblock 4"},
}, "Steam Engine", "advtrains_newlocomotive_inv.png")
advtrains.register_wagon("wagon_default", "steam",{
@@ -445,7 +445,7 @@ advtrains.register_wagon("wagon_default", "steam",{
drops={"default:steelblock 4"},
}, "Passenger Wagon", "advtrains_wagon_inv.png")
-advtrains.register_train_type("electric", {"default"})
+advtrains.register_train_type("electric", {"regular", "default"}, 20)
advtrains.register_wagon("engine_japan", "electric",{
mesh="advtrains_engine_japan.b3d",
@@ -471,7 +471,7 @@ advtrains.register_wagon("wagon_japan", "electric",{
}, "Japanese Train Wagon", "blue.png")
-advtrains.register_train_type("subway", {"default"})
+advtrains.register_train_type("subway", {"default"}, 15)
advtrains.register_wagon("subway_wagon", "subway",{
mesh="advtrains_subway_train.b3d",