Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/system/LocalTurnManager.cpp
Show All 18 Lines | |||||
#include "LocalTurnManager.h" | #include "LocalTurnManager.h" | ||||
CLocalTurnManager::CLocalTurnManager(CSimulation2& simulation, IReplayLogger& replay) | CLocalTurnManager::CLocalTurnManager(CSimulation2& simulation, IReplayLogger& replay) | ||||
: CTurnManager(simulation, DEFAULT_TURN_LENGTH_SP, 0, replay) | : CTurnManager(simulation, DEFAULT_TURN_LENGTH_SP, 0, replay) | ||||
{ | { | ||||
} | } | ||||
void CLocalTurnManager::PostCommand(player_id_t playerid, JS::HandleValue data) | |||||
Stan: player_id_t ? | |||||
{ | |||||
AddCommand(m_ClientId, playerid, data, m_CurrentTurn + 1); | |||||
} | |||||
void CLocalTurnManager::PostCommand(JS::HandleValue data) | void CLocalTurnManager::PostCommand(JS::HandleValue data) | ||||
{ | { | ||||
// Add directly to the next turn, ignoring COMMAND_DELAY, | // Add directly to the next turn, ignoring COMMAND_DELAY, | ||||
// because we don't need to compensate for network latency | // because we don't need to compensate for network latency | ||||
AddCommand(m_ClientId, m_PlayerId, data, m_CurrentTurn + 1); | AddCommand(m_ClientId, m_PlayerId, data, m_CurrentTurn + 1); | ||||
Done Inline ActionsRewrite this function in terms of the other one. wraitii: Rewrite this function in terms of the other one. | |||||
} | } | ||||
void CLocalTurnManager::NotifyFinishedOwnCommands(u32 turn) | void CLocalTurnManager::NotifyFinishedOwnCommands(u32 turn) | ||||
{ | { | ||||
FinishedAllCommands(turn, m_TurnLength); | FinishedAllCommands(turn, m_TurnLength); | ||||
} | } | ||||
void CLocalTurnManager::NotifyFinishedUpdate(u32 UNUSED(turn)) | void CLocalTurnManager::NotifyFinishedUpdate(u32 UNUSED(turn)) | ||||
Show All 15 Lines |
Wildfire Games · Phabricator
player_id_t ?