summaryrefslogtreecommitdiffstats
path: root/src/control/Replay.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-04-27 12:31:49 +0200
committeraap <aap@papnet.eu>2020-04-27 12:31:49 +0200
commitd397a59951a22336d5b61997449ab74d263c06b8 (patch)
tree5f5bc2e411e62574a542a3e079989069079e7731 /src/control/Replay.cpp
parentfix (temporary?) for black bullet traces (diff)
parentFix use of integers instead of enum/bool/nil (diff)
downloadre3-d397a59951a22336d5b61997449ab74d263c06b8.tar
re3-d397a59951a22336d5b61997449ab74d263c06b8.tar.gz
re3-d397a59951a22336d5b61997449ab74d263c06b8.tar.bz2
re3-d397a59951a22336d5b61997449ab74d263c06b8.tar.lz
re3-d397a59951a22336d5b61997449ab74d263c06b8.tar.xz
re3-d397a59951a22336d5b61997449ab74d263c06b8.tar.zst
re3-d397a59951a22336d5b61997449ab74d263c06b8.zip
Diffstat (limited to 'src/control/Replay.cpp')
-rw-r--r--src/control/Replay.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/control/Replay.cpp b/src/control/Replay.cpp
index d37e98cf..da350660 100644
--- a/src/control/Replay.cpp
+++ b/src/control/Replay.cpp
@@ -701,7 +701,7 @@ void CReplay::StoreCarUpdate(CVehicle *vehicle, int id)
vp->door_angles[1] = 127.0f / PI * car->Doors[3].m_fAngle;
vp->door_status = 0;
for (int i = 0; i < 6; i++){
- if (car->Damage.GetDoorStatus(i) == 3)
+ if (car->Damage.GetDoorStatus(i) == DOOR_STATUS_MISSING)
vp->door_status |= BIT(i);
}
}
@@ -744,27 +744,27 @@ void CReplay::ProcessCarUpdate(CVehicle *vehicle, float interpolation, CAddressI
car->Damage.SetDoorStatus(DOOR_FRONT_LEFT, DOOR_STATUS_SWINGING);
if (vp->door_angles[1])
car->Damage.SetDoorStatus(DOOR_FRONT_RIGHT, DOOR_STATUS_SWINGING);
- if (vp->door_status & 1 && car->Damage.GetDoorStatus(DOOR_BONNET) != 3){
+ if (vp->door_status & 1 && car->Damage.GetDoorStatus(DOOR_BONNET) != DOOR_STATUS_MISSING){
car->Damage.SetDoorStatus(DOOR_BONNET, DOOR_STATUS_MISSING);
car->SetDoorDamage(CAR_BONNET, DOOR_BONNET, true);
}
- if (vp->door_status & 2 && car->Damage.GetDoorStatus(DOOR_BOOT) != 3) {
+ if (vp->door_status & 2 && car->Damage.GetDoorStatus(DOOR_BOOT) != DOOR_STATUS_MISSING) {
car->Damage.SetDoorStatus(DOOR_BOOT, DOOR_STATUS_MISSING);
car->SetDoorDamage(CAR_BOOT, DOOR_BOOT, true);
}
- if (vp->door_status & 4 && car->Damage.GetDoorStatus(DOOR_FRONT_LEFT) != 3) {
+ if (vp->door_status & 4 && car->Damage.GetDoorStatus(DOOR_FRONT_LEFT) != DOOR_STATUS_MISSING) {
car->Damage.SetDoorStatus(DOOR_FRONT_LEFT, DOOR_STATUS_MISSING);
car->SetDoorDamage(CAR_DOOR_LF, DOOR_FRONT_LEFT, true);
}
- if (vp->door_status & 8 && car->Damage.GetDoorStatus(DOOR_FRONT_RIGHT) != 3) {
+ if (vp->door_status & 8 && car->Damage.GetDoorStatus(DOOR_FRONT_RIGHT) != DOOR_STATUS_MISSING) {
car->Damage.SetDoorStatus(DOOR_FRONT_RIGHT, DOOR_STATUS_MISSING);
car->SetDoorDamage(CAR_DOOR_RF, DOOR_FRONT_RIGHT, true);
}
- if (vp->door_status & 0x10 && car->Damage.GetDoorStatus(DOOR_REAR_LEFT) != 3) {
+ if (vp->door_status & 0x10 && car->Damage.GetDoorStatus(DOOR_REAR_LEFT) != DOOR_STATUS_MISSING) {
car->Damage.SetDoorStatus(DOOR_REAR_LEFT, DOOR_STATUS_MISSING);
car->SetDoorDamage(CAR_DOOR_LR, DOOR_REAR_LEFT, true);
}
- if (vp->door_status & 0x20 && car->Damage.GetDoorStatus(DOOR_REAR_RIGHT) != 3) {
+ if (vp->door_status & 0x20 && car->Damage.GetDoorStatus(DOOR_REAR_RIGHT) != DOOR_STATUS_MISSING) {
car->Damage.SetDoorStatus(DOOR_REAR_RIGHT, DOOR_STATUS_MISSING);
car->SetDoorDamage(CAR_DOOR_RR, DOOR_REAR_RIGHT, true);
}