damage_magnitude_accumulator is only available when a car is oppo, net_human or local human (#160)

This commit is contained in:
Anonymous Maarten 2022-09-15 22:43:37 +02:00 committed by GitHub
parent e8a38f4a1a
commit 25ecaf7309
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -939,8 +939,8 @@ int DoCrashEarnings(tCar_spec* pCar1, tCar_spec* pCar2) {
}
dam_acc_2 = 0;
if (pCar2) {
if (pCar1->driver <= eDriver_non_car) {
if (pCar2 != NULL) {
if (pCar2->driver <= eDriver_non_car) {
dam_acc_2 = 0;
} else {
dam_acc_2 = pCar2->damage_magnitude_accumulator != 0;