mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-11-09 20:03:42 +00:00
# Basic experimental multiplayer integration with new simulation system.
Add new turn manager that should be more correct and potentially more efficient. Remove evil CNetServer/CNetClient multiple inheritance of CTurnManager. Add multiplayer autostart. Various minor cleanups. This was SVN commit r7551.
This commit is contained in:
1 parent
8c1a3f7c8a
commit
c684c211a2
41 files changed
+1330
-463
No files matched your search
@@ -103,16 +103,9 @@ void PostNetworkCommand(void* cbdata, CScriptVal cmd)
|
||||
if (queue.null())
|
||||
return;
|
||||
|
||||
int player = -1;
|
||||
if (g_Game && g_Game->GetLocalPlayer())
|
||||
player = g_Game->GetLocalPlayer()->GetPlayerID();
|
||||
|
||||
jsval cmd2 = sim->GetScriptInterface().CloneValueFromOtherContext(guiManager->GetScriptInterface(), cmd.get());
|
||||
|
||||
queue->PushClientCommand(player, cmd2);
|
||||
// TODO: This shouldn't call Push, it should send the message to the network layer
|
||||
// (which should propagate it across the network and eventually call Push on the
|
||||
// appropriate turn)
|
||||
queue->PostNetworkCommand(cmd2);
|
||||
}
|
||||
|
||||
std::vector<entity_id_t> PickEntitiesAtPoint(void* UNUSED(cbdata), int x, int y)
|
||||
|
||||
Reference in new issue
Block a user