Skip to content

Commit

Permalink
fix: players positions were being applied after every kill
Browse files Browse the repository at this point in the history
  • Loading branch information
tvillegas98 committed Dec 4, 2024
1 parent 17a4511 commit e47a181
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion apps/arena/lib/arena/game_updater.ex
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,12 @@ defmodule Arena.GameUpdater do
|> update_in([:killfeed], fn killfeed -> [entry | killfeed] end)
|> maybe_add_kill_to_player(killer_id)
|> grant_power_up_to_killer(game_config, killer_id, victim_id)
|> put_player_position(victim_id)

game_state = if game_config.game.game_mode != :DEATHMATCH do
put_player_position(game_state, victim_id)
else
game_state
end

broadcast_player_dead(state.game_state.game_id, victim_id)

Expand Down
2 changes: 1 addition & 1 deletion apps/arena/lib/arena/matchmaking/deathmatch_mode.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defmodule Arena.Matchmaking.DeathmatchMode do

# 3 Mins
# TODO: add this to the configurator https://github.com/lambdaclass/mirra_backend/issues/985
@match_duration 180_000
@match_duration 20_000
@respawn_time 5000

# Time to wait to start game with any amount of clients
Expand Down

0 comments on commit e47a181

Please sign in to comment.