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

@@ -696,7 +696,7 @@ void cEntity::BroadcastMovementUpdate(class cClientHandle const * a_ClientHandle
void cEntity::AttachTo(class cEntity * a_Entity)
void cEntity::AttachTo(class cEntity & a_Entity)
{
}
@@ -766,6 +766,15 @@ void cEntity::ResetPosition(class Vector3<double> a_Pos)
void cEntity::OnDetach()
{
}
cPawn::cPawn(enum cEntity::eEntityType, float a_Width, float a_Height) :
cEntity(etMonster, Vector3d(), a_Height, a_Width)
{