1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-23 09:30:00 +00:00

Merge remote-tracking branch 'samler/world' into Standalone

This commit is contained in:
Sergeanur 2020-04-17 10:16:30 +03:00
commit 881d61f811
9 changed files with 1010 additions and 39 deletions

View file

@ -28,6 +28,7 @@ public:
static void StartCutsceneProcessing() { ms_cutsceneProcessing = true; }
static bool IsRunning(void) { return ms_running; }
static bool HasLoaded(void) { return ms_loaded; }
static bool IsCutsceneProcessing(void) { return ms_cutsceneProcessing; }
static bool UseLodMultiplier(void) { return ms_useLodMultiplier; }
static CCutsceneObject* GetCutsceneObject(int id) { return ms_pCutsceneObjects[id]; }

View file

@ -1087,7 +1087,7 @@ void CReplay::TriggerPlayback(uint8 cam_mode, float cam_x, float cam_y, float ca
Playback.m_bSlot = first;
Playback.m_nOffset = 0;
Playback.m_pBase = Buffers[first];
CObject::DeleteAllTempObjectInArea(CVector(0.0f, 0.0f, 0.0f), 1000000.0f);
CObject::DeleteAllTempObjectsInArea(CVector(0.0f, 0.0f, 0.0f), 1000000.0f);
StoreStuffInMem();
EmptyPedsAndVehiclePools();
SlowMotion = 1;

File diff suppressed because it is too large Load diff

View file

@ -85,7 +85,7 @@ public:
}
}
static void ClearScanCodes(void);
static void ClearExcitingStuffFromArea(const CVector &pos, float radius, uint8);
static void ClearExcitingStuffFromArea(const CVector &pos, float radius, bool bRemoveProjectilesAndTidyUpShadows);
static bool CameraToIgnoreThisObject(CEntity *ent);
@ -103,19 +103,26 @@ public:
static CEntity *TestSphereAgainstSectorList(CPtrList&, CVector, float, CEntity*, bool);
static void FindObjectsInRangeSectorList(CPtrList&, CVector&, float, bool, short*, short, CEntity**);
static void FindObjectsInRange(CVector&, float, bool, short*, short, CEntity**, bool, bool, bool, bool, bool);
static void FindObjectsOfTypeInRangeSectorList(uint32, CPtrList&, CVector&, float, bool, short*, short, CEntity**);
static void FindObjectsOfTypeInRange(uint32, CVector&, float, bool, short*, short, CEntity**, bool, bool, bool, bool, bool);
static void FindObjectsOfTypeInRangeSectorList(uint32 modelId, CPtrList& list, const CVector& position, float radius, bool bCheck2DOnly, int16* nEntitiesFound, int16 maxEntitiesToFind, CEntity** aEntities);
static void FindObjectsOfTypeInRange(uint32 modelId, const CVector& position, float radius, bool bCheck2DOnly, int16* nEntitiesFound, int16 maxEntitiesToFind, CEntity** aEntities, bool bBuildings, bool bVehicles, bool bPeds, bool bObjects, bool bDummies);
static float FindGroundZForCoord(float x, float y);
static float FindGroundZFor3DCoord(float x, float y, float z, bool *found);
static float FindRoofZFor3DCoord(float x, float y, float z, bool *found);
static void RemoveReferencesToDeletedObject(CEntity*);
static void FindObjectsKindaColliding(const CVector &, float, bool, int16*, int16, CEntity **, bool, bool, bool, bool, bool);
static void FindObjectsIntersectingCube(const CVector &, const CVector &, int16*, int16, CEntity **, bool, bool, bool, bool, bool);
static void FindObjectsKindaColliding(const CVector& position, float radius, bool bCheck2DOnly, int16* nCollidingEntities, int16 maxEntitiesToFind, CEntity** aEntities, bool bBuildings, bool bVehicles, bool bPeds, bool bObjects, bool bDummies);
static void FindObjectsKindaCollidingSectorList(CPtrList& list, const CVector& position, float radius, bool bCheck2DOnly, int16* nCollidingEntities, int16 maxEntitiesToFind, CEntity** aEntities);
static void FindObjectsIntersectingCube(const CVector& vecStartPos, const CVector& vecEndPos, int16* nIntersecting, int16 maxEntitiesToFind, CEntity** aEntities, bool bBuildings, bool bVehicles, bool bPeds, bool bObjects, bool bDummies);
static void FindObjectsIntersectingCubeSectorList(CPtrList& list, const CVector& vecStartPos, const CVector& vecEndPos, int16* nIntersecting, int16 maxEntitiesToFind, CEntity** aEntities);
static void FindObjectsIntersectingAngledCollisionBox(const CColBox &, const CMatrix &, const CVector &, float, float, float, float, int16*, int16, CEntity **, bool, bool, bool, bool, bool);
static void FindMissionEntitiesIntersectingCube(const CVector&, const CVector&, int16*, int16, CEntity**, bool, bool, bool);
static void ClearCarsFromArea(float, float, float, float, float, float);
static void ClearPedsFromArea(float, float, float, float, float, float);
static void CallOffChaseForArea(float, float, float, float);
static void FindObjectsIntersectingAngledCollisionBoxSectorList(CPtrList& list, const CColBox& boundingBox, const CMatrix& matrix, const CVector& position, int16* nEntitiesFound, int16 maxEntitiesToFind, CEntity** aEntities);
static void FindMissionEntitiesIntersectingCube(const CVector& vecStartPos, const CVector& vecEndPos, int16* nIntersecting, int16 maxEntitiesToFind, CEntity** aEntities, bool bVehicles, bool bPeds, bool bObjects);
static void FindMissionEntitiesIntersectingCubeSectorList(CPtrList& list, const CVector& vecStartPos, const CVector& vecEndPos, int16* nIntersecting, int16 maxEntitiesToFind, CEntity** aEntities, bool bIsVehicleList, bool bIsPedList);
static void ClearCarsFromArea(float x1, float y1, float z1, float x2, float y2, float z2);
static void ClearPedsFromArea(float x1, float y1, float z1, float x2, float y2, float z2);
static void CallOffChaseForArea(float x1, float y1, float x2, float y2);
static void CallOffChaseForAreaSectorListVehicles(CPtrList& list, float x1, float y1, float x2, float y2, float fStartX, float fStartY, float fEndX, float fEndY);
static void CallOffChaseForAreaSectorListPeds(CPtrList& list, float x1, float y1, float x2, float y2);
static float GetSectorX(float f) { return ((f - WORLD_MIN_X)/SECTOR_SIZE_X); }
static float GetSectorY(float f) { return ((f - WORLD_MIN_Y)/SECTOR_SIZE_Y); }
@ -131,19 +138,20 @@ public:
static void StopAllLawEnforcersInTheirTracks();
static void SetAllCarsCanBeDamaged(bool);
static void ExtinguishAllCarFiresInArea(CVector, float);
static void SetCarsOnFire(float, float, float, float, CEntity*);
static void SetPedsOnFire(float, float, float, float, CEntity*);
static void SetCarsOnFire(float x, float y, float z, float radius, CEntity* reason);
static void SetPedsOnFire(float x, float y, float z, float radius, CEntity* reason);
static void Initialise();
static void AddParticles();
static void ShutDown();
static void ClearForRestart(void);
static void RepositionCertainDynamicObjects();
static void RepositionOneObject(CEntity* pEntity);
static void RemoveStaticObjects();
static void Process();
static void TriggerExplosion(const CVector &, float, float, CEntity*, bool);
static void UseDetonator(CEntity *);
static void TriggerExplosion(const CVector& position, float fRadius, float fPower, CEntity* pCreator, bool bProcessVehicleBombTimer);
static void TriggerExplosionSectorList(CPtrList& list, const CVector& position, float fRadius, float fPower, CEntity* pCreator, bool bProcessVehicleBombTimer);
static void UseDetonator(CEntity *pEntity);
};
extern CColPoint gaTempSphereColPoints[MAX_COLLISION_POINTS];

