sync with master

This commit is contained in:
Nikolay Korolev
2020-04-19 17:38:48 +03:00
28 changed files with 104 additions and 85 deletions

View File

@ -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;

View File

@ -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)
@ -1771,13 +1771,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)
@ -1803,7 +1803,7 @@ CPhysical::ProcessCollision(void)
CPed *ped = (CPed*)this;
m_fDistanceTravelled = 0.0f;
field_EF = 0;
m_bIsVehicleBeingShifted = false;
m_phy_flagA80 = false;
if(!bUsesCollision){
@ -1916,7 +1916,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() ||

View File

@ -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;