From fc43b1ba0987afce993d74bd5f092e4a275c8616 Mon Sep 17 00:00:00 2001 From: hackykid Date: Mon, 27 Jun 2005 21:34:31 +0000 Subject: (svn r2494) - Fix: [newgrf] Dont assume a spriteset can only have 4 or 8 sprites. --- engine.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/engine.c b/engine.c index 671427e3c..65f016eda 100644 --- a/engine.c +++ b/engine.c @@ -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; -- cgit v1.2.3-70-g09d2