diff options
author | glx <glx@openttd.org> | 2007-11-12 20:42:35 +0000 |
---|---|---|
committer | glx <glx@openttd.org> | 2007-11-12 20:42:35 +0000 |
commit | de7f58d5d4411035abb0f324fdb5afeed9d20534 (patch) | |
tree | 909571993ba3e25d2847f865f84ee42db342beda | |
parent | 60ccc5bbce380f8b6203902b9206e0e86ba8462b (diff) | |
download | openttd-de7f58d5d4411035abb0f324fdb5afeed9d20534.tar.xz |
(svn r11424) -Fix: an override can be set only once
-rw-r--r-- | src/newgrf_commons.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/newgrf_commons.cpp b/src/newgrf_commons.cpp index 823c0f918..5afcab114 100644 --- a/src/newgrf_commons.cpp +++ b/src/newgrf_commons.cpp @@ -50,6 +50,8 @@ OverrideManagerBase::~OverrideManagerBase() void OverrideManagerBase::Add(uint8 local_id, uint32 grfid, uint entity_type) { assert(entity_type < max_offset); + /* An override can be set only once */ + if (entity_overrides[entity_type] != invalid_ID) return; entity_overrides[entity_type] = local_id; grfid_overrides[entity_type] = grfid; } |