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

Overheating - Fix jamming sound #7463

Merged
merged 4 commits into from
Jan 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ nomisum <nomisum@gmail.com>
OnkelDisMaster <onkeldismaster@gmail.com>
Orbis2358 <mgkid3310@naver.com>
oscarmolinadev
Panisher (Tushino Serious Games) <panisher333@gmail.com>
PaxJaromeMalues <seemax1991@gmail.com>
PiZZADOX <509thParachuteInfantry@gmail.com>
Phyma <sethramstrom@gmail.com>
Expand Down
2 changes: 1 addition & 1 deletion addons/overheating/functions/fnc_clearJam.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ if (_weapon in _jammedWeapons) then {
if (_weapon == primaryWeapon _unit) then {
playSound QGVAR(fixing_rifle);
} else {
if (_weapon == secondaryWeapon _unit) then {
if (_weapon == handgunWeapon _unit) then {
playSound QGVAR(fixing_pistol);
};
};
Expand Down
10 changes: 9 additions & 1 deletion addons/overheating/functions/fnc_jamWeapon.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ if (_ammo > 0) then {
}, [_unit, _weapon, _ammo]] call CBA_fnc_execNextFrame;
};

if (_weapon == primaryWeapon _unit) then {
playSound QGVAR(jamming_rifle);
} else {
if (_weapon == handgunWeapon _unit) then {
playSound QGVAR(jamming_pistol);
};
};

// only display the hint once, after you try to shoot an already jammed weapon
GVAR(knowAboutJam) = false;

Expand All @@ -55,7 +63,7 @@ if (_unit getVariable [QGVAR(JammingActionID), -1] == -1) then {
};

private _statement = {
playSound3D ["a3\sounds_f\weapons\Other\dry9.wss", _this select 0];
playSound3D ["a3\sounds_f\weapons\Other\dry9.wss", _this select 0, false, eyePos (_this select 0), 1, 1, 15];

if (!(missionNamespace getVariable [QGVAR(knowAboutJam), false]) && {(_this select 1) ammo currentWeapon (_this select 1) > 0} && {GVAR(DisplayTextOnJam)}) then {
[localize LSTRING(WeaponJammed)] call EFUNC(common,displayTextStructured);
Expand Down