Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions Client/mods/deathmatch/logic/CClientModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,17 @@ bool CClientModel::Allocate(ushort usParentID)
pModelInfo->MakePedModel("PSYCHO");
return true;
case eClientModelType::OBJECT:
if (g_pClientGame->GetObjectManager()->IsValidModel(usParentID))
if (g_pClientGame->GetObjectManager()->IsValidModel(usParentID) &&
!CClientPedManager::IsValidWeaponModel(usParentID))
{
pModelInfo->MakeObjectModel(usParentID);
return true;
}
break;
case eClientModelType::OBJECT_DAMAGEABLE:
{
bool isValidModel = g_pClientGame->GetObjectManager()->IsValidModel(usParentID);
bool isValidModel = g_pClientGame->GetObjectManager()->IsValidModel(usParentID) &&
!CClientPedManager::IsValidWeaponModel(usParentID);
bool isDamagable = pParentModelInfo->IsDamageableAtomic();
if (isValidModel && isDamagable)
{
Expand All @@ -63,14 +65,16 @@ bool CClientModel::Allocate(ushort usParentID)
break;
}
case eClientModelType::CLUMP:
if (g_pClientGame->GetObjectManager()->IsValidModel(usParentID))
if (g_pClientGame->GetObjectManager()->IsValidModel(usParentID) &&
!CClientPedManager::IsValidWeaponModel(usParentID))
{
pModelInfo->MakeClumpModel(usParentID);
return true;
}
break;
case eClientModelType::TIMED_OBJECT:
if (g_pClientGame->GetObjectManager()->IsValidModel(usParentID))
if (g_pClientGame->GetObjectManager()->IsValidModel(usParentID) &&
!CClientPedManager::IsValidWeaponModel(usParentID))
{
pModelInfo->MakeTimedObjectModel(usParentID);
return true;
Expand Down
Loading