mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-20 10:52:41 +01:00
Codechange: Store grfid with entity grfprops.
This allows using the grfid without having to dereference the grffile pointer. Uses no extra storage as it fits within otherwise wasted padding space.
This commit is contained in:
committed by
Peter Nelson
parent
e750d10cee
commit
e73d6fcaac
@@ -71,6 +71,7 @@ void SetCustomEngineSprites(EngineID engine, uint8_t cargo, const SpriteGroup *g
|
||||
void SetEngineGRF(EngineID engine, const GRFFile *file)
|
||||
{
|
||||
Engine *e = Engine::Get(engine);
|
||||
e->grf_prop.grfid = file->grfid;
|
||||
e->grf_prop.grffile = file;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user