From 638246ac2b0a338169ceb34b6e2fa0556bfe71df Mon Sep 17 00:00:00 2001 From: Kevin Granade Date: Wed, 25 Dec 2019 02:42:45 +0000 Subject: [PATCH] Initialize tripoint to avoid always teleporting monsters to ground level. --- src/teleport.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/teleport.cpp b/src/teleport.cpp index 7a63eb5b025e0..c9be878b80af8 100644 --- a/src/teleport.cpp +++ b/src/teleport.cpp @@ -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" ) ) ) {