From c5969d6d03b661668a9893b0cca9f6df98f7ad4b Mon Sep 17 00:00:00 2001 From: megamage Date: Tue, 24 Mar 2009 13:13:00 -0600 Subject: *Make sure the a player can only have one viewpoint. --HG-- branch : trunk --- src/game/Unit.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/game/Unit.cpp') diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 1850f9f1eeb..3c2713c6d91 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -13141,6 +13141,7 @@ void Unit::SetCharmedOrPossessedBy(Unit* charmer, bool possess) SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_24); ((Player*)charmer)->SetClientControl(this, 1); ((Player*)charmer)->SetMover(this); + ((Player*)charmer)->SetViewpoint(this, true); charmer->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); } // Charm demon @@ -13223,6 +13224,7 @@ void Unit::RemoveCharmedOrPossessedBy(Unit *charmer) { ((Player*)charmer)->SetClientControl(charmer, 1); ((Player*)charmer)->SetMover(charmer); + ((Player*)charmer)->SetViewpoint(this, false); charmer->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); } // restore UNIT_FIELD_BYTES_0 -- cgit v1.2.3