Teleport off of mount when throwing enderpearl (#5179)
* Teleport off of mount when throwing enderpearl * Simplify returning boolean * Oops forgot a semicolon * Fix code conventions in Player.h
This commit is contained in:
@@ -2590,6 +2590,15 @@ void cPlayer::AttachTo(cEntity * a_AttachTo)
|
||||
|
||||
|
||||
void cPlayer::Detach()
|
||||
{
|
||||
Detach(false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void cPlayer::Detach(bool a_IsTeleporting)
|
||||
{
|
||||
if (m_AttachedTo == nullptr)
|
||||
{
|
||||
@@ -2607,6 +2616,13 @@ void cPlayer::Detach()
|
||||
}
|
||||
|
||||
Super::Detach();
|
||||
|
||||
// If they are teleporting, no need to figure out position
|
||||
if (a_IsTeleporting)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int PosX = POSX_TOINT;
|
||||
int PosY = POSY_TOINT;
|
||||
int PosZ = POSZ_TOINT;
|
||||
|
||||
Reference in New Issue
Block a user