Merge branch 'master' of github.com:KoffeinFlummi/ACE3

This commit is contained in:
Nicolás Badano 2015-03-23 14:02:06 -03:00
commit c8b6f6dc78
62 changed files with 1697 additions and 629 deletions

View File

@ -1,77 +1,77 @@
class CfgAmmo {
class MissileBase;
class ShellBase;
class ace_m47_dragon_serviceCharge : ShellBase {
hit = 1;
indirectHit = 2;
indirectHitRange = 1;
typicalSpeed = 100;
explosive = 1;
cost = 300;
model = "\ca\weapons\empty";
airFriction = 0;
timeToLive = 1;
explosionTime = 0.001;
soundFly[] = {"",1,1};
soundEngine[] = {"",1,4};
CraterEffects = "";
explosionEffects = "ace_m47_serviceExplosion";
hitarmor[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33};
hitbuilding[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33};
hitconcrete[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33};
hitdefault[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33};
hitfoliage[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33};
hitglass[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33};
hitglassarmored[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33};
hitgroundhard[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33};
hitgroundsoft[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33};
hitiron[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33};
hitman[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33};
hitmetal[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33};
hitmetalplate[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33};
hitplastic[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33};
hitrubber[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33};
hitwood[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33};
sounddefault1[] = {"\x\ace\addons\arty_ammunition\Sounds\base_eject", 56.2341, 1, 1800};
sounddefault2[] = {"\x\ace\addons\arty_ammunition\Sounds\base_eject", 56.2341, 1, 1800};
sounddefault3[] = {"\x\ace\addons\arty_ammunition\Sounds\base_eject", 56.2341, 1, 1800};
soundHit[] = {"\x\ace\addons\arty_ammunition\Sounds\base_eject",56.23413,1,1800};
};
class M_47_AT_EP1: MissileBase {
ace_towsmoke = 0; // no trail
six_tracerenable = 0; // can't find it?
ace_guidance_type = "dragon";
soundFly[] = {"",0,1,0};
soundEngine[] = {"",0,1,0};
};
class ace_missile_dragon : M_47_AT_EP1 {
model = QUOTE(PATHTOF(models\dragon.p3d));
maxSpeed = 120;
thrust = 0;
initTime = 0;
thrustTime = 0;
sideAirFriction = 0.025;
explosionEffects = "";
CraterEffects = "";
hitarmor[] = {"soundhit", 1};
hitbuilding[] = {"soundhit", 1};
hitconcrete[] = {"soundhit", 1};
hitdefault[] = {"soundhit", 1};
hitfoliage[] = {"soundhit", 1};
hitglass[] = {"soundhit", 1};
hitglassarmored[] = {"soundhit", 1};
hitgroundhard[] = {"soundhit", 1};
hitgroundsoft[] = {"soundhit", 1};
hitiron[] = {"soundhit", 1};
hitman[] = {"soundhit", 1};
hitmetal[] = {"soundhit", 1};
hitmetalplate[] = {"soundhit", 1};
hitplastic[] = {"soundhit", 1};
hitrubber[] = {"soundhit", 1};
hitwood[] = {"soundhit", 1};
soundhit[] = {"", 0, 1};
};
class CfgAmmo {
class MissileBase;
class ShellBase;
class ace_m47_dragon_serviceCharge : ShellBase {
hit = 1;
indirectHit = 2;
indirectHitRange = 1;
typicalSpeed = 100;
explosive = 1;
cost = 300;
model = "\ca\weapons\empty";
airFriction = 0;
timeToLive = 1;
explosionTime = 0.001;
soundFly[] = {"",1,1};
soundEngine[] = {"",1,4};
CraterEffects = "";
explosionEffects = "ace_m47_serviceExplosion";
hitarmor[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33};
hitbuilding[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33};
hitconcrete[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33};
hitdefault[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33};
hitfoliage[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33};
hitglass[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33};
hitglassarmored[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33};
hitgroundhard[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33};
hitgroundsoft[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33};
hitiron[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33};
hitman[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33};
hitmetal[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33};
hitmetalplate[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33};
hitplastic[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33};
hitrubber[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33};
hitwood[] = {"soundDefault1", 0.33, "soundDefault2", 0.33, "soundDefault3", 0.33};
sounddefault1[] = {"\x\ace\addons\arty_ammunition\Sounds\base_eject", 56.2341, 1, 1800};
sounddefault2[] = {"\x\ace\addons\arty_ammunition\Sounds\base_eject", 56.2341, 1, 1800};
sounddefault3[] = {"\x\ace\addons\arty_ammunition\Sounds\base_eject", 56.2341, 1, 1800};
soundHit[] = {"\x\ace\addons\arty_ammunition\Sounds\base_eject",56.23413,1,1800};
};
class M_47_AT_EP1: MissileBase {
ace_towsmoke = 0; // no trail
six_tracerenable = 0; // can't find it?
ace_guidance_type = "dragon";
soundFly[] = {"",0,1,0};
soundEngine[] = {"",0,1,0};
};
class ace_missile_dragon : M_47_AT_EP1 {
model = QUOTE(PATHTOF(models\dragon.p3d));
maxSpeed = 120;
thrust = 0;
initTime = 0;
thrustTime = 0;
sideAirFriction = 0.025;
explosionEffects = "";
CraterEffects = "";
hitarmor[] = {"soundhit", 1};
hitbuilding[] = {"soundhit", 1};
hitconcrete[] = {"soundhit", 1};
hitdefault[] = {"soundhit", 1};
hitfoliage[] = {"soundhit", 1};
hitglass[] = {"soundhit", 1};
hitglassarmored[] = {"soundhit", 1};
hitgroundhard[] = {"soundhit", 1};
hitgroundsoft[] = {"soundhit", 1};
hitiron[] = {"soundhit", 1};
hitman[] = {"soundhit", 1};
hitmetal[] = {"soundhit", 1};
hitmetalplate[] = {"soundhit", 1};
hitplastic[] = {"soundhit", 1};
hitrubber[] = {"soundhit", 1};
hitwood[] = {"soundhit", 1};
soundhit[] = {"", 0, 1};
};
};

View File

@ -1,11 +1,11 @@
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_pre_init));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_post_init));
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_pre_init));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_post_init));
};
};

View File

