1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-18 18:02:37 +01:00

(svn r22151) [1.1] -Backport from trunk:

- Fix: Spectators had crashes when closing buoy windows (r22131)
- Fix: Build-station-window showed wrong selection when reopening [FS#4530] (r22128)
- Fix: Canals would get drawn as land in the smallmap when using the owner window (r22127)
- Fix: The animation-ness of two goldmine tiles were swapped, causing the wheeltower to not work properly, and the bottom corner to show the wrong sprite [FS#4528] (r22125)
- Fix: CommandQueue::Pop() did not update 'last'; popping the last item caused the queue to disconnect unless there was only one item [FS#4522] (r22123)
This commit is contained in:
rubidium
2011-02-26 20:06:18 +00:00
parent cad2aa6b14
commit f2d2713f05
5 changed files with 12 additions and 6 deletions

View File

@@ -81,13 +81,16 @@ CommandPacket *CommandQueue::Pop(bool ignore_paused)
{
CommandPacket **prev = &this->first;
CommandPacket *ret = this->first;
CommandPacket *prev_item = NULL;
if (ignore_paused && _pause_mode != PM_UNPAUSED) {
while (ret != NULL && !IsCommandAllowedWhilePaused(ret->cmd)) {
prev_item = ret;
prev = &ret->next;
ret = ret->next;
}
}
if (ret != NULL) {
if (ret == this->last) this->last = prev_item;
*prev = ret->next;
this->count--;
}