projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed loop mode for some sound effects
[rocksndiamonds.git]
/
src
/
game.c
diff --git
a/src/game.c
b/src/game.c
index edf9686c4158e8f42c0f31cc65bfa38f55cef42b..643d36e5840230e1389bb7c911d79151726d70e2 100644
(file)
--- a/
src/game.c
+++ b/
src/game.c
@@
-11904,7
+11904,7
@@
static void GameActionsExt(void)
TapeRecordAction(tape_action);
// remember if game was played (especially after tape stopped playing)
TapeRecordAction(tape_action);
// remember if game was played (especially after tape stopped playing)
- if (!tape.playing && summarized_player_action)
+ if (!tape.playing && summarized_player_action
&& !checkGameFailed()
)
game.GamePlayed = TRUE;
#if USE_NEW_PLAYER_ASSIGNMENTS
game.GamePlayed = TRUE;
#if USE_NEW_PLAYER_ASSIGNMENTS
@@
-13998,7
+13998,6
@@
void BuryPlayer(struct PlayerInfo *player)
return;
PlayLevelSoundElementAction(jx, jy, player->artwork_element, ACTION_DYING);
return;
PlayLevelSoundElementAction(jx, jy, player->artwork_element, ACTION_DYING);
- PlayLevelSound(jx, jy, SND_GAME_LOSING);
RemovePlayer(player);
RemovePlayer(player);
@@
-14656,7
+14655,7
@@
static int DigField(struct PlayerInfo *player,
LevelSolved();
LevelSolved();
- Play
LevelSound(x, y,
SND_GAME_SOKOBAN_SOLVING);
+ Play
Sound(
SND_GAME_SOKOBAN_SOLVING);
}
}
else
}
}
else
@@
-15640,15
+15639,21
@@
void RequestRestartGame(char *message)
boolean has_started_game = hasStartedNetworkGame();
int request_mode = (has_started_game ? REQ_ASK : REQ_CONFIRM);
boolean has_started_game = hasStartedNetworkGame();
int request_mode = (has_started_game ? REQ_ASK : REQ_CONFIRM);
+ int door_state = DOOR_CLOSE_1;
- if (Request(message, request_mode | REQ_STAY_
CLOSED
) && has_started_game)
+ if (Request(message, request_mode | REQ_STAY_
OPEN
) && has_started_game)
{
{
+ CloseDoor(door_state);
+
StartGameActions(network.enabled, setup.autorecord, level.random_seed);
}
else
{
StartGameActions(network.enabled, setup.autorecord, level.random_seed);
}
else
{
- // needed in case of envelope request to close game panel
- CloseDoor(DOOR_CLOSE_1);
+ // if game was invoked from level editor, also close tape recorder door
+ if (level_editor_test_game)
+ door_state = DOOR_CLOSE_ALL;
+
+ CloseDoor(door_state);
SetGameStatus(GAME_MODE_MAIN);
SetGameStatus(GAME_MODE_MAIN);
@@
-15681,6
+15686,9
@@
void CheckGameOver(void)
if (game_over_delay > 0)
{
if (game_over_delay > 0)
{
+ if (game_over_delay == game_over_delay_value / 2)
+ PlaySound(SND_GAME_LOSING);
+
game_over_delay--;
return;
game_over_delay--;
return;