I have a case where the game state engine is apparently calling the wrong state function.
My game uses the "finish" action to move the game along from state to state. My smoking
gun trace is this:
21/04 22:05:28 [warning] [T3856] [2243333/ddyer0] Enter stFinish finish
21/04 22:05:36 [warning] [T3856] [2243338/ddyer5] Enter stFinish review
where I expect the previous to be "enter stReview review"
which comes from
function stFinish()
{ self::warn("Enter stFinish " . self::currentStateName());
// do the scoring
}
function stReview()
{ self::warn("Enter stReview " . self::currentStateName());
}
and state engine
// score and declare the winner
7 => array(
"name" => "finish",
"description" => clienttranslate('${actplayer} designate stones that should be captured'),
"descriptionmyturn" => clienttranslate('${you} wait for ${actplayer} to finish'),
"type" => "multipleactiveplayer",
"action" => "stFinish",
"possibleactions" => array("resume" , "finish", "markStone", "zombiePass"),
"transitions" => array( "finish" => 8, "resume" => 6, "markStone"=>7, "zombiePass" => 8)
),
8 => array (
"name" => "review",
"description" => clienttranslate('${actplayer} review the final position'),
"descriptionmyturn" => clienttranslate('${you} review the final position'),
"type" => "multipleactiveplayer",
"action" => "stReview",
"possibleactions" => array("resume" , "finish", "markStone", "zombiePass"),
"transitions" => array( "finish" => 99, "resume" => 6, "markStone"=>6, "zombiePass" => 99)
),
My game uses the "finish" action to move the game along from state to state. My smoking
gun trace is this:
21/04 22:05:28 [warning] [T3856] [2243333/ddyer0] Enter stFinish finish
21/04 22:05:36 [warning] [T3856] [2243338/ddyer5] Enter stFinish review
where I expect the previous to be "enter stReview review"
which comes from
function stFinish()
{ self::warn("Enter stFinish " . self::currentStateName());
// do the scoring
}
function stReview()
{ self::warn("Enter stReview " . self::currentStateName());
}
and state engine
// score and declare the winner
7 => array(
"name" => "finish",
"description" => clienttranslate('${actplayer} designate stones that should be captured'),
"descriptionmyturn" => clienttranslate('${you} wait for ${actplayer} to finish'),
"type" => "multipleactiveplayer",
"action" => "stFinish",
"possibleactions" => array("resume" , "finish", "markStone", "zombiePass"),
"transitions" => array( "finish" => 8, "resume" => 6, "markStone"=>7, "zombiePass" => 8)
),
8 => array (
"name" => "review",
"description" => clienttranslate('${actplayer} review the final position'),
"descriptionmyturn" => clienttranslate('${you} review the final position'),
"type" => "multipleactiveplayer",
"action" => "stReview",
"possibleactions" => array("resume" , "finish", "markStone", "zombiePass"),
"transitions" => array( "finish" => 99, "resume" => 6, "markStone"=>6, "zombiePass" => 99)
),