1
0

Fix crash when tamed wolf is hit by arrows

This commit is contained in:
LogicParrot
2016-01-16 14:16:47 +02:00
parent 5ca2f4fd0c
commit 8c12227687
7 changed files with 79 additions and 61 deletions

View File

@@ -1640,7 +1640,10 @@ void cClientHandle::HandleUseEntity(UInt32 a_TargetEntityID, bool a_IsLeftClick)
}
a_Entity->TakeDamage(*m_Me);
m_Me->AddFoodExhaustion(0.3);
m_Me->NotifyFriendlyWolves(a_Entity);
if (a_Entity->IsPawn())
{
m_Me->NotifyFriendlyWolves(static_cast<cPawn*>(a_Entity));
}
return true;
}
} Callback(m_Player);