-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add team attribute to entities #989
Conversation
This PR also closes #960 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM just left a question
character_name: character_name, | ||
name: player_name, | ||
from_pid: from_pid, | ||
type: :human |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason for this type
parameter? just wondering
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's used by the game_updater genserver to save human and bot ids in different lists.
See game_updater.ex:80-84
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Nico-Sanchez I'm getting an error when the match ends in Deathmatch mode.
** (BadMapError) expected a map, got: 12
(elixir 1.16.2) lib/map.ex:682: Map.update(12, :category, nil, #Function<8.2673582/1 in Arena.GameUpdater.complete_entity/2>)
(arena 0.11.1) lib/arena/game_updater.ex:812: Arena.GameUpdater.complete_entity/2
(arena 0.11.1) lib/arena/game_updater.ex:803: anonymous fn/3 in Arena.GameUpdater.complete_entities/2
(stdlib 5.2.1) maps.erl:416: :maps.fold_1/4
(arena 0.11.1) lib/arena/game_updater.ex:786: Arena.GameUpdater.broadcast_game_ended/2
(arena 0.11.1) lib/arena/game_updater.ex:353: Arena.GameUpdater.handle_info/2
(stdlib 5.2.1) gen_server.erl:1095: :gen_server.try_handle_info/3
(stdlib 5.2.1) gen_server.erl:1183: :gen_server.handle_msg/6
(stdlib 5.2.1) proc_lib.erl:241: :proc_lib.init_p_do_apply/3
Last message: :deathmatch_end_game_check
Can you solve it?
Warning
Merge alongside https://github.com/lambdaclass/champions_of_mirra/pull/2245
Motivation
We need a new team game mode.
Summary of changes
How to test it?
Play the game with the front branch. Everything should work as usual.
Pay special attention to collisions, damage, effects, pools, projectiles, etc. Everything should affect the proper entities.
Checklist