If Bob was stunned when the game is saving, set him back to normal facing so we don't error.
This commit is contained in:
parent
9c1b39179d
commit
ceaced512f
|
@ -709,6 +709,12 @@ static void load(cJSON *root)
|
|||
|
||||
static void save(cJSON *root)
|
||||
{
|
||||
/* in case Bob was put into stun state during save */
|
||||
if (world.bob->facing == FACING_DIE)
|
||||
{
|
||||
world.bob->facing = oldFacing;
|
||||
}
|
||||
|
||||
cJSON_AddStringToObject(root, "type", "Bob");
|
||||
cJSON_AddNumberToObject(root, "x", world.bob->checkpoints[0].x);
|
||||
cJSON_AddNumberToObject(root, "y", world.bob->checkpoints[0].y);
|
||||
|
|
Loading…
Reference in New Issue