Skip to content

Commit

Permalink
Protect only the actual movement during warping. Fixes #431.
Browse files Browse the repository at this point in the history
Before this commit, the warp protection introduced for fixing #358
was only released by a LevelEntry corresponding to a LevelExit,
and that LevelEntry needed to be a movement one (and not a
LevelEntryBeam). This commit moves the entire warping kill
protection solely into LevelExit, such that it only surrounds the
actual movement during use of the LevelExit. This way the section
covered by the warp protection is more predictable as well, given
that TSC uses the same cLevel_Player instance throughout the entire
game.
  • Loading branch information
Quintus committed Jun 18, 2015
1 parent f84b8bf commit ab03b37
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion tsc/src/objects/level_entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ void cLevel_Entry::Activate(void)
pLevel_Player->m_pos_z = player_posz;
// set state back
pLevel_Player->m_state = player_state;
pLevel_Player->Set_Warping(false); // Release kill protection for warps

if (m_direction == DIR_RIGHT || m_direction == DIR_LEFT) {
pLevel_Player->Set_Rotation_Z(0);
Expand Down
2 changes: 2 additions & 0 deletions tsc/src/objects/level_exit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,8 @@ void cLevel_Exit::Activate(void)
if (m_direction == DIR_RIGHT || m_direction == DIR_LEFT) {
pLevel_Player->Set_Rotation_Z(0);
}

pLevel_Player->Set_Warping(false);
}

pLevel_Player->Clear_Collisions();
Expand Down

0 comments on commit ab03b37

Please sign in to comment.