Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix vehicle crashes #3323

Merged
merged 3 commits into from
Feb 17, 2016
Merged

Fix vehicle crashes #3323

merged 3 commits into from
Feb 17, 2016

Conversation

PabstMirror
Copy link
Contributor

Fix #3306
Fix #3269

Enemy RPG to MRAP (driver):

HD: [carrd,"",1,<NULL-object>,"",-1]
HD: [carrd,"",1,<NULL-object>,"",-1]
HD: [carrd,"",1,O Alpha 1-1:1,"R_PG32V_F",-1]

Enemy RPG to MRAP (gunner):

HD: [carrg,"",1,O Alpha 1-1:1 REMOTE,"R_PG32V_F",-1]

35m fall veh explodes (driver):

HD: [carrd,"",1,<NULL-object>,"",-1]
HD: [carrd,"",1,<NULL-object>,"",-1]
HD: [carrd,"",1,carrd,"",-1]

35m fall veh explodes (gunner):

HD: [carrg,"",1,carrd,"",-1]

So in crashes, the shooter/source can be the pilot for non-drivers.
Switching the order in determine if fatal will handle RPG shots that blow up vehicles as there doesn't seem to be any hit point damage.

@PabstMirror PabstMirror added the kind/bug-fix Release Notes: **FIXED:** label Feb 16, 2016
@PabstMirror PabstMirror added this to the 3.5.0 milestone Feb 16, 2016
@SzwedzikPL
Copy link
Contributor

Is this also fixes #1811 ?

@PabstMirror
Copy link
Contributor Author

@SzwedzikPL I believe so, I couldn't reproduce that issue directly, but now in-general a vehicle explosion should almost always be fatal.

if (GVAR(enableVehicleCrashes)) then {
_selection = GVAR(SELECTIONS) select (floor(random(count GVAR(SELECTIONS))));
_effectiveSelectionName = _this select 1; //pull random selection from HDC
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we doing this? Isn't selection "" here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On crash, handle damage caching will convert the "" into a random selection,
I think we want the same value for passing to FUNC(determineIfFatal)
But we don't want to overwrite _selection for the _selection in ["", "head", "body"] checks on instantDeath/revive.

@thojkooi
Copy link
Contributor

👍 Just my two comments. Nice work @PabstMirror

thojkooi added a commit that referenced this pull request Feb 17, 2016
@thojkooi thojkooi merged commit 8e49c8b into master Feb 17, 2016
@thojkooi thojkooi deleted the fixVehicleCrashes branch February 17, 2016 17:32
@ghost
Copy link

ghost commented Mar 1, 2016

(RHS) something strange become with AGS damage to troops and hellfire from apache to t72 tank with this change. Cant say in detail. We will test this issue in the next few days on the new version

@SzwedzikPL
Copy link
Contributor

This problem is not fixed. Today i had a situation, my helicopter was shot down. After helicopter explosion i was still alive in vehicle. As soon as the fire was over I got out of the vehicle without any wounds.

@ghost
Copy link

ghost commented Mar 3, 2016

@SzwedzikPL
did you test it on 3.5.0 version ?

@SzwedzikPL
Copy link
Contributor

@ivankrouglyi Yes

@jonpas
Copy link
Member

jonpas commented Mar 3, 2016

Create a new issue with app the required information please, don't reopen old closed PRs that were already released, thank you.

@acemod acemod locked and limited conversation to collaborators Mar 3, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug-fix Release Notes: **FIXED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants