aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-24 13:13:00 -0600
committermegamage <none@none>2009-03-24 13:13:00 -0600
commitc5969d6d03b661668a9893b0cca9f6df98f7ad4b (patch)
treeee3a45b2c5b2db7f01026f345f67bcbc316b5e24 /src/game/Unit.cpp
parent6b4d5c4a358d46c10c75a586cfbb0b4ee5de19e2 (diff)
*Make sure the a player can only have one viewpoint.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp2
1 files changed, 2 insertions, 0 deletions
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