mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Handle RHS impact grenades (RGN/RGO) (#4447)
This commit is contained in:
parent
d1e15110b3
commit
a7c75a3bf6
@ -31,6 +31,12 @@ private _muzzle = _unit getVariable [QGVAR(activeMuzzle), ""];
|
||||
// Set muzzle ammo to 0 to block vanilla throwing (can only be 0 or 1), removeItem above resets it
|
||||
_unit setAmmo [_muzzle, 0];
|
||||
|
||||
// Handle weird scripted grenades (RHS) which could cause unexpected behaviour
|
||||
private _nonInheritedCfg = configProperties [configFile >> "CfgAmmo" >> _throwableType, 'configName _x == QGVAR(replaceWith)', false];
|
||||
if ((count _nonInheritedCfg) == 1) then {
|
||||
_throwableType = getText (_nonInheritedCfg select 0);
|
||||
};
|
||||
|
||||
// Create actual throwable globally
|
||||
private _activeThrowableOld = _unit getVariable [QGVAR(activeThrowable), objNull];
|
||||
private _activeThrowable = createVehicle [_throwableType, _activeThrowableOld, [], 0, "CAN_COLLIDE"];
|
||||
|
@ -163,6 +163,8 @@ class CfgAmmo {
|
||||
ace_frag_force = 1;
|
||||
};
|
||||
class rhs_ammo_rgn: rhs_ammo_rgn_base {
|
||||
// RGN is scripted grenade that deletes itself, which will break advanced throwing, replace with it's base
|
||||
ace_advanced_throwing_replaceWith = "rhs_ammo_rgn_base";
|
||||
ace_frag_enabled = 0;
|
||||
ace_frag_skip = 1;
|
||||
ace_frag_force = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user