mirror of
https://github.com/halpz/re3.git
synced 2025-06-29 22:06:23 +00:00
merge with upstream
This commit is contained in:
@ -24,7 +24,7 @@ uint32& CBridge::TimeOfBridgeBecomingOperational = *(uint32*)0x8F2BC0;
|
||||
void CBridge::Init()
|
||||
{
|
||||
FindBridgeEntities();
|
||||
OldLift = -1.0;
|
||||
OldLift = -1.0f;
|
||||
if (pLiftPart && pWeight)
|
||||
{
|
||||
DefaultZLiftPart = pLiftPart->GetPosition().z;
|
||||
@ -60,32 +60,32 @@ void CBridge::Update()
|
||||
if (timeElapsed < 10000)
|
||||
{
|
||||
State = STATE_LIFT_PART_MOVING_DOWN;
|
||||
liftHeight = 25.0 - timeElapsed / 10000.0 * 25.0;
|
||||
liftHeight = 25.0f - timeElapsed / 10000.0f * 25.0f;
|
||||
}
|
||||
else if (timeElapsed < 40000)
|
||||
{
|
||||
liftHeight = 0.0;
|
||||
liftHeight = 0.0f;
|
||||
State = STATE_LIFT_PART_IS_DOWN;
|
||||
}
|
||||
else if (timeElapsed < 50000)
|
||||
{
|
||||
liftHeight = 0.0;
|
||||
liftHeight = 0.0f;
|
||||
State = STATE_LIFT_PART_ABOUT_TO_MOVE_UP;
|
||||
}
|
||||
else if (timeElapsed < 60000)
|
||||
{
|
||||
State = STATE_LIFT_PART_MOVING_UP;
|
||||
liftHeight = (timeElapsed - 50000) / 10000.0 * 25.0;
|
||||
liftHeight = (timeElapsed - 50000) / 10000.0f * 25.0f;
|
||||
}
|
||||
else
|
||||
{
|
||||
liftHeight = 25.0;
|
||||
liftHeight = 25.0f;
|
||||
State = STATE_LIFT_PART_IS_UP;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
liftHeight = 25.0;
|
||||
liftHeight = 25.0f;
|
||||
TimeOfBridgeBecomingOperational = 0;
|
||||
State = STATE_BRIDGE_LOCKED;
|
||||
}
|
||||
@ -151,4 +151,4 @@ STARTPATCHES
|
||||
InjectHook(0x413D10, &CBridge::ShouldLightsBeFlashing, PATCH_JUMP);
|
||||
InjectHook(0x413D20, &CBridge::FindBridgeEntities, PATCH_JUMP);
|
||||
InjectHook(0x413DE0, &CBridge::ThisIsABridgeObjectMovingUp, PATCH_JUMP);
|
||||
ENDPATCHES
|
||||
ENDPATCHES
|
||||
|
@ -2,6 +2,47 @@
|
||||
#include "common.h"
|
||||
|
||||
class CVehicle;
|
||||
class CEntity;
|
||||
class CObject;
|
||||
|
||||
class CCrane
|
||||
{
|
||||
public:
|
||||
CEntity *m_pObject;
|
||||
CObject *m_pMagnet;
|
||||
int m_nAudioEntity;
|
||||
float m_fPickupX1;
|
||||
float m_fPickupX2;
|
||||
float m_fPickupY1;
|
||||
float m_fPickupY2;
|
||||
CVector m_vecDropoffTarget;
|
||||
float m_fDropoffHeading;
|
||||
float m_fPickupAngle;
|
||||
float m_fDropoffAngle;
|
||||
float m_fPickupDistance;
|
||||
float m_fDropoffDistance;
|
||||
float m_fAngle;
|
||||
float m_fDistance;
|
||||
float m_fHeight;
|
||||
float m_fHookOffset;
|
||||
float m_fHookHeight;
|
||||
CVector m_vecHookInitPos;
|
||||
CVector m_vecHookCurPos;
|
||||
float m_fHookVelocityX;
|
||||
float m_fHookVelocityY;
|
||||
CVehicle *m_pVehiclePickedUp;
|
||||
int m_nUpdateTimer;
|
||||
char m_bCraneActive;
|
||||
char m_bCraneStatus;
|
||||
char m_bVehiclesCollected;
|
||||
char m_bIsCrusher;
|
||||
char m_bIsMilitaryCrane;
|
||||
char field_125;
|
||||
char m_bNotMilitaryCrane;
|
||||
char gap_127[1];
|
||||
};
|
||||
|
||||
static_assert(sizeof(CCrane) == 128, "CCrane: error");
|
||||
|
||||
class CCranes
|
||||
{
|
||||
|
@ -991,7 +991,7 @@ float
|
||||
CPathFind::FindNodeOrientationForCarPlacement(int32 nodeId)
|
||||
{
|
||||
if(m_pathNodes[nodeId].numLinks == 0)
|
||||
return 0.0;
|
||||
return 0.0f;
|
||||
CVector dir = m_pathNodes[m_connections[m_pathNodes[nodeId].firstLink]].pos - m_pathNodes[nodeId].pos;
|
||||
dir.z = 0.0f;
|
||||
dir.Normalise();
|
||||
@ -1008,7 +1008,7 @@ CPathFind::FindNodeOrientationForCarPlacementFacingDestination(int32 nodeId, flo
|
||||
CVector dir;
|
||||
|
||||
if(m_pathNodes[nodeId].numLinks == 0)
|
||||
return 0.0;
|
||||
return 0.0f;
|
||||
|
||||
int bestNode = m_connections[m_pathNodes[nodeId].firstLink];
|
||||
#ifdef FIX_BUGS
|
||||
|
@ -1,27 +1,29 @@
|
||||
#include "common.h"
|
||||
#include "patcher.h"
|
||||
#include "main.h"
|
||||
#include "Pickups.h"
|
||||
|
||||
#include "Camera.h"
|
||||
#include "Entity.h"
|
||||
#include "Timer.h"
|
||||
#include "Shadows.h"
|
||||
#include "Coronas.h"
|
||||
#include "World.h"
|
||||
#include "ModelIndices.h"
|
||||
#include "PlayerPed.h"
|
||||
#include "Object.h"
|
||||
#include "Pools.h"
|
||||
#include "Pad.h"
|
||||
#include "Script.h"
|
||||
#include "Darkel.h"
|
||||
#include "Garages.h"
|
||||
#include "Entity.h"
|
||||
#include "Explosion.h"
|
||||
#include "WaterLevel.h"
|
||||
#include "SpecialFX.h"
|
||||
#include "PointLights.h"
|
||||
#include "Sprite.h"
|
||||
#include "Font.h"
|
||||
#include "Garages.h"
|
||||
#include "General.h"
|
||||
#include "ModelIndices.h"
|
||||
#include "Object.h"
|
||||
#include "Pad.h"
|
||||
#include "Pickups.h"
|
||||
#include "PlayerPed.h"
|
||||
#include "PointLights.h"
|
||||
#include "Pools.h"
|
||||
#include "Script.h"
|
||||
#include "Shadows.h"
|
||||
#include "SpecialFX.h"
|
||||
#include "Sprite.h"
|
||||
#include "Timer.h"
|
||||
#include "WaterLevel.h"
|
||||
#include "World.h"
|
||||
|
||||
CPickup(&CPickups::aPickUps)[NUMPICKUPS] = *(CPickup(*)[NUMPICKUPS])*(uintptr*)0x878C98;
|
||||
int16 CPickups::NumMessages;// = *(int16*)0x95CC98;
|
||||
@ -693,7 +695,7 @@ CPickups::DoPickUpEffects(CEntity *entity)
|
||||
|
||||
CVector &pos = entity->GetPosition();
|
||||
|
||||
float colorModifier = ((double)(rand() & 0x1F) * 0.015f + 1.0f) * modifiedSin * 0.15f;
|
||||
float colorModifier = ((CGeneral::GetRandomNumber() & 0x1F) * 0.015f + 1.0f) * modifiedSin * 0.15f;
|
||||
CShadows::StoreStaticShadow(
|
||||
(uintptr)entity,
|
||||
SHADOWTYPE_ADDITIVE,
|
||||
@ -704,9 +706,9 @@ CPickups::DoPickUpEffects(CEntity *entity)
|
||||
aWeaponReds[colorId] * colorModifier, aWeaponGreens[colorId] * colorModifier, aWeaponBlues[colorId] * colorModifier,
|
||||
4.0f, 1.0f, 40.0f, false, 0.0f);
|
||||
|
||||
float radius = (double)(rand() & 0xF) * 0.1 + 3.0;
|
||||
float radius = (CGeneral::GetRandomNumber() & 0xF) * 0.1f + 3.0f;
|
||||
CPointLights::AddLight(CPointLights::LIGHT_POINT, pos, CVector(0.0f, 0.0f, 0.0f), radius, aWeaponReds[colorId] * modifiedSin / 256.0f, aWeaponGreens[colorId] * modifiedSin / 256.0f, aWeaponBlues[colorId] * modifiedSin / 256.0f, CPointLights::FOG_NONE, true);
|
||||
float size = (double)(rand() & 0xF) * 0.0005 + 0.6;
|
||||
float size = (CGeneral::GetRandomNumber() & 0xF) * 0.0005f + 0.6f;
|
||||
CCoronas::RegisterCorona( (uintptr)entity,
|
||||
aWeaponReds[colorId] * modifiedSin / 2.0f, aWeaponGreens[colorId] * modifiedSin / 2.0f, aWeaponBlues[colorId] * modifiedSin / 2.0f,
|
||||
255,
|
||||
@ -1044,4 +1046,4 @@ STARTPATCHES
|
||||
InjectHook(0x433E40, CPickups::Save, PATCH_JUMP);
|
||||
InjectHook(0x433BA0, &CPickup::GiveUsAPickUpObject, PATCH_JUMP);
|
||||
InjectHook(0x430860, &CPickup::Update, PATCH_JUMP);
|
||||
ENDPATCHES
|
||||
ENDPATCHES
|
||||
|
@ -174,7 +174,7 @@ void CMissionCleanup::Process()
|
||||
{
|
||||
CPopulation::m_AllRandomPedsThisType = -1;
|
||||
CPopulation::PedDensityMultiplier = 1.0f;
|
||||
CCarCtrl::CarDensityMultiplier = 1.0;
|
||||
CCarCtrl::CarDensityMultiplier = 1.0f;
|
||||
FindPlayerPed()->m_pWanted->m_fCrimeSensitivity = 1.0f;
|
||||
TheCamera.Restore();
|
||||
TheCamera.SetWideScreenOff();
|
||||
|
Reference in New Issue
Block a user