X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fevents.c;h=1ae5caa917de49834af8f4cfaa5e05ba14bea906;hb=ddfaf6a90af3d880779213dc218f21ad4e82aa73;hp=e8f205564eb968a174789767ac649db42ebe0b0e;hpb=f772f882546ab982dc61074f298d6115c9909f32;p=rocksndiamonds.git diff --git a/src/events.c b/src/events.c index e8f20556..1ae5caa9 100644 --- a/src/events.c +++ b/src/events.c @@ -171,7 +171,9 @@ void EventLoop(void) has its own synchronization and is CPU friendly, too */ if (game_status == GAME_MODE_PLAYING) + { HandleGameActions(); + } else { SyncDisplay(); @@ -466,7 +468,7 @@ static boolean is_string_suffix(char *string, char *suffix) if (suffix_len > string_len) return FALSE; - return (strcmp(&string[string_len - suffix_len], suffix) == 0); + return (strEqual(&string[string_len - suffix_len], suffix)); } #define MAX_CHEAT_INPUT_LEN 32 @@ -544,10 +546,7 @@ static void HandleKeysSpecial(Key key) { #ifdef DEBUG if (is_string_suffix(cheat_input, ".q")) - for (i = 0; i < MAX_INVENTORY_SIZE; i++) - if (local_player->inventory_size < MAX_INVENTORY_SIZE) - local_player->inventory_element[local_player->inventory_size++] = - EL_DYNAMITE; + DEBUG_SetMaximumDynamite(); #endif } else if (game_status == GAME_MODE_EDITOR) @@ -698,7 +697,7 @@ void HandleKey(Key key, int key_status) TapeTogglePause(TAPE_TOGGLE_MANUAL); } - if (game_status == GAME_MODE_PLAYING) + if (game_status == GAME_MODE_PLAYING && !network_playing) { int centered_player_nr_next = -999; @@ -713,6 +712,12 @@ void HandleKey(Key key, int key_status) { game.centered_player_nr_next = centered_player_nr_next; game.set_centered_player = TRUE; + + if (tape.recording) + { + tape.centered_player_nr_next = game.centered_player_nr_next; + tape.set_centered_player = TRUE; + } } }