1
0
Fork 0

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

- Fix: Prevent authentication bypass for the admin port when a new game is started [FS#4771] (r22934)
- Fix: TTO savegames with any aircraft not in an hangar caused crashes during load (r22915)
- Fix: Windows 2000 and XP without service pack 3 must use the win9x binary/installer; the newer MSVC compiler of the compile farm does not support those versions of Windows anymore [FS#4749] (r22909)
release/1.1
rubidium 2011-09-15 18:56:43 +00:00
parent c33d1fc60b
commit c42d060a44
10 changed files with 61 additions and 43 deletions

View File

@ -57,6 +57,7 @@ Var CDDRIVE
; Modern interface settings ; Modern interface settings
!include "MUI2.nsh" !include "MUI2.nsh"
!include "InstallOptions.nsh" !include "InstallOptions.nsh"
!include "WinVer.nsh"
!define MUI_ABORTWARNING !define MUI_ABORTWARNING
!define MUI_WELCOMEPAGE_TITLE_3LINES !define MUI_WELCOMEPAGE_TITLE_3LINES
@ -518,17 +519,17 @@ hasCD:
FunctionEnd FunctionEnd
;------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------
; Determine windows version, returns "win9x" if Win9x/Me or "winnt" on the stack ; Determine windows version, returns "win9x" if Win9x/Me/2000/XP SP2- or "winnt" for the rest on the stack
Function GetWindowsVersion Function GetWindowsVersion
ClearErrors ClearErrors
StrCpy $R0 "winnt"
GetVersion::WindowsPlatformId
Pop $R0
IntCmp $R0 2 WinNT 0
StrCpy $R0 "win9x" StrCpy $R0 "win9x"
WinNT: ${If} ${IsNT}
ClearErrors ${If} ${IsWinXP}
${AndIf} ${AtLeastServicePack} 3
${OrIf} ${AtLeastWin2003}
StrCpy $R0 "winnt"
${EndIf}
${EndIf}
Push $R0 Push $R0
FunctionEnd FunctionEnd
@ -540,12 +541,12 @@ Function CheckProcessorArchitecture
IntCmp $R0 64 Win64 0 IntCmp $R0 64 Win64 0
ClearErrors ClearErrors
IntCmp ${APPBITS} 64 0 Done IntCmp ${APPBITS} 64 0 Done
MessageBox MB_OKCANCEL|MB_ICONSTOP "You are trying to install the 64-bit OpenTTD on a 32-bit operating system. This is not going to work. Please download the correct version. Do you really want to continue?" IDOK Done IDCANCEL Abort MessageBox MB_YESNO|MB_ICONSTOP "You are trying to install the 64-bit OpenTTD on a 32-bit operating system. This is not going to work. Please download the correct version. Do you really want to continue?" IDYES Done IDNO Abort
GoTo Done GoTo Done
Win64: Win64:
ClearErrors ClearErrors
IntCmp ${APPBITS} 64 Done 0 IntCmp ${APPBITS} 64 Done 0
MessageBox MB_OKCANCEL|MB_ICONINFORMATION "You are trying to install the 32-bit OpenTTD on a 64-bit operating system. This is not advised, but will work with reduced capabilities. We suggest that you download the correct version. Do you really want to continue?" IDOK Done IDCANCEL Abort MessageBox MB_YESNO|MB_ICONINFORMATION "You are trying to install the 32-bit OpenTTD on a 64-bit operating system. This is not advised, but will work with reduced capabilities. We suggest that you download the correct version. Do you really want to continue?" IDYES Done IDNO Abort
GoTo Done GoTo Done
Abort: Abort:
Quit Quit
@ -560,12 +561,12 @@ Function CheckWindowsVersion
StrCmp $R0 "win9x" 0 WinNT StrCmp $R0 "win9x" 0 WinNT
ClearErrors ClearErrors
StrCmp ${APPARCH} "win9x" Done 0 StrCmp ${APPARCH} "win9x" Done 0
MessageBox MB_OKCANCEL|MB_ICONSTOP "You are trying to install the Windows 2000, XP, Vista and 7 version on Windows 95, 98 or ME. This is will not work. Please download the correct version. Do you really want to continue?" IDOK Done IDCANCEL Abort MessageBox MB_YESNO|MB_ICONSTOP "You are trying to install the Windows XP SP3, Vista and 7 version on Windows 95, 98, ME, 2000 and XP without SP3. This is will not work. Please download the correct version. Do you really want to continue?" IDYES Done IDNO Abort
GoTo Done GoTo Done
WinNT: WinNT:
ClearErrors ClearErrors
StrCmp ${APPARCH} "win9x" 0 Done StrCmp ${APPARCH} "win9x" 0 Done
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "You are trying to install the Windows 95, 98 and ME version on Windows 2000, XP, Vista or 7. This is not advised, but will work with reduced capabilities. We suggest that you download the correct version. Do you really want to continue?" IDOK Done IDCANCEL Abort MessageBox MB_YESNO|MB_ICONEXCLAMATION "You are trying to install the Windows 95, 98, 2000 and XP without SP3 version on Windows XP SP3, Vista or 7. This is not advised, but will work with reduced capabilities. We suggest that you download the correct version. Do you really want to continue?" IDYES Done IDNO Abort
Abort: Abort:
Quit Quit
Done: Done:
@ -674,8 +675,7 @@ WelcomeToSetup:
ReadRegStr $OLDVERSION HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "DisplayVersion" ReadRegStr $OLDVERSION HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "DisplayVersion"
; Gets the older version then displays it in a message box ; Gets the older version then displays it in a message box
MessageBox MB_OK|MB_ICONINFORMATION \ MessageBox MB_OK|MB_ICONINFORMATION \
"Welcome to ${APPNAMEANDVERSION} Setup.$\n \ "Welcome to ${APPNAMEANDVERSION} Setup.$\nThis will allow you to upgrade from version $OLDVERSION."
This will allow you to upgrade from version $OLDVERSION."
SectionSetFlags ${Section2} 0x80 ; set bit 7 SectionSetFlags ${Section2} 0x80 ; set bit 7
SectionSetFlags ${Section3} 0x80 ; set bit 7 SectionSetFlags ${Section3} 0x80 ; set bit 7
SectionSetFlags ${Section4} 0x80 ; set bit 7 SectionSetFlags ${Section4} 0x80 ; set bit 7
@ -686,8 +686,7 @@ VersionsAreEqual:
ReadRegStr $UninstallString HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "UninstallString" ReadRegStr $UninstallString HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenTTD" "UninstallString"
IfFileExists "$UninstallString" "" FinishCallback IfFileExists "$UninstallString" "" FinishCallback
MessageBox MB_YESNO|MB_ICONQUESTION \ MessageBox MB_YESNO|MB_ICONQUESTION \
"Setup detected ${APPNAMEANDVERSION} on your system. This is the same version that this program will install.$\n \ "Setup detected ${APPNAMEANDVERSION} on your system. This is the same version that this program will install.$\nAre you trying to uninstall it?" \
Are you trying to uninstall it?" \
IDYES DoUninstall IDNO FinishCallback IDYES DoUninstall IDNO FinishCallback
DoUninstall: ; You have the same version as this installer. This allows you to uninstall. DoUninstall: ; You have the same version as this installer. This allows you to uninstall.
Exec "$UninstallString" Exec "$UninstallString"
@ -695,8 +694,7 @@ DoUninstall: ; You have the same version as this installer. This allows you to
InstallerIsOlder: InstallerIsOlder:
MessageBox MB_OK|MB_ICONSTOP \ MessageBox MB_OK|MB_ICONSTOP \
"You have a newer version of ${APPNAME}.$\n \ "You have a newer version of ${APPNAME}.$\nSetup will now exit."
Setup will now exit."
Quit Quit
FinishCallback: FinishCallback:

View File

@ -1,5 +1,5 @@
!define APPBITS 32 ; Define number of bits for the architecture !define APPBITS 32 ; Define number of bits for the architecture
!define EXTRA_VERSION "2000, XP, Vista and 7" !define EXTRA_VERSION "XP SP3, Vista and 7"
!define APPARCH "win32" ; Define the application architecture !define APPARCH "win32" ; Define the application architecture
!define BINARY_DIR "${PATH_ROOT}objs\win32\Release" !define BINARY_DIR "${PATH_ROOT}objs\win32\Release"
InstallDir "$PROGRAMFILES32\OpenTTD\" InstallDir "$PROGRAMFILES32\OpenTTD\"

View File

@ -1,5 +1,5 @@
!define APPBITS 32 ; Define number of bits for the architecture !define APPBITS 32 ; Define number of bits for the architecture
!define EXTRA_VERSION "95, 98 and ME" !define EXTRA_VERSION "95, 98, ME, 2000 and XP without SP3"
!define APPARCH "win9x" ; Define the application architecture !define APPARCH "win9x" ; Define the application architecture
!define BINARY_DIR "${PATH_ROOT}bin" !define BINARY_DIR "${PATH_ROOT}bin"
InstallDir "$PROGRAMFILES32\OpenTTD\" InstallDir "$PROGRAMFILES32\OpenTTD\"

View File

@ -31,7 +31,7 @@ void GetAircraftSpriteSize(EngineID engine, uint &width, uint &height);
void UpdateAirplanesOnNewStation(const Station *st); void UpdateAirplanesOnNewStation(const Station *st);
void UpdateAircraftCache(Aircraft *v); void UpdateAircraftCache(Aircraft *v);
void AircraftLeaveHangar(Aircraft *v); void AircraftLeaveHangar(Aircraft *v, Direction exit_dir);
void AircraftNextAirportPos_and_Order(Aircraft *v); void AircraftNextAirportPos_and_Order(Aircraft *v);
void SetAircraftPosition(Aircraft *v, int x, int y, int z); void SetAircraftPosition(Aircraft *v, int x, int y, int z);
byte GetAircraftFlyingAltitude(const Aircraft *v); byte GetAircraftFlyingAltitude(const Aircraft *v);

View File

@ -1246,15 +1246,17 @@ void AircraftNextAirportPos_and_Order(Aircraft *v)
/** /**
* Aircraft is about to leave the hangar. * Aircraft is about to leave the hangar.
* @param v Aircraft leaving. * @param v Aircraft leaving.
* @param exit_dir The direction the vehicle leaves the hangar.
* @note This function is called in AfterLoadGame for old savegames, so don't rely
* on any data to be valid, especially don't rely on the fact that the vehicle
* is actually on the ground inside a depot.
*/ */
void AircraftLeaveHangar(Aircraft *v) void AircraftLeaveHangar(Aircraft *v, Direction exit_dir)
{ {
const Station *st = Station::GetByTile(v->tile);
v->cur_speed = 0; v->cur_speed = 0;
v->subspeed = 0; v->subspeed = 0;
v->progress = 0; v->progress = 0;
v->direction = st->airport.GetHangarExitDirection(v->tile); v->direction = exit_dir;
v->vehstatus &= ~VS_HIDDEN; v->vehstatus &= ~VS_HIDDEN;
{ {
Vehicle *u = v->Next(); Vehicle *u = v->Next();
@ -1339,7 +1341,8 @@ static void AircraftEventHandler_InHangar(Aircraft *v, const AirportFTAClass *ap
/* airplane goto state takeoff, helicopter to helitakeoff */ /* airplane goto state takeoff, helicopter to helitakeoff */
v->state = (v->subtype == AIR_HELICOPTER) ? HELITAKEOFF : TAKEOFF; v->state = (v->subtype == AIR_HELICOPTER) ? HELITAKEOFF : TAKEOFF;
} }
AircraftLeaveHangar(v); const Station *st = Station::GetByTile(v->tile);
AircraftLeaveHangar(v, st->airport.GetHangarExitDirection(v->tile));
AirportMove(v, apc); AirportMove(v, apc);
} }

View File

@ -393,6 +393,15 @@ public:
const char *ReceiveCommand(Packet *p, struct CommandPacket *cp); const char *ReceiveCommand(Packet *p, struct CommandPacket *cp);
void SendCommand(Packet *p, const struct CommandPacket *cp); void SendCommand(Packet *p, const struct CommandPacket *cp);
/**
* Get the status of the admin.
* @return The status of the admin.
*/
AdminStatus GetAdminStatus() const
{
return this->status;
}
}; };
#endif /* ENABLE_NETWORK */ #endif /* ENABLE_NETWORK */

View File

@ -750,7 +750,7 @@ void NetworkReboot()
} }
ServerNetworkAdminSocketHandler *as; ServerNetworkAdminSocketHandler *as;
FOR_ALL_ADMIN_SOCKETS(as) { FOR_ALL_ACTIVE_ADMIN_SOCKETS(as) {
as->SendNewGame(); as->SendNewGame();
as->SendPackets(); as->SendPackets();
} }
@ -777,7 +777,7 @@ void NetworkDisconnect(bool blocking, bool close_admins)
if (close_admins) { if (close_admins) {
ServerNetworkAdminSocketHandler *as; ServerNetworkAdminSocketHandler *as;
FOR_ALL_ADMIN_SOCKETS(as) { FOR_ALL_ACTIVE_ADMIN_SOCKETS(as) {
as->SendShutdown(); as->SendShutdown();
as->SendPackets(); as->SendPackets();
} }

View File

@ -147,8 +147,6 @@ NetworkRecvStatus ServerNetworkAdminSocketHandler::SendProtocol()
NetworkRecvStatus ServerNetworkAdminSocketHandler::SendWelcome() NetworkRecvStatus ServerNetworkAdminSocketHandler::SendWelcome()
{ {
this->status = ADMIN_STATUS_ACTIVE;
Packet *p = new Packet(ADMIN_PACKET_SERVER_WELCOME); Packet *p = new Packet(ADMIN_PACKET_SERVER_WELCOME);
p->Send_string(_settings_client.network.server_name); p->Send_string(_settings_client.network.server_name);
@ -525,6 +523,8 @@ DEF_ADMIN_RECEIVE_COMMAND(Server, ADMIN_PACKET_ADMIN_JOIN)
return this->SendError(NETWORK_ERROR_ILLEGAL_PACKET); return this->SendError(NETWORK_ERROR_ILLEGAL_PACKET);
} }
this->status = ADMIN_STATUS_ACTIVE;
DEBUG(net, 1, "[admin] '%s' (%s) has connected", this->admin_name, this->admin_version); DEBUG(net, 1, "[admin] '%s' (%s) has connected", this->admin_name, this->admin_version);
return this->SendProtocol(); return this->SendProtocol();
@ -656,7 +656,7 @@ DEF_ADMIN_RECEIVE_COMMAND(Server, ADMIN_PACKET_ADMIN_CHAT)
void NetworkAdminClientInfo(const NetworkClientSocket *cs, bool new_client) void NetworkAdminClientInfo(const NetworkClientSocket *cs, bool new_client)
{ {
ServerNetworkAdminSocketHandler *as; ServerNetworkAdminSocketHandler *as;
FOR_ALL_ADMIN_SOCKETS(as) { FOR_ALL_ACTIVE_ADMIN_SOCKETS(as) {
if (as->update_frequency[ADMIN_UPDATE_CLIENT_INFO] & ADMIN_FREQUENCY_AUTOMATIC) { if (as->update_frequency[ADMIN_UPDATE_CLIENT_INFO] & ADMIN_FREQUENCY_AUTOMATIC) {
as->SendClientInfo(cs); as->SendClientInfo(cs);
if (new_client) { if (new_client) {
@ -673,7 +673,7 @@ void NetworkAdminClientInfo(const NetworkClientSocket *cs, bool new_client)
void NetworkAdminClientUpdate(const NetworkClientInfo *ci) void NetworkAdminClientUpdate(const NetworkClientInfo *ci)
{ {
ServerNetworkAdminSocketHandler *as; ServerNetworkAdminSocketHandler *as;
FOR_ALL_ADMIN_SOCKETS(as) { FOR_ALL_ACTIVE_ADMIN_SOCKETS(as) {
if (as->update_frequency[ADMIN_UPDATE_CLIENT_INFO] & ADMIN_FREQUENCY_AUTOMATIC) { if (as->update_frequency[ADMIN_UPDATE_CLIENT_INFO] & ADMIN_FREQUENCY_AUTOMATIC) {
as->SendClientUpdate(ci); as->SendClientUpdate(ci);
} }
@ -687,7 +687,7 @@ void NetworkAdminClientUpdate(const NetworkClientInfo *ci)
void NetworkAdminClientQuit(ClientID client_id) void NetworkAdminClientQuit(ClientID client_id)
{ {
ServerNetworkAdminSocketHandler *as; ServerNetworkAdminSocketHandler *as;
FOR_ALL_ADMIN_SOCKETS(as) { FOR_ALL_ACTIVE_ADMIN_SOCKETS(as) {
if (as->update_frequency[ADMIN_UPDATE_CLIENT_INFO] & ADMIN_FREQUENCY_AUTOMATIC) { if (as->update_frequency[ADMIN_UPDATE_CLIENT_INFO] & ADMIN_FREQUENCY_AUTOMATIC) {
as->SendClientQuit(client_id); as->SendClientQuit(client_id);
} }
@ -702,7 +702,7 @@ void NetworkAdminClientQuit(ClientID client_id)
void NetworkAdminClientError(ClientID client_id, NetworkErrorCode error_code) void NetworkAdminClientError(ClientID client_id, NetworkErrorCode error_code)
{ {
ServerNetworkAdminSocketHandler *as; ServerNetworkAdminSocketHandler *as;
FOR_ALL_ADMIN_SOCKETS(as) { FOR_ALL_ACTIVE_ADMIN_SOCKETS(as) {
if (as->update_frequency[ADMIN_UPDATE_CLIENT_INFO] & ADMIN_FREQUENCY_AUTOMATIC) { if (as->update_frequency[ADMIN_UPDATE_CLIENT_INFO] & ADMIN_FREQUENCY_AUTOMATIC) {
as->SendClientError(client_id, error_code); as->SendClientError(client_id, error_code);
} }
@ -722,7 +722,7 @@ void NetworkAdminCompanyInfo(const Company *company, bool new_company)
} }
ServerNetworkAdminSocketHandler *as; ServerNetworkAdminSocketHandler *as;
FOR_ALL_ADMIN_SOCKETS(as) { FOR_ALL_ACTIVE_ADMIN_SOCKETS(as) {
if (as->update_frequency[ADMIN_UPDATE_COMPANY_INFO] != ADMIN_FREQUENCY_AUTOMATIC) continue; if (as->update_frequency[ADMIN_UPDATE_COMPANY_INFO] != ADMIN_FREQUENCY_AUTOMATIC) continue;
as->SendCompanyInfo(company); as->SendCompanyInfo(company);
@ -741,7 +741,7 @@ void NetworkAdminCompanyUpdate(const Company *company)
if (company == NULL) return; if (company == NULL) return;
ServerNetworkAdminSocketHandler *as; ServerNetworkAdminSocketHandler *as;
FOR_ALL_ADMIN_SOCKETS(as) { FOR_ALL_ACTIVE_ADMIN_SOCKETS(as) {
if (as->update_frequency[ADMIN_UPDATE_COMPANY_INFO] != ADMIN_FREQUENCY_AUTOMATIC) continue; if (as->update_frequency[ADMIN_UPDATE_COMPANY_INFO] != ADMIN_FREQUENCY_AUTOMATIC) continue;
as->SendCompanyUpdate(company); as->SendCompanyUpdate(company);
@ -756,7 +756,7 @@ void NetworkAdminCompanyUpdate(const Company *company)
void NetworkAdminCompanyRemove(CompanyID company_id, AdminCompanyRemoveReason bcrr) void NetworkAdminCompanyRemove(CompanyID company_id, AdminCompanyRemoveReason bcrr)
{ {
ServerNetworkAdminSocketHandler *as; ServerNetworkAdminSocketHandler *as;
FOR_ALL_ADMIN_SOCKETS(as) { FOR_ALL_ACTIVE_ADMIN_SOCKETS(as) {
as->SendCompanyRemove(company_id, bcrr); as->SendCompanyRemove(company_id, bcrr);
} }
} }
@ -770,7 +770,7 @@ void NetworkAdminChat(NetworkAction action, DestType desttype, ClientID client_i
if (from_admin) return; if (from_admin) return;
ServerNetworkAdminSocketHandler *as; ServerNetworkAdminSocketHandler *as;
FOR_ALL_ADMIN_SOCKETS(as) { FOR_ALL_ACTIVE_ADMIN_SOCKETS(as) {
if (as->update_frequency[ADMIN_UPDATE_CHAT] & ADMIN_FREQUENCY_AUTOMATIC) { if (as->update_frequency[ADMIN_UPDATE_CHAT] & ADMIN_FREQUENCY_AUTOMATIC) {
as->SendChat(action, desttype, client_id, msg, data); as->SendChat(action, desttype, client_id, msg, data);
} }
@ -796,7 +796,7 @@ void NetworkServerSendAdminRcon(AdminIndex admin_index, TextColour colour_code,
void NetworkAdminConsole(const char *origin, const char *string) void NetworkAdminConsole(const char *origin, const char *string)
{ {
ServerNetworkAdminSocketHandler *as; ServerNetworkAdminSocketHandler *as;
FOR_ALL_ADMIN_SOCKETS(as) { FOR_ALL_ACTIVE_ADMIN_SOCKETS(as) {
if (as->update_frequency[ADMIN_UPDATE_CONSOLE] & ADMIN_FREQUENCY_AUTOMATIC) { if (as->update_frequency[ADMIN_UPDATE_CONSOLE] & ADMIN_FREQUENCY_AUTOMATIC) {
as->SendConsole(origin, string); as->SendConsole(origin, string);
} }
@ -813,7 +813,7 @@ void NetworkAdminCmdLogging(const NetworkClientSocket *owner, const CommandPacke
ClientID client_id = owner == NULL ? _network_own_client_id : owner->client_id; ClientID client_id = owner == NULL ? _network_own_client_id : owner->client_id;
ServerNetworkAdminSocketHandler *as; ServerNetworkAdminSocketHandler *as;
FOR_ALL_ADMIN_SOCKETS(as) { FOR_ALL_ACTIVE_ADMIN_SOCKETS(as) {
if (as->update_frequency[ADMIN_UPDATE_CMD_LOGGING] & ADMIN_FREQUENCY_AUTOMATIC) { if (as->update_frequency[ADMIN_UPDATE_CMD_LOGGING] & ADMIN_FREQUENCY_AUTOMATIC) {
as->SendCmdLogging(client_id, cp); as->SendCmdLogging(client_id, cp);
} }
@ -826,7 +826,7 @@ void NetworkAdminCmdLogging(const NetworkClientSocket *owner, const CommandPacke
void ServerNetworkAdminSocketHandler::WelcomeAll() void ServerNetworkAdminSocketHandler::WelcomeAll()
{ {
ServerNetworkAdminSocketHandler *as; ServerNetworkAdminSocketHandler *as;
FOR_ALL_ADMIN_SOCKETS(as) { FOR_ALL_ACTIVE_ADMIN_SOCKETS(as) {
as->SendWelcome(); as->SendWelcome();
} }
} }
@ -838,7 +838,7 @@ void ServerNetworkAdminSocketHandler::WelcomeAll()
void NetworkAdminUpdate(AdminUpdateFrequency freq) void NetworkAdminUpdate(AdminUpdateFrequency freq)
{ {
ServerNetworkAdminSocketHandler *as; ServerNetworkAdminSocketHandler *as;
FOR_ALL_ADMIN_SOCKETS(as) { FOR_ALL_ACTIVE_ADMIN_SOCKETS(as) {
for (int i = 0; i < ADMIN_UPDATE_END; i++) { for (int i = 0; i < ADMIN_UPDATE_END; i++) {
if (as->update_frequency[i] & freq) { if (as->update_frequency[i] & freq) {
/* Update the admin for the required details */ /* Update the admin for the required details */

View File

@ -85,6 +85,14 @@ public:
#define FOR_ALL_ADMIN_SOCKETS_FROM(var, start) FOR_ALL_ITEMS_FROM(ServerNetworkAdminSocketHandler, adminsocket_index, var, start) #define FOR_ALL_ADMIN_SOCKETS_FROM(var, start) FOR_ALL_ITEMS_FROM(ServerNetworkAdminSocketHandler, adminsocket_index, var, start)
#define FOR_ALL_ADMIN_SOCKETS(var) FOR_ALL_ADMIN_SOCKETS_FROM(var, 0) #define FOR_ALL_ADMIN_SOCKETS(var) FOR_ALL_ADMIN_SOCKETS_FROM(var, 0)
/**
* Iterate over all the active sockets.
* @param var The variable to iterate with.
*/
#define FOR_ALL_ACTIVE_ADMIN_SOCKETS(var) \
FOR_ALL_ADMIN_SOCKETS(var) \
if (var->GetAdminStatus() == ADMIN_STATUS_ACTIVE)
void NetworkAdminClientInfo(const NetworkClientSocket *cs, bool new_client = false); void NetworkAdminClientInfo(const NetworkClientSocket *cs, bool new_client = false);
void NetworkAdminClientUpdate(const NetworkClientInfo *ci); void NetworkAdminClientUpdate(const NetworkClientInfo *ci);
void NetworkAdminClientQuit(ClientID client_id); void NetworkAdminClientQuit(ClientID client_id);

View File

@ -178,7 +178,7 @@ void UpdateOldAircraft()
continue; continue;
} }
AircraftLeaveHangar(a); // make airplane visible if it was in a depot for example AircraftLeaveHangar(a, a->direction); // make airplane visible if it was in a depot for example
a->vehstatus &= ~VS_STOPPED; // make airplane moving a->vehstatus &= ~VS_STOPPED; // make airplane moving
UpdateAircraftCache(a); UpdateAircraftCache(a);
a->cur_speed = a->vcache.cached_max_speed; // so aircraft don't have zero speed while in air a->cur_speed = a->vcache.cached_max_speed; // so aircraft don't have zero speed while in air