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: Explosive does not spawn at the correct altitude in fnc_moduleSuicideBomber #6323

Merged
merged 1 commit into from
May 4, 2018
Merged

FIX: Explosive does not spawn at the correct altitude in fnc_moduleSuicideBomber #6323

merged 1 commit into from
May 4, 2018

Conversation

Vdauphin
Copy link
Contributor

@Vdauphin Vdauphin commented May 4, 2018

When merged this pull request will:

  • Use _unit (Object) as position parameter for createVehicle instead of getPos _unit (Position array).
  • The bomb spawn at the correct altitude so the player and the suicider are killed as intended.
  • basic testing code in debug console :
// On Altis,
player allowdamage false;
player setPosASL [16894.5,13467.2,2.19884];

private _group = createGroup civilian;
private _unit = _group createUnit ["C_Man_casual_5_F", [16900.5,13458.1,2.19796], [], 0, "CAN_COLLIDE"];

createVehicle ["R_TBG32V_F", getPos _unit, [], 0, "CAN_COLLIDE"]; //Nobody is killed
//createVehicle ["R_TBG32V_F", _unit, [], 0, "CAN_COLLIDE"]; //Everybody is killed

Use `_unit` as position parameter for `createVehicle` instead of `getPos _unit`. The bomb spawn at the correct altitude.
Copy link
Contributor

@dedmen dedmen left a comment

Choose a reason for hiding this comment

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

Actual bug here is that getPos returns PositionAGLS but createVehicle want's positionATL.
This fix also makes the script a tiny bit faster ;3

Copy link
Member

@kymckay kymckay left a comment

Choose a reason for hiding this comment

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

Good fix

@kymckay kymckay merged commit 5f67e81 into acemod:master May 4, 2018
@Vdauphin Vdauphin deleted the suicidebomber branch May 4, 2018 15:47
@PabstMirror PabstMirror added the kind/bug-fix Release Notes: **FIXED:** label Aug 4, 2018
@PabstMirror PabstMirror added this to the 3.12.3 milestone Aug 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug-fix Release Notes: **FIXED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants