summaryrefslogtreecommitdiffstats
path: root/src/vehicles/DamageManager.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-05-27 22:32:33 +0200
committeraap <aap@papnet.eu>2020-05-31 17:05:59 +0200
commitc1e13177a1bbc6ce17d1ddc14cecc74cb278b853 (patch)
treee28cfc9af27dd1c50cbd1afba1add09f53853c49 /src/vehicles/DamageManager.cpp
parentMerge branch 'miami' of https://github.com/GTAmodding/re3 into miami (diff)
downloadre3-c1e13177a1bbc6ce17d1ddc14cecc74cb278b853.tar
re3-c1e13177a1bbc6ce17d1ddc14cecc74cb278b853.tar.gz
re3-c1e13177a1bbc6ce17d1ddc14cecc74cb278b853.tar.bz2
re3-c1e13177a1bbc6ce17d1ddc14cecc74cb278b853.tar.lz
re3-c1e13177a1bbc6ce17d1ddc14cecc74cb278b853.tar.xz
re3-c1e13177a1bbc6ce17d1ddc14cecc74cb278b853.tar.zst
re3-c1e13177a1bbc6ce17d1ddc14cecc74cb278b853.zip
Diffstat (limited to '')
-rw-r--r--src/vehicles/DamageManager.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/vehicles/DamageManager.cpp b/src/vehicles/DamageManager.cpp
index 6b59ccda..e4c28c95 100644
--- a/src/vehicles/DamageManager.cpp
+++ b/src/vehicles/DamageManager.cpp
@@ -10,14 +10,20 @@ float G_aComponentDamage[] = { 2.5f, 1.25f, 3.2f, 1.4f, 2.5f, 2.8f, 0.5f };
CDamageManager::CDamageManager(void)
{
ResetDamageStatus();
- m_fWheelDamageEffect = 0.75f;
- field_24 = 1;
+ m_fWheelDamageEffect = 0.5f;
+ field_18 = 1;
}
void
CDamageManager::ResetDamageStatus(void)
{
- memset(this, 0, sizeof(*this));
+ int i;
+ m_fWheelDamageEffect = 0.0f;
+ m_engineStatus = 0;
+ for(i = 0; i < ARRAY_SIZE(m_wheelStatus); i++) m_wheelStatus[i] = 0;
+ for(i = 0; i < ARRAY_SIZE(m_doorStatus); i++) m_doorStatus[i] = 0;
+ m_lightStatus = 0;
+ m_panelStatus = 0;
}
void
@@ -28,12 +34,8 @@ CDamageManager::FuckCarCompletely(void)
m_wheelStatus[0] = WHEEL_STATUS_MISSING;
// wheels 1-3 not reset?
- m_doorStatus[0] = DOOR_STATUS_MISSING;
- m_doorStatus[1] = DOOR_STATUS_MISSING;
- m_doorStatus[2] = DOOR_STATUS_MISSING;
- m_doorStatus[3] = DOOR_STATUS_MISSING;
- m_doorStatus[4] = DOOR_STATUS_MISSING;
- m_doorStatus[5] = DOOR_STATUS_MISSING;
+ for(i = 0; i < ARRAY_SIZE(m_doorStatus); i++)
+ m_doorStatus[i] = DOOR_STATUS_MISSING;
for(i = 0; i < 3; i++){
#ifdef FIX_BUGS
@@ -59,6 +61,8 @@ CDamageManager::ApplyDamage(tComponent component, float damage, float unused)
GetComponentGroup(component, &group, &subComp);
damage *= G_aComponentDamage[group];
+ if(component == COMPONENT_PANEL_WINDSCREEN)
+ damage *= 0.6f;
if(damage > 150.0f){
switch(group){
case COMPGROUP_WHEEL:
@@ -222,10 +226,6 @@ CDamageManager::GetEngineStatus(void)
bool
CDamageManager::ProgressEngineDamage(void)
{
- int status = GetEngineStatus();
- int newstatus = status + 32 + (CGeneral::GetRandomNumber() & 0x1F);
- if(status < ENGINE_STATUS_ON_FIRE && newstatus > ENGINE_STATUS_ON_FIRE-1)
- newstatus = ENGINE_STATUS_ON_FIRE-1;
- SetEngineStatus(newstatus);
- return true;
+ // gone in VC
+ return false;
}