@ -1,7 +1,7 @@
class CfgMagazines {
class CA_LauncherMagazine;
class Dragon_EP1: CA_LauncherMagazine {
model = QUOTE(PATHTOF(models\ace_m47_magazine.p3d));
};
class CfgMagazines {
class CA_LauncherMagazine;
class Dragon_EP1: CA_LauncherMagazine {
model = QUOTE(PATHTOF(models\ace_m47_magazine.p3d));
};
};

View File

@ -1,64 +1,64 @@
class CfgVehicles {
class LandVehicle;
class StaticWeapon : LandVehicle {
class Turrets;
};
class StaticATWeapon : StaticWeapon {
class Turrets: Turrets {
class MainTurret;
};
};
class ACE_M47_Static_Base : StaticATWeapon {
class Turrets: Turrets {
class MainTurret : MainTurret {
class ViewOptics;
};
};
};
class ACE_M47_Static: ACE_M47_Static_Base {
scope = 1; // Hide it for now
model = QUOTE(PATHTOF(models\ace_m47_static.p3d));
displayName = "M47 Dragon";
class Turrets: Turrets {
class MainTurret: MainTurret {
gunnerAction = "LowKORD_Gunner";
GVAR(tracker) = "TOWLauncherSingle";
gunnerOpticsModel = "\ca\Weapons_e\optics_m47";
weapons[] = {"ACE_M47StaticLauncher"};
magazines[] = {};
class ViewOptics : ViewOptics {
initFov = DRAGON_FOV;
minFov = DRAGON_FOV;
maxFov = DRAGON_FOV;
};
};
};
class AnimationSources {
class rest_rotate {
source="user";
animPeriod=0.00001;
initPhase=-0.35;
maxValue="3.60";
minValue="-3.60";
};
class optic_hide {
source="user";
animPeriod=0.0001;
initPhase=1;
maxValue="1";
minValue="0";
};
class missile_hide {
source="user";
animPeriod=0.0001;
initPhase=0;
maxValue="1";
minValue="0";
};
};
};
class CfgVehicles {
class LandVehicle;
class StaticWeapon : LandVehicle {
class Turrets;
};
class StaticATWeapon : StaticWeapon {
class Turrets: Turrets {
class MainTurret;
};
};
class ACE_M47_Static_Base : StaticATWeapon {
class Turrets: Turrets {
class MainTurret : MainTurret {
class ViewOptics;
};
};
};
class ACE_M47_Static: ACE_M47_Static_Base {
scope = 1; // Hide it for now
model = QUOTE(PATHTOF(models\ace_m47_static.p3d));
displayName = "M47 Dragon";
class Turrets: Turrets {
class MainTurret: MainTurret {
gunnerAction = "LowKORD_Gunner";
GVAR(tracker) = "TOWLauncherSingle";
gunnerOpticsModel = "\ca\Weapons_e\optics_m47";
weapons[] = {"ACE_M47StaticLauncher"};
magazines[] = {};
class ViewOptics : ViewOptics {
initFov = DRAGON_FOV;
minFov = DRAGON_FOV;
maxFov = DRAGON_FOV;
};
};
};
class AnimationSources {
class rest_rotate {
source="user";
animPeriod=0.00001;
initPhase=-0.35;
maxValue="3.60";
minValue="-3.60";
};
class optic_hide {
source="user";
animPeriod=0.0001;
initPhase=1;
maxValue="1";
minValue="0";
};
class missile_hide {
source="user";
animPeriod=0.0001;
initPhase=0;
maxValue="1";
minValue="0";
};
};
};
};

View File

@ -1,45 +1,45 @@
class CfgWeapons {
class Weapon_Bag_Base;
class B_AT_01_weapon_F: Weapon_Bag_Base {
};
class ACE_M47StaticLauncher: B_AT_01_weapon_F {
displayName = "M47 Dragon";
canLock = 0;
handAnim[] = {"OFP2_ManSkeleton","\Ca\weapons_E\Data\Anim\M47.rtm"};
sound[] = {"Ca\Sounds_E\Weapons_E\M47\M47_1",3.1622777,1,1200};
drySound[] = {"Ca\Sounds_E\Weapons_E\M47\dry",0.0001,1,10};
reloadMagazineSound[] = {"Ca\Sounds_E\Weapons_E\M47\rocket_reload",1.0,1,30};
soundFly[] = {"",3.1622777,1,500};
initSpeed = 20;
magazines[] = {"Dragon_EP1"};
reloadTime = 0;
magazineReloadTime = 0;
};
class Launcher;
class M47Launcher_EP1: Launcher {
displayName = "M47 Dragon";
canlock = 0;
model = QUOTE(PATHTOF(models\ace_m47_magazine.p3d));
picture = QUOTE(PATHTOF(textures\m47_dragon_item_ca.paa));
};
class ACE_M47_Daysight: M47Launcher_EP1 {
displayName = $STR_DN_ACE_DRAGONSUP36; // Stay next to tubes in gear dialogs
model = QUOTE(PATHTOF(models\ace_m47_optic.p3d));
picture = QUOTE(PATHTOF(textures\m47_daysight_item_ca.paa));
optics = 1;
weaponInfoType = "RscWeaponEmpty";
modelOptics = "\ca\Weapons_e\optics_m47";
reloadaction = "";
showSwitchAction = 1;
useAsBinocular = 1;
uipicture = "";
descriptionshort = "SU-36/P Daysight";
ace_disposable = 0;
magazines[] = {};
type = 4096;
opticsPPEffects[] = {"OpticsCHAbera1","OpticsBlur1"};
opticsZoomMin = 0.015;
opticsZoomMax = 0.015;
};
class CfgWeapons {
class Weapon_Bag_Base;
class B_AT_01_weapon_F: Weapon_Bag_Base {
};
class ACE_M47StaticLauncher: B_AT_01_weapon_F {
displayName = "M47 Dragon";
canLock = 0;
handAnim[] = {"OFP2_ManSkeleton","\Ca\weapons_E\Data\Anim\M47.rtm"};
sound[] = {"Ca\Sounds_E\Weapons_E\M47\M47_1",3.1622777,1,1200};
drySound[] = {"Ca\Sounds_E\Weapons_E\M47\dry",0.0001,1,10};
reloadMagazineSound[] = {"Ca\Sounds_E\Weapons_E\M47\rocket_reload",1.0,1,30};
soundFly[] = {"",3.1622777,1,500};
initSpeed = 20;
magazines[] = {"Dragon_EP1"};
reloadTime = 0;
magazineReloadTime = 0;
};
class Launcher;
class M47Launcher_EP1: Launcher {
displayName = "M47 Dragon";
canlock = 0;
model = QUOTE(PATHTOF(models\ace_m47_magazine.p3d));
picture = QUOTE(PATHTOF(textures\m47_dragon_item_ca.paa));
};
class ACE_M47_Daysight: M47Launcher_EP1 {
displayName = $STR_DN_ACE_DRAGONSUP36; // Stay next to tubes in gear dialogs
model = QUOTE(PATHTOF(models\ace_m47_optic.p3d));
picture = QUOTE(PATHTOF(textures\m47_daysight_item_ca.paa));
optics = 1;
weaponInfoType = "RscWeaponEmpty";
modelOptics = "\ca\Weapons_e\optics_m47";
reloadaction = "";
showSwitchAction = 1;
useAsBinocular = 1;
uipicture = "";
descriptionshort = "SU-36/P Daysight";
ace_disposable = 0;
magazines[] = {};
type = 4096;
opticsPPEffects[] = {"OpticsCHAbera1","OpticsBlur1"};
opticsZoomMin = 0.015;
opticsZoomMax = 0.015;
};
};

View File

@ -1,3 +1,3 @@
#include "script_component.hpp"
NO_DEDICATED;
#include "script_component.hpp"
NO_DEDICATED;

View File

@ -1,2 +1,2 @@
#include "script_component.hpp"
#include "script_component.hpp"

View File

@ -1,17 +1,17 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
units[] = { "ACE_M47_Static" };
weapons[] = { "ACE_M47StaticLauncher", "M47Launcher_EP1", "ACE_M47_Daysight" };
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = { "ace_main", "ace_common" };
VERSION_CONFIG;
};
};
#include "CfgEventhandlers.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
#include "CfgAmmo.hpp"
#include "script_component.hpp"
class CfgPatches {
class ADDON {
units[] = { "ACE_M47_Static" };
weapons[] = { "ACE_M47StaticLauncher", "M47Launcher_EP1", "ACE_M47_Daysight" };
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = { "ace_main", "ace_common" };
VERSION_CONFIG;
};
};
#include "CfgEventhandlers.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
#include "CfgAmmo.hpp"
#include "CfgMagazines.hpp"

View File

@ -1,135 +1,135 @@
//fnc_fired.sqf
#include "script_component.hpp"
#define DRAGON_VELOCITY 100
#define SERVICE_INTERVAL 0.3
#define DRAGON_SERVICE_COUNT 60
#define DRAGON_TRIM 1
#define TRACKINTERVAL 0.025
if ((_this select 0) == player || {(gunner (_this select 0)) == player}) then {
if ((typeOf (_this select 6)) == "M_47_AT_EP1") then {
_missile = (_this select 6);
_vel = velocity _missile;
_ppos = getPosASL _missile;
_missile setPosATL [_ppos select 0, _ppos select 1, 5000];
_unitVec = _vel call ACE_fnc_unitVector;
_spawnPos = [(_ppos select 0) + (_unitVec select 0), (_ppos select 1) + (_unitVec select 1), (_ppos select 2) + (_unitVec select 2)];
_shell = "ace_missile_dragon" createVehicle _spawnPos;
_this set[6, _shell];
_shell setPosASL _spawnPos;
_newVel = [_unitVec, DRAGON_VELOCITY*1.25] call ACE_fnc_vectorMultiply;
_shell setVelocity _newVel;
_shell setVectorDir _unitVec;
_gunner = _this select 0;
//setAccTime 0.2;
[
{
_unitVec = (velocity _shell) call ACE_fnc_unitVector;
_polar = _unitVec call CBA_fnc_vect2polar;
_spos = getPosATL _shell;
_ppos = getPosASL _shell;
_screenPos = if (_spos select 2 > _ppos select 2) then {worldToScreen _ppos} else {worldToScreen _spos};
if (count _screenPos > 0 && {alive _gunner}) then {
_x = (((_screenPos select 0) - 0.5) max -1) min 1;
_y = (((_screenPos select 1) - 0.45) max -1) min 1;
_m = ((_shell distance _gunner)*0.009);
//player sideChat format["x: %1, y: %2 m: %3 di: %4 spd: %5", _x*_m, _y*_m*-1, _m, (_shell distance _gunner), (speed _shell)];
_yDeg = 2.1;
_xDeg = 1.6;
_difEl = _yDeg*(_y*_m);
_difEl = ((_difEl min _yDeg) max (_yDeg*-1));
if(_difEl < 0) then {
_difEl = _difEl / 2;
};
_dir = _xDeg*(_x*_m)*-1;
_dir = ((_dir min _xDeg) max (_xDeg*-1));
_difDir = (_polar select 1) + _dir;
if (_difDir < 0) then {_difDir = _difDir + 360};
if (_difDir > 360) then {_difDir = _difDir - 360};
//drop ["\Ca\Data\Cl_basic","","Billboard",1,5,(getPos _shell),[0,0,0],1,1.275,1.0,0.0,[1],[[1,0,0,0.25]],[0],0.0,2.0,"","",""];
_firedAdjust = false;
_shellVelocity = velocity _shell;
_speed = (3.6*sqrt((_shellVelocity select 0)^2 + (_shellVelocity select 1)^2 + (_shellVelocity select 2)^2))*0.278;
//hint format["speed: %1\ndistance: %2\ntime: %3", _speed, (_gunner distance _shell), diag_tickTime-_startTime];
if (diag_tickTime >= _timerCorrect && {_chargeCount > 0}) then {
if ((abs _dir) >= _xDeg/2) then {
_firedAdjust = true;
_difDir = (_polar select 1) + (_dir*0.25);
if (_difDir < 0) then {_difDir = _difDir + 360};
if (_difDir > 360) then {_difDir = _difDir - 360};
//player sideChat "CORRECT!";
_timerCorrect = diag_tickTime+(SERVICE_INTERVAL*2);
_newVel = [DRAGON_VELOCITY, (_difDir), (_polar select 2)+(_difEl*0.25)+DRAGON_TRIM] call CBA_fnc_polar2vect;
_shell setVelocity _newVel;
_shell setVectorDir (_newVel call ACE_fnc_unitVector);
"ace_m47_dragon_serviceCharge" createVehicle (getPos _shell);
_chargeCount = _chargeCount - 1;
};
};
if (!_firedAdjust && {diag_tickTime >= _timer} && {_chargeCount > 0}) then {
_timer = diag_tickTime+SERVICE_INTERVAL;
_newVel = [DRAGON_VELOCITY, _difDir, (_polar select 2)+(_difEl)+DRAGON_TRIM] call CBA_fnc_polar2vect;
//_newVel = [(velocity _shell), _newVel] call ACE_fnc_vectorAdd;
// if(_difEl > 0) then {
// drop ["\Ca\Data\Cl_basic","","Billboard",1,5,(getPos _shell),[0,0,0],1,1.275,1.0,0.0,[0.5],[[0,1,0,1]],[0],0.0,2.0,"","",""];
// } else {
// drop ["\Ca\Data\Cl_basic","","Billboard",1,5,(getPos _shell),[0,0,0],1,1.275,1.0,0.0,[0.5],[[0,0,1,1]],[0],0.0,2.0,"","",""];
// };
_shell setVelocity _newVel;
_shell setVectorDir (_newVel call ACE_fnc_unitVector);
// charge FX
_shellCharge = "ace_m47_dragon_serviceCharge" createVehicle _ppos;
_shellCharge setPosASL _ppos;
_chargeCount = _chargeCount - 1;
};
};
_missile setPosATL [_ppos select 0, _ppos select 1, 5000];
_prevTime = diag_tickTime;
},
[_shell,_gunner,_unitVec,_missile],
0.0, // delay
{
//init
_shell = _this select 0;
_gunner = _this select 1;
_chargeCount = DRAGON_SERVICE_COUNT;
_timer = diag_tickTime+SERVICE_INTERVAL;
_timerCorrect = _timer;
_originalVec = _this select 2;
_originalPolar = _originalVec call CBA_fnc_vect2polar;
_targetPolar = +_originalPolar;
_startTime = diag_tickTime;
_lastX = 1000;
_lastY = 1000;
// Return original missile at explosion
_missile = _this select 3;
// start from beginning
_prevTime = diag_tickTime - TRACKINTERVAL;
},
{
// exit
if !(isNull _missile) then {
_missile setVelocity _newVel;
_missile setVectorDir (_newVel call ACE_fnc_unitVector);
_missile setPosASL _ppos;
};
},
{
diag_tickTime - _prevTime > TRACKINTERVAL
},
{!alive _shell},
[
"_shell", "_gunner", "_chargeCount", "_timer", "_originalVec", "_originalPolar", "_timerCorrect", "_startTime", "_lastX", "_lastY",
"_missile", "_ppos", "_newVel", "_prevTime"
]
] call cba_common_fnc_addPerFrameHandlerLogic;
};
//fnc_fired.sqf
#include "script_component.hpp"
#define DRAGON_VELOCITY 100
#define SERVICE_INTERVAL 0.3
#define DRAGON_SERVICE_COUNT 60
#define DRAGON_TRIM 1
#define TRACKINTERVAL 0.025
if ((_this select 0) == player || {(gunner (_this select 0)) == player}) then {
if ((typeOf (_this select 6)) == "M_47_AT_EP1") then {
_missile = (_this select 6);
_vel = velocity _missile;
_ppos = getPosASL _missile;
_missile setPosATL [_ppos select 0, _ppos select 1, 5000];
_unitVec = _vel call ACE_fnc_unitVector;
_spawnPos = [(_ppos select 0) + (_unitVec select 0), (_ppos select 1) + (_unitVec select 1), (_ppos select 2) + (_unitVec select 2)];
_shell = "ace_missile_dragon" createVehicle _spawnPos;
_this set[6, _shell];
_shell setPosASL _spawnPos;
_newVel = [_unitVec, DRAGON_VELOCITY*1.25] call ACE_fnc_vectorMultiply;
_shell setVelocity _newVel;
_shell setVectorDir _unitVec;
_gunner = _this select 0;
//setAccTime 0.2;
[
{
_unitVec = (velocity _shell) call ACE_fnc_unitVector;
_polar = _unitVec call CBA_fnc_vect2polar;
_spos = getPosATL _shell;
_ppos = getPosASL _shell;
_screenPos = if (_spos select 2 > _ppos select 2) then {worldToScreen _ppos} else {worldToScreen _spos};
if (count _screenPos > 0 && {alive _gunner}) then {
_x = (((_screenPos select 0) - 0.5) max -1) min 1;
_y = (((_screenPos select 1) - 0.45) max -1) min 1;
_m = ((_shell distance _gunner)*0.009);
//player sideChat format["x: %1, y: %2 m: %3 di: %4 spd: %5", _x*_m, _y*_m*-1, _m, (_shell distance _gunner), (speed _shell)];
_yDeg = 2.1;
_xDeg = 1.6;
_difEl = _yDeg*(_y*_m);
_difEl = ((_difEl min _yDeg) max (_yDeg*-1));
if(_difEl < 0) then {
_difEl = _difEl / 2;
};
_dir = _xDeg*(_x*_m)*-1;
_dir = ((_dir min _xDeg) max (_xDeg*-1));
_difDir = (_polar select 1) + _dir;
if (_difDir < 0) then {_difDir = _difDir + 360};
if (_difDir > 360) then {_difDir = _difDir - 360};
//drop ["\Ca\Data\Cl_basic","","Billboard",1,5,(getPos _shell),[0,0,0],1,1.275,1.0,0.0,[1],[[1,0,0,0.25]],[0],0.0,2.0,"","",""];
_firedAdjust = false;
_shellVelocity = velocity _shell;
_speed = (3.6*sqrt((_shellVelocity select 0)^2 + (_shellVelocity select 1)^2 + (_shellVelocity select 2)^2))*0.278;
//hint format["speed: %1\ndistance: %2\ntime: %3", _speed, (_gunner distance _shell), diag_tickTime-_startTime];
if (diag_tickTime >= _timerCorrect && {_chargeCount > 0}) then {
if ((abs _dir) >= _xDeg/2) then {
_firedAdjust = true;
_difDir = (_polar select 1) + (_dir*0.25);
if (_difDir < 0) then {_difDir = _difDir + 360};
if (_difDir > 360) then {_difDir = _difDir - 360};
//player sideChat "CORRECT!";
_timerCorrect = diag_tickTime+(SERVICE_INTERVAL*2);
_newVel = [DRAGON_VELOCITY, (_difDir), (_polar select 2)+(_difEl*0.25)+DRAGON_TRIM] call CBA_fnc_polar2vect;
_shell setVelocity _newVel;
_shell setVectorDir (_newVel call ACE_fnc_unitVector);
"ace_m47_dragon_serviceCharge" createVehicle (getPos _shell);
_chargeCount = _chargeCount - 1;
};
};
if (!_firedAdjust && {diag_tickTime >= _timer} && {_chargeCount > 0}) then {
_timer = diag_tickTime+SERVICE_INTERVAL;
_newVel = [DRAGON_VELOCITY, _difDir, (_polar select 2)+(_difEl)+DRAGON_TRIM] call CBA_fnc_polar2vect;
//_newVel = [(velocity _shell), _newVel] call ACE_fnc_vectorAdd;
// if(_difEl > 0) then {
// drop ["\Ca\Data\Cl_basic","","Billboard",1,5,(getPos _shell),[0,0,0],1,1.275,1.0,0.0,[0.5],[[0,1,0,1]],[0],0.0,2.0,"","",""];
// } else {
// drop ["\Ca\Data\Cl_basic","","Billboard",1,5,(getPos _shell),[0,0,0],1,1.275,1.0,0.0,[0.5],[[0,0,1,1]],[0],0.0,2.0,"","",""];
// };
_shell setVelocity _newVel;
_shell setVectorDir (_newVel call ACE_fnc_unitVector);
// charge FX
_shellCharge = "ace_m47_dragon_serviceCharge" createVehicle _ppos;
_shellCharge setPosASL _ppos;
_chargeCount = _chargeCount - 1;
};
};
_missile setPosATL [_ppos select 0, _ppos select 1, 5000];
_prevTime = diag_tickTime;
},
[_shell,_gunner,_unitVec,_missile],
0.0, // delay
{
//init
_shell = _this select 0;
_gunner = _this select 1;
_chargeCount = DRAGON_SERVICE_COUNT;
_timer = diag_tickTime+SERVICE_INTERVAL;
_timerCorrect = _timer;
_originalVec = _this select 2;
_originalPolar = _originalVec call CBA_fnc_vect2polar;
_targetPolar = +_originalPolar;
_startTime = diag_tickTime;
_lastX = 1000;
_lastY = 1000;
// Return original missile at explosion
_missile = _this select 3;
// start from beginning
_prevTime = diag_tickTime - TRACKINTERVAL;
},
{
// exit
if !(isNull _missile) then {
_missile setVelocity _newVel;
_missile setVectorDir (_newVel call ACE_fnc_unitVector);
_missile setPosASL _ppos;
};
},
{
diag_tickTime - _prevTime > TRACKINTERVAL
},
{!alive _shell},
[
"_shell", "_gunner", "_chargeCount", "_timer", "_originalVec", "_originalPolar", "_timerCorrect", "_startTime", "_lastX", "_lastY",
"_missile", "_ppos", "_newVel", "_prevTime"
]
] call cba_common_fnc_addPerFrameHandlerLogic;
};
};

View File

@ -1,79 +1,79 @@
License (short)
===============
You are free:
- to Share — to copy, distribute and transmit the work
Under the following conditions:
- Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
- Noncommercial — You may not use this work for commercial purposes.
- No Derivative Works — You may not alter, transform, or build upon this work.
With the understanding that:
Waiver — Any of the above conditions can be waived if you get permission from the copyright holder.
Public Domain — Where the work or any of its elements is in the public domain under applicable law, that status is in no way affected by the license.
Other Rights — In no way are any of the following rights affected by the license:
- Your fair dealing or fair use rights, or other applicable copyright exceptions and limitations;
- The author's moral rights;
- Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy rights.
Notice — For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page.
Full license text
=================
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.
1. Definitions
"Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License.
"Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined above) for the purposes of this License.
"Distribute" means to make available to the public the original and copies of the Work through sale or other transfer of ownership.
"Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License.
"Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast.
"Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work.
"You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.
"Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images.
"Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium.
2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws.
3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:
to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections; and,
to Distribute and Publicly Perform the Work including as incorporated in Collections.
The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats, but otherwise you have no rights to make Adaptations. Subject to 8(f), all rights not expressly granted by Licensor are hereby reserved, including but not limited to the rights set forth in Section 4(d).
4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:
You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(c), as requested.
You may not exercise any of the rights granted to You in Section 3 above in any manner that is primarily intended for or directed toward commercial advantage or private monetary compensation. The exchange of the Work for other copyrighted works by means of digital file-sharing or otherwise shall not be considered to be intended for or directed toward commercial advantage or private monetary compensation, provided there is no payment of any monetary compensation in connection with the exchange of copyrighted works.
If You Distribute, or Publicly Perform the Work or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work. The credit required by this Section 4(c) may be implemented in any reasonable manner; provided, however, that in the case of a Collection, at a minimum such credit will appear, if a credit for all contributing authors of Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties.
For the avoidance of doubt:
Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License;
Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License if Your exercise of such rights is for a purpose or use which is otherwise than noncommercial as permitted under Section 4(b) and otherwise waives the right to collect royalties through any statutory or compulsory licensing scheme; and,
Voluntary License Schemes. The Licensor reserves the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License that is for a purpose or use which is otherwise than noncommercial as permitted under Section 4(b).
Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation.
5. Representations, Warranties and Disclaimer
UNLESS OTHERWISE MUTUALLY AGREED BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7. Termination
This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.
Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.
8. Miscellaneous
Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.
If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.
This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.
The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law.
License (short)
===============
You are free:
- to Share — to copy, distribute and transmit the work
Under the following conditions:
- Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
- Noncommercial — You may not use this work for commercial purposes.
- No Derivative Works — You may not alter, transform, or build upon this work.
With the understanding that:
Waiver — Any of the above conditions can be waived if you get permission from the copyright holder.
Public Domain — Where the work or any of its elements is in the public domain under applicable law, that status is in no way affected by the license.
Other Rights — In no way are any of the following rights affected by the license:
- Your fair dealing or fair use rights, or other applicable copyright exceptions and limitations;
- The author's moral rights;
- Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy rights.
Notice — For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page.
Full license text
=================
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.
1. Definitions
"Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License.
"Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined above) for the purposes of this License.
"Distribute" means to make available to the public the original and copies of the Work through sale or other transfer of ownership.
"Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License.
"Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast.
"Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work.
"You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.
"Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images.
"Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium.
2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws.
3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:
to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections; and,
to Distribute and Publicly Perform the Work including as incorporated in Collections.
The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats, but otherwise you have no rights to make Adaptations. Subject to 8(f), all rights not expressly granted by Licensor are hereby reserved, including but not limited to the rights set forth in Section 4(d).
4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:
You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(c), as requested.
You may not exercise any of the rights granted to You in Section 3 above in any manner that is primarily intended for or directed toward commercial advantage or private monetary compensation. The exchange of the Work for other copyrighted works by means of digital file-sharing or otherwise shall not be considered to be intended for or directed toward commercial advantage or private monetary compensation, provided there is no payment of any monetary compensation in connection with the exchange of copyrighted works.
If You Distribute, or Publicly Perform the Work or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work. The credit required by this Section 4(c) may be implemented in any reasonable manner; provided, however, that in the case of a Collection, at a minimum such credit will appear, if a credit for all contributing authors of Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties.
For the avoidance of doubt:
Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License;
Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License if Your exercise of such rights is for a purpose or use which is otherwise than noncommercial as permitted under Section 4(b) and otherwise waives the right to collect royalties through any statutory or compulsory licensing scheme; and,
Voluntary License Schemes. The Licensor reserves the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License that is for a purpose or use which is otherwise than noncommercial as permitted under Section 4(b).
Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation.
5. Representations, Warranties and Disclaimer
UNLESS OTHERWISE MUTUALLY AGREED BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7. Termination
This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.
Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.
8. Miscellaneous
Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.
If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.
This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.
The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law.

View File

@ -1,96 +1,96 @@
class CfgSkeletons {
class Default {
isDiscrete = 1;
skeletonInherit = "";
skeletonBones[] = {};
};
class ace_m47_static_skeleton: Default {
skeletonInherit = "Default";
skeletonBones[] = {
"bipod","",
"grav_box","bipod",
"launcher","grav_box",
"optic","launcher",
"missile","launcher"
};
};
};
class CfgModels {
class Default {
sectionsInherit = "";
sections[] = {};
};
class ace_m47_static: Default {
sectionsInherit = "Default";
sections[] = {};
skeletonName = "ace_m47_static_skeleton";
class Animations {
class MainGun {
type="rotation";
selection="launcher";
sourceAddress = "clamp";
source="MainGun";
axis="elevate_axis";
animPeriod=0.01;
initPhase=0;
maxValue="rad 360";
minValue="rad -360";
angle1="rad 360";
angle0="rad -360";
};
class MainTurret {
type="rotation";
source="MainTurret";
selection="bipod";
sourceAddress = "loop";
axis="rotate_axis";
animPeriod=0.005;
minValue="rad -360";
maxValue="rad +360";
angle0="rad -360";
angle1="rad +360";
};
class rest_rotate {
type="rotation";
selection="grav_box";
sourceAddress = "clamp";
source="user";
axis="elevate_axis";
animPeriod=0.00001;
initPhase=-0.35;
maxValue="3.60";
minValue="-3.60";
angle1="rad -360";
angle0="rad 360";
};
class optic_hide
{
type = "hide";
source = "user";
selection = "optic";
animPeriod = 0.0001;
minValue = 0;
maxValue = 1;
minPhase = 0;
maxPhase = 1;
hideValue = 0.99;
initPhase = 1;
};
class missile_hide
{
type = "hide";
source = "user";
selection = "missile";
animPeriod = 0.0001;
minValue = 0;
maxValue = 1;
minPhase = 0;
maxPhase = 1;
hideValue = 0.99;
};
};
};
};
class CfgSkeletons {
class Default {
isDiscrete = 1;
skeletonInherit = "";
skeletonBones[] = {};
};
class ace_m47_static_skeleton: Default {
skeletonInherit = "Default";
skeletonBones[] = {
"bipod","",
"grav_box","bipod",
"launcher","grav_box",
"optic","launcher",
"missile","launcher"
};
};
};
class CfgModels {
class Default {
sectionsInherit = "";
sections[] = {};
};
class ace_m47_static: Default {
sectionsInherit = "Default";
sections[] = {};
skeletonName = "ace_m47_static_skeleton";
class Animations {
class MainGun {
type="rotation";
selection="launcher";
sourceAddress = "clamp";
source="MainGun";
axis="elevate_axis";
animPeriod=0.01;
initPhase=0;
maxValue="rad 360";
minValue="rad -360";
angle1="rad 360";
angle0="rad -360";
};
class MainTurret {
type="rotation";
source="MainTurret";
selection="bipod";
sourceAddress = "loop";
axis="rotate_axis";
animPeriod=0.005;
minValue="rad -360";
maxValue="rad +360";
angle0="rad -360";
angle1="rad +360";
};
class rest_rotate {
type="rotation";
selection="grav_box";
sourceAddress = "clamp";
source="user";
axis="elevate_axis";
animPeriod=0.00001;
initPhase=-0.35;
maxValue="3.60";
minValue="-3.60";
angle1="rad -360";
angle0="rad 360";
};
class optic_hide
{
type = "hide";
source = "user";
selection = "optic";
animPeriod = 0.0001;
minValue = 0;
maxValue = 1;
minPhase = 0;
maxPhase = 1;
hideValue = 0.99;
initPhase = 1;
};
class missile_hide
{
type = "hide";
source = "user";
selection = "missile";
animPeriod = 0.0001;
minValue = 0;
maxValue = 1;
minPhase = 0;
maxPhase = 1;
hideValue = 0.99;
};
};
};
};

View File

@ -1,12 +1,12 @@
#define COMPONENT wep_dragon
#include "\z\ace\Addons\main\script_mod.hpp"
#ifdef DEBUG_ENABLED_WEP_DRAGON
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_WEP_DRAGON
#define DEBUG_SETTINGS DEBUG_SETTINGS_WEP_DRAGON
#endif
#include "\z\ace\Addons\main\script_macros.hpp"
#define COMPONENT wep_dragon
#include "\z\ace\Addons\main\script_mod.hpp"
#ifdef DEBUG_ENABLED_WEP_DRAGON
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_WEP_DRAGON
#define DEBUG_SETTINGS DEBUG_SETTINGS_WEP_DRAGON
#endif
#include "\z\ace\Addons\main\script_macros.hpp"

View File

@ -13,7 +13,9 @@ if (_unit getVariable [QGVAR(isDragging), false]) then {
private "_draggedObject";
_draggedObject = _unit getVariable [QGVAR(draggedObject), objNull];
[_unit, _draggedObject] call FUNC(dropObject);
if (!isNull _draggedObject) then {
[_unit, _draggedObject] call FUNC(dropObject);
};
};
};
@ -25,7 +27,9 @@ if (_unit getVariable [QGVAR(isCarrying), false]) then {
private "_carriedObject";
_carriedObject = _unit getVariable [QGVAR(carriedObject), objNull];
[_unit, _carriedObject] call FUNC(dropObject_carry);
if (!isNull _carriedObject) then {
[_unit, _carriedObject] call FUNC(dropObject_carry);
};
};
};

