1
0

Spectation: add dedicated pathway for spectator mode (#5303)

* Spectation: add dedicated pathway for spectator mode

+ Sync player rotation with spectated entity.
+ Add dedicated infrastructure to cPlayer for handling spectation, instead of misusing entity riding.
* Avoid infinite recursion when exiting spectation, fixes #5296

* AttachTo: Change parameter to reference
This commit is contained in:
Tiger Wang
2021-09-29 23:17:03 +01:00
committed by GitHub
parent 6bbbc52d02
commit 028a5735c5
11 changed files with 152 additions and 142 deletions

View File

@@ -67,8 +67,8 @@ void cPig::OnRightClicked(cPlayer & a_Player)
m_Attachee->Detach();
}
// Attach the player to this pig
a_Player.AttachTo(this);
// Attach the player to this pig:
a_Player.AttachTo(*this);
}
else if (a_Player.GetEquippedItem().m_ItemType == E_ITEM_SADDLE)
{