diff options
author | rubidium <rubidium@openttd.org> | 2008-04-23 00:14:49 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-04-23 00:14:49 +0000 |
commit | 2d860049a741eeeebac6ff3fb3b829cad967670c (patch) | |
tree | ce7256cb62030c63a9834a408c4ce5f57d1076c9 /src/industry_cmd.cpp | |
parent | 501b89b8de86aef593035bcf8fcac5c262930651 (diff) | |
download | openttd-2d860049a741eeeebac6ff3fb3b829cad967670c.tar.xz |
(svn r12844) -Fix: the industry tick trigger should only be triggered once every 256 ticks, not every tick... Also bail out of the triggers a little earlier if you know they are not going to happen anyway.
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r-- | src/industry_cmd.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index 6dac2fab9..75b7c3ca0 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -1033,6 +1033,9 @@ static void ProduceIndustryGoods(Industry *i) if (cut) ChopLumberMillTrees(i); } + + TriggerIndustry(i, INDUSTRY_TRIGGER_INDUSTRY_TICK); + StartStopIndustryTileAnimation(i, IAT_INDUSTRY_TICK); } } @@ -1054,8 +1057,6 @@ void OnTick_Industry() if (_game_mode == GM_EDITOR) return; FOR_ALL_INDUSTRIES(i) { - TriggerIndustry(i, INDUSTRY_TRIGGER_INDUSTRY_TICK); - StartStopIndustryTileAnimation(i, IAT_INDUSTRY_TICK); ProduceIndustryGoods(i); } } |