equal
deleted
inserted
replaced
48 * @param entity_type original entity type |
48 * @param entity_type original entity type |
49 */ |
49 */ |
50 void OverrideManagerBase::Add(uint8 local_id, uint32 grfid, uint entity_type) |
50 void OverrideManagerBase::Add(uint8 local_id, uint32 grfid, uint entity_type) |
51 { |
51 { |
52 assert(entity_type < max_offset); |
52 assert(entity_type < max_offset); |
|
53 /* An override can be set only once */ |
|
54 if (entity_overrides[entity_type] != invalid_ID) return; |
53 entity_overrides[entity_type] = local_id; |
55 entity_overrides[entity_type] = local_id; |
54 grfid_overrides[entity_type] = grfid; |
56 grfid_overrides[entity_type] = grfid; |
55 } |
57 } |
56 |
58 |
57 /** Resets the mapping, which is used while initializing game */ |
59 /** Resets the mapping, which is used while initializing game */ |