[11114] Reset camera view at removing from world

this helps us to clean reference between viewpoint and camera in some cases
This commit is contained in:
SilverIce 2011-02-07 03:50:04 +02:00
parent 8069cf09d2
commit b2d81eae1b
2 changed files with 4 additions and 1 deletions

View file

@ -2037,6 +2037,9 @@ void Player::RemoveFromWorld()
///- Do not add/remove the player from the object storage ///- Do not add/remove the player from the object storage
///- It will crash when updating the ObjectAccessor ///- It will crash when updating the ObjectAccessor
///- The player should only be removed when logging out ///- The player should only be removed when logging out
if (IsInWorld())
GetCamera().ResetView();
Unit::RemoveFromWorld(); Unit::RemoveFromWorld();
} }

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "11113" #define REVISION_NR "11114"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__