From 8c12227687454abe5bdd0b8796f84f15fd3817d8 Mon Sep 17 00:00:00 2001 From: LogicParrot <LogicParrot@users.noreply.github.com> Date: Sat, 16 Jan 2016 14:16:47 +0200 Subject: Fix crash when tamed wolf is hit by arrows --- src/ClientHandle.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/ClientHandle.cpp') diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index 377a84ce9..6585a38b2 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -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); -- cgit v1.2.3