diff options
author | eray orçunus <erayorcunus@gmail.com> | 2020-02-22 23:42:10 +0100 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2020-02-22 23:48:21 +0100 |
commit | b2d062ef2dc5d117fa11a56d56a2ac8531c7a187 (patch) | |
tree | e90bb131f188deae507206838c739845a5698e97 /src/vehicles | |
parent | Fix police radio condition (diff) | |
download | re3-b2d062ef2dc5d117fa11a56d56a2ac8531c7a187.tar re3-b2d062ef2dc5d117fa11a56d56a2ac8531c7a187.tar.gz re3-b2d062ef2dc5d117fa11a56d56a2ac8531c7a187.tar.bz2 re3-b2d062ef2dc5d117fa11a56d56a2ac8531c7a187.tar.lz re3-b2d062ef2dc5d117fa11a56d56a2ac8531c7a187.tar.xz re3-b2d062ef2dc5d117fa11a56d56a2ac8531c7a187.tar.zst re3-b2d062ef2dc5d117fa11a56d56a2ac8531c7a187.zip |
Diffstat (limited to '')
-rw-r--r-- | src/vehicles/Automobile.cpp | 4 | ||||
-rw-r--r-- | src/vehicles/DamageManager.cpp | 8 | ||||
-rw-r--r-- | src/vehicles/Door.cpp | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp index a79f619c..64f756ad 100644 --- a/src/vehicles/Automobile.cpp +++ b/src/vehicles/Automobile.cpp @@ -2177,7 +2177,7 @@ CAutomobile::ProcessEntityCollision(CEntity *ent, CColPoint *colpoints) if(phys->bIsStatic){ phys->bIsStatic = false; phys->m_nStaticFrames = 0; - phys->ApplyMoveForce(m_vecMoveSpeed / speed); + phys->ApplyMoveForce(m_vecMoveSpeed / Sqrt(speed)); phys->AddToMovingList(); } } @@ -2318,7 +2318,7 @@ CAutomobile::ProcessControlInputs(uint8 pad) // Brake if player isn't in control // BUG: game always uses pad 0 here - if(CPad::GetPad(pad)->DisablePlayerControls){ + if(CPad::GetPad(pad)->ArePlayerControlsDisabled()){ m_fBrakePedal = 1.0f; bIsHandbrakeOn = true; m_fGasPedal = 0.0f; diff --git a/src/vehicles/DamageManager.cpp b/src/vehicles/DamageManager.cpp index 3a7bd9e9..9a697b6b 100644 --- a/src/vehicles/DamageManager.cpp +++ b/src/vehicles/DamageManager.cpp @@ -119,7 +119,7 @@ CDamageManager::GetComponentGroup(tComponent component, tComponentGroup *compone return true; }else if(component >= COMPONENT_DEFAULT){ *componentGroup = COMPGROUP_DEFAULT; - *subComp = component - COMPONENT_DEFAULT; + *subComp = COMPONENT_DEFAULT; return true; }else return false; @@ -141,7 +141,7 @@ bool CDamageManager::ProgressDoorDamage(uint8 door) { int status = GetDoorStatus(door); - if(status == 3) + if(status == PANEL_STATUS_MISSING) return false; SetDoorStatus(door, status+1); return true; @@ -163,7 +163,7 @@ bool CDamageManager::ProgressPanelDamage(uint8 panel) { int status = GetPanelStatus(panel); - if(status == 3) + if(status == DOOR_STATUS_MISSING) return false; SetPanelStatus(panel, status+1); return true; @@ -197,7 +197,7 @@ bool CDamageManager::ProgressWheelDamage(uint8 wheel) { int status = GetWheelStatus(wheel); - if(status == 3) + if(status == WHEEL_STATUS_MISSING) return false; SetWheelStatus(wheel, status+1); return true; diff --git a/src/vehicles/Door.cpp b/src/vehicles/Door.cpp index 2d47b3e9..c569be59 100644 --- a/src/vehicles/Door.cpp +++ b/src/vehicles/Door.cpp @@ -47,9 +47,9 @@ CDoor::Process(CVehicle *vehicle) case 2: // z-axis if(m_nDirn) - fSpeedDiff = -(vecSpeedDiff.x + vecSpeedDiff.y); + fSpeedDiff = -(vecSpeedDiff.y + vecSpeedDiff.x); else - fSpeedDiff = vecSpeedDiff.x + vecSpeedDiff.y; + fSpeedDiff = vecSpeedDiff.y - vecSpeedDiff.x; break; } fSpeedDiff = clamp(fSpeedDiff, -0.2f, 0.2f); |