mirror of
https://github.com/IT07/a3_vemf_reloaded.git
synced 2024-08-30 16:52:11 +00:00
Speed improvements
This commit is contained in:
parent
3c6513fd44
commit
666eef3554
@ -7,13 +7,7 @@
|
|||||||
|
|
||||||
_target = param [0, objNull, [objNull]];
|
_target = param [0, objNull, [objNull]];
|
||||||
_killer = param [1, objNull, [objNull]];
|
_killer = param [1, objNull, [objNull]];
|
||||||
if not(isNull _target AND isNull _killer) then
|
_curWeapon = "Weapon";
|
||||||
{
|
|
||||||
scopeName "outer";
|
|
||||||
_dist = _target distance _killer;
|
|
||||||
if (_dist > 1) then
|
|
||||||
{
|
|
||||||
private ["_curWeapon"];
|
|
||||||
if (vehicle _killer isEqualTo _killer) then // If on foot
|
if (vehicle _killer isEqualTo _killer) then // If on foot
|
||||||
{
|
{
|
||||||
_curWeapon = currentWeapon _killer;
|
_curWeapon = currentWeapon _killer;
|
||||||
@ -22,22 +16,14 @@ if not(isNull _target AND isNull _killer) then
|
|||||||
{
|
{
|
||||||
_curWeapon = currentWeapon (vehicle _killer);
|
_curWeapon = currentWeapon (vehicle _killer);
|
||||||
};
|
};
|
||||||
_sayKilled = param [2, 1, [1]];
|
|
||||||
|
_dist = _target distance _killer;
|
||||||
|
_sayKilled = "sayKilled" call VEMFr_fnc_getSetting;
|
||||||
if (_sayKilled isEqualTo 1) then
|
if (_sayKilled isEqualTo 1) then
|
||||||
{
|
{
|
||||||
_kMsg = format["(VEMFr) %1 [%2, %3m] AI", name _killer, getText(configFile >> "CfgWeapons" >> _curWeapon >> "displayName"), round _dist];
|
[format["(VEMFr) %1 [%2, %3m] AI", name _killer, getText(configFile >> "CfgWeapons" >> _curWeapon >> "displayName"), round _dist]] ExecVM "exile_vemf_reloaded\sqf\systemChatToClient.sqf";
|
||||||
[_kMsg, [], "sys"] ExecVM "exile_vemf_reloaded\sqf\broadcast.sqf";
|
|
||||||
breakOut "outer";
|
|
||||||
};
|
};
|
||||||
if (_sayKilled isEqualTo 2) then
|
if (_sayKilled isEqualTo 2) then
|
||||||
{
|
{
|
||||||
VEMFrClientMsg = [format["(VEMFr) You [%1, %2m] AI", getText(configFile >> "CfgWeapons" >> _curWeapon >> "displayName"), round _dist], "sys"];
|
[format["(VEMFr) You [%1, %2m] AI", getText(configFile >> "CfgWeapons" >> _curWeapon >> "displayName"), round _dist]] ExecVM "exile_vemf_reloaded\sqf\systemChatToClient.sqf";
|
||||||
(owner _killer) publicVariableClient "VEMFrClientMsg";
|
|
||||||
VEMFrClientMsg = nil;
|
|
||||||
breakOut "outer";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
["sayKilledWeapon.sqf", 0, "_killer isNull!"] ExecVM "exile_vemf_reloaded\sqf\log.sqf";
|
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user