View File

@ -48,8 +48,8 @@ if (_type in _initializedClasses) exitWith {};
_initializedClasses pushBack _type;
GVAR(initializedClasses_carry) = _initializedClasses;
_carryAction = [QGVAR(drag), localize "STR_ACE_Dragging_Carry", "", {[_player, _target] call FUNC(carryObject)}, {[_player, _target] call FUNC(canCarry)}] call EFUNC(interact_menu,createAction);
_dropAction = [QGVAR(drop), localize "STR_ACE_Dragging_Drop", "", {[_player, _target] call FUNC(dropObject_carry)}, {[_player, _target] call FUNC(canDrop_carry)}] call EFUNC(interact_menu,createAction);
_carryAction = [QGVAR(carry), localize "STR_ACE_Dragging_Carry", "", {[_player, _target] call FUNC(carryObject)}, {[_player, _target] call FUNC(canCarry)}] call EFUNC(interact_menu,createAction);
_dropAction = [QGVAR(drop_carry), localize "STR_ACE_Dragging_Drop", "", {[_player, _target] call FUNC(dropObject_carry)}, {[_player, _target] call FUNC(canDrop_carry)}] call EFUNC(interact_menu,createAction);
[_type, 0, ["ACE_MainActions"], _carryAction] call EFUNC(interact_menu,addActionToClass);
[_type, 0, ["ACE_MainActions"], _dropAction] call EFUNC(interact_menu,addActionToClass);
[_type, 0, [], _dropAction] call EFUNC(interact_menu,addActionToClass);

