Merge branch 'master' into jgrpp

# Conflicts:
#	src/ai/ai_gui.cpp
#	src/company_cmd.cpp
#	src/lang/estonian.txt
#	src/lang/german.txt
#	src/lang/hungarian.txt
#	src/lang/korean.txt
#	src/lang/slovak.txt
#	src/main_gui.cpp
#	src/video/sdl2_v.cpp
This commit is contained in:
Jonathan G Rennison
2021-02-01 19:34:30 +00:00
24 changed files with 1449 additions and 1126 deletions

View File

@@ -317,7 +317,7 @@ const char *NetworkGameSocketHandler::ReceiveCommand(Packet *p, CommandPacket *c
cp->company = (CompanyID)p->Recv_uint8();
cp->cmd = p->Recv_uint32();
if (!IsValidCommand(cp->cmd)) return "invalid command";
if (GetCommandFlags(cp->cmd) & CMD_OFFLINE) return "offline only command";
if (GetCommandFlags(cp->cmd) & CMD_OFFLINE) return "single-player only command";
if ((cp->cmd & CMD_FLAGS_MASK) != 0) return "invalid command flag";
cp->p1 = p->Recv_uint32();

View File

@@ -345,10 +345,9 @@ protected:
if (r == 0) r = b->info.compatible - a->info.compatible;
/* Passworded servers should be below unpassworded servers */
if (r == 0) r = a->info.use_password - b->info.use_password;
/* Finally sort on the number of clients of the server */
if (r == 0) return NGameClientSorter(a, b);
return r < 0;
/* Finally sort on the number of clients of the server in reverse order. */
return (r != 0) ? r < 0: !NGameClientSorter(a, b);
}
/** Sort the server list */