From 9cee4e91cb736db6dfd4541e00cf8e077158a0b7 Mon Sep 17 00:00:00 2001 From: glx Date: Mon, 12 Nov 2007 20:42:35 +0000 Subject: (svn r11424) -Fix: an override can be set only once --- src/newgrf_commons.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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; } -- cgit v1.2.3-70-g09d2