View File

@ -52,4 +52,4 @@ _dragAction = [QGVAR(drag), localize "STR_ACE_Dragging_Drag", "", {[_player, _ta
_dropAction = [QGVAR(drop), localize "STR_ACE_Dragging_Drop", "", {[_player, _target] call FUNC(dropObject)}, {[_player, _target] call FUNC(canDrop)}] call EFUNC(interact_menu,createAction);
[_type, 0, ["ACE_MainActions"], _dragAction] call EFUNC(interact_menu,addActionToClass);
[_type, 0, ["ACE_MainActions"], _dropAction] call EFUNC(interact_menu,addActionToClass);
[_type, 0, [], _dropAction] call EFUNC(interact_menu,addActionToClass);

View File

@ -40,4 +40,7 @@ _unit selectWeapon primaryWeapon _unit;
// can't play action that depends on weapon if it was added the same frame
[{_this playActionNow "grabDrag";}, _unit] call EFUNC(common,execNextFrame);
// prevents draging and carrying at the same time
_unit setVariable [QGVAR(isDragging), true, true];
[FUNC(startDragPFH), 0.2, [_unit, _target, time + 5]] call CBA_fnc_addPerFrameHandler;

View File

@ -10,6 +10,17 @@ _timeOut = _this select 0 select 2;
// timeout. Do nothing. Quit. time, because anim length is linked to ingame time.
if (time > _timeOut) exitWith {
[_this select 1] call CBA_fnc_removePerFrameHandler;
// drop if in timeout
private "_draggedObject";
_draggedObject = _unit getVariable [QGVAR(draggedObject), objNull];
if (!isNull _draggedObject) exitWith {
[_unit, _draggedObject] call FUNC(dropObject);
};
// re-enable everything
_unit setVariable [QGVAR(isDragging), false, true];
};
// unit is ready to start dragging

View File

@ -49,6 +49,30 @@ class ACE_Medical_Actions {
callbackSuccess = QUOTE(DFUNC(treatmentBasic_bloodbag));
animationCaller = "AinvPknlMstpSnonWnonDnon_medic1";
};
class Carry: Bandage {
displayName = "";
displayNameProgress = "";
treatmentLocations[] = {"All"};
requiredMedic = 0;
treatmentTime = 0;
items[] = {};
condition = QUOTE(DFUNC(canCarry));
callbackSuccess = QUOTE([ARR_3(_this select 0, _this select 1, true)] call DFUNC(actionCarryUnit));
callbackFailure = "";
callbackProgress = "";
itemConsumed = 0;
animationPatient = "";
animationCaller = "";
animationCallerProne = "";
animationCallerSelf = "";
animationCallerSelfProne = "";
};
class Drag: Carry {
displayName = "";
displayNameProgress = "";
condition = QUOTE(DFUNC(canCarry));
callbackSuccess = QUOTE([ARR_3(_this select 0, _this select 1, false)] call DFUNC(actionCarryUnit));
};
};
class Advanced {
@ -199,6 +223,30 @@ class ACE_Medical_Actions {
animationPatient = "";
itemConsumed = 0;
};
class Carry: fieldDressing {
displayName = "";
displayNameProgress = "";
treatmentLocations[] = {"All"};
requiredMedic = 0;
treatmentTime = 0;
items[] = {};
condition = QUOTE(DFUNC(canCarry));
callbackSuccess = QUOTE([ARR_3(_this select 0, _this select 1, true)] call DFUNC(actionCarryUnit));
callbackFailure = "";
callbackProgress = "";
itemConsumed = 0;
animationPatient = "";
animationCaller = "";
animationCallerProne = "";
animationCallerSelf = "";
animationCallerSelfProne = "";
};
class Drag: Carry {
displayName = "";
displayNameProgress = "";
condition = QUOTE(DFUNC(canCarry));
callbackSuccess = QUOTE([ARR_3(_this select 0, _this select 1, false)] call DFUNC(actionCarryUnit));
};
};
};

View File

@ -68,4 +68,8 @@ class ACE_Settings {
typeName = "NUMBER";
value = 120;
};
class GVAR(allowDeadBodyMovement) {
typeName = "BOOL";
value = false;
};
};

View File

