summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-05-16 10:22:12 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-05-16 10:22:12 +0200
commitcf5db7311776c26b4c2710b142a2863e88645965 (patch)
tree9e033a80f831b1b7f5aad9461e5e40c3cb6d5843 /src
parentremoved duplicate code (diff)
downloadre3-cf5db7311776c26b4c2710b142a2863e88645965.tar
re3-cf5db7311776c26b4c2710b142a2863e88645965.tar.gz
re3-cf5db7311776c26b4c2710b142a2863e88645965.tar.bz2
re3-cf5db7311776c26b4c2710b142a2863e88645965.tar.lz
re3-cf5db7311776c26b4c2710b142a2863e88645965.tar.xz
re3-cf5db7311776c26b4c2710b142a2863e88645965.tar.zst
re3-cf5db7311776c26b4c2710b142a2863e88645965.zip
Diffstat (limited to '')
-rw-r--r--src/peds/CivilianPed.cpp5
-rw-r--r--src/peds/PedAttractor.h4
2 files changed, 5 insertions, 4 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);
diff --git a/src/peds/PedAttractor.h b/src/peds/PedAttractor.h
index 3408be93..d2ed014e 100644
--- a/src/peds/PedAttractor.h
+++ b/src/peds/PedAttractor.h
@@ -152,9 +152,9 @@ public:
virtual void UpdatePedStateOnDeparture(CPed* pPed) const override
{ /*
if (pPed->m_money > 10)
- pPed->m_money = 0;
- else
pPed->m_money -= 10;
+ else
+ pPed->m_money = 0;
*/
}
CPedPizzaAttractor(C2dEffect* pEffect, const CMatrix& matrix, int32 maxpeds, float qdist, float waitTime, float approachTime, float unk8, float unk9, float posdisp, float headdisp) :