Skip to content

Commit

Permalink
Initialize tripoint to avoid always teleporting monsters to ground le…
Browse files Browse the repository at this point in the history
…vel.
  • Loading branch information
kevingranade committed Dec 25, 2019
1 parent b9149dd commit 638246a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/teleport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ bool teleport::teleport( Creature &critter, int min_distance, int max_distance,
const bool c_is_u = p != nullptr && p == &g->u;
int tries = 0;
tripoint origin = critter.pos();
tripoint new_pos;
tripoint new_pos = origin;
//The teleportee is dimensionally anchored so nothing happens
if( p && ( p->worn_with_flag( "DIMENSIONAL_ANCHOR" ) ||
p->has_effect_with_flag( "DIMENSIONAL_ANCHOR" ) ) ) {
Expand Down

0 comments on commit 638246a

Please sign in to comment.