-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Player snaps back if teleport fails #72887
Changes from 3 commits
195441e
04d7352
2ae568e
7d111a4
661fd45
50dd2cc
5fe1076
d91ec5f
f2f86d5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,7 +144,7 @@ | |
|
||
// Put us back at 0. We shouldn't have to do this but other tests are | ||
// making assumptions about what z-level they're on. | ||
g->vertical_shift( 0 ); | ||
dummy.setpos( test_origin ); | ||
} | ||
|
||
static const efftype_id effect_winded( "winded" ); | ||
|
@@ -274,7 +274,7 @@ | |
REQUIRE( swimmer.pos() == left ); | ||
REQUIRE( avatar_action::move( swimmer, here, tripoint_east ) ); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, this wants an offset like tripoint_east, not a coordinate like left. |
||
} else { | ||
REQUIRE( swimmer.pos() == right ); | ||
Check failure on line 277 in tests/water_movement_test.cpp GitHub Actions / Basic Build and Test (Clang 10, Ubuntu, Curses)
Check failure on line 277 in tests/water_movement_test.cpp GitHub Actions / Basic Build and Test (Clang 10, Ubuntu, Curses)
Check failure on line 277 in tests/water_movement_test.cpp GitHub Actions / Basic Build and Test (Clang 10, Ubuntu, Curses)
Check failure on line 277 in tests/water_movement_test.cpp GitHub Actions / Basic Build and Test (Clang 10, Ubuntu, Curses)
Check failure on line 277 in tests/water_movement_test.cpp GitHub Actions / Basic Build and Test (Clang 10, Ubuntu, Curses)
Check failure on line 277 in tests/water_movement_test.cpp GitHub Actions / Basic Build and Test (Clang 10, Ubuntu, Curses)
Check failure on line 277 in tests/water_movement_test.cpp GitHub Actions / Basic Build and Test (Clang 10, Ubuntu, Curses)
|
||
REQUIRE( avatar_action::move( swimmer, here, tripoint_west ) ); | ||
} | ||
++steps; | ||
|
@@ -905,6 +905,7 @@ | |
|
||
TEST_CASE( "check_swim_move_cost_and_distance_values", "[swimming][slow]" ) | ||
{ | ||
clear_avatar(); | ||
setup_test_lake(); | ||
|
||
avatar &dummy = get_avatar(); | ||
|
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.
The issue comes from this change.
game::vertical_shift
setsabs_sub
on themap
object. And apparentlyCreature::setpos
does not, so the map still thinks it's at z-level -1 when the avatar moves in subsequent tests, which sets the avatar z-level to -1 whengame::update_map
is called.