Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/game/scenes/arena.c
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ void arena_har_defeat_hook(int loser_player_id, scene *scene) {
}
score->rounds++;
if(player_winner->ctrl->type != CTRL_TYPE_AI && player_loser->ctrl->type == CTRL_TYPE_AI) {
chr_score_victory(score, har_health_percent(winner_har));
// chr_score_victory(score, har_health_percent(winner_har));
}
if(score->rounds >= ceilf(local->rounds / 2.0f)) {
winner_har->state = STATE_VICTORY;
Expand Down
16 changes: 11 additions & 5 deletions src/game/scenes/mainmenu/menu_connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,13 @@ void menu_connect_tick(component *c) {
p1->pilot->har_id = HAR_JAGUAR;
p1->pilot->pilot_id = 0;
p1->pilot->name[0] = '\0';
p2->pilot->har_id = HAR_JAGUAR;
p2->pilot->pilot_id = 0;
p2->pilot->har_id = HAR_PYROS;
p2->pilot->pilot_id = 9;
p2->pilot->name[0] = '\0';


p1->sp_wins = 0;

player1_ctrl = omf_calloc(1, sizeof(controller));
controller_init(player1_ctrl, gs);
player1_ctrl->har_obj_id = p1->har_obj_id;
Expand All @@ -158,16 +161,19 @@ void menu_connect_tick(component *c) {
game_player_set_ctrl(p1, player1_ctrl);

// Player 2 controller -- Local
settings_keyboard *k = &settings_get()->keys;
/*settings_keyboard *k = &settings_get()->keys;
if(k->ctrl_type1 == CTRL_TYPE_KEYBOARD) {
_setup_keyboard(gs, 1, 0);
} else if(k->ctrl_type1 == CTRL_TYPE_GAMEPAD) {
_setup_joystick(gs, 1, k->joy_name1, k->joy_offset1);
}
if(!controller_set_delay(game_player_get_ctrl(game_state_get_player(gs, 1)), NET_INPUT_DELAY)) {
log_error("unable to set network controller delay");
}
game_player_set_selectable(p2, 1);
}*/
ai_controller_create(player2_ctrl, 4, p2->pilot, 9);
game_player_set_ctrl(p2, player2_ctrl);

game_player_set_selectable(p2, 0);

chr_score_set_difficulty(game_player_get_score(game_state_get_player(gs, 0)), AI_DIFFICULTY_CHAMPION);
chr_score_set_difficulty(game_player_get_score(game_state_get_player(gs, 1)), AI_DIFFICULTY_CHAMPION);
Expand Down
6 changes: 3 additions & 3 deletions src/game/scenes/mainmenu/menu_listen.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ void menu_listen_tick(component *c) {
p1->pilot->har_id = HAR_JAGUAR;
p1->pilot->pilot_id = 0;
p1->pilot->name[0] = '\0';
p2->pilot->har_id = HAR_JAGUAR;
p2->pilot->pilot_id = 0;
p2->pilot->har_id = HAR_PYROS;
p2->pilot->pilot_id = 9;
p2->pilot->name[0] = '\0';

player1_ctrl = omf_calloc(1, sizeof(controller));
Expand All @@ -81,7 +81,7 @@ void menu_listen_tick(component *c) {
// Player 2 controller -- Network
net_controller_create(player2_ctrl, local->host, event.peer, NULL, ROLE_SERVER);
game_player_set_ctrl(p2, player2_ctrl);
game_player_set_selectable(p2, 1);
game_player_set_selectable(p2, 0);

chr_score_set_difficulty(game_player_get_score(game_state_get_player(gs, 0)), AI_DIFFICULTY_CHAMPION);
chr_score_set_difficulty(game_player_get_score(game_state_get_player(gs, 1)), AI_DIFFICULTY_CHAMPION);
Expand Down
2 changes: 1 addition & 1 deletion src/game/scenes/melee.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ void handle_action(scene *scene, int player, int action) {
player2->pilot->har_id = HAR_NOVA;
} else {
// pick an opponent we have not yet beaten
while(1) {
while(0) {
int i = rand_int(10);
if((2 << i) & player1->sp_wins || i == player1->pilot->pilot_id) {
continue;
Expand Down
Loading