player->is_bored = FALSE;
player->is_sleeping = FALSE;
+ player->was_waiting = TRUE;
+ player->was_moving = FALSE;
+ player->was_snapping = FALSE;
+ player->was_dropping = FALSE;
+
player->frame_counter_bored = -1;
player->frame_counter_sleeping = -1;
static void CheckSaveEngineSnapshot(struct PlayerInfo *player)
{
- static boolean player_was_moving = FALSE;
- static boolean player_was_snapping = FALSE;
- static boolean player_was_dropping = FALSE;
-
- if ((!player->is_moving && player_was_moving) ||
- (player->MovPos == 0 && player_was_moving) ||
- (player->is_snapping && !player_was_snapping) ||
- (player->is_dropping && !player_was_dropping))
+ if ((!player->is_moving && player->was_moving) ||
+ (player->MovPos == 0 && player->was_moving) ||
+ (player->is_snapping && !player->was_snapping) ||
+ (player->is_dropping && !player->was_dropping))
{
if (!SaveEngineSnapshotToList())
return;
- player_was_moving = FALSE;
- player_was_snapping = TRUE;
- player_was_dropping = TRUE;
+ player->was_moving = FALSE;
+ player->was_snapping = TRUE;
+ player->was_dropping = TRUE;
}
else
{
if (player->is_moving)
- player_was_moving = TRUE;
+ player->was_moving = TRUE;
if (!player->is_snapping)
- player_was_snapping = FALSE;
+ player->was_snapping = FALSE;
if (!player->is_dropping)
- player_was_dropping = FALSE;
+ player->was_dropping = FALSE;
}
}
boolean any_player_snapping,
boolean any_player_dropping)
{
- static boolean player_was_waiting = TRUE;
-
if (frame == 0 && !any_player_dropping)
{
- if (!player_was_waiting)
+ if (!local_player->was_waiting)
{
if (!SaveEngineSnapshotToList())
return;
- player_was_waiting = TRUE;
+ local_player->was_waiting = TRUE;
}
}
else if (any_player_moving || any_player_snapping || any_player_dropping)
{
- player_was_waiting = FALSE;
+ local_player->was_waiting = FALSE;
}
}
void CheckSaveEngineSnapshot_SP(boolean murphy_is_waiting,
boolean murphy_is_dropping)
{
- static boolean player_was_waiting = TRUE;
-
if (murphy_is_waiting)
{
- if (!player_was_waiting)
+ if (!local_player->was_waiting)
{
if (!SaveEngineSnapshotToList())
return;
- player_was_waiting = TRUE;
+ local_player->was_waiting = TRUE;
}
}
else
{
- player_was_waiting = FALSE;
+ local_player->was_waiting = FALSE;
}
}