Skip to content

Commit

Permalink
game: Replace pilot_id special cases 10 with PILOT_KREISSACK
Browse files Browse the repository at this point in the history
Also fix Kreissack typos in comments.
  • Loading branch information
mrannanj committed Jul 12, 2024
1 parent 3a727ab commit 77a20fc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/game/scenes/arena.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ void arena_har_defeat_hook(int player_id, scene *scene) {
local->over = 1;
if(is_singleplayer(scene)) {
player_winner->sp_wins |= 2 << player_loser->pilot->pilot_id;
if(player_loser->pilot->pilot_id == 10) {
if(player_loser->pilot->pilot_id == PILOT_KREISSACK) {
// can't scrap/destruct kreissack
winner_har->state = STATE_DONE;
// major go boom
Expand Down
4 changes: 2 additions & 2 deletions src/game/scenes/melee.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ void handle_action(scene *scene, int player, int action) {
player2->pilot->pilot_id = local->pilot_id_b;
} else {
if(player1->sp_wins == (2046 ^ (2 << player1->pilot->pilot_id))) {
// everyone but kriessack
player2->pilot->pilot_id = 10;
// everyone but kreissack
player2->pilot->pilot_id = PILOT_KREISSACK;
player2->pilot->har_id = HAR_NOVA;
} else {
// pick an opponent we have not yet beaten
Expand Down
4 changes: 2 additions & 2 deletions src/game/scenes/newsroom.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ void newsroom_input_tick(scene *scene) {
game_state_set_next(scene->gs, SCENE_END);
} else {
if(p1->sp_wins == (2046 ^ (2 << p1->pilot->pilot_id))) {
// everyone but kriessack
p2->pilot->pilot_id = 10;
// everyone but kreissack
p2->pilot->pilot_id = PILOT_KREISSACK;
p2->pilot->har_id = HAR_NOVA;
} else {
// pick an opponent we have not yet beaten
Expand Down
4 changes: 2 additions & 2 deletions src/game/scenes/vs.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ void vs_render(scene *scene) {
font_render_wrapped(&font_small, lang_get(66 + local->arena), 56 + 72, 160, (211 - 72) - 4, COLOR_GREEN);
} else if(player2->pilot && player2->pilot->pilot_id == PILOT_KREISSACK &&
settings_get()->gameplay.difficulty < 2) {
// kriessack, but not on Veteran or higher
// kreissack, but not on Veteran or higher
font_render_wrapped(&font_small, lang_get(747), 59, 160, 200, COLOR_YELLOW);
} else if(player1->chr && player2->pilot) {
font_render_wrapped(&font_small, player2->pilot->quotes[0], 320 - (59 + 150), 165, 120, COLOR_YELLOW);
Expand Down Expand Up @@ -532,7 +532,7 @@ int vs_create(scene *scene) {
local->too_pathetic_dialog.clicked = vs_too_pathetic_dialog_clicked;

if(player2->pilot && player2->pilot->pilot_id == PILOT_KREISSACK && settings_get()->gameplay.difficulty < 2) {
// kriessack, but not on Veteran or higher
// kreissack, but not on Veteran or higher
dialog_show(&local->too_pathetic_dialog, 1);
}

Expand Down

0 comments on commit 77a20fc

Please sign in to comment.