summaryrefslogtreecommitdiffstats
path: root/src/peds/CivilianPed.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/peds/CivilianPed.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/peds/CivilianPed.cpp b/src/peds/CivilianPed.cpp
index 50b04df3..48785025 100644
--- a/src/peds/CivilianPed.cpp
+++ b/src/peds/CivilianPed.cpp
@@ -11,6 +11,7 @@
#include "SurfaceTable.h"
#include "Weather.h"
#include "PedAttractor.h"
+#include "Object.h"
CCivilianPed::CCivilianPed(ePedType pedtype, uint32 mi) : CPed(pedtype)
{
@@ -391,8 +392,8 @@ void CCivilianPed::FindNearbyAttractorsSectorList(CPtrList& list, float& minDist
{
for (CPtrNode* pNode = list.first; pNode != nil; pNode = pNode->next) {
CEntity* pEntity = (CEntity*)pNode->item;
- //if (pEntity->IsObject() && (CObject*)(pEntity)->IsBroken())
- //continue;
+ if (pEntity->IsObject() && (!pEntity->IsStatic() || ((CObject*)pEntity)->bHasBeenDamaged))
+ continue;
CBaseModelInfo* pModelInfo = CModelInfo::GetModelInfo(pEntity->GetModelIndex());
for (int i = 0; i < pModelInfo->GetNum2dEffects(); i++) {
C2dEffect* pEffect = pModelInfo->Get2dEffect(i);