I don't understand what's wrong with zombie mode in my game. After starting a game, the active player quits game using gear menu > "quit this game" hyperlink instead of doing his turn. The current state defines a "zombiePass" transition used by my zombie function, but it's not getting executed for some reason. (Yes, this is in pre-production, not studio)
Instead, table is broken for all players with the following error (players cannot even chat):
This is state #3 (current state) in the code:
And this is the relevant portion of zombie turn function in the code:
Instead, table is broken for all players with the following error (players cannot even chat):
Code: Select all
Unexpected exception: Can't manage zombie player in this game state (3)
#0 /var/tournoi/release/tournoi-171231-1530/www/include/APP_GameAction.inc.php(203): Table->checkReturnState()
#1 /var/tournoi/release/tournoi-171231-1530/www/include/APP_GameAction.inc.php(196): APP_GameAction->ajaxResponseWithResult(NULL)
#2 /var/tournoi/release/tournoi-171231-1530/www/include/APP_GameAction.inc.php(151): APP_GameAction->ajaxResponse()
#3 /var/tournoi/release/tournoi-171231-1530/www/include/webActionCore.inc.php(133): APP_GameAction->wakeup()
#4 /var/tournoi/release/tournoi-171231-1530/www/index.php(152): launchWebAction('coupcitystate', 'action_coupcity...', 'wakeup', false, false, NULL, true, false)Code: Select all
3 => array(
"name" => "playerStart",
"description" => clienttranslate('${actplayer} must take an action.'),
"descriptionmyturn" => clienttranslate('${you} must take an action.'),
"type" => "activeplayer",
"action" => "stPlayerStart",
"possibleactions" => array( "act" ),
"transitions" => array( "ask" => 10, "execute" => 80, "zombiePass" => 97 )
),
Code: Select all
public function zombieTurn($state, $active_player)
{
if (array_key_exists('zombiePass', $state['transitions'])) {
if ($state['type'] == 'multipleactiveplayer') {
$this->gamestate->setPlayerNonMultiactive($active_player, 'zombiePass');
} else {
$this->gamestate->nextState('zombiePass');
}
...