We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8ece26 commit c552bc8Copy full SHA for c552bc8
rts/Game/GameServer.cpp
@@ -518,7 +518,21 @@ bool CGameServer::SendDemoData(int targetFrameNum)
518
// never send these from demos
519
break;
520
}
521
-
+ case NETMSG_CCOMMAND: {
522
+ if (!AdjustPlayerNumber(buf ,3))
523
+ continue;
524
+ try {
525
+ CommandMessage msg(rpkt);
526
+ const Action& action = msg.GetAction();
527
+ if (msg.GetPlayerID() == SERVER_PLAYER && action.command == "cheat")
528
+ SetBoolArg(cheating, action.extra);
529
+ } catch (const netcode::UnpackPacketException& ex) {
530
+ Message(str(format("Warning: Discarding invalid command message packet in demo: %s") %ex.what()));
531
532
+ }
533
+ Broadcast(rpkt);
534
+ break;
535
536
default: {
537
Broadcast(rpkt);
538
0 commit comments