NML 0.5.3 vehicle animations broken?

Discussions about the technical aspects of graphics development, including NewGRF tools and utilities.

Moderator: Graphics Moderators

Post Reply
User avatar
LaDoncella
Traffic Manager
Traffic Manager
Posts: 249
Joined: 28 Sep 2004 16:01
Contact:

NML 0.5.3 vehicle animations broken?

Post by LaDoncella »

Just compiled eGRVT2 with a few changes viewtopic.php?f=67&t=62841&start=200 with nml 0.5.3 windows binary.
And the horse animations, despite not being touched from the previous versions don't work. Only play a few frames for the first vehicle using them an thats about it.

Did the way animations for vehicles are coded changed at some point, or they are broken?
User avatar
LaDoncella
Traffic Manager
Traffic Manager
Posts: 249
Joined: 28 Sep 2004 16:01
Contact:

Re: NML 0.5.3 vehicle animations broken?

Post by LaDoncella »

for future reference if anyone needs it:
to use vehicle animations you need to clamp motion_counter with modulus operator ( % ) to the number of animation steeps you have.

Code: Select all

switch (FEAT_ROADVEHS, PARENT, switch_2HORSE_v1_animation, motion_counter % 3) {
	1:  spriteset_2HORSE_v1_a1;
	2:  spriteset_2HORSE_v1_a2;
	spriteset_2HORSE_v1_a3;
}
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 5 guests