@ -6,8 +6,9 @@ class CfgVehicles {
class ArgumentsBaseUnits {
};
};
class ACE_Module;
// TODO localization for all the modules
class ACE_moduleMedicalSettings: Module_F {
class ACE_moduleMedicalSettings: ACE_Module {
scope = 2;
displayName = "Medical Settings [ACE]";
icon = QUOTE(PATHTOF(ui\moduleIcon.paa));
@ -129,7 +130,7 @@ class CfgVehicles {
};
};
class ACE_moduleTreatmentConfiguration: Module_F {
class ACE_moduleTreatmentConfiguration: ACE_Module {
scope = 2;
displayName = "Treatment Configuration [ACE]";
icon = QUOTE(PATHTOF(ui\moduleIcon.paa));
@ -344,6 +345,466 @@ class CfgVehicles {
name = "leg_r";
};
};
class ACE_SelfActions {
class Medical {
displayName = "Medical";
runOnHover = 1;
hotkey = "M";
statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));
icon = PATHTOF(UI\icons\medical_cross.paa);
class ACE_Head {
displayName = "$STR_ACE_Interaction_Head";
icon = PATHTOF(UI\icons\medical_cross.paa);
statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));
runOnHover = 1;
class Bandage {
displayName = "$STR_ACE_Medical_Bandage_HitHead";
distance = 2.0;
condition = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(treatment));
showDisabled = 1;
priority = 2;
hotkey = "B";
enableInside = 1;
icon = PATHTOF(UI\icons\bandage.paa);
};
// Advanced medical
class FieldDressing {
displayName = "Field Dressing";
distance = 5.0;
condition = QUOTE([ARR_4(_player, _target, 'head', 'FieldDressing')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'head', 'FieldDressing')] call DFUNC(treatment));
showDisabled = 0;
priority = 2;
hotkey = "";
enableInside = 1;
icon = PATHTOF(UI\icons\bandage.paa);
};
class PackingBandage: fieldDressing {
displayName = "Packing Bandage";
condition = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(treatment));
icon = PATHTOF(UI\icons\packingBandage.paa);
};
class ElasticBandage: fieldDressing {
displayName = "Elastic Bandage";
condition = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(treatment));
icon = PATHTOF(UI\icons\bandage.paa);
};
class QuikClot: fieldDressing {
displayName = "QuikClot";
condition = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(treatment));
icon = PATHTOF(UI\icons\bandage.paa);
};
class CheckPulse: fieldDressing {
displayName = "Check Pulse";
condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckPulse')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckPulse')] call DFUNC(treatment));
icon = "";
};
class CheckBloodPressure: CheckPulse {
displayName = "Check Blood Pressure";
condition = QUOTE([ARR_4(_player, _target, 'head', 'CheckBloodPressure')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'head', 'CheckBloodPressure')] call DFUNC(treatment));
};
};
class ACE_Torso {
displayName = "$STR_ACE_Interaction_Torso";
distance = 5.0;
condition = "true";
runOnHover = 1;
statement = QUOTE([ARR_3(_target, true, 1)] call DFUNC(displayPatientInformation));
showDisabled = 1;
priority = 2;
hotkey = "";
enableInside = 1;
icon = PATHTOF(UI\icons\medical_cross.paa);
class Bandage {
displayName = "$STR_ACE_Medical_Bandage_HitBody";
distance = 2.0;
condition = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call DFUNC(treatment));
showDisabled = 1;
priority = 2;
hotkey = "B";
enableInside = 1;
icon = PATHTOF(UI\icons\bandage.paa);
};
class TriageCard {
displayName = "Triage Card";
distance = 2.0;
condition = "true";
statement = QUOTE([ARR_2(_target, true)] call DFUNC(displayTriageCard));
showDisabled = 1;
priority = 2;
hotkey = "";
enableInside = 1;
icon = PATHTOF(UI\icons\triageCard.paa);
};
// Advanced medical
class FieldDressing {
displayName = "Field Dressing";
distance = 5.0;
condition = QUOTE([ARR_4(_player, _target, 'body', 'FieldDressing')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'body', 'FieldDressing')] call DFUNC(treatment));
showDisabled = 0;
priority = 2;
hotkey = "";
enableInside = 1;
icon = PATHTOF(UI\icons\bandage.paa);
};
class PackingBandage: fieldDressing {
displayName = "Packing Bandage";
condition = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(treatment));
icon = PATHTOF(UI\icons\packingBandage.paa);
};
class ElasticBandage: fieldDressing {
displayName = "Elastic Bandage";
condition = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(treatment));
icon = PATHTOF(UI\icons\bandage.paa);
};
class QuikClot: fieldDressing {
displayName = "QuikClot";
condition = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(treatment));
icon = PATHTOF(UI\icons\bandage.paa);
};
};
class ACE_ArmLeft {
displayName = "$STR_ACE_Interaction_ArmLeft";
runOnHover = 1;
statement = QUOTE([ARR_3(_target, true, 2)] call DFUNC(displayPatientInformation));
icon = PATHTOF(UI\icons\medical_cross.paa);
class Bandage {
displayName = "$STR_ACE_Medical_Bandage_HitLeftArm";
distance = 2.0;
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call DFUNC(treatment));
showDisabled = 1;
priority = 2;
hotkey = "B";
enableInside = 1;
icon = PATHTOF(UI\icons\bandage.paa);
};
// Advanced medical
class FieldDressing {
displayName = "Field Dressing";
distance = 5.0;
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'FieldDressing')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'FieldDressing')] call DFUNC(treatment));
showDisabled = 0;
priority = 2;
hotkey = "";
enableInside = 1;
icon = PATHTOF(UI\icons\bandage.paa);
};
class PackingBandage: fieldDressing {
displayName = "Packing Bandage";
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(treatment));
icon = PATHTOF(UI\icons\packingBandage.paa);
};
class ElasticBandage: fieldDressing {
displayName = "Elastic Bandage";
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(treatment));
icon = PATHTOF(UI\icons\bandage.paa);
};
class QuikClot: fieldDressing {
displayName = "QuikClot";
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(treatment));
icon = PATHTOF(UI\icons\bandage.paa);
};
class Tourniquet: fieldDressing {
displayName = "Tourniquet";
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(treatment));
icon = PATHTOF(UI\icons\tourniquet.paa);
};
class Morphine: fieldDressing {
displayName = "$STR_ACE_Medical_Inject_Morphine";
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(treatment));
icon = PATHTOF(UI\icons\autoInjector.paa);
};
class Atropine: Morphine {
displayName = "Atropine";
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(treatment));
icon = PATHTOF(UI\icons\autoInjector.paa);
};
class Epinephrine: Morphine {
displayName = "$STR_ACE_Medical_Inject_Epinephrine";
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(treatment));
icon = PATHTOF(UI\icons\autoInjector.paa);
};
class CheckPulse: fieldDressing {
displayName = "Check Pulse";
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckPulse')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckPulse')] call DFUNC(treatment));
icon = "";
};
class CheckBloodPressure: CheckPulse {
displayName = "Check Blood Pressure";
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckBloodPressure')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'CheckBloodPressure')] call DFUNC(treatment));
};
class RemoveTourniquet: Tourniquet {
displayName = "Remove Tourniquet";
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'RemoveTourniquet')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'RemoveTourniquet')] call DFUNC(treatment));
};
};
class ACE_ArmRight {
displayName = "$STR_ACE_Interaction_ArmRight";
runOnHover = 1;
statement = QUOTE([ARR_3(_target, true, 3)] call DFUNC(displayPatientInformation));
icon = PATHTOF(UI\icons\medical_cross.paa);
class Bandage {
displayName = "$STR_ACE_Medical_Bandage_HitRightArm";
distance = 2.0;
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(treatment));
showDisabled = 1;
priority = 2;
hotkey = "B";
enableInside = 1;
icon = PATHTOF(UI\icons\bandage.paa);
};
// Advanced medical
class FieldDressing {
displayName = "Field Dressing";
distance = 5.0;
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'FieldDressing')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'FieldDressing')] call DFUNC(treatment));
showDisabled = 0;
priority = 2;
hotkey = "";
enableInside = 1;
icon = PATHTOF(UI\icons\bandage.paa);
};
class PackingBandage: fieldDressing {
displayName = "Packing Bandage";
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(treatment));
icon = PATHTOF(UI\icons\packingBandage.paa);
};
class ElasticBandage: fieldDressing {
displayName = "Elastic Bandage";
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'ElasticBandage')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'ElasticBandage')] call DFUNC(treatment));
};
class QuikClot: fieldDressing {
displayName = "QuikClot";
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'QuikClot')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'QuikClot')] call DFUNC(treatment));
};
class Tourniquet: fieldDressing {
displayName = "Tourniquet";
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(treatment));
icon = PATHTOF(UI\icons\tourniquet.paa);
};
class Morphine: fieldDressing {
displayName = "$STR_ACE_Medical_Inject_Morphine";
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(treatment));
icon = PATHTOF(UI\icons\autoInjector.paa);
};
class Atropine: Morphine {
displayName = "Atropine";
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Atropine')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Atropine')] call DFUNC(treatment));
};
class Epinephrine: Morphine {
displayName = "$STR_ACE_Medical_Inject_Epinephrine";
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Epinephrine')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Epinephrine')] call DFUNC(treatment));
};
class CheckPulse: fieldDressing {
displayName = "Check Pulse";
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckPulse')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckPulse')] call DFUNC(treatment));
icon = "";
};
class CheckBloodPressure: CheckPulse {
displayName = "Check Blood Pressure";
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckBloodPressure')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'CheckBloodPressure')] call DFUNC(treatment));
};
class RemoveTourniquet: Tourniquet {
displayName = "Remove Tourniquet";
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'RemoveTourniquet')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'RemoveTourniquet')] call DFUNC(treatment));
};
};
class ACE_LegLeft {
displayName = "$STR_ACE_Interaction_LegLeft";
runOnHover = 1;
statement = QUOTE([ARR_3(_target, true, 4)] call DFUNC(displayPatientInformation));
icon = PATHTOF(UI\icons\medical_cross.paa);
class Bandage {
displayName = "$STR_ACE_Medical_Bandage_HitLeftLeg";
distance = 2.0;
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call DFUNC(treatment));
showDisabled = 1;
priority = 2;
hotkey = "B";
enableInside = 1;
icon = PATHTOF(UI\icons\bandage.paa);
};
// Advanced medical
class FieldDressing {
displayName = "Field Dressing";
distance = 5.0;
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'FieldDressing')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'FieldDressing')] call DFUNC(treatment));
showDisabled = 0;
priority = 2;
hotkey = "";
enableInside = 1;
icon = PATHTOF(UI\icons\bandage.paa);
};
class PackingBandage: fieldDressing {
displayName = "Packing Bandage";
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(treatment));
icon = PATHTOF(UI\icons\packingBandage.paa);
};
class ElasticBandage: fieldDressing {
displayName = "Elastic Bandage";
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'ElasticBandage')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'ElasticBandage')] call DFUNC(treatment));
};
class QuikClot: fieldDressing {
displayName = "QuikClot";
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'QuikClot')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'QuikClot')] call DFUNC(treatment));
};
class Tourniquet: fieldDressing {
displayName = "Tourniquet";
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(treatment));
icon = PATHTOF(UI\icons\tourniquet.paa);
};
class Morphine: fieldDressing {
displayName = "$STR_ACE_Medical_Inject_Morphine";
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(treatment));
};
class Atropine: Morphine {
displayName = "Atropine";
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(treatment));
icon = PATHTOF(UI\icons\autoInjector.paa);
};
class Epinephrine: Morphine {
displayName = "$STR_ACE_Medical_Inject_Epinephrine";
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Epinephrine')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Epinephrine')] call DFUNC(treatment));
};
class RemoveTourniquet: Tourniquet {
displayName = "Remove Tourniquet";
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'RemoveTourniquet')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'RemoveTourniquet')] call DFUNC(treatment));
};
};
class ACE_LegRight {
displayName = "$STR_ACE_Interaction_LegRight";
runOnHover = 1;
statement = QUOTE([ARR_3(_target, true, 5)] call DFUNC(displayPatientInformation));
icon = PATHTOF(UI\icons\medical_cross.paa);
class Bandage {
displayName = "$STR_ACE_Medical_Bandage_HitRightLeg";
distance = 2.0;
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call DFUNC(treatment));
showDisabled = 1;
priority = 2;
hotkey = "B";
enableInside = 1;
icon = PATHTOF(UI\icons\bandage.paa);
};
// Advanced medical
class FieldDressing {
displayName = "Field Dressing";
distance = 5.0;
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'FieldDressing')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'FieldDressing')] call DFUNC(treatment));
showDisabled = 0;
priority = 2;
hotkey = "";
enableInside = 1;
icon = PATHTOF(UI\icons\bandage.paa);
};
class PackingBandage: fieldDressing {
displayName = "Packing Bandage";
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(treatment));
icon = PATHTOF(UI\icons\packingBandage.paa);
};
class ElasticBandage: fieldDressing {
displayName = "Elastic Bandage";
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'ElasticBandage')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'ElasticBandage')] call DFUNC(treatment));
};
class QuikClot: fieldDressing {
displayName = "QuikClot";
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'QuikClot')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'QuikClot')] call DFUNC(treatment));
};
class Tourniquet: fieldDressing {
displayName = "Tourniquet";
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(treatment));
icon = PATHTOF(UI\icons\tourniquet.paa);
};
class Morphine: fieldDressing {
displayName = "$STR_ACE_Medical_Inject_Morphine";
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(treatment));
icon = PATHTOF(UI\icons\autoInjector.paa);
};
class Atropine: Morphine {
displayName = "Atropine";
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Atropine')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Atropine')] call DFUNC(treatment));
};
class Epinephrine: Morphine {
displayName = "$STR_ACE_Medical_Inject_Epinephrine";
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Epinephrine')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Epinephrine')] call DFUNC(treatment));
};
class RemoveTourniquet: Tourniquet {
displayName = "Remove Tourniquet";
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'RemoveTourniquet')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'RemoveTourniquet')] call DFUNC(treatment));
};
};
};
};
class ACE_Actions {
class ACE_Head {
@ -433,6 +894,28 @@ class CfgVehicles {
enableInside = 1;
icon = PATHTOF(UI\icons\bandage.paa);
};
class Carry {
displayName = "$STR_ACE_MEDICAL_CARRY";
distance = 2.0;
condition = QUOTE([ARR_4(_player, _target, 'body', 'Carry')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'body', 'Carry')] call DFUNC(treatment));
showDisabled = 1;
priority = 2;
hotkey = "";
enableInside = 1;
//icon = PATHTOF(UI\icons\bandage.paa);
};
class Drag {
displayName = "$STR_ACE_MEDICAL_DRAG";
distance = 2.0;
condition = QUOTE([ARR_4(_player, _target, 'body', 'Drag')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'body', 'Drag')] call DFUNC(treatment));
showDisabled = 1;
priority = 2;
hotkey = "";
enableInside = 1;
//icon = PATHTOF(UI\icons\bandage.paa);
};
class TriageCard {
displayName = "Triage Card";
@ -589,27 +1072,27 @@ class CfgVehicles {
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV')] call DFUNC(treatment));
};
class PlasmaIV_500: PlasmaIV {
displayName = "Give Blood IV (500ml)";
displayName = "Give Plasma IV (500ml)";
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PlasmaIV_500')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'PlasmaIV_500')] call DFUNC(treatment));
};
class PlasmaIV_250: PlasmaIV {
displayName = "Give Blood IV (250ml)";
displayName = "Give Plasma IV (250ml)";
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PlasmaIV_250')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'PlasmaIV_250')] call DFUNC(treatment));
};
class SalineIV: BloodIV {
displayName = "Give Blood IV (1000ml)";
displayName = "Give Saline IV (1000ml)";
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV')] call DFUNC(treatment));
};
class SalineIV_500: SalineIV {
displayName = "Give Blood IV (500ml)";
displayName = "Give Saline IV (500ml)";
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV_500')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV_500')] call DFUNC(treatment));
};
class SalineIV_250: SalineIV {
displayName = "Give Blood IV (250ml)";
displayName = "Give Saline IV (250ml)";
condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV_250')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'SalineIV_250')] call DFUNC(treatment));
};
@ -714,32 +1197,32 @@ class CfgVehicles {
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV_250')] call DFUNC(treatment));
};
class PlasmaIV: BloodIV {
displayName = "Give Blood IV (1000ml)";
displayName = "Give Plasma IV (1000ml)";
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call DFUNC(treatment));
};
class PlasmaIV_500: PlasmaIV {
displayName = "Give Blood IV (500ml)";
displayName = "Give Plasma IV (500ml)";
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PlasmaIV_500')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'PlasmaIV_500')] call DFUNC(treatment));
};
class PlasmaIV_250: PlasmaIV {
displayName = "Give Blood IV (250ml)";
displayName = "Give Plasma IV (250ml)";
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PlasmaIV_250')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'PlasmaIV_250')] call DFUNC(treatment));
};
class SalineIV: BloodIV {
displayName = "Give Blood IV (1000ml)";
displayName = "Give Saline IV (1000ml)";
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV')] call DFUNC(treatment));
};
class SalineIV_500: SalineIV {
displayName = "Give Blood IV (500ml)";
displayName = "Give Saline IV (500ml)";
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV_500')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV_500')] call DFUNC(treatment));
};
class SalineIV_250: SalineIV {
displayName = "Give Blood IV (250ml)";
displayName = "Give Saline IV (250ml)";
condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV_250')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'SalineIV_250')] call DFUNC(treatment));
};
@ -846,32 +1329,32 @@ class CfgVehicles {
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV_250')] call DFUNC(treatment));
};
class PlasmaIV: BloodIV {
displayName = "Give Blood IV (1000ml)";
displayName = "Give Plasma IV (1000ml)";
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call DFUNC(treatment));
};
class PlasmaIV_500: PlasmaIV {
displayName = "Give Blood IV (500ml)";
displayName = "Give Plasma IV (500ml)";
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PlasmaIV_500')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'PlasmaIV_500')] call DFUNC(treatment));
};
class PlasmaIV_250: PlasmaIV {
displayName = "Give Blood IV (250ml)";
displayName = "Give Plasma IV (250ml)";
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PlasmaIV_250')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'PlasmaIV_250')] call DFUNC(treatment));
};
class SalineIV: BloodIV {
displayName = "Give Blood IV (1000ml)";
displayName = "Give saline IV (1000ml)";
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV')] call DFUNC(treatment));
};
class SalineIV_500: SalineIV {
displayName = "Give Blood IV (500ml)";
displayName = "Give saline IV (500ml)";
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV_500')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV_500')] call DFUNC(treatment));
};
class SalineIV_250: SalineIV {
displayName = "Give Blood IV (250ml)";
displayName = "Give saline IV (250ml)";
condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV_250')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'SalineIV_250')] call DFUNC(treatment));
};
@ -966,32 +1449,32 @@ class CfgVehicles {
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV_250')] call DFUNC(treatment));
};
class PlasmaIV: BloodIV {
displayName = "Give Blood IV (1000ml)";
displayName = "Give Plasma IV (1000ml)";
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call DFUNC(treatment));
};
class PlasmaIV_500: PlasmaIV {
displayName = "Give Blood IV (500ml)";
displayName = "Give Plasma IV (500ml)";
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PlasmaIV_500')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'PlasmaIV_500')] call DFUNC(treatment));
};
class PlasmaIV_250: PlasmaIV {
displayName = "Give Blood IV (250ml)";
displayName = "Give Plasma IV (250ml)";
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PlasmaIV_250')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'PlasmaIV_250')] call DFUNC(treatment));
};
class SalineIV: BloodIV {
displayName = "Give Blood IV (1000ml)";
displayName = "Give Saline IV (1000ml)";
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV')] call DFUNC(treatment));
};
class SalineIV_500: SalineIV {
displayName = "Give Blood IV (500ml)";
displayName = "Give Saline IV (500ml)";
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV_500')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV_500')] call DFUNC(treatment));
};
class SalineIV_250: SalineIV {
displayName = "Give Blood IV (250ml)";
displayName = "Give Saline IV (250ml)";
condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV_250')] call DFUNC(canTreatCached));
statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'SalineIV_250')] call DFUNC(treatment));
};

