fix(player): respawn reseteja facing a DOWN i input/cardinal pendents
This commit is contained in:
1 parent
cd5bb94223
commit
d054d1b246
1 file changed
+11
@@ -1034,11 +1034,22 @@ void Player::respawn(float x, float y) {
|
||||
state_ = State::GROUNDED;
|
||||
intended_vx_ = 0.0F;
|
||||
intended_vy_ = 0.0F;
|
||||
input_vx_ = 0.0F;
|
||||
input_vy_ = 0.0F;
|
||||
being_pushed_ = false;
|
||||
jump_z_ = 0.0F;
|
||||
jump_vz_ = 0.0F;
|
||||
landing_stun_remaining_ms_ = 0.0F;
|
||||
turning_remaining_ms_ = 0.0F;
|
||||
pending_cardinal_ = Cardinal::NONE;
|
||||
intermediate_cardinal_ = Cardinal::NONE;
|
||||
last_input_cardinal_ = Cardinal::NONE;
|
||||
// Reseteig del facing al d'spawn original (mirant cap a la càmera):
|
||||
// sense això, un EXITED que entrava per la porta amb facing UP
|
||||
// re-aparix d'esquena al pròxim cicle. Mateixa lògica que el ctor.
|
||||
facing_ = Facing::DOWN;
|
||||
setFlip(SDL_FLIP_NONE);
|
||||
setCurrentAnimation("stand_down");
|
||||
setPosX(x);
|
||||
setPosY(y);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user