diff options
author | erorcun <erayorcunus@gmail.com> | 2020-04-19 15:54:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-19 15:54:05 +0200 |
commit | f9ed50e17813d2a6708a6516e18041c7482a7462 (patch) | |
tree | e8d1312d1e2a9706793ac781271fedc73db91624 /src/entities | |
parent | Fix savename buffer overflow (diff) | |
parent | Struct cleanup, various fixes, enable PS2 rand (diff) | |
download | re3-f9ed50e17813d2a6708a6516e18041c7482a7462.tar re3-f9ed50e17813d2a6708a6516e18041c7482a7462.tar.gz re3-f9ed50e17813d2a6708a6516e18041c7482a7462.tar.bz2 re3-f9ed50e17813d2a6708a6516e18041c7482a7462.tar.lz re3-f9ed50e17813d2a6708a6516e18041c7482a7462.tar.xz re3-f9ed50e17813d2a6708a6516e18041c7482a7462.tar.zst re3-f9ed50e17813d2a6708a6516e18041c7482a7462.zip |
Diffstat (limited to 'src/entities')
-rw-r--r-- | src/entities/Entity.h | 36 | ||||
-rw-r--r-- | src/entities/Physical.cpp | 12 | ||||
-rw-r--r-- | src/entities/Physical.h | 6 |
3 files changed, 27 insertions, 27 deletions
diff --git a/src/entities/Entity.h b/src/entities/Entity.h index dadeee54..8c2634f3 100644 --- a/src/entities/Entity.h +++ b/src/entities/Entity.h @@ -40,25 +40,25 @@ public: uint32 m_status : 5; // flagsA - uint32 bUsesCollision : 1; - uint32 bCollisionProcessed : 1; - uint32 bIsStatic : 1; - uint32 bHasContacted : 1; + uint32 bUsesCollision : 1; // does entity use collision + uint32 bCollisionProcessed : 1; // has object been processed by a ProcessEntityCollision function + uint32 bIsStatic : 1; // is entity static + uint32 bHasContacted : 1; // has entity processed some contact forces uint32 bPedPhysics : 1; - uint32 bIsStuck : 1; - uint32 bIsInSafePosition : 1; + uint32 bIsStuck : 1; // is entity stuck + uint32 bIsInSafePosition : 1; // is entity in a collision free safe position uint32 bUseCollisionRecords : 1; // flagsB - uint32 bWasPostponed : 1; + uint32 bWasPostponed : 1; // was entity control processing postponed uint32 bExplosionProof : 1; - uint32 bIsVisible : 1; - uint32 bHasCollided : 1; // + uint32 bIsVisible : 1; //is the entity visible + uint32 bHasCollided : 1; uint32 bRenderScorched : 1; uint32 bHasBlip : 1; - uint32 bIsBIGBuilding : 1; + uint32 bIsBIGBuilding : 1; // Set if this entity is a big building // VC inserts one more flag here: if drawdist <= 2000 - uint32 bRenderDamaged : 1; + uint32 bRenderDamaged : 1; // use damaged LOD models for objects with applicable damage // flagsC uint32 bBulletProof : 1; @@ -66,22 +66,22 @@ public: uint32 bCollisionProof : 1; uint32 bMeleeProof : 1; uint32 bOnlyDamagedByPlayer : 1; - uint32 bStreamingDontDelete : 1; + uint32 bStreamingDontDelete : 1; // Dont let the streaming remove this uint32 bZoneCulled : 1; - uint32 bZoneCulled2 : 1; // only treadables+10m + uint32 bZoneCulled2 : 1; // only treadables+10m // flagsD - uint32 bRemoveFromWorld : 1; - uint32 bHasHitWall : 1; - uint32 bImBeingRendered : 1; + uint32 bRemoveFromWorld : 1; // remove this entity next time it should be processed + uint32 bHasHitWall : 1; // has collided with a building (changes subsequent collisions) + uint32 bImBeingRendered : 1; // don't delete me because I'm being rendered uint32 bTouchingWater : 1; // used by cBuoyancy::ProcessBuoyancy uint32 bIsSubway : 1; // set when subway, but maybe different meaning? - uint32 bDrawLast : 1; + uint32 bDrawLast : 1; // draw object last uint32 bNoBrightHeadLights : 1; uint32 bDoNotRender : 1; // flagsE - uint32 bDistanceFade : 1; + uint32 bDistanceFade : 1; // Fade entity because it is far away uint32 m_flagE2 : 1; uint16 m_scanCode; diff --git a/src/entities/Physical.cpp b/src/entities/Physical.cpp index 445cd83f..ec4543f6 100644 --- a/src/entities/Physical.cpp +++ b/src/entities/Physical.cpp @@ -36,7 +36,7 @@ CPhysical::CPhysical(void) for(i = 0; i < 6; i++) m_aCollisionRecords[i] = nil; - field_EF = false; + m_bIsVehicleBeingShifted = false; m_nDamagePieceType = 0; m_fDamageImpulse = 0.0f; @@ -63,7 +63,7 @@ CPhysical::CPhysical(void) m_phy_flagA10 = false; m_phy_flagA20 = false; - m_nZoneLevel = 0; + m_nZoneLevel = LEVEL_NONE; } CPhysical::~CPhysical(void) @@ -1767,13 +1767,13 @@ CPhysical::ProcessShift(void) CWorld::AdvanceCurrentScanCode(); if(IsVehicle()) - field_EF = true; + m_bIsVehicleBeingShifted = true; CEntryInfoNode *node; bool hasshifted = false; // whatever that means... for(node = m_entryInfoList.first; node; node = node->next) hasshifted |= ProcessShiftSectorList(node->sector->m_lists); - field_EF = false; + m_bIsVehicleBeingShifted = false; if(hasshifted){ CWorld::AdvanceCurrentScanCode(); for(node = m_entryInfoList.first; node; node = node->next) @@ -1799,7 +1799,7 @@ CPhysical::ProcessCollision(void) CPed *ped = (CPed*)this; m_fDistanceTravelled = 0.0f; - field_EF = 0; + m_bIsVehicleBeingShifted = false; m_phy_flagA80 = false; if(!bUsesCollision){ @@ -1912,7 +1912,7 @@ CPhysical::ProcessCollision(void) ApplyMoveSpeed(); ApplyTurnSpeed(); GetMatrix().Reorthogonalise(); - field_EF = 0; + m_bIsVehicleBeingShifted = false; m_phy_flagA80 = false; if(!m_vecMoveSpeed.IsZero() || !m_vecTurnSpeed.IsZero() || diff --git a/src/entities/Physical.h b/src/entities/Physical.h index 6fbc3ffd..fa5ada05 100644 --- a/src/entities/Physical.h +++ b/src/entities/Physical.h @@ -40,7 +40,7 @@ public: char field_EC; uint8 m_nStaticFrames; uint8 m_nCollisionRecords; - bool field_EF; + bool m_bIsVehicleBeingShifted; CEntity *m_aCollisionRecords[PHYSICAL_MAX_COLLISIONRECORDS]; float m_fDistanceTravelled; @@ -55,8 +55,8 @@ public: uint8 bAffectedByGravity : 1; uint8 bInfiniteMass : 1; uint8 bIsInWater : 1; - uint8 m_phy_flagA10 : 1; - uint8 m_phy_flagA20 : 1; + uint8 m_phy_flagA10 : 1; // unused + uint8 m_phy_flagA20 : 1; // unused uint8 bHitByTrain : 1; uint8 m_phy_flagA80 : 1; |