mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
fixes and spaces
This commit is contained in:
parent
5ffe1fa3e5
commit
425be3a6c2
@ -1,20 +1,20 @@
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE( call compile preprocessFileLineNumbers PATHTOF(XEH_preInit.sqf) );
|
||||
};
|
||||
class ADDON {
|
||||
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_Killed_EventHandlers {
|
||||
class CAManBase {
|
||||
class GVAR(HandleGear) {
|
||||
killed = QUOTE( _this call FUNC(handleKilled) );
|
||||
class CAManBase {
|
||||
class GVAR(HandleGear) {
|
||||
killed = QUOTE( _this call FUNC(handleKilled) );
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
class Extended_Respawn_EventHandlers {
|
||||
class CAManBase {
|
||||
class GVAR(HandleGear) {
|
||||
respawn = QUOTE( _this call FUNC(handleRespawn) );
|
||||
class CAManBase {
|
||||
class GVAR(HandleGear) {
|
||||
respawn = QUOTE( _this call FUNC(handleRespawn) );
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
class CfgVehicleClasses {
|
||||
class GVAR(Rallypoints) {
|
||||
displayName = "ACE Respawn";
|
||||
};
|
||||
class GVAR(Rallypoints) {
|
||||
displayName = "ACE Respawn";
|
||||
};
|
||||
};
|
||||
|
@ -1,17 +1,17 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {};
|
||||
weapons[] = {"ACE_Rallypoint_West", "ACE_Rallypoint_East", "ACE_Rallypoint_Independent", "ACE_RallypointExit_West", "ACE_RallypointExit_East", "ACE_RallypointExit_Independent"};
|
||||
requiredVersion = 0.60;
|
||||
requiredAddons[] = {"ace_core"};
|
||||
version = QUOTE(VERSION);
|
||||
versionStr = QUOTE(VERSION);
|
||||
versionAr[] = {VERSION_AR};
|
||||
author[] = {"bux578", "commy2"};
|
||||
authorUrl = "https://github.com/bux578/";
|
||||
};
|
||||
class ADDON {
|
||||
units[] = {};
|
||||
weapons[] = {"ACE_Rallypoint_West", "ACE_Rallypoint_East", "ACE_Rallypoint_Independent", "ACE_RallypointExit_West", "ACE_RallypointExit_East", "ACE_RallypointExit_Independent"};
|
||||
requiredVersion = 0.60;
|
||||
requiredAddons[] = {"ace_core"};
|
||||
version = QUOTE(VERSION);
|
||||
versionStr = QUOTE(VERSION);
|
||||
versionAr[] = {VERSION_AR};
|
||||
author[] = {"bux578", "commy2"};
|
||||
authorUrl = "https://github.com/bux578/";
|
||||
};
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
@ -20,7 +20,6 @@ class CfgPatches {
|
||||
#include "CfgVehicles.hpp"
|
||||
|
||||
class ACE_Parameters_Boolean {
|
||||
// Boolean Parameters (0/1)
|
||||
GVAR(SavePreDeathGear) = 0;
|
||||
GVAR(RemoveDeadBodiesDisonncected) = 1;
|
||||
GVAR(SavePreDeathGear) = 0;
|
||||
GVAR(RemoveDeadBodiesDisonncected) = 1;
|
||||
};
|
||||
|
@ -26,8 +26,8 @@ _side = _this select 1;
|
||||
|
||||
_unit getVariable ["ACE_canMoveRallypoint"), false]
|
||||
&& {!isNull ([
|
||||
objNull,
|
||||
missionNamespace getVariable ["ACE_Rallypoint_West", objNull],
|
||||
missionNamespace getVariable ["ACE_Rallypoint_East", objNull],
|
||||
missionNamespace getVariable ["ACE_Rallypoint_Independent", objNull]
|
||||
objNull,
|
||||
missionNamespace getVariable ["ACE_Rallypoint_West", objNull],
|
||||
missionNamespace getVariable ["ACE_Rallypoint_East", objNull],
|
||||
missionNamespace getVariable ["ACE_Rallypoint_Independent", objNull]
|
||||
] select ([west, east, independent] find _side) + 1)}
|
||||
|
@ -21,25 +21,25 @@ private ["_unit", "_allGear"];
|
||||
_unit = _this select 0;
|
||||
|
||||
_allGear = [
|
||||
(headgear _unit),
|
||||
(goggles _unit),
|
||||
(uniform _unit),
|
||||
(uniformItems _unit),
|
||||
(vest _unit),
|
||||
(vestItems _unit),
|
||||
(backpack _unit),
|
||||
(backpackItems _unit),
|
||||
(primaryWeapon _unit),
|
||||
(primaryWeaponItems _unit),
|
||||
(primaryWeaponMagazine _unit),
|
||||
(secondaryWeapon _unit),
|
||||
(secondaryWeaponItems _unit),
|
||||
(secondaryWeaponMagazine _unit),
|
||||
(handgunWeapon _unit),
|
||||
(handgunItems _unit),
|
||||
(handgunMagazine _unit),
|
||||
(assignedItems _unit),
|
||||
(binocular _unit)
|
||||
(headgear _unit),
|
||||
(goggles _unit),
|
||||
(uniform _unit),
|
||||
(uniformItems _unit),
|
||||
(vest _unit),
|
||||
(vestItems _unit),
|
||||
(backpack _unit),
|
||||
(backpackItems _unit),
|
||||
(primaryWeapon _unit),
|
||||
(primaryWeaponItems _unit),
|
||||
(primaryWeaponMagazine _unit),
|
||||
(secondaryWeapon _unit),
|
||||
(secondaryWeaponItems _unit),
|
||||
(secondaryWeaponMagazine _unit),
|
||||
(handgunWeapon _unit),
|
||||
(handgunItems _unit),
|
||||
(handgunMagazine _unit),
|
||||
(assignedItems _unit),
|
||||
(binocular _unit)
|
||||
];
|
||||
|
||||
_allGear
|
||||
|
@ -25,9 +25,9 @@ _killedUnit = _this select 0;
|
||||
GVAR(unitGear) = [];
|
||||
|
||||
if (GVAR(SavePreDeathGear)) then {
|
||||
GVAR(unitGear) = [_killedUnit] call FUNC(getAllGear);
|
||||
GVAR(unitGear) = [_killedUnit] call FUNC(getAllGear);
|
||||
};
|
||||
|
||||
if (missionNamespace getVariable [QGVAR(showFriendlyFireMessage), false]) then {
|
||||
[_this, FUNC(showFriendlyFireMessage), 2] call EFUNC(Core, execRemoteFnc);
|
||||
[_this, FUNC(showFriendlyFireMessage), 2] call EFUNC(Core,execRemoteFnc);
|
||||
};
|
||||
|
@ -23,5 +23,5 @@ _respawnedUnit = _this select 0;
|
||||
|
||||
// Restores the gear when the player respawns
|
||||
if (GVAR(SavePreDeathGear)) then {
|
||||
[_respawnedUnit, GVAR(unitGear)] call FUNC(restoreGear);
|
||||
[_respawnedUnit, GVAR(unitGear)] call FUNC(restoreGear);
|
||||
};
|
||||
|
@ -25,9 +25,9 @@ if (!local _rallypoint) exitWith {};
|
||||
_name = typeOf _rallypoint;
|
||||
|
||||
if (isNil _name) then {
|
||||
missionNamespace setVariable [_name, _rallypoint];
|
||||
publicVariable _name;
|
||||
missionNamespace setVariable [_name, _rallypoint];
|
||||
publicVariable _name;
|
||||
} else {
|
||||
deleteVehicle _rallypoint;
|
||||
diag_log text "[ACE] Respawn: ERROR Multiple Rallypoints of same type.";
|
||||
deleteVehicle _rallypoint;
|
||||
diag_log text "[ACE] Respawn: ERROR Multiple Rallypoints of same type.";
|
||||
};
|
||||
|
@ -27,26 +27,26 @@ if !(_activated) exitWith {};
|
||||
|
||||
GVAR(Module) = true;
|
||||
|
||||
[_logic, QGVAR(SavePreDeathGear), "SavePreDeathGear"] call EFUNC(Core, readBooleanParameterFromModule);
|
||||
[_logic, QGVAR(RemoveDeadBodiesDisonncected), "RemoveDeadBodiesDisonncected"] call EFUNC(Core, readBooleanParameterFromModule);
|
||||
[_logic, QGVAR(SavePreDeathGear), "SavePreDeathGear"] call EFUNC(Core,readBooleanParameterFromModule);
|
||||
[_logic, QGVAR(RemoveDeadBodiesDisonncected), "RemoveDeadBodiesDisonncected"] call EFUNC(Core,readBooleanParameterFromModule);
|
||||
|
||||
if (isServer) then {
|
||||
if (GVAR(RemoveDeadBodiesDisonncected)) then {
|
||||
_fnc_deleteDisconnected = {
|
||||
_this spawn {
|
||||
_unit = _this select 0;
|
||||
if (GVAR(RemoveDeadBodiesDisonncected)) then {
|
||||
_fnc_deleteDisconnected = {
|
||||
_this spawn {
|
||||
_unit = _this select 0;
|
||||
|
||||
sleep 4;
|
||||
sleep 4;
|
||||
|
||||
if (!alive _unit) then {
|
||||
deleteVehicle _unit;
|
||||
if (!alive _unit) then {
|
||||
deleteVehicle _unit;
|
||||
};
|
||||
};
|
||||
false
|
||||
};
|
||||
};
|
||||
false
|
||||
};
|
||||
|
||||
addMissionEventHandler ["HandleDisconnect", _fnc_deleteDisconnected];
|
||||
};
|
||||
addMissionEventHandler ["HandleDisconnect", _fnc_deleteDisconnected];
|
||||
};
|
||||
};
|
||||
|
||||
diag_log text "[ACE]: Respawn Module Initialized.";
|
||||
|
@ -19,18 +19,18 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
_this spawn {
|
||||
_logic = _this select 0;
|
||||
_units = _this select 1;
|
||||
_activated = _this select 2;
|
||||
_logic = _this select 0;
|
||||
_units = _this select 1;
|
||||
_activated = _this select 2;
|
||||
|
||||
if !(_activated) exitWith {};
|
||||
if !(_activated) exitWith {};
|
||||
|
||||
if (isServer) then {
|
||||
_varName = QGVAR(showFriendlyFireMessage);
|
||||
if (isServer) then {
|
||||
_varName = QGVAR(showFriendlyFireMessage);
|
||||
|
||||
missionNamespace setVariable [_varName, true];
|
||||
publicVariable _varName;
|
||||
};
|
||||
missionNamespace setVariable [_varName, true];
|
||||
publicVariable _varName;
|
||||
};
|
||||
|
||||
diag_log text "[ACE]: Friendly Fire Messages Module Initialized.";
|
||||
diag_log text "[ACE]: Friendly Fire Messages Module Initialized.";
|
||||
};
|
||||
|
@ -25,7 +25,7 @@ _activated = _this select 2;
|
||||
if !(_activated) exitWith {};
|
||||
|
||||
{
|
||||
_x setVariable ["ACE_canMoveRallypoint", true];
|
||||
_x setVariable ["ACE_canMoveRallypoint", true];
|
||||
} forEach _units;
|
||||
|
||||
diag_log text "[ACE]: Rallypoint Module Initialized.";
|
||||
|
@ -18,37 +18,37 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
_this spawn {
|
||||
_unit = _this select 0;
|
||||
_side = _this select 1;
|
||||
_unit = _this select 0;
|
||||
_side = _this select 1;
|
||||
|
||||
// rallypoint names are defined in CfgVehicles.hpp
|
||||
|
||||
_rallypoint = [
|
||||
objNull,
|
||||
missionNamespace getVariable ["ACE_Rallypoint_West", objNull],
|
||||
missionNamespace getVariable ["ACE_RallypointExit_East", objNull],
|
||||
missionNamespace getVariable ["ACE_RallypointExit_Independent", objNull]
|
||||
] select ([west, east, independent] find _side) + 1;
|
||||
// rallypoint names are defined in CfgVehicles.hpp
|
||||
|
||||
if (isNull _rallypoint) exitWith {};
|
||||
_rallypoint = [
|
||||
objNull,
|
||||
missionNamespace getVariable ["ACE_Rallypoint_West", objNull],
|
||||
missionNamespace getVariable ["ACE_RallypointExit_East", objNull],
|
||||
missionNamespace getVariable ["ACE_RallypointExit_Independent", objNull]
|
||||
] select ([west, east, independent] find _side) + 1;
|
||||
|
||||
_position = getPosATL _unit;
|
||||
_position = _position findEmptyPosition [0, 2, typeOf _rallypoint];
|
||||
if (count _position == 0) then {_position = getPosATL _unit};
|
||||
if (isNull _rallypoint) exitWith {};
|
||||
|
||||
_position set [2, 0];
|
||||
_position = getPosATL _unit;
|
||||
_position = _position findEmptyPosition [0, 2, typeOf _rallypoint];
|
||||
if (count _position == 0) then {_position = getPosATL _unit};
|
||||
|
||||
[localize "STR_ACE_Respawn_Deploy"] call EFUNC(Core, displayTextStructured);
|
||||
_position set [2, 0];
|
||||
|
||||
sleep 5;
|
||||
_rallypoint setPosATL _position;
|
||||
_unit reveal _rallypoint;
|
||||
[localize "STR_ACE_Respawn_Deploy"] call EFUNC(Core,displayTextStructured);
|
||||
|
||||
/*
|
||||
_marker = format ["AGM_RallyPoint_%1", _side];
|
||||
_marker setMarkerPos _position;
|
||||
_marker setMarkerTextLocal format ["%1:%2", [date select 3, 2, 0] call CBA_fnc_FORMATNumber, [date select 4, 2, 0] call CBA_fnc_FORMATNumber];
|
||||
*/
|
||||
sleep 5;
|
||||
_rallypoint setPosATL _position;
|
||||
_unit reveal _rallypoint;
|
||||
|
||||
[localize "STR_ACE_Respawn_Deploy"] call EFUNC(Core, displayTextStructured);
|
||||
/*
|
||||
_marker = format ["AGM_RallyPoint_%1", _side];
|
||||
_marker setMarkerPos _position;
|
||||
_marker setMarkerTextLocal format ["%1:%2", [date select 3, 2, 0] call CBA_fnc_FORMATNumber, [date select 4, 2, 0] call CBA_fnc_FORMATNumber];
|
||||
*/
|
||||
|
||||
[localize "STR_ACE_Respawn_Deploy"] call EFUNC(Core,displayTextStructured);
|
||||
};
|
||||
|
@ -30,8 +30,8 @@ if (_forceRemove) then {
|
||||
};
|
||||
|
||||
[_body, _bodyRemoveTimer] spawn {
|
||||
sleep (_this select 1);
|
||||
// hideBody takes ~20s till body is fully underground
|
||||
// a better hideBody would make this more aesthetic
|
||||
deleteVehicle (_this select 0);
|
||||
sleep (_this select 1);
|
||||
// hideBody takes ~20s till body is fully underground
|
||||
// a better hideBody would make this more aesthetic
|
||||
deleteVehicle (_this select 0);
|
||||
};
|
||||
|
@ -21,11 +21,11 @@ private ["_forceRemove", "_body"];
|
||||
_forceRemove = _this select 0;
|
||||
|
||||
{
|
||||
if (getPlayerUID _x == _uid) exitWith {
|
||||
_body = _x;
|
||||
};
|
||||
if (getPlayerUID _x == _uid) exitWith {
|
||||
_body = _x;
|
||||
};
|
||||
} forEach playableUnits;
|
||||
|
||||
if (!isNil "_body" && {!alive _body}) then {
|
||||
[_body, _forceRemove] call FUNC(removeBody);
|
||||
[_body, _forceRemove] call FUNC(removeBody);
|
||||
};
|
||||
|
@ -56,85 +56,85 @@ _binocular = _allGear select 18;
|
||||
|
||||
// start restoring the items
|
||||
if (_headgear != "") then {
|
||||
_unit addHeadgear _headgear;
|
||||
_unit addHeadgear _headgear;
|
||||
};
|
||||
if (_uniform != "") then {
|
||||
_unit forceAddUniform _uniform;
|
||||
_unit forceAddUniform _uniform;
|
||||
};
|
||||
if (_vest != "") then {
|
||||
_unit addVest _vest;
|
||||
_unit addVest _vest;
|
||||
};
|
||||
if (_goggles != "") then {
|
||||
_unit addGoggles _goggles;
|
||||
_unit addGoggles _goggles;
|
||||
};
|
||||
|
||||
{
|
||||
_unit addItemToUniform _x;
|
||||
_unit addItemToUniform _x;
|
||||
}forEach _uniformitems;
|
||||
|
||||
{
|
||||
_unit addItemToVest _x;
|
||||
_unit addItemToVest _x;
|
||||
}forEach _vestitems;
|
||||
|
||||
|
||||
if(format["%1", _backpack] != "") then {
|
||||
_unit addBackpack _backpack;
|
||||
_unit addBackpack _backpack;
|
||||
|
||||
_backpa = unitBackpack _unit;
|
||||
clearMagazineCargoGlobal _backpa;
|
||||
clearWeaponCargoGlobal _backpa;
|
||||
clearItemCargoGlobal _backpa;
|
||||
{
|
||||
_unit addItemToBackpack _x;
|
||||
} forEach _backpackitems;
|
||||
_backpa = unitBackpack _unit;
|
||||
clearMagazineCargoGlobal _backpa;
|
||||
clearWeaponCargoGlobal _backpa;
|
||||
clearItemCargoGlobal _backpa;
|
||||
{
|
||||
_unit addItemToBackpack _x;
|
||||
} forEach _backpackitems;
|
||||
};
|
||||
|
||||
|
||||
// primaryWeapon
|
||||
if (_primaryweapon != "") then {
|
||||
{
|
||||
_unit addMagazine _x;
|
||||
} forEach _primaryweaponmagazine;
|
||||
{
|
||||
_unit addMagazine _x;
|
||||
} forEach _primaryweaponmagazine;
|
||||
|
||||
_unit addWeapon _primaryweapon;
|
||||
_unit addWeapon _primaryweapon;
|
||||
|
||||
{
|
||||
if (_x != "") then {
|
||||
_unit addPrimaryWeaponItem _x;
|
||||
};
|
||||
} forEach _primaryweaponitems;
|
||||
{
|
||||
if (_x != "") then {
|
||||
_unit addPrimaryWeaponItem _x;
|
||||
};
|
||||
} forEach _primaryweaponitems;
|
||||
};
|
||||
|
||||
|
||||
// secondaryWeapon
|
||||
if (_secondaryweapon != "") then {
|
||||
{
|
||||
_unit addMagazine _x;
|
||||
} forEach _secondaryweaponmagazine;
|
||||
{
|
||||
_unit addMagazine _x;
|
||||
} forEach _secondaryweaponmagazine;
|
||||
|
||||
_unit addWeapon _secondaryweapon;
|
||||
_unit addWeapon _secondaryweapon;
|
||||
|
||||
{
|
||||
if (_x != "") then {
|
||||
_unit addSecondaryWeaponItem _x;
|
||||
};
|
||||
} forEach _secondaryweaponitems;
|
||||
{
|
||||
if (_x != "") then {
|
||||
_unit addSecondaryWeaponItem _x;
|
||||
};
|
||||
} forEach _secondaryweaponitems;
|
||||
};
|
||||
|
||||
|
||||
// handgun
|
||||
if (_handgunweapon != "") then {
|
||||
{
|
||||
_unit addMagazine _x;
|
||||
} forEach _handgunweaponmagazine;
|
||||
{
|
||||
_unit addMagazine _x;
|
||||
} forEach _handgunweaponmagazine;
|
||||
|
||||
_unit addWeapon _handgunweapon;
|
||||
_unit addWeapon _handgunweapon;
|
||||
|
||||
{
|
||||
if (_x != "") then {
|
||||
_unit addHandgunItem _x;
|
||||
};
|
||||
} forEach _handgunweaponitems;
|
||||
{
|
||||
if (_x != "") then {
|
||||
_unit addHandgunItem _x;
|
||||
};
|
||||
} forEach _handgunweaponitems;
|
||||
};
|
||||
|
||||
|
||||
@ -146,6 +146,6 @@ _assignedItems = _assignedItems - [_binocular];
|
||||
_unit addWeapon _binocular;
|
||||
|
||||
if ("Laserdesignator" in assignedItems _unit) then {
|
||||
_unit selectWeapon "Laserdesignator";
|
||||
if (currentMagazine _unit == "") then {_unit addMagazine "Laserbatteries";};
|
||||
_unit selectWeapon "Laserdesignator";
|
||||
if (currentMagazine _unit == "") then {_unit addMagazine "Laserbatteries";};
|
||||
};
|
||||
|
@ -23,7 +23,7 @@ _unit = _this select 0;
|
||||
_killer = _this select 1;
|
||||
|
||||
if (_unit != _killer && side group _unit in [side group ACE_player, civilian] && {side group _killer == side group ACE_player}) then {
|
||||
systemChat format ["%1 was killed by %2", [_unit] call EFUNC(Core, getName), [_killer] call EFUNC(Core, getName)];
|
||||
systemChat format ["%1 was killed by %2", [_unit] call EFUNC(Core,getName), [_killer] call EFUNC(Core,getName)];
|
||||
|
||||
[_unit, "killedByFriendly", [_unit, _killer]] call EFUNC(Core, callCustomEventHandlers);
|
||||
[_unit, "killedByFriendly", [_unit, _killer]] call EFUNC(Core,callCustomEventHandlers);
|
||||
};
|
||||
|
@ -27,18 +27,18 @@ _toBase = _this select 2;
|
||||
// rallypoint names are defined in CfgVehicles.hpp
|
||||
|
||||
_rallypoint = ([
|
||||
[
|
||||
objNull,
|
||||
missionNamespace getVariable ["ACE_RallypointExit_West", objNull],
|
||||
missionNamespace getVariable ["ACE_RallypointExit_East", objNull],
|
||||
missionNamespace getVariable ["ACE_RallypointExit_Independent", objNull]
|
||||
],
|
||||
[
|
||||
objNull,
|
||||
missionNamespace getVariable ["ACE_Rallypoint_West", objNull],
|
||||
missionNamespace getVariable ["ACE_Rallypoint_East", objNull],
|
||||
missionNamespace getVariable ["ACE_Rallypoint_Independent", objNull]
|
||||
]
|
||||
[
|
||||
objNull,
|
||||
missionNamespace getVariable ["ACE_RallypointExit_West", objNull],
|
||||
missionNamespace getVariable ["ACE_RallypointExit_East", objNull],
|
||||
missionNamespace getVariable ["ACE_RallypointExit_Independent", objNull]
|
||||
],
|
||||
[
|
||||
objNull,
|
||||
missionNamespace getVariable ["ACE_Rallypoint_West", objNull],
|
||||
missionNamespace getVariable ["ACE_Rallypoint_East", objNull],
|
||||
missionNamespace getVariable ["ACE_Rallypoint_Independent", objNull]
|
||||
]
|
||||
] select _toBase) select ([west, east, independent] find _side) + 1;
|
||||
|
||||
if (isNull _rallypoint) exitWith {};
|
||||
|
1
addons/respawn/functions/script_component.hpp
Normal file
1
addons/respawn/functions/script_component.hpp
Normal file
@ -0,0 +1 @@
|
||||
#include "\z\ace\addons\respawn\script_component.hpp"
|
Loading…
Reference in New Issue
Block a user