You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Update() will still return false thus breaks the main loop, although it have called AgentControl()->Restart() in OnGameEnd().
In single player game with a computer, it works fine.
And maybe that is what caused the problem:
staticvoidCallOnStep(Agent* a) { // 0. Update()->StepAgents()->RunParallel()->[]step_agent()->CallOnStep()
ControlInterface* control = a->Control();
if (!control->IsInGame()) {
a->OnGameEnd(); // 1. Ok, it calls OnGameEnd() and my AgentControl()->Restart() will be called soon!
control->RequestLeaveGame(); // 2. ...OK...That's itreturn;
}
ActionInterface* action = a->Actions();
control->IssueEvents(action->Commands());
if (action) {
action->SendActions();
}
ActionFeatureLayerInterface* action_feature_layer = a->ActionsFeatureLayer();
if (action_feature_layer) {
action_feature_layer->SendActions();
}
} // 4. Then it will return to Update() and return false, then the main loop breaks and my program exits
}
The text was updated successfully, but these errors were encountered:
The Update() will still return false thus breaks the main loop, although it have called AgentControl()->Restart() in OnGameEnd().
In single player game with a computer, it works fine.
And maybe that is what caused the problem:
The text was updated successfully, but these errors were encountered: