Merge branch 'master' of github.com:gtamodding/re3
This commit is contained in:
commit
9176aef1b2
@ -1679,7 +1679,7 @@ float CGarage::CalcDistToGarageRectangleSquared(float X, float Y)
|
|||||||
else
|
else
|
||||||
distX = 0.0f;
|
distX = 0.0f;
|
||||||
if (Y < m_fY1)
|
if (Y < m_fY1)
|
||||||
distY = m_fY1 - X;
|
distY = m_fY1 - Y;
|
||||||
else if (Y > m_fY2)
|
else if (Y > m_fY2)
|
||||||
distY = Y - m_fY2;
|
distY = Y - m_fY2;
|
||||||
else
|
else
|
||||||
|
@ -7117,7 +7117,7 @@ int8 CRunningScript::ProcessCommands800To899(int32 command)
|
|||||||
case COMMAND_CLOSE_GARAGE:
|
case COMMAND_CLOSE_GARAGE:
|
||||||
{
|
{
|
||||||
CollectParameters(&m_nIp, 1);
|
CollectParameters(&m_nIp, 1);
|
||||||
CGarages::CloseGarage(ScriptParams[1]);
|
CGarages::CloseGarage(ScriptParams[0]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
case COMMAND_WARP_CHAR_FROM_CAR_TO_COORD:
|
case COMMAND_WARP_CHAR_FROM_CAR_TO_COORD:
|
||||||
@ -9141,7 +9141,7 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command)
|
|||||||
assert(pVehicle);
|
assert(pVehicle);
|
||||||
assert(pVehicle->m_vehType == VEHICLE_TYPE_CAR);
|
assert(pVehicle->m_vehType == VEHICLE_TYPE_CAR);
|
||||||
CAutomobile* pCar = (CAutomobile*)pVehicle;
|
CAutomobile* pCar = (CAutomobile*)pVehicle;
|
||||||
pCar->bTakeLessDamage = ScriptParams[1];
|
pCar->bMoreResistantToDamage = ScriptParams[1];
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
case COMMAND_SET_JAMES_CAR_ON_PATH_TO_PLAYER:
|
case COMMAND_SET_JAMES_CAR_ON_PATH_TO_PLAYER:
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
CSkidmark CSkidmarks::aSkidmarks[NUMSKIDMARKS];
|
CSkidmark CSkidmarks::aSkidmarks[NUMSKIDMARKS];
|
||||||
|
|
||||||
RwImVertexIndex SkidmarkIndexList[16 * 6];
|
RwImVertexIndex SkidmarkIndexList[SKIDMARK_LENGTH * 6];
|
||||||
RwIm3DVertex SkidmarkVertices[16 * 2];
|
RwIm3DVertex SkidmarkVertices[SKIDMARK_LENGTH * 2];
|
||||||
RwTexture *gpSkidTex;
|
RwTexture *gpSkidTex;
|
||||||
RwTexture *gpSkidBloodTex;
|
RwTexture *gpSkidBloodTex;
|
||||||
RwTexture *gpSkidMudTex;
|
RwTexture *gpSkidMudTex;
|
||||||
@ -32,7 +32,7 @@ CSkidmarks::Init(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ix = 0;
|
ix = 0;
|
||||||
for(i = 0; i < 16; i++){
|
for(i = 0; i < SKIDMARK_LENGTH; i++){
|
||||||
SkidmarkIndexList[i*6+0] = ix+0;
|
SkidmarkIndexList[i*6+0] = ix+0;
|
||||||
SkidmarkIndexList[i*6+1] = ix+2;
|
SkidmarkIndexList[i*6+1] = ix+2;
|
||||||
SkidmarkIndexList[i*6+2] = ix+1;
|
SkidmarkIndexList[i*6+2] = ix+1;
|
||||||
@ -42,7 +42,7 @@ CSkidmarks::Init(void)
|
|||||||
ix += 2;
|
ix += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(i = 0; i < 16; i++){
|
for(i = 0; i < SKIDMARK_LENGTH; i++){
|
||||||
RwIm3DVertexSetU(&SkidmarkVertices[i*2 + 0], 0.0f);
|
RwIm3DVertexSetU(&SkidmarkVertices[i*2 + 0], 0.0f);
|
||||||
RwIm3DVertexSetV(&SkidmarkVertices[i*2 + 0], i*5.01f);
|
RwIm3DVertexSetV(&SkidmarkVertices[i*2 + 0], i*5.01f);
|
||||||
RwIm3DVertexSetU(&SkidmarkVertices[i*2 + 1], 1.0f);
|
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();
|
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
|
// No space to continue, end it
|
||||||
aSkidmarks[i].m_state = 2;
|
aSkidmarks[i].m_state = 2;
|
||||||
aSkidmarks[i].m_fadeStart = CTimer::GetTimeInMilliseconds() + 10000;
|
aSkidmarks[i].m_fadeStart = CTimer::GetTimeInMilliseconds() + 10000;
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
enum { SKIDMARK_LENGTH = 16 };
|
||||||
|
|
||||||
class CSkidmark
|
class CSkidmark
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -12,8 +14,8 @@ public:
|
|||||||
uint32 m_lastUpdate;;
|
uint32 m_lastUpdate;;
|
||||||
uint32 m_fadeStart;
|
uint32 m_fadeStart;
|
||||||
uint32 m_fadeEnd;
|
uint32 m_fadeEnd;
|
||||||
CVector m_pos[16];
|
CVector m_pos[SKIDMARK_LENGTH];
|
||||||
CVector m_side[16];
|
CVector m_side[SKIDMARK_LENGTH];
|
||||||
};
|
};
|
||||||
|
|
||||||
class CSkidmarks
|
class CSkidmarks
|
||||||
|
Loading…
Reference in New Issue
Block a user