mirror of
https://github.com/GTAmodding/re3.git
synced 2024-11-13 06:49:00 +00:00
CAutomobile fixes
This commit is contained in:
parent
d3e7ab933d
commit
0e5ffb8c34
1 changed files with 24 additions and 23 deletions
|
@ -1363,7 +1363,7 @@ CAutomobile::PreRender(void)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if(Abs(fwdSpeed) > 0.5f)
|
if(Abs(fwdSpeed) > 5.0f)
|
||||||
AddWheelDirtAndWater(&m_aWheelColPoints[i], drawParticles);
|
AddWheelDirtAndWater(&m_aWheelColPoints[i], drawParticles);
|
||||||
if(m_aWheelSkidmarkBloody[i] && m_aWheelTimer[i] > 0.0f)
|
if(m_aWheelSkidmarkBloody[i] && m_aWheelTimer[i] > 0.0f)
|
||||||
CSkidmarks::RegisterOne((uintptr)this + i, m_aWheelColPoints[i].point,
|
CSkidmarks::RegisterOne((uintptr)this + i, m_aWheelColPoints[i].point,
|
||||||
|
@ -1388,7 +1388,7 @@ CAutomobile::PreRender(void)
|
||||||
CVector(0.0f, 0.0f, 0.0f));
|
CVector(0.0f, 0.0f, 0.0f));
|
||||||
|
|
||||||
if(m_aWheelTimer[CARWHEEL_REAR_LEFT] > 0.0f)
|
if(m_aWheelTimer[CARWHEEL_REAR_LEFT] > 0.0f)
|
||||||
CSkidmarks::RegisterOne((uintptr)this + CARWHEEL_REAR_LEFT,
|
CSkidmarks::RegisterOne((uintptr)this + 5,
|
||||||
m_aWheelColPoints[CARWHEEL_REAR_LEFT].point + offset,
|
m_aWheelColPoints[CARWHEEL_REAR_LEFT].point + offset,
|
||||||
GetForward().x, GetForward().y,
|
GetForward().x, GetForward().y,
|
||||||
&m_aWheelSkidmarkMuddy[CARWHEEL_REAR_LEFT], &m_aWheelSkidmarkBloody[CARWHEEL_REAR_LEFT]);
|
&m_aWheelSkidmarkMuddy[CARWHEEL_REAR_LEFT], &m_aWheelSkidmarkBloody[CARWHEEL_REAR_LEFT]);
|
||||||
|
@ -1406,12 +1406,12 @@ CAutomobile::PreRender(void)
|
||||||
CVector(0.0f, 0.0f, 0.0f));
|
CVector(0.0f, 0.0f, 0.0f));
|
||||||
|
|
||||||
if(m_aWheelTimer[CARWHEEL_REAR_RIGHT] > 0.0f)
|
if(m_aWheelTimer[CARWHEEL_REAR_RIGHT] > 0.0f)
|
||||||
CSkidmarks::RegisterOne((uintptr)this + CARWHEEL_REAR_RIGHT,
|
CSkidmarks::RegisterOne((uintptr)this + 6,
|
||||||
m_aWheelColPoints[CARWHEEL_REAR_RIGHT].point + offset,
|
m_aWheelColPoints[CARWHEEL_REAR_RIGHT].point + offset,
|
||||||
GetForward().x, GetForward().y,
|
GetForward().x, GetForward().y,
|
||||||
&m_aWheelSkidmarkMuddy[CARWHEEL_REAR_RIGHT], &m_aWheelSkidmarkBloody[CARWHEEL_REAR_RIGHT]);
|
&m_aWheelSkidmarkMuddy[CARWHEEL_REAR_RIGHT], &m_aWheelSkidmarkBloody[CARWHEEL_REAR_RIGHT]);
|
||||||
break;
|
break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1539,7 +1539,7 @@ CAutomobile::PreRender(void)
|
||||||
r *= f;
|
r *= f;
|
||||||
g *= f;
|
g *= f;
|
||||||
b *= f;
|
b *= f;
|
||||||
}else if(t > 412){
|
}else if(t > (512-100)){
|
||||||
float f = (512-t)/100.0f;
|
float f = (512-t)/100.0f;
|
||||||
r *= f;
|
r *= f;
|
||||||
g *= f;
|
g *= f;
|
||||||
|
@ -1770,20 +1770,20 @@ CAutomobile::PreRender(void)
|
||||||
// Taillight coronas
|
// Taillight coronas
|
||||||
if(behindness > 0.0f){
|
if(behindness > 0.0f){
|
||||||
// Behind car
|
// Behind car
|
||||||
float intensity = 0.4f*behindness + 0.4f;
|
float intensity = (behindness + 1.0f)*0.4f;
|
||||||
float size = (behindness + 1.0f)/2.0f;
|
float size = (behindness + 1.0f)*0.5f;
|
||||||
|
|
||||||
if(m_fGasPedal < 0.0f){
|
if(m_fGasPedal < 0.0f){
|
||||||
// reversing
|
// reversing
|
||||||
intensity += 0.4f;
|
intensity += 0.4f;
|
||||||
size += 0.3f;
|
size += 0.3f;
|
||||||
if(Damage.GetLightStatus(VEHLIGHT_REAR_LEFT) == LIGHT_STATUS_OK)
|
if(Damage.GetLightStatus(VEHLIGHT_REAR_LEFT) == LIGHT_STATUS_OK)
|
||||||
CCoronas::RegisterCorona((uintptr)this + 2, 128*intensity, 128*intensity, 128*intensity, 255,
|
CCoronas::RegisterCorona((uintptr)this + 14, 128*intensity, 128*intensity, 128*intensity, 255,
|
||||||
lightL, size, 50.0f*TheCamera.LODDistMultiplier,
|
lightL, size, 50.0f*TheCamera.LODDistMultiplier,
|
||||||
CCoronas::TYPE_STREAK, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON,
|
CCoronas::TYPE_STREAK, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON,
|
||||||
CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, angle);
|
CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, angle);
|
||||||
if(Damage.GetLightStatus(VEHLIGHT_REAR_RIGHT) == LIGHT_STATUS_OK)
|
if(Damage.GetLightStatus(VEHLIGHT_REAR_RIGHT) == LIGHT_STATUS_OK)
|
||||||
CCoronas::RegisterCorona((uintptr)this + 3, 128*intensity, 128*intensity, 128*intensity, 255,
|
CCoronas::RegisterCorona((uintptr)this + 15, 128*intensity, 128*intensity, 128*intensity, 255,
|
||||||
lightR, size, 50.0f*TheCamera.LODDistMultiplier,
|
lightR, size, 50.0f*TheCamera.LODDistMultiplier,
|
||||||
CCoronas::TYPE_STREAK, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON,
|
CCoronas::TYPE_STREAK, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON,
|
||||||
CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, angle);
|
CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, angle);
|
||||||
|
@ -1795,23 +1795,23 @@ CAutomobile::PreRender(void)
|
||||||
|
|
||||||
if(alarmOff){
|
if(alarmOff){
|
||||||
if(Damage.GetLightStatus(VEHLIGHT_REAR_LEFT) == LIGHT_STATUS_OK)
|
if(Damage.GetLightStatus(VEHLIGHT_REAR_LEFT) == LIGHT_STATUS_OK)
|
||||||
CCoronas::RegisterCorona((uintptr)this + 2, 0, 0, 0, 0,
|
CCoronas::RegisterCorona((uintptr)this + 14, 0, 0, 0, 0,
|
||||||
lightL, size, 0.0f,
|
lightL, size, 0.0f,
|
||||||
CCoronas::TYPE_STREAK, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON,
|
CCoronas::TYPE_STREAK, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON,
|
||||||
CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, angle);
|
CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, angle);
|
||||||
if(Damage.GetLightStatus(VEHLIGHT_REAR_RIGHT) == LIGHT_STATUS_OK)
|
if(Damage.GetLightStatus(VEHLIGHT_REAR_RIGHT) == LIGHT_STATUS_OK)
|
||||||
CCoronas::RegisterCorona((uintptr)this + 3, 0, 0, 0, 0,
|
CCoronas::RegisterCorona((uintptr)this + 15, 0, 0, 0, 0,
|
||||||
lightR, size, 0.0f,
|
lightR, size, 0.0f,
|
||||||
CCoronas::TYPE_STREAK, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON,
|
CCoronas::TYPE_STREAK, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON,
|
||||||
CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, angle);
|
CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, angle);
|
||||||
}else{
|
}else{
|
||||||
if(Damage.GetLightStatus(VEHLIGHT_REAR_LEFT) == LIGHT_STATUS_OK)
|
if(Damage.GetLightStatus(VEHLIGHT_REAR_LEFT) == LIGHT_STATUS_OK)
|
||||||
CCoronas::RegisterCorona((uintptr)this + 2, 128*intensity, 0, 0, 255,
|
CCoronas::RegisterCorona((uintptr)this + 14, 128*intensity, 0, 0, 255,
|
||||||
lightL, size, 50.0f*TheCamera.LODDistMultiplier,
|
lightL, size, 50.0f*TheCamera.LODDistMultiplier,
|
||||||
CCoronas::TYPE_STREAK, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON,
|
CCoronas::TYPE_STREAK, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON,
|
||||||
CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, angle);
|
CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, angle);
|
||||||
if(Damage.GetLightStatus(VEHLIGHT_REAR_RIGHT) == LIGHT_STATUS_OK)
|
if(Damage.GetLightStatus(VEHLIGHT_REAR_RIGHT) == LIGHT_STATUS_OK)
|
||||||
CCoronas::RegisterCorona((uintptr)this + 3, 128*intensity, 0, 0, 255,
|
CCoronas::RegisterCorona((uintptr)this + 15, 128*intensity, 0, 0, 255,
|
||||||
lightR, size, 50.0f*TheCamera.LODDistMultiplier,
|
lightR, size, 50.0f*TheCamera.LODDistMultiplier,
|
||||||
CCoronas::TYPE_STREAK, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON,
|
CCoronas::TYPE_STREAK, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON,
|
||||||
CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, angle);
|
CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, angle);
|
||||||
|
@ -1819,10 +1819,11 @@ CAutomobile::PreRender(void)
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
// In front of car
|
// In front of car
|
||||||
|
// missing LODDistMultiplier probably a BUG
|
||||||
if(Damage.GetLightStatus(VEHLIGHT_REAR_LEFT) == LIGHT_STATUS_OK)
|
if(Damage.GetLightStatus(VEHLIGHT_REAR_LEFT) == LIGHT_STATUS_OK)
|
||||||
CCoronas::UpdateCoronaCoors((uintptr)this + 2, lightL, 50.0f*TheCamera.LODDistMultiplier, angle);
|
CCoronas::UpdateCoronaCoors((uintptr)this + 14, lightL, 50.0f, angle);
|
||||||
if(Damage.GetLightStatus(VEHLIGHT_REAR_RIGHT) == LIGHT_STATUS_OK)
|
if(Damage.GetLightStatus(VEHLIGHT_REAR_RIGHT) == LIGHT_STATUS_OK)
|
||||||
CCoronas::UpdateCoronaCoors((uintptr)this + 3, lightR, 50.0f*TheCamera.LODDistMultiplier, angle);
|
CCoronas::UpdateCoronaCoors((uintptr)this + 15, lightR, 50.0f, angle);
|
||||||
}
|
}
|
||||||
|
|
||||||
// bright lights
|
// bright lights
|
||||||
|
@ -1888,12 +1889,12 @@ CAutomobile::PreRender(void)
|
||||||
if(m_fGasPedal < 0.0f){
|
if(m_fGasPedal < 0.0f){
|
||||||
// reversing
|
// reversing
|
||||||
if(Damage.GetLightStatus(VEHLIGHT_REAR_LEFT) == LIGHT_STATUS_OK)
|
if(Damage.GetLightStatus(VEHLIGHT_REAR_LEFT) == LIGHT_STATUS_OK)
|
||||||
CCoronas::RegisterCorona((uintptr)this + 2, 120, 120, 120, 255,
|
CCoronas::RegisterCorona((uintptr)this + 14, 120, 120, 120, 255,
|
||||||
lightL, 1.2f, 50.0f*TheCamera.LODDistMultiplier,
|
lightL, 1.2f, 50.0f*TheCamera.LODDistMultiplier,
|
||||||
CCoronas::TYPE_STAR, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON,
|
CCoronas::TYPE_STAR, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON,
|
||||||
CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, 0.0f);
|
CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, 0.0f);
|
||||||
if(Damage.GetLightStatus(VEHLIGHT_REAR_RIGHT) == LIGHT_STATUS_OK)
|
if(Damage.GetLightStatus(VEHLIGHT_REAR_RIGHT) == LIGHT_STATUS_OK)
|
||||||
CCoronas::RegisterCorona((uintptr)this + 3, 120, 120, 120, 255,
|
CCoronas::RegisterCorona((uintptr)this + 15, 120, 120, 120, 255,
|
||||||
lightR, 1.2f, 50.0f*TheCamera.LODDistMultiplier,
|
lightR, 1.2f, 50.0f*TheCamera.LODDistMultiplier,
|
||||||
CCoronas::TYPE_STAR, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON,
|
CCoronas::TYPE_STAR, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON,
|
||||||
CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, 0.0f);
|
CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, 0.0f);
|
||||||
|
@ -1904,12 +1905,12 @@ CAutomobile::PreRender(void)
|
||||||
}else{
|
}else{
|
||||||
// braking
|
// braking
|
||||||
if(Damage.GetLightStatus(VEHLIGHT_REAR_LEFT) == LIGHT_STATUS_OK)
|
if(Damage.GetLightStatus(VEHLIGHT_REAR_LEFT) == LIGHT_STATUS_OK)
|
||||||
CCoronas::RegisterCorona((uintptr)this + 2, 120, 0, 0, 255,
|
CCoronas::RegisterCorona((uintptr)this + 14, 120, 0, 0, 255,
|
||||||
lightL, 1.2f, 50.0f*TheCamera.LODDistMultiplier,
|
lightL, 1.2f, 50.0f*TheCamera.LODDistMultiplier,
|
||||||
CCoronas::TYPE_STAR, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON,
|
CCoronas::TYPE_STAR, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON,
|
||||||
CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, 0.0f);
|
CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, 0.0f);
|
||||||
if(Damage.GetLightStatus(VEHLIGHT_REAR_RIGHT) == LIGHT_STATUS_OK)
|
if(Damage.GetLightStatus(VEHLIGHT_REAR_RIGHT) == LIGHT_STATUS_OK)
|
||||||
CCoronas::RegisterCorona((uintptr)this + 3, 120, 0, 0, 255,
|
CCoronas::RegisterCorona((uintptr)this + 15, 120, 0, 0, 255,
|
||||||
lightR, 1.2f, 50.0f*TheCamera.LODDistMultiplier,
|
lightR, 1.2f, 50.0f*TheCamera.LODDistMultiplier,
|
||||||
CCoronas::TYPE_STAR, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON,
|
CCoronas::TYPE_STAR, CCoronas::FLARE_NONE, CCoronas::REFLECTION_ON,
|
||||||
CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, 0.0f);
|
CCoronas::LOSCHECK_OFF, CCoronas::STREAK_ON, 0.0f);
|
||||||
|
@ -1920,15 +1921,15 @@ CAutomobile::PreRender(void)
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
if(Damage.GetLightStatus(VEHLIGHT_REAR_LEFT) == LIGHT_STATUS_OK)
|
if(Damage.GetLightStatus(VEHLIGHT_REAR_LEFT) == LIGHT_STATUS_OK)
|
||||||
CCoronas::UpdateCoronaCoors((uintptr)this + 2, lightL, 50.0f*TheCamera.LODDistMultiplier, 0.0f);
|
CCoronas::UpdateCoronaCoors((uintptr)this + 14, lightL, 50.0f*TheCamera.LODDistMultiplier, 0.0f);
|
||||||
if(Damage.GetLightStatus(VEHLIGHT_REAR_RIGHT) == LIGHT_STATUS_OK)
|
if(Damage.GetLightStatus(VEHLIGHT_REAR_RIGHT) == LIGHT_STATUS_OK)
|
||||||
CCoronas::UpdateCoronaCoors((uintptr)this + 3, lightR, 50.0f*TheCamera.LODDistMultiplier, 0.0f);
|
CCoronas::UpdateCoronaCoors((uintptr)this + 15, lightR, 50.0f*TheCamera.LODDistMultiplier, 0.0f);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
if(Damage.GetLightStatus(VEHLIGHT_REAR_LEFT) == LIGHT_STATUS_OK)
|
if(Damage.GetLightStatus(VEHLIGHT_REAR_LEFT) == LIGHT_STATUS_OK)
|
||||||
CCoronas::UpdateCoronaCoors((uintptr)this + 2, lightL, 50.0f*TheCamera.LODDistMultiplier, 0.0f);
|
CCoronas::UpdateCoronaCoors((uintptr)this + 14, lightL, 50.0f*TheCamera.LODDistMultiplier, 0.0f);
|
||||||
if(Damage.GetLightStatus(VEHLIGHT_REAR_RIGHT) == LIGHT_STATUS_OK)
|
if(Damage.GetLightStatus(VEHLIGHT_REAR_RIGHT) == LIGHT_STATUS_OK)
|
||||||
CCoronas::UpdateCoronaCoors((uintptr)this + 3, lightR, 50.0f*TheCamera.LODDistMultiplier, 0.0f);
|
CCoronas::UpdateCoronaCoors((uintptr)this + 15, lightR, 50.0f*TheCamera.LODDistMultiplier, 0.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// end of lights
|
// end of lights
|
||||||
|
|
Loading…
Reference in a new issue