1
0

Fix cPawn pushing

cPawn instances can no longer push an entity they are attached to. cEntity now has a IsAttachedTo method.
This commit is contained in:
Marvin Kopf
2016-02-02 14:44:10 +01:00
parent 57e6fd654b
commit a1c48f4853
3 changed files with 22 additions and 0 deletions

View File

@@ -1864,6 +1864,19 @@ bool cEntity::IsA(const char * a_ClassName) const
bool cEntity::IsAttachedTo(const cEntity * a_Entity) const
{
if ((m_AttachedTo != nullptr) && (a_Entity->GetUniqueID() == m_AttachedTo->GetUniqueID()))
{
return true;
}
return false;
}
void cEntity::SetHeadYaw(double a_HeadYaw)
{
m_HeadYaw = a_HeadYaw;