Skip to content

Commit 67a7bff

Browse files
committed
Addenum
1 parent f9f83f5 commit 67a7bff

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Client/game_sa/CBuildingsPoolSA.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,8 @@ void CBuildingsPoolSA::RemovePedsContactEnityLinks()
374374
ped->pLastContactedEntity[3] = nullptr;
375375
ped->m_ucCollisionState = 0;
376376

377-
reinterpret_cast<CPlayerPedSA*>(pedLinks->pEntity)->SetTargetedEntity(nullptr);
377+
if (auto* playerPed = dynamic_cast<CPlayerPed*>(pedLinks->pEntity))
378+
playerPed->SetTargetedEntity(nullptr);
378379
}
379380
}
380381
}

0 commit comments

Comments
 (0)