tresinformal / drakkar

The tresinformal video game called 'Drakkar'
GNU General Public License v3.0
11 stars 4 forks source link

A player that is out cannot collide with other players #625

Closed TheoPannetier closed 1 year ago

TheoPannetier commented 1 year ago

Context

While a player is out, as a result of being killed, it should not be able to run in collisions with other players, instead passing through them as if it didn't exist.

Test

#define FIX_ISSUE_625
{
      // (625) A player that is out cannot collide with other players
    game g;
    const coordinate c_p2 = g.get_player(1).get_position();
    g.get_player(0).place_to_position(c_p2);
    assert(are_colliding(g.get_player(0), g.get_player(1)));
    g.kill_player(0);
    assert(!are_colliding(g.get_player(0), g.get_player(1)));
}
#endif // FIX_ISSUE_XXX