summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2019-06-30 23:15:34 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2019-06-30 23:15:34 +0200
commit02c7cbc75f0451e87bff0a9d5469fe057432769c (patch)
treeb84cf4ab2a5f41f055c6b91771e67b356b357675 /src/control
parentChanged CReplay::Display slightly (diff)
downloadre3-02c7cbc75f0451e87bff0a9d5469fe057432769c.tar
re3-02c7cbc75f0451e87bff0a9d5469fe057432769c.tar.gz
re3-02c7cbc75f0451e87bff0a9d5469fe057432769c.tar.bz2
re3-02c7cbc75f0451e87bff0a9d5469fe057432769c.tar.lz
re3-02c7cbc75f0451e87bff0a9d5469fe057432769c.tar.xz
re3-02c7cbc75f0451e87bff0a9d5469fe057432769c.tar.zst
re3-02c7cbc75f0451e87bff0a9d5469fe057432769c.zip
Diffstat (limited to 'src/control')
-rw-r--r--src/control/Replay.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/control/Replay.cpp b/src/control/Replay.cpp
index ce2a9bd4..e49e10bc 100644
--- a/src/control/Replay.cpp
+++ b/src/control/Replay.cpp
@@ -130,7 +130,42 @@ static void(*FindCBFunction(uint8 id))(CAnimBlendAssociation*, void*)
return CBArray_RE3[id];
}
+#if 0
WRAPPER static void ApplyPanelDamageToCar(uint32, CAutomobile*, bool) { EAXJMP(0x584EA0); }
+#else
+static void ApplyPanelDamageToCar(uint32 panels, CAutomobile* vehicle, bool flying)
+{
+ CDamageManager::PanelStatus rp = *(CDamageManager::PanelStatus*)&panels;
+ if (vehicle->m_DamageManager.m_sPanelsStatus.m_nPanelFrontLeftStatus != rp.m_nPanelFrontLeftStatus){
+ vehicle->m_DamageManager.m_sPanelsStatus.m_nPanelFrontLeftStatus = rp.m_nPanelFrontLeftStatus;
+ vehicle->SetPanelDamage(13, CDamageManager::PANEL_FL, flying);
+ }
+ if (vehicle->m_DamageManager.m_sPanelsStatus.m_nPanelFrontRightStatus != rp.m_nPanelFrontRightStatus) {
+ vehicle->m_DamageManager.m_sPanelsStatus.m_nPanelFrontRightStatus = rp.m_nPanelFrontRightStatus;
+ vehicle->SetPanelDamage(9, CDamageManager::PANEL_FR, flying);
+ }
+ if (vehicle->m_DamageManager.m_sPanelsStatus.m_nPanelBackLeftStatus != rp.m_nPanelBackLeftStatus) {
+ vehicle->m_DamageManager.m_sPanelsStatus.m_nPanelBackLeftStatus = rp.m_nPanelBackLeftStatus;
+ vehicle->SetPanelDamage(14, CDamageManager::PANEL_RL, flying);
+ }
+ if (vehicle->m_DamageManager.m_sPanelsStatus.m_nPanelBackRightStatus != rp.m_nPanelBackRightStatus) {
+ vehicle->m_DamageManager.m_sPanelsStatus.m_nPanelBackRightStatus = rp.m_nPanelBackRightStatus;
+ vehicle->SetPanelDamage(10, CDamageManager::PANEL_RR, flying);
+ }
+ if (vehicle->m_DamageManager.m_sPanelsStatus.m_nWindshieldStatus != rp.m_nWindshieldStatus) {
+ vehicle->m_DamageManager.m_sPanelsStatus.m_nWindshieldStatus = rp.m_nWindshieldStatus;
+ vehicle->SetPanelDamage(19, CDamageManager::PANEL_WINDSHIELD, flying);
+ }
+ if (vehicle->m_DamageManager.m_sPanelsStatus.m_nPanelFrontStatus != rp.m_nPanelFrontStatus) {
+ vehicle->m_DamageManager.m_sPanelsStatus.m_nPanelFrontStatus = rp.m_nPanelFrontStatus;
+ vehicle->SetPanelDamage(7, CDamageManager::PANEL_FRONT, flying);
+ }
+ if (vehicle->m_DamageManager.m_sPanelsStatus.m_nPanelBackStatus != rp.m_nPanelBackStatus) {
+ vehicle->m_DamageManager.m_sPanelsStatus.m_nPanelBackStatus = rp.m_nPanelBackStatus;
+ vehicle->SetPanelDamage(8, CDamageManager::PANEL_BACK, flying);
+ }
+}
+#endif
void PrintElementsInPtrList(void)
{