From 7470322a3d0fd1d37ab95ba4625e3bed2ad22f84 Mon Sep 17 00:00:00 2001 From: Darkvater Date: Sat, 14 May 2005 12:36:16 +0000 Subject: (svn r2306) - CodeChange: Check the last commands; refits. This needed an extensive rewrite and global/local-cargo ID juggling and bitmasking. However with this done it looks better as well and is compatible with newgrf handling. Big thanks to HackyKid for doing most of the work. This also closes patch "[ 1199277 ] Command checks" --- newgrf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'newgrf.c') diff --git a/newgrf.c b/newgrf.c index 30c5a8f06..3607326aa 100644 --- a/newgrf.c +++ b/newgrf.c @@ -1450,8 +1450,7 @@ static void NewVehicle_SpriteGroupMapping(byte *buf, int len) return; } - if (ctype == 0xFF) - ctype = CID_PURCHASE; + if (ctype == GC_INVALID) ctype = GC_PURCHASE; if (wagover) { // TODO: No multiple cargo types per vehicle yet. --pasky @@ -1482,7 +1481,7 @@ static void NewVehicle_SpriteGroupMapping(byte *buf, int len) // TODO: No multiple cargo types per vehicle yet. --pasky SetWagonOverrideSprites(engine, &_cur_grffile->spritegroups[groupid], last_engines, last_engines_count); } else { - SetCustomEngineSprites(engine, CID_DEFAULT, &_cur_grffile->spritegroups[groupid]); + SetCustomEngineSprites(engine, GC_DEFAULT, &_cur_grffile->spritegroups[groupid]); last_engines[i] = engine; } } -- cgit v1.2.3-54-g00ecf