View file

@ -865,6 +865,16 @@ CEntity::ModifyMatrixForBannerInWind(void)
UpdateRwFrame();
}
void
CEntity::AddSteamsFromGround(CPtrList& list)
{
CPtrNode *pNode = list.first;
while (pNode) {
((CEntity*)pNode->item)->AddSteamsFromGround(nil);
pNode = pNode->next;
}
}
#include <new>
class CEntity_ : public CEntity
@ -912,7 +922,7 @@ STARTPATCHES
InjectHook(0x473F60, &CEntity::DetachFromRwObject, PATCH_JUMP);
InjectHook(0x475A20, &CEntity::PreRenderForGlassWindow, PATCH_JUMP);
InjectHook(0x50CE40, &CEntity::AddSteamsFromGround, PATCH_JUMP);
InjectHook(0x50CE40, (void (CEntity::*)(CVector*))& CEntity::AddSteamsFromGround, PATCH_JUMP);
InjectHook(0x475670, &CEntity::ModifyMatrixForTreeInWind, PATCH_JUMP);
InjectHook(0x475830, &CEntity::ModifyMatrixForBannerInWind, PATCH_JUMP);
InjectHook(0x4FA530, &CEntity::ProcessLightsForEntity, PATCH_JUMP);

View file

@ -4,6 +4,7 @@
#include "Placeable.h"
struct CReference;
class CPtrList;
enum eEntityType
{
@ -152,5 +153,7 @@ public:
void ModifyMatrixForTreeInWind(void);
void ModifyMatrixForBannerInWind(void);
void ProcessLightsForEntity(void);
static void AddSteamsFromGround(CPtrList& list);
};
static_assert(sizeof(CEntity) == 0x64, "CEntity: error");

View file

@ -496,4 +496,11 @@ IsExplosiveThingModel(int16 id)
{
return id == MI_EXPLODINGBARREL ||
id == MI_PETROLPUMP;
}
inline bool
IsFence(int16 id)
{
return id == MI_FENCE ||
id == MI_FENCE2;
}

View file

@ -383,7 +383,7 @@ CObject::DeleteAllTempObjects()
}
void
CObject::DeleteAllTempObjectInArea(CVector point, float fRadius)
CObject::DeleteAllTempObjectsInArea(CVector point, float fRadius)
{
CObjectPool *objectPool = CPools::GetObjectPool();
for (int32 i = 0; i < objectPool->GetSize(); i++) {
@ -426,5 +426,5 @@ STARTPATCHES
InjectHook(0x4BB010, &CObject::CanBeDeleted, PATCH_JUMP);
InjectHook(0x4BBE60, &CObject::DeleteAllMissionObjects, PATCH_JUMP);
InjectHook(0x4BBDF0, &CObject::DeleteAllTempObjects, PATCH_JUMP);
InjectHook(0x4BBED0, &CObject::DeleteAllTempObjectInArea, PATCH_JUMP);
InjectHook(0x4BBED0, &CObject::DeleteAllTempObjectsInArea, PATCH_JUMP);
ENDPATCHES

View file

@ -99,6 +99,6 @@ public:
static void DeleteAllMissionObjects();
static void DeleteAllTempObjects();
static void DeleteAllTempObjectInArea(CVector point, float fRadius);
static void DeleteAllTempObjectsInArea(CVector point, float fRadius);
};
static_assert(sizeof(CObject) == 0x198, "CObject: error");