mirror of
https://github.com/GTAmodding/re3.git
synced 2024-11-15 13:49:03 +00:00
Merge branch 'master' of github.com:gtamodding/re3
This commit is contained in:
commit
9176aef1b2
5 changed files with 14 additions and 12 deletions
|
@ -1679,7 +1679,7 @@ float CGarage::CalcDistToGarageRectangleSquared(float X, float Y)
|
|||
else
|
||||
distX = 0.0f;
|
||||
if (Y < m_fY1)
|
||||
distY = m_fY1 - X;
|
||||
distY = m_fY1 - Y;
|
||||
else if (Y > m_fY2)
|
||||
distY = Y - m_fY2;
|
||||
else
|
||||
|
@ -2358,4 +2358,4 @@ STARTPATCHES
|
|||
InjectHook(0x427AB0, CGarages::IsPointInAGarageCameraZone, PATCH_JUMP); // CCamera::CamControl
|
||||
InjectHook(0x427BC0, CGarages::CameraShouldBeOutside, PATCH_JUMP); // CCamera::CamControl
|
||||
InjectHook(0x428940, CGarages::Load, PATCH_JUMP); // GenericLoad
|
||||
ENDPATCHES
|
||||
ENDPATCHES
|
||||
|
|
|
@ -7117,7 +7117,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command)
|
|||
case COMMAND_CLOSE_GARAGE:
|
||||
{
|
||||
CollectParameters(&m_nIp, 1);
|
||||
CGarages::CloseGarage(ScriptParams[1]);
|
||||
CGarages::CloseGarage(ScriptParams[0]);
|
||||
return 0;
|
||||
}
|
||||
case COMMAND_WARP_CHAR_FROM_CAR_TO_COORD:
|
||||
|
@ -9141,7 +9141,7 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command)
|
|||
assert(pVehicle);
|
||||
assert(pVehicle->m_vehType == VEHICLE_TYPE_CAR);
|
||||
CAutomobile* pCar = (CAutomobile*)pVehicle;
|
||||
pCar->bTakeLessDamage = ScriptParams[1];
|
||||
pCar->bMoreResistantToDamage = ScriptParams[1];
|
||||
return 0;
|
||||
}
|
||||
case COMMAND_SET_JAMES_CAR_ON_PATH_TO_PLAYER:
|
||||
|
|
|
@ -1223,7 +1223,7 @@ CCamera::CamControl(void)
|
|||
ReqMode == CCam::MODE_1STPERSON_RUNABOUT || ReqMode == CCam::MODE_M16_1STPERSON_RUNABOUT ||
|
||||
ReqMode == CCam::MODE_FIGHT_CAM_RUNABOUT || ReqMode == CCam::MODE_HELICANNON_1STPERSON ||
|
||||
WhoIsInControlOfTheCamera == CAMCONTROL_SCRIPT ||
|
||||
m_bJustCameOutOfGarage || m_bPlayerIsInGarage)
|
||||
m_bJustCameOutOfGarage || m_bPlayerIsInGarage)
|
||||
canUseObbeCam = false;
|
||||
|
||||
if(m_bObbeCinematicPedCamOn && canUseObbeCam)
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
|
||||
CSkidmark CSkidmarks::aSkidmarks[NUMSKIDMARKS];
|
||||
|
||||
RwImVertexIndex SkidmarkIndexList[16 * 6];
|
||||
RwIm3DVertex SkidmarkVertices[16 * 2];
|
||||
RwImVertexIndex SkidmarkIndexList[SKIDMARK_LENGTH * 6];
|
||||
RwIm3DVertex SkidmarkVertices[SKIDMARK_LENGTH * 2];
|
||||
RwTexture *gpSkidTex;
|
||||
RwTexture *gpSkidBloodTex;
|
||||
RwTexture *gpSkidMudTex;
|
||||
|
@ -32,7 +32,7 @@ CSkidmarks::Init(void)
|
|||
}
|
||||
|
||||
ix = 0;
|
||||
for(i = 0; i < 16; i++){
|
||||
for(i = 0; i < SKIDMARK_LENGTH; i++){
|
||||
SkidmarkIndexList[i*6+0] = ix+0;
|
||||
SkidmarkIndexList[i*6+1] = ix+2;
|
||||
SkidmarkIndexList[i*6+2] = ix+1;
|
||||
|
@ -42,7 +42,7 @@ CSkidmarks::Init(void)
|
|||
ix += 2;
|
||||
}
|
||||
|
||||
for(i = 0; i < 16; i++){
|
||||
for(i = 0; i < SKIDMARK_LENGTH; i++){
|
||||
RwIm3DVertexSetU(&SkidmarkVertices[i*2 + 0], 0.0f);
|
||||
RwIm3DVertexSetV(&SkidmarkVertices[i*2 + 0], i*5.01f);
|
||||
RwIm3DVertexSetU(&SkidmarkVertices[i*2 + 1], 1.0f);
|
||||
|
@ -201,7 +201,7 @@ CSkidmarks::RegisterOne(uintptr id, CVector pos, float fwdX, float fwdY, bool *i
|
|||
}
|
||||
aSkidmarks[i].m_lastUpdate = CTimer::GetTimeInMilliseconds();
|
||||
|
||||
if(aSkidmarks[i].m_last >= 15){
|
||||
if(aSkidmarks[i].m_last >= SKIDMARK_LENGTH-1){
|
||||
// No space to continue, end it
|
||||
aSkidmarks[i].m_state = 2;
|
||||
aSkidmarks[i].m_fadeStart = CTimer::GetTimeInMilliseconds() + 10000;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
enum { SKIDMARK_LENGTH = 16 };
|
||||
|
||||
class CSkidmark
|
||||
{
|
||||
public:
|
||||
|
@ -12,8 +14,8 @@ public:
|
|||
uint32 m_lastUpdate;;
|
||||
uint32 m_fadeStart;
|
||||
uint32 m_fadeEnd;
|
||||
CVector m_pos[16];
|
||||
CVector m_side[16];
|
||||
CVector m_pos[SKIDMARK_LENGTH];
|
||||
CVector m_side[SKIDMARK_LENGTH];
|
||||
};
|
||||
|
||||
class CSkidmarks
|
||||
|
|
Loading…
Reference in a new issue