(svn r2494) - Fix: [newgrf] Dont assume a spriteset can only have 4 or 8 sprites.

This commit is contained in:
hackykid 2005-06-27 21:34:31 +00:00
parent b38358f8b7
commit fc43b1ba09
1 changed files with 2 additions and 3 deletions

View File

@ -563,9 +563,8 @@ int GetCustomEngineSprite(byte engine, const Vehicle *v, byte direction)
return 0;
}
direction %= 8;
if (rsg->sprites_per_set == 4)
direction %= 4;
assert(rsg->sprites_per_set <= 8);
direction %= rsg->sprites_per_set;
totalsets = in_motion ? rsg->loaded_count : rsg->loading_count;