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

Add weapon on back functionality #7088

Open
wants to merge 1 commit into
base: master
from

Conversation

@BaerMitUmlaut
Copy link
Member

commented Jul 4, 2019

When merged this pull request will:

  • Allow putting primary weapons on your back to carry two primary weapons at once

All inventory interactions that you can do with a normal weapon should work with this, too.

TODO:

  • Render limit performance testing
  • MP testing

Found issues:

  • Dropping WOB and primary, then trying to take both again doesn't work (WOB field does not appear)
  • Swapping with a launcher does not work (either way)
  • Switching fire mode triggers weapon event?
  • Scope adjustment stays with different weapon
  • Player's weapon sometimes doesn't update rotation when still in view
  • Picking up weapon from ground doesn't delete the dropped WOB - maybe that could be done?
  • Fix behaviour in vehicles
addons/weapononback/XEH_postInit.sqf Outdated Show resolved Hide resolved
addons/weapononback/XEH_postInit.sqf Outdated Show resolved Hide resolved
addons/weapononback/XEH_postInit.sqf Outdated Show resolved Hide resolved
addons/weapononback/XEH_postInit.sqf Outdated Show resolved Hide resolved
if (secondaryWeapon ACE_player != QGVAR(weapon)) then {
_dropCatcher ctrlSetText QPATHTOF(data\weapononback_ca.paa);
} else {
_dropCatcher ctrlSetText "#(rgb,8,8,3)color(1,1,1,0)";

This comment has been minimized.

Copy link
@Dystopian

Dystopian Jul 5, 2019

Contributor

#(rgb,8,8,3)color(1,1,1,x) maybe should be replaced with macro here and below

This comment has been minimized.

Copy link
@BaerMitUmlaut

BaerMitUmlaut Jul 5, 2019

Author Member

I considered that, but maybe we should add that in CBA instead?

This comment has been minimized.

Copy link
@jonpas

jonpas Jul 5, 2019

Member

He meant macro because you use the same one twice.

This comment has been minimized.

Copy link
@BaerMitUmlaut

BaerMitUmlaut Jul 5, 2019

Author Member

I know and I meant that such a macro would fit into CBA 😜

This comment has been minimized.

Copy link
@Dystopian

Dystopian Jul 5, 2019

Contributor

I wouldn't wait for it in CBA, first do it in ACE, then (some day) add to cba, then wait for cba release, them move to cba

addons/weapononback/script_component.hpp Outdated Show resolved Hide resolved
addons/weapononback/script_component.hpp Show resolved Hide resolved
addons/weapononback/script_component.hpp Show resolved Hide resolved
addons/weapononback/script_component.hpp Show resolved Hide resolved
addons/weapononback/script_component.hpp Show resolved Hide resolved
@severgun

This comment has been minimized.

Copy link

commented Jul 5, 2019

I already asked that in Slack, but will duplicate here as reminder.
How it will handle player death?

@BaerMitUmlaut BaerMitUmlaut force-pushed the weapon-on-back branch from d79d6f2 to a65ba1e Jul 12, 2019

@BaerMitUmlaut BaerMitUmlaut removed the 1.96 label Jul 25, 2019

@BaerMitUmlaut

This comment has been minimized.

Copy link
Member Author

commented Jul 25, 2019

New commands arrived in 1.94 already.

@BaerMitUmlaut BaerMitUmlaut force-pushed the weapon-on-back branch 4 times, most recently from d7dd3d8 to e4af1d9 Aug 5, 2019

@BaerMitUmlaut BaerMitUmlaut force-pushed the weapon-on-back branch from e4af1d9 to 877183d Aug 5, 2019

if !(_newPrimary isEqualTo []) then {
_newPrimary params ["_weapon"];

// addWeapon is going to eat a mag for each muzzle before we can fill the weapon with addWeaponItem

This comment has been minimized.

Copy link
@severgun

severgun Aug 13, 2019

You need to check if weapon was empty and remove auto loaded magazines from weapon or allow "eating".
Because currently swapping empty weapon will allow duping magazines.
used removeAllPrimaryWeaponItems ACE_player; do not remove magazines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.