Minor tweaks

This commit is contained in:
johnb432 2024-02-06 12:43:25 +01:00
parent 7586048e22
commit a35864c615
4 changed files with 12 additions and 19 deletions

View File

@ -1,10 +1,10 @@
// weird ass concatenation syntax. PBO Project complains otherwise... // weird ass concatenation syntax. PBO Project complains otherwise...
#define CONCAT(a,b) a####b #define CONCAT(a,b) a####b
#define CREATE_SCREAM(no)\ #define CREATE_SCREAM(no)\
class GVAR(DOUBLES(scream,no)) { \ class GVAR(DOUBLES(scream,no)) {\
name = QUOTE(GVAR(CONCAT(scream,no)));\ name = QGVAR(CONCAT(scream,no));\
sound[] = {QUOTE(PATHTOF(CONCAT(sounds\scream,no).ogg)), QUOTE(db+8), 1};\ sound[] = {QPATHTOF(CONCAT(sounds\scream,no).ogg), QUOTE(db+8), 1};\
titles[] = {}; \ titles[] = {};\
} }
class CfgSounds { class CfgSounds {

View File

@ -59,7 +59,7 @@ if (isServer) then {
private _hashedKey = hashValue _key; private _hashedKey = hashValue _key;
if (isNil "_hashedKey") exitWith { if (isNil "_hashedKey") exitWith {
ERROR_1("Unsupported key type used: %1",_key) ERROR_3("Unsupported key type used: %1 - %2 - %3",_key,typeName _key,typeOf _key);
}; };
// To avoid issues, remove existing entries first before overwriting // To avoid issues, remove existing entries first before overwriting
@ -76,7 +76,7 @@ if (isServer) then {
private _hashedKey = hashValue _key; private _hashedKey = hashValue _key;
if (isNil "_hashedKey") exitWith { if (isNil "_hashedKey") exitWith {
ERROR_1("Unsupported key type used: %1",_key) ERROR_3("Unsupported key type used: %1 - %2 - %3",_key,typeName _key,typeOf _key);
}; };
(GVAR(fireSources) deleteAt _hashedKey) params [["_fireLogic", objNull]]; (GVAR(fireSources) deleteAt _hashedKey) params [["_fireLogic", objNull]];

View File

@ -5,7 +5,6 @@
* *
* Arguments: * Arguments:
* 0: Unit <OBJECT> * 0: Unit <OBJECT>
* 1: Should unit throw its current weapon <BOOL> (default: true)
* *
* Return Value: * Return Value:
* None * None
@ -13,20 +12,14 @@
* Public: No * Public: No
*/ */
params ["_unit", ["_throwWeapon", true]]; params ["_unit"];
if ( if (
_throwWeapon GVAR(dropWeapon) > 0 &&
&& {GVAR(dropWeapon) > 0} {isNull objectParent _unit && {(currentWeapon _unit) != ""}} &&
&& {isNull objectParent _unit && {(currentWeapon _unit) != ""}} {!isPlayer _unit || GVAR(dropWeapon) >= 2}
&& {!isPlayer _unit || GVAR(dropWeapon) >= 2}
) then { ) then {
_unit call EFUNC(common,throwWeapon); _unit call EFUNC(common,throwWeapon);
}; };
if (_unit isKindOf "CAManBase") then { [QGVAR(playScream), [format [QGVAR(scream_%1), floor (1 + random 15)], _unit]] call CBA_fnc_globalEvent;
private _soundID = floor (1 + random 15);
private _sound = format [QGVAR(scream_%1), _soundID];
[QGVAR(playScream), [_sound, _unit]] call CBA_fnc_globalEvent;
};

View File

@ -29,7 +29,7 @@ if (_intensity > BURN_MIN_INTENSITY) then {
TRACE_1("patient still burning, looping",_this); TRACE_1("patient still burning, looping",_this);
if (EGVAR(medical_gui,pendingReopen)) then { if (EGVAR(medical_gui,pendingReopen)) then {
LOG("temporarily blocking medical menu reopen"); TRACE_1("temporarily blocking medical menu reopen",_this);
EGVAR(medical_gui,pendingReopen) = false; EGVAR(medical_gui,pendingReopen) = false;
[{EGVAR(medical_gui,pendingReopen) = true}] call CBA_fnc_execNextFrame; [{EGVAR(medical_gui,pendingReopen) = true}] call CBA_fnc_execNextFrame;