Skip to content

Commit

Permalink
Reset LastValidPlayerPos when starting a new game
Browse files Browse the repository at this point in the history
This fixes the player spawn position when starting a new game after
already having loaded an existing game. The bugged spawn position
was visible for a few frames before the intro cutscene started and
could activate triggers causing system messages to be displayed before
they should be.

Fixes: bug #140
  • Loading branch information
dscharrer committed Mar 8, 2015
1 parent 3bbb997 commit f09ac2a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/game/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2660,12 +2660,15 @@ void ARX_PLAYER_Invulnerability(long flag) {
}

extern Entity * FlyingOverIO;
extern Vec3f LastValidPlayerPos;

void ARX_GAME_Reset(long type) {
arx_assert(entities.player());

DeadTime = 0;

LastValidPlayerPos = Vec3f_ZERO;

entities.player()->speed_modif = 0;

LAST_JUMP_ENDTIME = 0;
Expand Down

0 comments on commit f09ac2a

Please sign in to comment.