View File

@ -2,7 +2,6 @@
#include "script_component.hpp"
if (!hasInterface) exitwith{};
GVAR(enabledFor) = 1; // TODO remove this once we implement settings. Just here to get the vitals working.
GVAR(heartBeatSounds_Fast) = ["ACE_heartbeat_fast_1", "ACE_heartbeat_fast_2", "ACE_heartbeat_fast_3"];
@ -218,23 +217,15 @@ if (isNil QGVAR(level)) then {
}, 0, []] call CBA_fnc_addPerFrameHandler;
// broadcast injuries to JIP clients in a MP session
if (isMultiplayer and GVAR(level) >= 2) then {
[QGVAR(onPlayerConnected), "onPlayerConnected", {
if (isNil QGVAR(InjuredCollection)) then {
GVAR(InjuredCollection) = [];
};
if (isMultiplayer) then {
// We are only pulling the wounds for the units in the player group. Anything else will come when the unit interacts with them.
if (hasInterface) then {
{
_unit = _x;
_openWounds = _unit getvariable [QGVAR(openWounds), []];
{
["medical_propagateWound", [_id], [_unit, _x]] call EFUNC(common,targetEvent);
}foreach _openWounds;
}foreach GVAR(InjuredCollection);
}, []] call BIS_fnc_addStackedEventHandler;
[_x, player] call FUNC(requestWoundSync);
}foreach units group player;
};
};
[
{(((_this select 0) getvariable [QGVAR(bloodVolume), 0]) < 65)},
{(((_this select 0) getvariable [QGVAR(pain), 0]) > 0.9)},

View File

@ -11,6 +11,8 @@ PREP(actionPlaceInBodyBag);
PREP(actionRemoveTourniquet);
PREP(actionLoadUnit);
PREP(actionUnloadUnit);
PREP(actionCarryUnit);
PREP(actionDropUnit);
PREP(addHeartRateAdjustment);
PREP(addToInjuredCollection);
PREP(addToLog);
@ -20,12 +22,14 @@ PREP(addUnloadPatientActions);
PREP(canAccessMedicalEquipment);
PREP(canTreat);
PREP(canTreatCached);
PREP(canCarry);
PREP(determineIfFatal);
PREP(getBloodLoss);
PREP(getBloodPressure);
PREP(getBloodVolumeChange);
PREP(getCardiacOutput);
PREP(getTypeOfDamage);
PREP(getHeartRateChange);
PREP(getTriageStatus);
PREP(getUnconsciousCondition);
PREP(handleDamage);
@ -52,6 +56,7 @@ PREP(itemCheck);
PREP(onMedicationUsage);
PREP(onWoundUpdateRequest);
PREP(onPropagateWound);
PREP(onCarryObjectDropped);
PREP(parseConfigForInjuries);
PREP(playInjuredSound);
PREP(reactionToDamage);
@ -89,8 +94,12 @@ PREP(moduleAssignMedicRoles);
PREP(moduleAssignMedicalVehicle);
PREP(moduleAssignMedicalFacility);
PREP(moduleTreatmentConfiguration);
PREP(copyDeadBody);
PREP(requestWoundSync);
GVAR(injuredUnitCollection) = [];
GVAR(IVBags) = [];
call FUNC(parseConfigForInjuries);
ADDON = true;

View File

@ -5,7 +5,7 @@ class CfgPatches {
units[] = {"ACE_medicalSupplyCrate", "ACE_fieldDressingItem", "ACE_packingBandageItem", "ACE_elasticBandageItem", "ACE_tourniquetItem", "ACE_morphineItem", "ACE_atropineItem", "ACE_epinephrineItem", "ACE_plasmaIVItem", "ACE_bloodIVItem", "ACE_salineIVItem", "ACE_quikclotItem", "ACE_personalAidKitItem", "ACE_surgicalKitItem", "ACE_bodyBagItem"};
weapons[] = {"ACE_fieldDressing", "ACE_packingBandage", "ACE_elasticBandage", "ACE_tourniquet", "ACE_morphine", "ACE_atropine", "ACE_epinephrine", "ACE_plasmaIV", "ACE_plasmaIV_500", "ACE_plasmaIV_250", "ACE_bloodIV", "ACE_bloodIV_500", "ACE_bloodIV_250", "ACE_salineIV", "ACE_salineIV_500", "ACE_salineIV_250", "ACE_quikclot", "ACE_personalAidKit", "ACE_surgicalKit", "ACE_bodyBag"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {ace_common, ace_interaction};
requiredAddons[] = {ace_common, ace_interaction, ace_modules};
author[] = {"Glowbal", "KoffienFlummi"};
authorUrl = "";
VERSION_CONFIG;

View File

@ -0,0 +1,87 @@
/*
* Author: Glowbal
* makes the calling unit start carrying the specified unit
*
* Arguments:
* 0: The caller <OBJECT>
* 1: The target <OBJECT>
* 2: Carry object. True is carry, false is dragging <BOOL>
*
* Return Value:
* NONE
*
* Public: No
*/
#include "script_component.hpp"
private ["_caller", "_target", "_positionUnit", "_carry"];
_caller = _this select 0;
_target = _this select 1;
_carry = _this select 2;
if (!(_target isKindOf "CaManBase") || !(_caller isKindOf "CaManBase")) exitwith{ };
if (vehicle _caller != _caller || vehicle _target != _target) exitwith {};
if (!([_caller] call EFUNC(common,canInteract)) || {_caller == _target} || {(([_target] call EFUNC(common,isAwake)))}) exitwith {};
if (!alive _target) exitwith {
if (GVAR(allowDeadBodyMovement)) then {
[{
_this call FUNC(actionCarryUnit);
}, [_caller, ([_target,_caller] call FUNC(copyDeadBody)), _carry], 0.25, 0.25] call EFUNC(common,waitAndExecute);
};
};
if !([_caller,_target] call EFUNC(common,carryObj)) exitwith {};
if (primaryWeapon _caller == "") then {
_caller addWeapon "ACE_FakePrimaryWeapon";
};
if (currentWeapon _caller != (primaryWeapon _caller)) then {
_caller selectWeapon (primaryWeapon _caller);
};
if (_carry) then {
_target attachTo [_caller, [0.1, -0.1, -1.25], "LeftShoulder"];
[_target, "AinjPfalMstpSnonWnonDf_carried_dead", 2, true] call EFUNC(common,doAnimation);
[_caller, "acinpercmstpsraswrfldnon", 1] call EFUNC(common,doAnimation);
} else {
_target attachTo [_caller, [0.125, 1.007, 0]];
_target setDir (getDir _target + 180) % 360;
_target setPos ((getPos _target) vectorAdd ((vectorDir _caller) vectorMultiply 1.5));
[_caller, "AcinPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation);
[_target, "AinjPpneMstpSnonWrflDb", 2, true] call EFUNC(common,doAnimation);
};
[
2,
[_caller, _target, _carry],
{
private ["_caller","_target", "_carry", "_args"];
_args = _this select 0;
_caller = _args select 0;
_target = _args select 1;
_carry = _args select 2;
_target setvariable [QGVAR(beingCarried), _caller, true];
_caller setvariable [QGVAR(carrying), _target, true];
_caller setvariable [QGVAR(isCarrying), if (_carry) then {1} else {0}, true];
// Removing any old drop scroll wheel actions
// TODO Do we still want scroll wheel actions?
if (!isnil QGVAR(DROP_ADDACTION)) then {
_caller removeAction GVAR(DROP_ADDACTION);
GVAR(DROP_ADDACTION) = nil;
};
// Adding the drop scroll wheel action.
GVAR(DROP_ADDACTION) = _caller addAction [format["Drop %1",[_target] call EFUNC(common,getName)], {[_this select 1, _this select 2] call FUNC(actionDropUnit);}];
[_target, true] call EFUNC(common,disableAI);
},
{
[(_this select 0), objNull,[0, 0, 0]] call EFUNC(common,carryObj);
// TODO reset animations..
},
if (_carry) then {localize "STR_ACE_MEDICAL_ACTION_CARRY"} else {localize "STR_ACE_MEDICAL_ACTION_DRAG"},
{true}
] call EFUNC(common,progressBar);

View File

@ -11,7 +11,9 @@
*
* Public: No
*/
#include "script_component.hpp"
private ["_caller","_target"];
_caller = _this select 0;
_target = _this select 1;

View File

@ -11,7 +11,9 @@
*
* Public: No
*/
#include "script_component.hpp"
private ["_caller","_target","_title","_content"];
_caller = _this select 0;
_target = _this select 1;

View File

@ -0,0 +1,23 @@
/*
* Author: Glowbal
* Drop a unit if the caller nit is currently dragging or carrying a unit
*
* Arguments:
* 0: The caller <OBJECT>
*
* Return Value:
* NONE
*
* Public: No
*/
#include "script_component.hpp"
private "_caller";
_caller = _this select 0;
if (!isnil QGVAR(DROP_ADDACTION)) then {
[_caller,objNull] call EFUNC(common,carryObj);
_caller removeAction GVAR(DROP_ADDACTION);
GVAR(DROP_ADDACTION) = nil;
};

View File

@ -12,10 +12,8 @@
* Public: No
*/
#include "script_component.hpp"
private ["_caller", "_target","_vehicle", "_loaded"];
_caller = _this select 0;
_target = _this select 1;

View File

@ -27,7 +27,7 @@ if (([_target] call cse_fnc_isAwake)) exitwith {};
if ([_caller, _target] call EFUNC(common,unloadPerson)) then {
if (_drag) then {
if ((vehicle _caller) == _caller) then {
[[_caller, _target], QUOTE(DFUNC(actionDragUnit)), _caller, false] call BIS_fnc_MP;
[[_caller, _target, true], QUOTE(DFUNC(actionDragUnit)), _caller, false] call EFUNC(common,execRemoteFnc); // TODO replace by event
};
};
};

View File

@ -18,22 +18,21 @@ _unit = _this select 0;
_force = if (count _this > 1) then {_this select 1} else {false};
if ([_unit] call FUNC(hasMedicalEnabled) || _force) then {
if ((_unit getvariable[QGVAR(addedToUnitLoop),false] || !alive _unit) && !_force) exitwith{};
if !(local _unit) exitwith {
[[_unit, _force], QUOTE(DFUNC(addToInjuredCollection)), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
};
if ((_unit getvariable[QGVAR(addedToUnitLoop),false] || !alive _unit) && !_force) exitwith{};
_unit setvariable [QGVAR(addedToUnitLoop), true, true];
if (isNil QGVAR(InjuredCollection)) then {
GVAR(InjuredCollection) = [];
};
GVAR(InjuredCollection) pushback _unit;
diag_log format["[MEDICAL] Added a unit to loop: %1", _unit];
[{
private "_unit";
_unit = (_this select 0) select 0;
if (!alive _unit || !local _unit) then {
[_this select 1] call CBA_fnc_removePerFrameHandler;
diag_log format["[MEDICAL] Removed a unit from loop: %1", _unit];
if (!local _unit) then {
if (GVAR(level) >= 2) then {
_unit setvariable [QGVAR(heartRate), _unit getvariable [QGVAR(heartRate), 0], true];
@ -41,7 +40,6 @@ if ([_unit] call FUNC(hasMedicalEnabled) || _force) then {
};
_unit setvariable [QGVAR(bloodVolume), _unit getvariable [QGVAR(bloodVolume), 0], true];
};
GVAR(InjuredCollection) = GVAR(InjuredCollection) - [_unit];
} else {
[_unit] call FUNC(handleUnitVitals);

View File

@ -39,6 +39,4 @@ _actions = [];
};
} forEach crew _vehicle;
systemChat str(count _actions);
_actions

View File

@ -0,0 +1,29 @@
/*
* Author: Glowbal
* Check if caller can carry or drag the target
*
* Arguments:
* 0: The caller <OBJECT>
* 1: The target <OBJECT>
*
* Return Value:
* NONE
*
* Public: No
*/
#include "script_component.hpp"
private ["_caller", "_target", "_positionUnit", "_carry"];
_caller = _this select 0;
_target = _this select 1;
if (!(_target isKindOf "CaManBase") || !(_caller isKindOf "CaManBase")) exitwith{false};
if (vehicle _caller != _caller || vehicle _target != _target) exitwith {false};
if (!([_caller] call EFUNC(common,canInteract)) || {_caller == _target} || {(([_target] call EFUNC(common,isAwake)))}) exitwith {false};
if (!alive _target) exitwith {GVAR(allowDeadBodyMovement)};
((isNull ([_caller] call FUNC(getCarriedObj))) && {isNull ([_target] call FUNC(getCarriedObj))} && {isNull ([_caller] call FUNC(getCarriedBy))} && {isNull ([_target] call FUNC(getCarriedBy))})

View File

@ -40,6 +40,7 @@ _locations = getArray (_config >> "treatmentLocations");
_return = true;
if (getText (_config >> "condition") != "") then {
_condition = getText (_config >> "condition");
if (isnil _condition) then {
_condition = compile _condition;
} else {

View File

@ -0,0 +1,83 @@
/*
* Author: Glowbal
* Makes a copy of a dead body. For handling dead bodies for actions such as load and carry.
*
* Arguments:
* 0: The oldbody <OBJECT>
* 1: The caller <OBJECT>
*
* Return Value:
* OBJECT Returns the copy of the unit. If no copy could be made, returns the oldBody
*
* Public: No
*/
#include "script_component.hpp"
private ["_oldBody","_newUnit","_class","_group","_position","_side","_allVariables"];
_oldBody = _this select 0;
_caller = _this select 1;
if (alive _oldBody) exitwith {_oldBody}; // we only want to do this for dead bodies
_name = _oldBody getvariable ["ACE_name", "unknown"];
_class = typeof _oldBody;
_side = side _caller;
_group = createGroup _side;
_position = getPos _oldBody;
_newUnit = _group createUnit [typeof _oldBody, _position, [], 0, "NONE"];
_newUnit setVariable ["ACE_name", _name, true];
_newUnit disableAI "TARGET";
_newUnit disableAI "AUTOTARGET";
_newUnit disableAI "MOVE";
_newUnit disableAI "ANIM";
_newUnit disableAI "FSM";
removeallweapons _newUnit;
removeallassigneditems _newUnit;
removeUniform _newUnit;
removeHeadgear _newUnit;
removeBackpack _newUnit;
removeVest _newUnit;
_newUnit addHeadgear (headgear _oldBody);
_newUnit addBackpack (backpack _oldBody);
clearItemCargoGlobal (backpackContainer _newUnit);
clearMagazineCargoGlobal (backpackContainer _newUnit);
clearWeaponCargoGlobal (backpackContainer _newUnit);
_newUnit addVest (vest _oldBody);
clearItemCargoGlobal (backpackContainer _newUnit);
clearMagazineCargoGlobal (backpackContainer _newUnit);
clearWeaponCargoGlobal (backpackContainer _newUnit);
_newUnit addUniform (uniform _oldBody);
clearItemCargoGlobal (backpackContainer _newUnit);
clearMagazineCargoGlobal (backpackContainer _newUnit);
clearWeaponCargoGlobal (backpackContainer _newUnit);
{_newUnit addMagazine _x} count (magazines _oldBody);
{_newUnit addWeapon _x} count (weapons _oldBody);
{_newUnit addItem _x} count (items _oldBody);
_newUnit selectWeapon (primaryWeapon _newUnit);
// We are attaching the old unit and hiding it, so we can keep the original unit until later.
_oldBody attachTo [_newUnit, [0,0,0]];
if (isMultiplayer) then {
hideObjectGlobal _oldBody;
} else {
hideObject _oldBody;
};
_newUnit setvariable [QGVAR(copyOfUnit), _oldBody, true];
_oldBody setvariable [QGVAR(hasCopy), _newUnit, true];
_newUnit setvariable ["ACE_isDead", true, true];
_newUnit setvariable ["ACE_isUnconscious", true, true];
_newUnit setvariable [QGVAR(disableInteraction), true, true];
_oldBody setvariable [QGVAR(disableInteraction), true, true];
_newUnit setDamage 0.89;
_newUnit;

View File

@ -21,6 +21,8 @@ GVAR(currentSelectedSelectionN) = if (count _this > 2) then {_this select 2} els
GVAR(displayPatientInformationTarget) = if (_show) then {_target} else {ObjNull};
[_target, ACE_player] call FUNC(requestWoundSync);
if (_show) then {
("ACE_MedicalRscDisplayInformation" call BIS_fnc_rscLayer) cutRsc [QGVAR(DisplayInformation),"PLAIN"];

View File

@ -37,21 +37,13 @@ _bloodVolume = _unit getvariable [QGVAR(bloodVolume), 100];
_bloodVolumeChange = -(_unit call FUNC(getBloodLoss));
if (_bloodVolume < 100.0) then {
if ((_unit getvariable [QGVAR(salineIVVolume), 0]) > 0) then {
_bloodVolumeChange = _bloodVolumeChange + BLOOD_CHANGE_PER_SECOND;
_ivVolume = (_unit getvariable [QGVAR(salineIVVolume), 0]) + IV_CHANGE_PER_SECOND;
_unit setvariable [QGVAR(salineIVVolume),_ivVolume];
};
if ((_unit getvariable [QGVAR(plasmaIVVolume), 0]) > 0) then {
_bloodVolumeChange = _bloodVolumeChange + BLOOD_CHANGE_PER_SECOND;
_ivVolume = (_unit getvariable [QGVAR(plasmaIVVolume), 0]) + IV_CHANGE_PER_SECOND;
_unit setvariable [QGVAR(plasmaIVVolume),_ivVolume];
};
if ((_unit getvariable [QGVAR(bloodIVVolume), 0]) > 0) then {
_bloodVolumeChange = _bloodVolumeChange + BLOOD_CHANGE_PER_SECOND;
_ivVolume = (_unit getvariable [QGVAR(bloodIVVolume), 0]) + IV_CHANGE_PER_SECOND;
_unit setvariable [QGVAR(bloodIVVolume),_ivVolume];
};
{
if ((_unit getvariable [_x, 0]) > 0) then {
_bloodVolumeChange = _bloodVolumeChange + BLOOD_CHANGE_PER_SECOND;
_ivVolume = (_unit getvariable [_x, 0]) + IV_CHANGE_PER_SECOND;
_unit setvariable [_x,_ivVolume];
};
}foreach GVAR(IVBags);
};
_bloodVolumeChange;

View File

@ -22,4 +22,9 @@ if (GVAR(level) >= 2) then {
_unit setvariable [QGVAR(heartRate), 0];
_unit setvariable [QGVAR(bloodPressure), [0, 0]];
_unit setvariable [QGVAR(airwayStatus), 0];
_openWounds = _unit getvariable [QGVAR(openWounds), []];
{
["medical_propagateWound", [_unit, _x]] call EFUNC(common,globalEvent);
}foreach _openWounds;
};

View File

@ -105,7 +105,7 @@ if (GVAR(level) >= 2) then {
};
// Set the vitals
_heartRate = (_unit getvariable [QGVAR(heartRate), 0]) + ([_unit] call FUNC(getHeartRateChange)) * _interval;
_heartRate = (_unit getvariable [QGVAR(heartRate), 0]) + (([_unit] call FUNC(getHeartRateChange)) * _interval);
_unit setvariable [QGVAR(heartRate), _heartRate, _syncValues];
_bloodPressure = [_unit] call FUNC(getBloodPressure);

View File

@ -0,0 +1,85 @@
/*
* Author: Glowbal
* Called on event CarryObjectDropped
*
* Arguments:
* 0: The caller <OBJECT>
*
* Return Value:
* NONE
*
* Public: No
*/
#include "script_component.hpp"
private ["_unit","_params"];
_caller = _this select 0;
_target = _caller getvariable [QGVAR(carrying), objNull];
_carrying = _caller getvariable [QGVAR(isCarrying), -1];
if (_carrying >= 0) then {
if !(isNull (_target getvariable [QGVAR(copyOfUnit), objNull])) then {
_copy = _target;
_target = _copy getvariable [QGVAR(copyOfUnit), objNull];
if (isMultiplayer) then {
_target hideObjectGlobal false;
} else {
_target hideObject false;
};
detach _copy;
deleteVehicle _copy;
_target setvariable [QGVAR(disableInteraction), nil, true];
_target setvariable [QGVAR(hasCopy), nil, true];
};
_caller setvariable [QGVAR(isCarrying), -1, true];
if (primaryWeapon _caller == "ACE_FakePrimaryWeapon") then {
_caller removeWeapon "ACE_FakePrimaryWeapon";
};
[_target, false] call EFUNC(common,disableAI);
_caller setvariable[QGVAR(onStartMovingUnitParams), nil];
// handle the drag & carry administration
if (_carrying == 0) then {
_target setvariable [QGVAR(beingDragged), nil, true];
_caller setvariable [QGVAR(dragging), nil, true];
} else {
_target setvariable [QGVAR(beingCarried), nil, true];
_caller setvariable [QGVAR(carrying), nil, true];
};
// handle the drag & carry animiations
if ([_caller] call EFUNC(common,isAwake) && (vehicle _caller == _caller)) then {
[_caller,"amovpercmstpsraswrfldnon_amovpknlmstpslowwrfldnon", 1] call EFUNC(common,doAnimation);
};
if (vehicle _target == _target) then {
if (_carrying == 0) then {
[_target,"AinjPpneMstpSnonWrflDb_release", 2, true] call EFUNC(common,doAnimation);
} else {
[_target,"AinjPfalMstpSnonWrflDnon_carried_Down", 2, true] call EFUNC(common,doAnimation);
};
} else {
if ([_target] call EFUNC(common,isAwake)) then {
[_target,"", 2] call EFUNC(common,doAnimation); // TODO play animation for the current seat instead
} else {
// this might not work properly
[_target,([_target] call EFUNC(common,getDeathAnim)), 1] call EFUNC(common,doAnimation);
};
};
// Ensure that the unit does not get dropped through the floor of a building
if (!surfaceIsWater getPos _caller) then {
[{
EXPLODE_3_PVT(_this,_caller,_target,_killOnDrop);
if (vehicle _target == _target && (vehicle _caller == _caller)) then {
// This will set the target body/unit on the correct position, so it doesn't fall through floors.
_positionUnit = getPosATL _target;
_positionUnit set [2, (getPosATL _caller) select 2];
_target setPosATL _positionUnit;
};
}, [_caller,_target], 0.5, 0.5] call EFUNC(common,waitAndExecute);
};
};

View File

@ -19,9 +19,9 @@ _unit = _this select 0;
_lastId = _this select 1;
_originOfrequest = _this select 2;
_openWounds = _unit getvariable [QGVAR(openWounds), []];
if (count _openWounds > _lastId) then {
{
["medical_propagateWound", [_originOfrequest], [_unit, _x]] call EFUNC(common,targetEvent);
}foreach _openWounds;
if (local _unit) then {
_openWounds = _unit getvariable [QGVAR(openWounds), []];
{
["medical_propagateWound", [_originOfrequest], [_unit, _x]] call EFUNC(common,targetEvent);
}foreach _openWounds;
};

View File

@ -0,0 +1,24 @@
/*
* Author: Glowbal
* Ask for the latest wound information.
*
* Arguments:
* 0: The target <OBJECT>
* 1: object belonging to the caller <OBJECT>
*
* ReturnValue:
* <NIL>
*
* Public: Yes
*/
#include "script_component.hpp"
private [ "_target", "_caller", "_openWounds","_lastId"];
_target = _this select 0;
_caller = _this select 1;
if (local _target || GVAR(level) < 2) exitwith {}; // if the target is local, we already got the most update to date information
if (_target getvariable [QGVAR(isWoundSynced), false]) exitwith {};
_target setvariable [QGVAR(isWoundSynced), true];
["medical_woundUpdateRequest", [_target], [_target, _lastId, _caller]] call EFUNC(common,targetEvent);

View File

@ -73,11 +73,7 @@ if (alive _target) then {
// Reduce the pain level
_pain = _target getvariable [QGVAR(pain), 0];
_pain = _pain * _painReduce;
if (_pain <= 0) then {
_pain = 0;
};
_target setvariable [QGVAR(pain), _pain];
_target setvariable [QGVAR(pain), (_pain - _painReduce) max 0];
_resistance = _unit getvariable [QGVAR(peripheralResistance), 100];
_resistance = _resistance + _viscosityChange;

View File

@ -21,8 +21,8 @@ _ivItem = _this select 1;
// Find the proper attributes for the used IV
_config = (configFile >> "ACE_Medical_Advanced" >> "Treatment" >> "IV");
_volumeAdded = getNumber (_medicationConfig >> "volume");
_typeOf = getText (_medicationConfig >> "type");
_volumeAdded = getNumber (_config >> "volume");
_typeOf = getText (_config >> "type");
if (isClass (_config >> _className)) then {
_config = (_config >> _className);
@ -33,6 +33,11 @@ if (isClass (_config >> _className)) then {
_varName = format["ACE_Medical_IVVolume_%1",_typeOf];
_target setvariable [_varName, (_target getvariable [_varName, 0]) + _volumeAdded];
if !(_varName in GVAR(IVBags)) then {
GVAR(IVBags) pushback _varName;
publicVariable GVAR(IVBags);
};
// TODO localization
//[_target,"treatment",format["%1 has given %4 a %2(%3ml)",[_caller] call EFUNC(common,getName),_attributes select 2,_attributes select 1,_target]] call FUNC(addActivityToLog);
//[_target,_removeItem] call FUNC(addToTriageList);

View File

@ -720,10 +720,69 @@
<Russian>%1 проводит вам интубацию</Russian>
<Spanish>%1 te está intubando</Spanish>
</Key>
<Key ID="STR_ACE_MEDICAL_DRAG">
<English>Drag</English>
<German>Ziehen</German>
<Spanish>Arrastrar</Spanish>
<Polish>Ciągnij</Polish>
<Czech>Táhnout</Czech>
<Russian>Тащить</Russian>
<French>Tracter</French>
<Hungarian>Húzás</Hungarian>
<Portuguese>Arrastar</Portuguese>
<Italian>Trascina</Italian>
</Key>
<Key ID="STR_ACE_MEDICAL_CARRY">
<English>Carry</English>
<German>Tragen</German>
<Spanish>Cargar</Spanish>
<Polish>Nieś</Polish>
<Czech>Nést</Czech>
<Russian>Нести</Russian>
<French>Porter</French>
<Hungarian>Cipelés</Hungarian>
<Portuguese>Carregar</Portuguese>
<Italian>Trasporta</Italian>
</Key>
<Key ID="STR_ACE_MEDICAL_RELEASE">
<English>Release</English>
<German>Loslassen</German>
<Spanish>Soltar</Spanish>
<Polish>Połóż</Polish>
<Czech>Položit</Czech>
<Russian>Отпустить</Russian>
<French>Déposer</French>
<Hungarian>Elenged</Hungarian>
<Portuguese>Largar</Portuguese>
<Italian>Lascia</Italian>
</Key>
<Key ID="STR_ACE_MEDICAL_LOAD">
<English>Load Patient Into</English>
<German>Patient Einladen</German>
<Spanish>Cargar el paciente en</Spanish>
<Polish>Załaduj pacjenta</Polish>
<Czech>Naložit pacianta do</Czech>
<Russian>Погрузить пациента в</Russian>
<French>Embarquer le Patient</French>
<Hungarian>Sebesült berakása</Hungarian>
<Portuguese>Carregar Paciente Em</Portuguese>
<Italian>Carica paziente nel</Italian>
</Key>
<Key ID="STR_ACE_MEDICAL_UNLOAD">
<English>Unload Patient</English>
<German>Patient Ausladen</German>
<Spanish>Descargar el paciente</Spanish>
<Polish>Wyładuj pacjenta</Polish>
<Czech>Vyložit pacienta</Czech>
<Russian>Выгрузить пациента</Russian>
<French>Débarquer le Patient</French>
<Hungarian>Sebesült kihúzása</Hungarian>
<Portuguese>Descarregar Paciente</Portuguese>
<Italian>Scarica il paziente</Italian>
</Key>
<Key ID="STR_ACE_Medical_UnloadPatient">
<English>Unload patient &gt;&gt;</English>
</Key>
</Container>
</Package>
</Project>

View File

@ -0,0 +1 @@
z\ace\addons\modules

View File

@ -0,0 +1,13 @@
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class _ACE_modules { // using a _ so it is the first postInit to be executed
init = QUOTE(call COMPILE_FILE(XEH_postInit));
};
};

View File

@ -0,0 +1,44 @@
#include "script_component.hpp"
// TODO This is a basic and limited implementation that mimics some of the functionality from the A3 module framework, but not all of it.
// We have to execute this in the postInit XEH because on object init, the parameters of the modules are not yet available. They are if we execute it at the start of postInit execution.
{
[_x] call {
private ["_logic", "_logicType", "_config", "_isGlobal", "_isDisposable", "_isPersistent","_function"];
_logic = _this select 0;
_logicType = typeof _logic;
_logic hideobject true;
if (_logic getvariable [QGVAR(initalized), false]) exitwith {};
_config = (configFile >> "CfgVehicles" >> _logicType);
if !(isClass _config) exitwith {};
// isGlobal = 1;
_isGlobal = getNumber (_config >> "isGlobal") > 0;
_isDisposable = getNumber (_config >> "isDisposable") > 0;
_isPersistent = getNumber (_config >> "isPersistent") > 0 || getnumber (_config >> "isGlobal") > 1;
_function = getText (_config >> "function");
if (isnil _function) then {
_function = compile _function;
} else {
_function = missionNamespace getvariable _function;
};
if (_isGlobal) then {
[_logic, [], true] call _function;
} else {
if (isServer) then {
[_logic, [], true] call _function;
};
};
if !(_isPersistent) then {
_logic setvariable [QGVAR(initalized), true];
};
if (_isDisposable) then {
deleteVehicle _logic;
};
};
}foreach GVAR(moduleInitCollection);

View File

@ -0,0 +1,8 @@
#include "script_component.hpp"
ADDON = false;
PREP(moduleInit);
GVAR(moduleInitCollection) = [];
ADDON = true;

28
addons/modules/config.cpp Normal file
View File

@ -0,0 +1,28 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
author[] = {"Glowbal"};
authorUrl = "";
VERSION_CONFIG;
};
};
class CfgVehicles {
class Logic;
class Module_F: Logic {
class ArgumentsBaseUnits {
};
};
class ACE_Module: Module_F {
class EventHandlers {
init = QUOTE(_this call DFUNC(moduleInit));
};
};
};
#include "CfgEventHandlers.hpp"

View File

@ -0,0 +1,19 @@
/*
* Author: Glowbal
* IV Treatment local callback
*
* Arguments:
* 0: The logic object <OBJECT>
*
*
* Return Value:
* nil
*
* Public: No
*/
#include "script_component.hpp"
if ((_this select 0) isKindOf "Module_F") then {
GVAR(moduleInitCollection) pushback (_this select 0);
};

View File

@ -0,0 +1 @@
#include "\z\ace\addons\modules\script_component.hpp"

View File

@ -0,0 +1,12 @@
#define COMPONENT modules
#include "\z\ace\addons\main\script_mod.hpp"
#ifdef DEBUG_ENABLED_MODULES
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_MODULES
#define DEBUG_SETTINGS DEBUG_SETTINGS_MODULES
#endif
#include "\z\ace\addons\main\script_macros.hpp"