mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-19 12:39:11 +00:00
(svn r14735) -Codechange: remove a bit of bit-waste in the map array (without changing the map array) and make the CompanyIDs contiguous.
-Note: 15 should be enough for now... making it any more means adding more bytes to the map array and thus wasting more bits instead of reducing the bit waste.
This commit is contained in:
@@ -1189,6 +1189,8 @@ struct NetworkLobbyWindow : public Window {
|
||||
SetDParamStr(0, gi->server_name);
|
||||
this->DrawWidgets();
|
||||
|
||||
SetVScrollCount(this, gi->companies_on);
|
||||
|
||||
/* Draw company list */
|
||||
pos = this->vscroll.pos;
|
||||
while (pos < gi->companies_on) {
|
||||
@@ -1207,7 +1209,7 @@ struct NetworkLobbyWindow : public Window {
|
||||
|
||||
pos++;
|
||||
y += NET_PRC__SIZE_OF_ROW;
|
||||
if (pos >= this->vscroll.cap) break;
|
||||
if (pos >= this->vscroll.pos + this->vscroll.cap) break;
|
||||
}
|
||||
|
||||
/* Draw info about selected company when it is selected in the left window */
|
||||
|
Reference in New Issue
Block a user