Merge branch 'master' into disarmingTest

This commit is contained in:
PabstMirror 2015-03-29 14:41:15 -05:00
commit e65d74f43d
547 changed files with 9326 additions and 5364 deletions

View File

@ -1,19 +1,19 @@
<p align="center">
<img src="https://github.com/KoffeinFlummi/ACE3/blob/master/extras/assets/logo/black/ACE3-Logo.jpg" height="80" />
<img src="https://github.com/KoffeinFlummi/ACE3/blob/master/extras/assets/logo/black/ACE3-Logo.jpg" height="80" />
</p>
<p align="center">
<a href="https://github.com/KoffeinFlummi/ACE3/releases">
<img src="http://img.shields.io/badge/release-3.0-green.svg?style=flat" alt="ACE version">
</a>
<a href="#">
<img src="http://img.shields.io/badge/download-22_MB-blue.svg?style=flat" alt="ACE download">
</a>
<a href="https://github.com/KoffeinFlummi/ACE3/issues">
<img src="http://img.shields.io/github/issues/KoffeinFlummi/ACE3.svg?style=flat" alt="ACE issues">
</a>
<a href="https://github.com/KoffeinFlummi/ACE3/blob/master/LICENSE">
<img src="http://img.shields.io/badge/license-GPLv2-red.svg?style=flat" alt="ACE license">
</a>
<a href="https://github.com/KoffeinFlummi/ACE3/releases">
<img src="http://img.shields.io/badge/release-3.0-green.svg?style=flat" alt="ACE version">
</a>
<a href="#">
<img src="http://img.shields.io/badge/download-22_MB-blue.svg?style=flat" alt="ACE download">
</a>
<a href="https://github.com/KoffeinFlummi/ACE3/issues">
<img src="http://img.shields.io/github/issues/KoffeinFlummi/ACE3.svg?style=flat" alt="ACE issues">
</a>
<a href="https://github.com/KoffeinFlummi/ACE3/blob/master/LICENSE">
<img src="http://img.shields.io/badge/license-GPLv2-red.svg?style=flat" alt="ACE license">
</a>
</p>
<p align="center"><sup><strong>Requires the latest version of <a href="http://www.armaholic.com/page.php?id=18767">CBA A3</a> | <a href="#">BIF thread</a></strong></sup></p>

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

@ -6,7 +6,7 @@
displayName = "$STR_ACE_Attach_AttachDetach"; \
condition = QUOTE(([ARR_3(_player, _target, '')] call FUNC(canAttach))); \
statement = QUOTE( [ARR_2(_player, _target)] call FUNC(openAttachUI);); \
exceptions[] = {"ACE_Drag_isNotDragging"}; \
exceptions[] = {"isNotDragging"}; \
showDisabled = 0; \
priority = 0; \
icon = PATHTOF(UI\attach_ca.paa); \
@ -16,7 +16,7 @@
displayName = "$STR_ACE_Attach_Detach"; \
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(canDetach))); \
statement = QUOTE( [ARR_2(_player, _target)] call FUNC(detach) ); \
exceptions[] = {"ACE_Drag_isNotDragging"}; \
exceptions[] = {"isNotDragging"}; \
showDisabled = 0; \
priority = 0; \
icon = PATHTOF(UI\detach_ca.paa); \
@ -57,7 +57,7 @@ class CfgVehicles {
displayName = "$STR_ACE_Attach_AttachDetach";
condition = QUOTE(([ARR_3(_player, _player, '')] call FUNC(canAttach)));
statement = QUOTE( [ARR_2(_player, _player)] call FUNC(openAttachUI); );
exceptions[] = {"ACE_Drag_isNotDragging"};
exceptions[] = {"isNotDragging"};
showDisabled = 0;
priority = 5;
icon = PATHTOF(UI\attach_ca.paa);
@ -67,7 +67,7 @@ class CfgVehicles {
displayName = "$STR_ACE_Attach_Detach";
condition = QUOTE(([ARR_2(_player, _player)] call FUNC(canDetach)));
statement = QUOTE( [ARR_2(_player, _player)] call FUNC(detach) );
exceptions[] = {"ACE_Drag_isNotDragging"};
exceptions[] = {"isNotDragging"};
showDisabled = 0;
priority = 5;
icon = PATHTOF(UI\detach_ca.paa);

View File

@ -6,7 +6,7 @@ class CfgPatches {
weapons[] = {"ACE_IR_Strobe_Item"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interaction"};
author[] = {"KoffeinFlummi","eRazeri","CAA-Picard"};
author[] = {"KoffeinFlummi","eRazeri","esteldunedain"};
authorUrl = "https://github.com/KoffeinFlummi/";
VERSION_CONFIG;
};

View File

@ -1,5 +1,5 @@
/*
* Author: eRazeri and CAA-Picard
* Author: eRazeri and esteldunedain
* Attach an item to the unit
*
* Arguments:

View File

@ -1,5 +1,5 @@
/*
* Author: eRazeri and CAA-Picard
* Author: eRazeri and esteldunedain
* Detach an item from a unit
*
* Arguments:

View File

@ -1,41 +0,0 @@
class CfgAmmo {
/* 6.5x39mm Grendel */
class BulletBase;
class B_65x39_Caseless: BulletBase {
typicalSpeed = 724;
airFriction = -0.000915;
};
/* 5.56x45mm NATO */
class B_556x45_Ball: BulletBase {
typicalSpeed = 911;
airFriction = -0.001335;
};
/* 7.62x51mm NATO */
class B_762x51_Ball: BulletBase {
typicalSpeed = 853;
//airfriction =
};
/* Other */
class B_9x21_Ball;
class B_9x19_Ball: B_9x21_Ball {
typicalSpeed = 381;
airfriction = -0.00213;
};
class B_45ACP_Ball: BulletBase {
typicalSpeed = 250;
airfriction = -0.0009;
};
};

View File

@ -1,65 +0,0 @@
class CfgMagazines {
/* 6.5x39mm Grendel - MX */
class CA_Magazine;
class 30Rnd_65x39_caseless_mag: CA_Magazine {
initSpeed = 724;
};
class 100Rnd_65x39_caseless_mag: CA_Magazine {
initSpeed = 724;
};
/* 6.5x39mm Grendel - Katiba */
class 30Rnd_65x39_caseless_green: 30Rnd_65x39_caseless_mag {
initSpeed = 724;
};
class 200Rnd_65x39_cased_Box: 100Rnd_65x39_caseless_mag {
initSpeed = 691;
};
/* 5.56x45mm NATO */
class 30Rnd_556x45_Stanag: CA_Magazine {
initSpeed = 911;
};
/* 7.62x51mm NATO */
class 20Rnd_762x51_Mag: CA_Magazine {
initSpeed = 792; // 18" M14 EBR barrel
};
class 150Rnd_762x51_Box: CA_Magazine {
ammo = "B_762x51_Ball";
initSpeed = 853; // Typical MV for M240
};
/* Other */
class 30Rnd_9x21_Mag: CA_Magazine {
ammo = "B_9x19_Ball";
initSpeed = 370;
};
class 16Rnd_9x21_Mag: 30Rnd_9x21_Mag {
ammo = "B_9x19_Ball";
initSpeed = 381;
};
class 30Rnd_45ACP_Mag_SMG_01: 30Rnd_9x21_Mag {
initSpeed = 259;
};
class 9Rnd_45ACP_Mag: 30Rnd_45ACP_Mag_SMG_01 {
initSpeed = 250;
};
};

View File

@ -12,7 +12,5 @@ class CfgPatches {
};
};
#include "CfgAmmo.hpp"
#include "CfgMagazines.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"

View File

@ -41,3 +41,11 @@ class Extended_InitPost_EventHandlers {
};
};
};
//make sure captiveNum is reset on respawn
class Extended_Respawn_EventHandlers {
class CAManBase {
class ADDON {
respawn = QUOTE(_this call FUNC(handleRespawn));
};
};
};

View File

@ -39,6 +39,7 @@ class CfgMovesMaleSdr: CfgMovesBasic {
interpolationRestart = 2;
ConnectTo[] = {"ACE_AmovPercMstpScapWnonDnon",0.1};
InterpolateTo[] = {"Unconscious",0.01,"ACE_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon",0.1};
canReload = 0;
};
class ACE_AmovPercMstpScapWnonDnon: ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon {
file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\non\non\AmovPercMstpSnonWnonDnon_Ease";
@ -63,6 +64,7 @@ class CfgMovesMaleSdr: CfgMovesBasic {
interpolationRestart = 2;
ConnectTo[] = {"ACE_AmovPercMstpSsurWnonDnon",0.1};
InterpolateTo[] = {"Unconscious",0.01,"ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon",0.1};
canReload = 0;
};
class ACE_AmovPercMstpSsurWnonDnon: ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon {
file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\sur\non\AmovPercMstpSsurWnonDnon";
@ -80,4 +82,3 @@ class CfgMovesMaleSdr: CfgMovesBasic {
};
};
};

View File

@ -39,7 +39,7 @@ class CfgVehicles {
distance = 4;
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canStopEscorting));
statement = QUOTE([ARR_3(_player,_target, false)] call FUNC(doEscortCaptive));
exceptions[] = {QGVAR(isNotEscorting)};
exceptions[] = {"isNotEscorting"};
showDisabled = 0;
icon = QUOTE(PATHTOF(UI\captive_ca.paa));
priority = 2.3;
@ -50,7 +50,7 @@ class CfgVehicles {
distance = 4;
condition = QUOTE([ARR_3(_player, _target, objNull)] call FUNC(canLoadCaptive));
statement = QUOTE([ARR_3(_player, _target, objNull)] call FUNC(doLoadCaptive));
exceptions[] = {QGVAR(isNotEscorting)};
exceptions[] = {"isNotEscorting"};
showDisabled = 0;
icon = QUOTE(PATHTOF(UI\captive_ca.paa));
priority = 2.2;
@ -74,7 +74,7 @@ class CfgVehicles {
displayName = "$STR_ACE_Captives_StopEscorting";
condition = QUOTE([ARR_2(_player, objNull)] call FUNC(canStopEscorting));
statement = QUOTE([ARR_3(_player,objNull, false)] call FUNC(doEscortCaptive));
exceptions[] = {QGVAR(isNotEscorting)};
exceptions[] = {"isNotEscorting"};
showDisabled = 0;
priority = 2.3;
hotkey = "C";
@ -91,7 +91,7 @@ class CfgVehicles {
displayName = "$STR_ACE_Captives_StopSurrendering";
condition = QUOTE([ARR_2(_player, false)] call FUNC(canSurrender));
statement = QUOTE([ARR_2(_player, false)] call FUNC(setSurrendered));
exceptions[] = {QGVAR(isNotSurrendering)};
exceptions[] = {"isNotSurrendering"};
showDisabled = 0;
priority = 0;
};
@ -107,7 +107,7 @@ class CfgVehicles {
distance = 4; \
condition = QUOTE([ARR_3(_player, objNull, _target)] call FUNC(canLoadCaptive)); \
statement = QUOTE([ARR_3(_player, objNull, _target)] call FUNC(doLoadCaptive)); \
exceptions[] = {QGVAR(isNotEscorting)}; \
exceptions[] = {"isNotEscorting"}; \
showDisabled = 0; \
priority = 1.2; \
hotkey = "L"; \
@ -178,7 +178,7 @@ class CfgVehicles {
curatorCost = 0; //???
isGlobal = 1; //run global
isTriggerActivated = 1; //Wait for triggers
// icon = QUOTE(PATHTOF(ui\todo.paa));
icon = QUOTE(PATHTOF(UI\Icon_Module_Make_Unit_Surrender_ca.paa));
functionPriority = 0;
class Arguments {};
class ModuleDescription: ModuleDescription {

View File

@ -21,6 +21,7 @@ PREP(handleGetOut);
PREP(handleKilled);
PREP(handleOnUnconscious);
PREP(handlePlayerChanged);
PREP(handleRespawn);
PREP(handleUnitInitPost);
PREP(handleZeusDisplayChanged);
PREP(moduleSurrender);

View File

@ -18,7 +18,7 @@
PARAMS_1(_oldUnit);
if (_oldUnit getVariable [QGVAR(isHandcuffed), false]) then {
_oldUnit setVariable [QGVAR(isHandcuffed), false, true];
[_oldUnit, false] call FUNC(setSurrendered);
};
if (_oldUnit getVariable [QGVAR(isEscorting), false]) then {
@ -26,5 +26,5 @@ if (_oldUnit getVariable [QGVAR(isEscorting), false]) then {
};
if (_oldUnit getVariable [QGVAR(isSurrendering), false]) then {
_oldUnit setVariable [QGVAR(isSurrendering), false, true];
[_oldUnit, false] call FUNC(setSurrendered);
};

View File

@ -0,0 +1,39 @@
/*
* Author: commy2 PabstMirror
* Fix, because captiveNum doesn't reset properly on respawn
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Corpse <OBJECT>
*
* Return Value:
* Nothing
*
* Example:
* [alive, body] call ACE_captives_fnc_handleRespawn;
*
* Public: No
*/
#include "script_component.hpp"
PARAMS_2(_unit,_dead);
if (!local _unit) exitWith {};
//With respawn="group", we could be respawning into a unit that is handcuffed/captive
//If they are, reset and rerun the SET function
//if not, make sure to explicity disable the setCaptivityStatus, because captiveNum does not work correctly on respawn
if (_unit getVariable [QGVAR(isHandcuffed), false]) then {
_unit setVariable [QGVAR(isHandcuffed), false];
[_unit, true] call FUNC(setHandcuffed);
} else {
[_unit, QGVAR(Handcuffed), false] call EFUNC(common,setCaptivityStatus);
};
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
_unit setVariable [QGVAR(isSurrendering), false];
[_unit, true] call FUNC(setSurrendered);
} else {
[_unit, QGVAR(Surrendered), false] call EFUNC(common,setCaptivityStatus);
};

View File

@ -75,6 +75,7 @@ if (_state) then {
};
};
if (!alive _unit) exitWith {};
if (_unit getVariable ["ACE_isUnconscious", false]) exitWith {}; //don't touch animations if unconscious
//if we are in "hands up" animationState, crack it now

View File

@ -1,5 +1,6 @@
class CfgActions {
// fixes pick up action on mine detectors, because all ACE items are of that simulationClass and BI doesn't seem to care
class None;
class TakeWeapon: None {
show = 0;

View File

@ -42,19 +42,3 @@ class Extended_Respawn_EventHandlers {
};
};
};
class Extended_Killed_EventHandlers {
class CAManBase {
class GVAR(dropObject) {
Killed = QUOTE(if (local (_this select 0)) then {[ARR_2(_this select 0, ObjNull)] call FUNC(carryObj)};);
};
};
};
class Extended_GetIn_EventHandlers {
class CAManBase {
class GVAR(dropObject) {
GetIn = QUOTE(if (local (_this select 0)) then {[ARR_2(_this select 0, ObjNull)] call FUNC(carryObj)};);
};
};
};

View File

@ -0,0 +1,76 @@
class CfgMovesBasic {
class Default;
class Actions {
// fixes grab animation with equipped pistol
class NoActions;
class PistolStandActions: NoActions {
grabDrag = "AmovPercMstpSlowWrflDnon_AcinPknlMwlkSlowWrflDb_2";
};
class LauncherKneelActions: NoActions {
grabDrag = "AmovPercMstpSlowWrflDnon_AcinPknlMwlkSlowWrflDb_2";
};
class CivilStandActions: NoActions {
grabDrag = "AmovPercMstpSlowWrflDnon_AcinPknlMwlkSlowWrflDb_2";
};
};
};
class CfgMovesMaleSdr: CfgMovesBasic {
class AgonyBase;
class AgonyBaseRfl;
class StandBase;
class HealBase;
class States {
// fixes being able to reload in some animations, can't remember now what exactly
class AinjPfalMstpSnonWnonDnon_carried_Down: AgonyBase {
canReload = 0;
};
class AinjPfalMstpSnonWnonDnon_carried_Up: AgonyBase {
canReload = 0;
};
class AinjPfalMstpSnonWrflDnon_carried_Down: AgonyBase {
canReload = 0;
};
class AinjPfalMstpSnonWrflDnon_carried_Up: AgonyBaseRfl {
canReload = 0;
};
class AmovPpneMstpSnonWnonDnon_injured;
class AinjPpneMstpSnonWnonDnon: AmovPpneMstpSnonWnonDnon_injured {
canReload = 0;
};
class AmovPpneMstpSrasWrflDnon_injured;
class AinjPpneMstpSnonWrflDnon: AmovPpneMstpSrasWrflDnon_injured {
canReload = 0;
};
// mark as on ladder animation
class LadderCivilStatic: StandBase {
ACE_isLadder = 1;
};
// dunno, important
class AmovPercMstpSnonWnonDnon_AcinPknlMwlkSnonWnonDb_1;
class AcinPknlMstpSnonWnonDnon: AmovPercMstpSnonWnonDnon_AcinPknlMwlkSnonWnonDb_1 {
enableDirectControl = 1;
};
class AcinPknlMwlkSnonWnonDb: AmovPercMstpSnonWnonDnon_AcinPknlMwlkSnonWnonDb_1 {
enableDirectControl = 1;
};
// fix falling back to unconsciousness animation and disable rotating in that state
class Unconscious: Default {
ConnectTo[] = {};
head = "headNo";
forceAim = 1;
static = 1;
};
// idk. Flummi?
class AinvPknlMstpSnonWnonDnon_medic0: HealBase {
variantsPlayer[] = {};
};
};
};

View File

@ -33,7 +33,7 @@ class CfgVehicles {
function = QFUNC(moduleCheckPBOs);
scope = 2;
isGlobal = 1;
icon = QUOTE(PATHTOF(UI\IconCheckPBO_ca.paa));
icon = QUOTE(PATHTOF(UI\Icon_Module_CheckPBO_ca.paa));
class Arguments {
class Action {
displayName = "Action";
@ -87,6 +87,7 @@ class CfgVehicles {
displayName = "LSD Vehicles";
function = "ACE_Common_fnc_moduleLSDVehicles";
scope = 2;
icon = QUOTE(PATHTOF(UI\Icon_Module_LSD_ca.paa));
isGlobal = 1;
class Arguments {
};

View File

@ -218,6 +218,7 @@ class CfgVoice {
displayName = "$STR_ACE_Common_NoVoice";
};
};
class CfgVoiceTypes {
class ACE_NoVoice {
name = "$STR_ACE_Common_NoVoice";

View File

@ -25,4 +25,20 @@ class CfgWeapons {
mass = 0;
};
};
class InventoryItem_Base_F;
class ACE_Banana: ACE_ItemCore {
author = "$STR_ACE_Common_ACETeam";
scope = 2;
displayName = "$STR_ACE_Common_bananaDisplayName";
descriptionShort = "$STR_ACE_Common_bananaDescr";
model = PATHTOF(data\banana.p3d);
picture = PATHTOF(data\icon_banana_ca.paa);
icon = "iconObject_circle";
mapSize = 0.034;
class ItemInfo: InventoryItem_Base_F {
mass = 1;
};
};
};

File diff suppressed because it is too large Load Diff

View File

@ -1,35 +0,0 @@
class CfgMovesBasic;
class CfgMovesMaleSdr: CfgMovesBasic {
class AgonyBase;
class AgonyBaseRfl;
class StandBase;
class States {
class AinjPfalMstpSnonWnonDnon_carried_Down: AgonyBase {
canReload = 0;
};
class AinjPfalMstpSnonWnonDnon_carried_Up: AgonyBase {
canReload = 0;
};
class AinjPfalMstpSnonWrflDnon_carried_Down: AgonyBase {
canReload = 0;
};
class AinjPfalMstpSnonWrflDnon_carried_Up: AgonyBaseRfl {
canReload = 0;
};
class AmovPpneMstpSnonWnonDnon_injured;
class AinjPpneMstpSnonWnonDnon: AmovPpneMstpSnonWnonDnon_injured {
canReload = 0;
};
class AmovPpneMstpSrasWrflDnon_injured;
class AinjPpneMstpSnonWrflDnon: AmovPpneMstpSrasWrflDnon_injured {
canReload = 0;
};
class LadderCivilStatic: StandBase {
ACE_isLadder = 1;
};
};
};

View File

@ -53,17 +53,6 @@ class RscTitles {
};
};
class ACE_EventHandlerHelper: ACE_Rsc_Display_Base {
idd = -1;
class controls {
class CameraView: RscMapControl {
onDraw = "if (cameraView != uiNamespace getVariable 'ACE_EventHandler_CameraMode') then {uiNamespace setVariable ['ACE_EventHandler_CameraMode', cameraView]; {[uiNamespace getVariable 'ACE_EventHandler_CameraMode'] call _x; nil} count ((missionNamespace getVariable 'ACE_EventHandler_CameraMode') select 2);};";
idc = -1;
w = 0;
h = 0;
};
};
};
class ACE_EventHandlerHelper2: ACE_Rsc_Display_Base {
class controls {
class MapMarkerCreated: RscMapControl {

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -33,6 +33,9 @@ if (hasInterface) then {
_this lock (_this getVariable [QGVAR(lockStatus), locked _this]);
}] call FUNC(addEventhandler);
["setDir", {(_this select 0) setDir (_this select 1)}] call FUNC(addEventhandler);
["setFuel", {(_this select 0) setFuel (_this select 1)}] call FUNC(addEventhandler);
// hack to get PFH to work in briefing
[QGVAR(onBriefingPFH), "onEachFrame", {
if (time > 0) exitWith {
@ -171,15 +174,9 @@ GVAR(OldPlayerWeapon) = currentWeapon ACE_player;
}, 0, []] call cba_fnc_addPerFrameHandler;
[QGVAR(StateArrested),false,true,QUOTE(ADDON)] call FUNC(defineVariable);
[QGVAR(carriedBy),objNull,false,QUOTE(ADDON)] call FUNC(defineVariable);
[QGVAR(carriedObj),objNull,false,QUOTE(ADDON)] call FUNC(defineVariable);
["VehicleSetFuel", {
PARAMS_2(_vehicle,_fuelLevel);
_vehicle setFuel _fuelLevel;
}] call FUNC(addEventhandler);
["displayTextStructured", FUNC(displayTextStructured)] call FUNC(addEventhandler);
["displayTextPicture", FUNC(displayTextPicture)] call FUNC(addEventhandler);
["notOnMap", {!visibleMap}] call FUNC(addCanInteractWithCondition);
["isNotInside", {_this select 0 == _this select 1 || {vehicle (_this select 0) == _this select 0}}] call FUNC(addCanInteractWithCondition);

View File

@ -6,9 +6,7 @@ ADDON = false;
// ACE Common Function
PREP(addActionEventHandler);
PREP(addActionMenuEventHandler);
PREP(addCameraEventHandler);
PREP(addCanInteractWithCondition);
PREP(addCustomEventHandler);
PREP(addLineToDebugDraw);
PREP(addMapMarkerCreatedEventHandler);
PREP(addScrollWheelEventHandler);
@ -17,18 +15,13 @@ PREP(adminKick);
PREP(ambientBrightness);
PREP(applyForceWalkStatus);
PREP(ASLToPosition);
PREP(beingCarried);
PREP(binarizeNumber);
PREP(blurScreen);
PREP(cachedCall);
PREP(callCustomEventHandlers);
PREP(callCustomEventHandlersGlobal);
PREP(canGetInPosition);
PREP(canInteract);
PREP(canInteractWith);
PREP(canUseWeapon);
PREP(carriedByObj);
PREP(carryObj);
PREP(changeProjectileDirection);
PREP(checkPBOs);
PREP(claim);
@ -62,8 +55,6 @@ PREP(fixPosition);
PREP(getAllDefinedSetVariables);
PREP(getAllGear);
PREP(getCaptivityStatus);
PREP(getCarriedBy);
PREP(getCarriedObj);
PREP(getConfigCommander);
PREP(getConfigGunner);
PREP(getDeathAnim);
@ -104,6 +95,9 @@ PREP(getVehicleCrew);
PREP(getVersion);
PREP(getWeaponAzimuthAndInclination);
PREP(getWeaponIndex);
PREP(getWeaponModes);
PREP(getWeaponMuzzles);
PREP(getWeaponState);
PREP(getWeaponType);
PREP(getWindDirection);
PREP(goKneeling);
@ -126,7 +120,6 @@ PREP(isModLoaded);
PREP(isPlayer);
PREP(isTurnedOut);
PREP(letterToCode);
PREP(limitMovementSpeed);
PREP(loadPerson);
PREP(loadPersonLocal);
PREP(loadSettingsFromProfile);
@ -150,9 +143,7 @@ PREP(readSettingFromModule);
PREP(receiveRequest);
PREP(removeActionEventHandler);
PREP(removeActionMenuEventHandler);
PREP(removeCameraEventHandler);
PREP(removeCanInteractWithCondition);
PREP(removeCustomEventHandler);
PREP(removeMapMarkerCreatedEventHandler);
PREP(removeScrollWheelEventHandler);
PREP(removeSpecificMagazine);
@ -166,7 +157,6 @@ PREP(serverLog);
PREP(setArrestState);
PREP(setCanInteract);
PREP(setCaptivityStatus);
PREP(setCarriedBy);
PREP(setDefinedVariable);
PREP(setDisableUserInputStatus);
PREP(setForceWalkStatus);
@ -258,14 +248,15 @@ if (hasInterface) then {
ACE_player = missionNamespace getVariable ["BIS_fnc_moduleRemoteControl_unit", player];
uiNamespace setVariable ["ACE_player", ACE_player];
// Raise custom event. @todo, remove
[missionNamespace, "playerChanged", [ACE_player, _oldPlayer]] call FUNC(callCustomEventHandlers);
// Raise ACE event
["playerChanged", [ACE_player, _oldPlayer]] call FUNC(localEvent);
};
}, 0, []] call cba_fnc_addPerFrameHandler;
};
// Init toHex
[0] call FUNC(toHex);
ADDON = true;
isHC = !(hasInterface || isDedicated);

View File

@ -3,7 +3,7 @@
class CfgPatches {
class ADDON {
units[] = {"ACE_Box_Misc"};
weapons[] = {"ACE_ItemCore","ACE_FakePrimaryWeapon"};
weapons[] = {"ACE_ItemCore","ACE_FakePrimaryWeapon", "ACE_Banana"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_main"};
author[] = {"KoffeinFlummi"};
@ -13,11 +13,16 @@ class CfgPatches {
};
#include "CfgEventHandlers.hpp"
#include "CfgSounds.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"
#include "CfgMagazines.hpp"
#include "CfgActions.hpp"
#include "CfgMoves.hpp"
#include "CfgVoice.hpp"
class ACE_Rsc_Display_Base {
idd = -1;
type = 0;
@ -82,12 +87,12 @@ class ACE_Settings {
value = 0;
typeName = "BOOL";
};
class GVAR(enableNumberHotkeys) {
/*class GVAR(enableNumberHotkeys) {
value = 1;
typeName = "BOOL";
isClientSetable = 1;
displayName = "$STR_ACE_Common_EnableNumberHotkeys";
};
};*/
class GVAR(settingFeedbackIcons) {
value = 1;
typeName = "SCALAR";
@ -126,9 +131,6 @@ class ACE_Settings {
#include <ProgressScreen.hpp>
#include <HintConfig.hpp>
#include <RscInfoType.hpp>
#include <FixPickup.hpp>
#include <FixAnimations.hpp>
#include <NoVoice.hpp>
class CfgUIGrids {
class IGUI {

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,5 +1,5 @@
/*
* Author: CAA-Picard
* Author: esteldunedain
* Converts ASL to Arma "Position"
*
* Arguments:

View File

@ -1,39 +0,0 @@
/*
* Author: commy2
*
* Add a camera view event handler. The event script is called when the camera view changes.
* The argument of the called function is stored in the _this variable and has as first element the new camera mode. Possible arguments are ["INTERNAL"], ["EXTERNAL"], ["GUNNER"] and ["GROUP"].
*
* Argument:
* 0: Code to execute (Code or String)
*
* Return value:
* ID of the event script (used to remove it later).
*/
#include "script_component.hpp"
private ["_statement", "_actionsVar", "_id", "_actionIDs", "_actions"];
_statement = _this select 0;
if (typeName _statement == "STRING") then {
_statement = compile _statement;
};
_actionsVar = missionNamespace getVariable ["ACE_EventHandler_CameraMode", [-1, [], []]];
_id = (_actionsVar select 0) + 1;
_actionIDs = _actionsVar select 1;
_actions = _actionsVar select 2;
if (_id == 0) then {
uiNamespace setVariable ["ACE_EventHandler_CameraMode", cameraView];
(QGVAR(EventHandlerHelper) call BIS_fnc_rscLayer) cutRsc [QGVAR(EventHandlerHelper), "PLAIN"];
};
_actionIDs pushBack _id;
_actions pushBack _statement;
missionNamespace setVariable ["ACE_EventHandler_CameraMode", [_id, _actionIDs, _actions]];
_id

View File

@ -1,39 +0,0 @@
/*
* Author: commy2
*
* Add a custom event to a unit. The event scripts are called by FUNC(callCustomEventHandlers).
*
* Argument:
* 0: Object the event should be assigned to or namespace (Object OR Namespace)
* 1: Name of the event (String)
* 2: Code to execute (Code or String)
*
* Return value:
* ID of the event script (used to remove it later).
*/
#include "script_component.hpp"
private ["_object", "_type", "_statement", "_name", "_actionsVar", "_id", "_actionIDs", "_actions"];
_object = _this select 0;
_type = _this select 1;
_statement = _this select 2;
if (typeName _statement == "STRING") then {
_statement = compile _statement;
};
_name = format ["ACE_CustomEventHandlers_%1", _type];
_actionsVar = _object getVariable [_name, [-1, [], []]];
_id = (_actionsVar select 0) + 1;
_actionIDs = _actionsVar select 1;
_actions = _actionsVar select 2;
_actionIDs pushBack _id;
_actions pushBack _statement;
_object setVariable [_name, [_id, _actionIDs, _actions]];
_id

View File

@ -1,5 +1,5 @@
/*
* Author: CAA-Picard
* Author: esteldunedain
*
* Add line to draw on debug
*

View File

@ -1,5 +1,5 @@
/*
* Author: CAA-Picard
* Author: esteldunedain
* Adds a new setting at runtime, with all it's metadata.
* If has only local effects.
*

View File

@ -1,12 +0,0 @@
/**
* fn_beingCarried.sqf
* @Descr: Check if object is being carried
* @Author: Glowbal
*
* @Arguments: [object OBJECT]
* @Return: BOOL True if object is being carried
* @PublicAPI: true
*/
#include "script_component.hpp"
!(isNull ([_this select 0] call FUNC(getCarriedObj)));

View File

@ -1,6 +1,6 @@
/*
* Author: CAA-Picard and Jaynus
* Returns the result of the function and caches it up to a given time
* Author: esteldunedain and Jaynus
* Returns the result of the function and caches it up to a given time or event
*
* Arguments:
* 0: Parameters <ARRAY>
@ -8,6 +8,7 @@
* 2: Namespace to store the cache on <NAMESPACE>
* 3: Cache uid <STRING>
* 4: Max duration of the cache <NUMBER>
* 5: Event that clears the cache <STRING> (Optional)
*
* Return Value:
* Result of the function <ANY>
@ -20,6 +21,40 @@ EXPLODE_5_PVT(_this,_params,_function,_namespace,_uid,_duration);
if (((_namespace getVariable [_uid, [-99999]]) select 0) < diag_tickTime) then {
_namespace setVariable [_uid, [diag_tickTime + _duration, _params call _function]];
// Does the cache needs to be cleared on an event?
if (count _this > 5) then {
private ["_event","_varName","_cacheList"];
_event = _this select 5;
_varName = format [QGVAR(clearCache_%1),_event];
_cacheList = missionNamespace getVariable _varName;
// If there was no EH to clear these caches, add one
if (isNil {_cacheList}) then {
_cacheList = [];
missionNamespace setVariable [_varName, _cacheList];
[_event, {
private ["_varName","_cacheList"];
// _eventName is defined on the function that calls the event
#ifdef DEBUG_MODE_FULL
diag_log text format ["ACE: Clear cached variables on event: %1", _eventName];
#endif
// Get the list of caches to clear
_varName = format [QGVAR(clearCache_%1),_eventName];
_cacheList = missionNamespace getVariable [_varName, []];
// Erase all the cached results
{
_x call FUNC(eraseCache);
} forEach _cacheList;
// Empty the list
missionNamespace setVariable [_varName, []];
}] call FUNC(addEventhandler);
};
// Add this cache to the list of the event
_cacheList pushBack [_namespace, _uid];
};
#ifdef DEBUG_MODE_FULL
diag_log format ["Calculated result: %1 %2", _namespace, _uid];
} else {

View File

@ -1,31 +0,0 @@
/*
* Author: commy2
*
* Execute all custom event script assigned to this object.
*
* Argument:
* 0: Object the eventhandlers are assigned to or namespace (Object or Namespace)
* 1: Name of the event (String)
* 2: Arguments passed to the eventhandler script (Array, optional default: [Object the event handlers are assigned to])
*
* Return value:
* None.
*/
#include "script_component.hpp"
private ["_object", "_type", "_argument", "_name", "_actions"];
_object = _this select 0;
_type = _this select 1;
_argument = _this select 2;
if (isNil "_argument") then {_argument = [_object]};
_name = format ["ACE_CustomEventHandlers_%1", _type];
_actions = (_object getVariable [_name, [-1, [], []]]) select 2;
{
_argument call _x; nil;
} count _actions;
nil

View File

@ -1,16 +0,0 @@
/*
* Author: commy2
*
* Execute all custom event script assigned to this object on every machine.
*
* Argument:
* 0: Object the eventhandlers are assigned to or namespace (Object or Namespace)
* 1: Name of the event (String)
* 2: Arguments passed to the eventhandler script (Array, optional default: [Object the event handlers are assigned to])
*
* Return value:
* None.
*/
#include "script_component.hpp"
[_this, QUOTE(FUNC(callCustomEventHandlers)), 2] call FUNC(execRemoteFnc);

View File

@ -69,7 +69,7 @@ switch (_position) do {
case "gunner" : {
private "_turretConfig";
_turret = [typeOf _vehicle] call FUNC(getTurretGunner);
_turret = [_vehicle] call FUNC(getTurretGunner);
if (_turret isEqualTo []) exitWith {false};
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
@ -82,7 +82,7 @@ switch (_position) do {
case "commander" : {
private "_turretConfig";
_turret = [typeOf _vehicle] call FUNC(getTurretCommander);
_turret = [_vehicle] call FUNC(getTurretCommander);
if (_turret isEqualTo []) exitWith {false};
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
@ -95,7 +95,7 @@ switch (_position) do {
case "copilot" : {
private "_turretConfig";
_turret = [typeOf _vehicle] call FUNC(getTurretCopilot);
_turret = [_vehicle] call FUNC(getTurretCopilot);
if (_turret isEqualTo []) exitWith {false};
_turretConfig = [_config, _turret] call FUNC(getTurretConfigPath);
@ -108,7 +108,7 @@ switch (_position) do {
case "turret" : {
private ["_turrets", "_turretConfig"];
_turrets = [typeOf _vehicle] call FUNC(getTurretsOther);
_turrets = [_vehicle] call FUNC(getTurretsOther);
if (_index != -1 && {_turret = _turrets select _index;
CANGETINTURRETINDEX
@ -136,7 +136,7 @@ switch (_position) do {
case "ffv" : {
private ["_turrets", "_turretConfig"];
_turrets = [typeOf _vehicle] call FUNC(getTurretsFFV);
_turrets = [_vehicle] call FUNC(getTurretsFFV);
if (_index != -1 && {_turret = _turrets select _index;
CANGETINTURRETINDEX

View File

@ -1,13 +0,0 @@
/**
* fn_carriedByObj.sqf
* @Descr: Check if object A is being carried by object B.
* @Author: Glowbal
*
* @Arguments: [object OBJECT, unit OBJECT]
* @Return: BOOL True if B is carrying A.
* @PublicAPI: true
*/
#include "script_component.hpp"
([(_this select 0)] call FUNC(getCarriedBy) == [(_this select 1)] call FUNC(getCarriedBy));

View File

@ -1,72 +0,0 @@
/**
* fn_carryObj.sqf
* @Descr: Have a unit carry an object. Use ObjNull for second parameter if you want the unit to carry nothing
* @Author: Glowbal
*
* @Arguments: [unit OBJECT, objectToCarry OBJECT, attachToVector ARRAY (Optional)]
* @Return: BOOL Returns true if succesful
* @PublicAPI: true
*/
#include "script_component.hpp"
private ["_unit","_to","_return", "_fallDown", "_carriedObj", "_positionUnit"];
_unit = [_this, 0,ObjNull, [ObjNull]] call bis_fnc_param;
_to = [_this, 1,ObjNull, [ObjNull]] call bis_fnc_param;
_fallDown = false;
if (count _this > 3) then {
_fallDown = _this select 3;
};
_return = false;
[format["fnc_carryObj - UNIT: %1 ATTEMPTS TO CARRY %2",_unit,_to],2] call FUNC(debug);
if (((typeName _to) == "OBJECT" && (isNull ([_unit] call FUNC(getCarriedObj)))) || isNull _to) then {
if (vehicle _unit != _unit) exitwith {};
if (!isNull _to) then {
if ((isNull ([_to] call FUNC(getCarriedObj))) && ([_unit] call FUNC(canInteract))) then {
_return = true;
_unit setvariable [QGVAR(carriedObj),_to,true];
if (_fallDown) then {
// [_unit,_fallDown] call FUNC(limitMovementSpeed);
};
[_to, _unit] call FUNC(setCarriedBy);
if (count _this > 2) then {
if (count (_this select 2) == 3) then {
_to attachTo [_unit,(_this select 2)];
[format["fnc_carryObj - UNIT: %1 TO %2 - attachTo offset: %3",_unit,_to,(_this select 2)],2] call FUNC(debug);
};
};
["carryObject", [_unit], [_unit, _to, _fallDown]] call EFUNC(common,targetEvent);
// ["carryObject", [_unit, _to, _fallDown]] call ace_common_fnc_localEvent;
};
} else {
if (!isNull ([_unit] call FUNC(getCarriedObj))) then {
[format["fnc_carryObj - UNIT: %1 DROPING CARRIED OBJECT",_unit],2] call FUNC(debug);
_carriedObj = ([_unit] call FUNC(getCarriedObj));
detach _carriedObj;
//_carriedObj setPosATL [(getPosATL _carriedObj) select 0, (getPosATL _carriedObj) select 1,0];
if (!surfaceIsWater getPos _unit) then {
_positionUnit = getPosATL _carriedObj;
_positionUnit set [2, ((getPosATL _unit) select 2) + 0.1];
_carriedObj setPosATL _positionUnit;
} else {
_positionUnit = getPosASL _carriedObj;
_positionUnit set [2, ((getPosASL _unit) select 2) + 0.1];
_carriedObj setPosASL _positionUnit;
};
[[_unit] call FUNC(getCarriedObj), objNull] call FUNC(setCarriedBy);
_unit setvariable [QGVAR(carriedObj),_to,true];
_return = true;
["carryObjectDropped", [_unit], [_unit, _to, _fallDown]] call EFUNC(common,targetEvent);
// ["carryObjectDropped", [_unit, _to, _fallDown]] call ace_common_fnc_localEvent;
};
};
} else {
[format["fnc_carryObj - UNIT: %1 FAILED TO CARRY %2 - not an object or already carrying",_unit,_to],2] call FUNC(debug);
};
_return

View File

@ -1,5 +1,5 @@
/*
* Author: CAA-Picard
* Author: esteldunedain
*
* Returns a orthonormal system of reference aligned with the supplied vector
*

View File

@ -50,13 +50,13 @@ if (_state) then {
};
_ctrl = _dlg displayctrl 103;
_ctrl ctrlSetEventHandler ["buttonClick", "while {!isNull (uiNamespace getVariable ['GVAR(dlgDisableMouse)', displayNull])} do {closeDialog 0}; failMission 'LOSER'; [false] call FUNC(disableUserInput);"];
_ctrl ctrlSetEventHandler ["buttonClick", QUOTE(while {!isNull (uiNamespace getVariable [ARR_2(QUOTE(QGVAR(dlgDisableMouse)),displayNull)])} do {closeDialog 0}; failMission 'LOSER'; [false] call DFUNC(disableUserInput);)];
_ctrl ctrlEnable true;
_ctrl ctrlSetText "ABORT";
_ctrl ctrlSetTooltip "Abort.";
_ctrl = _dlg displayctrl ([104, 1010] select isMultiplayer);
_ctrl ctrlSetEventHandler ["buttonClick", "closeDialog 0; player setDamage 1; [false] call FUNC(disableUserInput);"];
_ctrl ctrlSetEventHandler ["buttonClick", QUOTE(closeDialog 0; player setDamage 1; [false] call DFUNC(disableUserInput);)];
_ctrl ctrlEnable (call {_config = missionConfigFile >> "respawnButton"; !isNumber _config || {getNumber _config == 1}});
_ctrl ctrlSetText "RESPAWN";
_ctrl ctrlSetTooltip "Respawn.";

View File

@ -1,5 +1,5 @@
/*
* Author: CAA-Picard
* Author: esteldunedain
* Deletes a cached result
*
* Arguments:

View File

@ -1,5 +1,5 @@
/*
* Author: CAA-Picard
* Author: esteldunedain
*
* Executes a code on the next frame
*

View File

@ -1,13 +0,0 @@
/**
* fn_getCarriedBy.sqf
* @Descr: Get the object that is carrying given unit or object
* @Author: Glowbal
*
* @Arguments: [unit OBJECT]
* @Return: OBJECT Returns the object that is carrying the unit. Otherwise returns ObjNull
* @PublicAPI: true
*/
#include "script_component.hpp"
((_this select 0) getvariable [QGVAR(carriedBy),objNull]);

View File

@ -1,13 +0,0 @@
/**
* fn_getCarriedObj.sqf
* @Descr: Grab the registered carried object
* @Author: Glowbal
*
* @Arguments: [unit OBJECT]
* @Return: OBJECT Returns the object that the unit is currently carrying. If not carrying, returns ObjNull
* @PublicAPI: true
*/
#include "script_component.hpp"
((_this select 0) getvariable [QGVAR(carriedObj),objNull]);

View File

@ -4,7 +4,7 @@
* Get the commander config of a vehicles turret.
*
* Argument:
* 0: vehicle type (String)
* 0: vehicle (Object)
*
* Return value:
* Commander config (Config)
@ -15,7 +15,7 @@ private ["_vehicle", "_config", "_turret"];
_vehicle = _this select 0;
_config = configFile >> "CfgVehicles" >> _vehicle;
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
_turret = [_vehicle] call FUNC(getTurretCommander);
[_config, _turret] call FUNC(getTurretConfigPath)

View File

@ -4,7 +4,7 @@
* Get the gunner config of a vehicles turret.
*
* Argument:
* 0: vehicle type (String)
* 0: vehicle (Object)
*
* Return value:
* Gunner config (Config)
@ -15,7 +15,7 @@ private ["_vehicle", "_config", "_turret"];
_vehicle = _this select 0;
_config = configFile >> "CfgVehicles" >> _vehicle;
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
_turret = [_vehicle] call FUNC(getTurretGunner);
[_config, _turret] call FUNC(getTurretConfigPath)

View File

@ -4,23 +4,23 @@
* Gets the turret index of door gunners
*
* Argument:
* 0: Vehicle type (String)
* 0: Vehicle (Object)
*
* Return value:
* Turret indexes of the door gunner. Empty array means no gunner position. (Array)
*/
#include "script_component.hpp"
private ["_vehicleType", "_turrets", "_doorTurrets", "_config"];
private ["_vehicle", "_turrets", "_doorTurrets", "_config"];
_vehicleType = _this select 0;
_vehicle = _this select 0;
_turrets = [_vehicleType] call FUNC(getTurrets);
_turrets = allTurrets [_vehicle, true];
_doorTurrets = [];
{
_config = configFile >> "CfgVehicles" >> _vehicleType;
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
_config = [_config, _x] call FUNC(getTurretConfigPath);
if ((getNumber (_config >> "isCopilot") == 0) && count (getArray (_config >> "weapons")) > 0 ) then {

View File

@ -64,7 +64,7 @@ switch (_position) do {
};
case "gunner" : {
_turret = [typeOf _vehicle] call FUNC(getTurretGunner);
_turret = [_vehicle] call FUNC(getTurretGunner);
if (CANGETINTURRETINDEX) then {
_script = [
@ -75,7 +75,7 @@ switch (_position) do {
};
case "commander" : {
_turret = [typeOf _vehicle] call FUNC(getTurretCommander);
_turret = [_vehicle] call FUNC(getTurretCommander);
if (CANGETINTURRETINDEX) then {
_script = [
@ -86,7 +86,7 @@ switch (_position) do {
};
case "copilot" : {
_turret = [typeOf _vehicle] call FUNC(getTurretCopilot);
_turret = [_vehicle] call FUNC(getTurretCopilot);
if (CANGETINTURRETINDEX) then {
_script = [
@ -100,7 +100,7 @@ switch (_position) do {
case "turret" : {
private "_turrets";
_turrets = [typeOf _vehicle] call FUNC(getTurretsOther);
_turrets = [_vehicle] call FUNC(getTurretsOther);
if (_index != -1 && {_turret = _turrets select _index; CANGETINTURRETINDEX}) then {
_script = [
@ -127,7 +127,7 @@ switch (_position) do {
case "ffv" : {
private "_turrets";
_turrets = [typeOf _vehicle] call FUNC(getTurretsFFV);
_turrets = [_vehicle] call FUNC(getTurretsFFV);
if (_index != -1 && {_turret = _turrets select _index; CANGETINTURRETINDEX}) then {
_script = [

View File

@ -1,5 +1,5 @@
/*
* Author: CAA-Picard
* Author: esteldunedain
* Returns the metadata of a setting if it exists
*
* Arguments:

View File

@ -4,7 +4,7 @@
* Get the turret index of a vehicles commander.
*
* Argument:
* 0: Vehicle type (String)
* 0: Vehicle (Object)
*
* Return value:
* Turret index of the vehicles commander. Empty array means no observer position. (Array)
@ -15,11 +15,11 @@ private ["_vehicle", "_turrets", "_turret", "_config"];
_vehicle = _this select 0;
_turrets = [_vehicle] call FUNC(getTurrets);
_turrets = allTurrets [_vehicle, true];
_turret = [];
{
_config = configFile >> "CfgVehicles" >> _vehicle;
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
_config = [_config, _x] call FUNC(getTurretConfigPath);

View File

@ -4,7 +4,7 @@
* Get the turret index of a vehicles copilot.
*
* Argument:
* 0: Vehicle type (String)
* 0: Vehicle (Object)
*
* Return value:
* Turret index of the vehicles gunner. Empty array means no copilot position. (Array)
@ -15,11 +15,11 @@ private ["_vehicle", "_turrets", "_turret", "_config"];
_vehicle = _this select 0;
_turrets = [_vehicle] call FUNC(getTurrets);
_turrets = allTurrets [_vehicle, true];
_turret = [];
{
_config = configFile >> "CfgVehicles" >> _vehicle;
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
_config = [_config, _x] call FUNC(getTurretConfigPath);

View File

@ -4,7 +4,7 @@
* Get the turret index of a vehicles gunner.
*
* Argument:
* 0: Vehicle type (String)
* 0: Vehicle (Object)
*
* Return value:
* Turret index of the vehicles gunner. Empty array means no gunner position. (Array)
@ -15,11 +15,11 @@ private ["_vehicle", "_turrets", "_turret", "_config"];
_vehicle = _this select 0;
_turrets = [_vehicle] call FUNC(getTurrets);
_turrets = allTurrets [_vehicle, true];
_turret = [];
{
_config = configFile >> "CfgVehicles" >> _vehicle;
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
_config = [_config, _x] call FUNC(getTurretConfigPath);

View File

@ -18,7 +18,6 @@ _vehicle = vehicle _unit;
if (_unit == _vehicle) exitWith {[]};
//_turrets = [typeOf _vehicle] call FUNC(getTurrets);
_turrets = allTurrets [_vehicle, true];
_units = [];

View File

@ -4,7 +4,7 @@
* Get the turret indices of ffv turrets.
*
* Argument:
* 0: Vehicle type (String)
* 0: Vehicle (Object)
*
* Return value:
* Turret index of the vehicles gunner. Empty array means no ffv turrets. (Array)
@ -15,11 +15,11 @@ private ["_vehicle", "_turrets", "_turret", "_config"];
_vehicle = _this select 0;
_turrets = [_vehicle] call FUNC(getTurrets);
_turrets = allTurrets [_vehicle, true];
_turret = [];
{
_config = configFile >> "CfgVehicles" >> _vehicle;
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
_config = [_config, _x] call FUNC(getTurretConfigPath);

View File

@ -4,7 +4,7 @@
* Get the turret indices of other turrets (not gunner, commander, copilot or ffv).
*
* Argument:
* 0: Vehicle type (String)
* 0: Vehicle (Object)
*
* Return value:
* Turret index of the vehicles gunner. Empty array means no other turrets. (Array)
@ -15,11 +15,11 @@ private ["_vehicle", "_turrets", "_turret", "_config"];
_vehicle = _this select 0;
_turrets = [_vehicle] call FUNC(getTurrets);
_turrets = allTurrets [_vehicle, true];
_turret = [];
{
_config = configFile >> "CfgVehicles" >> _vehicle;
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
_config = [_config, _x] call FUNC(getTurretConfigPath);

View File

@ -0,0 +1,73 @@
/*
* Author: commy2
*
* Return current state of the weapon. Attachments and magazines with ammo.
*
* Argument:
* 0: A unit (Object)
* 1: A weapon (String)
*
* Return value:
* Weapon info, format: [attachments, muzzles, magazines, ammo] (Array)
*/
#include "script_component.hpp"
private ["_unit", "_weapon"];
_unit = _this select 0;
_weapon = _this select 1;
private "_muzzles";
_muzzles = [_weapon] call FUNC(getWeaponMuzzles);
private "_weaponInfo";
_weaponInfo = [];
switch (_weapon) do {
case (primaryWeapon _unit): {
_weaponInfo pushBack primaryWeaponItems _unit;
};
case (secondaryWeapon _unit): {
_weaponInfo pushBack secondaryWeaponItems _unit;
};
case (handgunWeapon _unit): {
_weaponInfo pushBack handgunItems _unit;
};
default {
_weaponInfo pushBack ["","","",""];
};
};
// get loaded magazines and ammo
private ["_magazines", "_ammo"];
_magazines = [];
_ammo = [];
{
_magazines pushBack "";
_ammo pushBack 0;
} forEach _muzzles;
{
if (_x select 2) then {
private "_index";
_index = _muzzles find (_x select 4);
if (_index != -1) then {
_magazines set [_index, _x select 0];
_ammo set [_index, _x select 1];
};
};
} forEach magazinesAmmoFull _unit;
_weaponInfo append [_muzzles, _magazines, _ammo];
_weaponInfo

View File

@ -19,7 +19,7 @@ _vector2 = _this select 1;
_newVector = [];
for "_i" from 0 to (((count _vector1) min (count _vector2)) - 1) do {
_newVector = _newVector + [(_vector1 select _i) * (_vector2 select _i)];
_newVector pushBack ((_vector1 select _i) * (_vector2 select _i));
};
_newVector

View File

@ -1,53 +0,0 @@
/**
* fn_limitMovementSpeed.sqf
* @Descr: Limits the movement speed of a unit
* @Author: Glowbal
*
* @Arguments: [unit OBJECT, fallDown BOOL (Optional)]
* @Return: void
* @PublicAPI: true
*/
#include "script_component.hpp"
private ["_unit","_carriedObj"];
_unit = _this select 0;
_fallDown = false;
if (count _this > 1) then {
_fallDown = _this select 1;
};
if ((_unit getvariable [QGVAR(limitMovementSpeed),false])) exitwith {
_unit setvariable [QGVAR(limitMovementSpeed),nil,true];
};
[{
private["_unit","_fallDown","_carriedObj"];
_unit = (_this select 0) select 0;
_fallDown = (_this select 0) select 1;
_carriedObj = [_unit] call FUNC(getCarriedObj);
if !(_unit getvariable [QGVAR(limitMovementSpeed),false]) exitwith {
[(_this select 1)] call cba_fnc_removePerFrameHandler;
};
if !((!isNull _carriedObj) && (alive _unit)) exitwith {
[(_this select 1)] call cba_fnc_removePerFrameHandler;
};
if (speed _unit > 12 && vehicle _unit == _unit && isTouchingGround _unit) then {
_unit setVelocity [0,0,0];
if (_fallDown) then {
_unit playMove "amovppnemstpsraswrfldnon";
};
if (_carriedObj isKindOf "Man") then {
hint "You can not move this fast while transporting this person.";
} else {
hint "You can not move this fast while carrying this object";
};
[_unit,ObjNull] call FUNC(carryObj);
};
}, 0.5, [_unit,_fallDown] ] call CBA_fnc_addPerFrameHandler;

View File

@ -35,8 +35,6 @@ if (_unit distance _loadcar <= 10) then {
};
if (!isNull _vehicle) then {
[_unit, true, GROUP_SWITCH_ID, side group _caller] call FUNC(switchToGroupSide);
[_caller,objNull] call FUNC(carryObj);
[_unit,objNull] call FUNC(carryObj);
[[_unit, _vehicle,_caller], QUOTE(FUNC(loadPersonLocal)), _unit, false] call EFUNC(common,execRemoteFnc);
};
_vehicle

View File

@ -1,5 +1,5 @@
/*
* Author: CAA-Picard
* Author: esteldunedain
* Load the user setable settings from the user profile.
* Config < Server UserConfig < Mission Config < Client settings
*

View File

@ -1,5 +1,5 @@
/*
* Author: CAA-Picard
* Author: esteldunedain
* Load the parameters on the server.
* Config < Server UserConfig < Mission Config
*

View File

@ -1,15 +1,4 @@
// by commy2
#include "script_component.hpp"
private ["_array", "_index"];
_array = [];
for "_index" from 0 to 10000 do {
if (str (findDisplay _this displayCtrl _index) != "No control") then {
diag_log text str (findDisplay _this displayCtrl _index);
_array pushBack _index;
};
};
_array;
[allControls findDisplay _this, {ctrlIDC _this}] call FUNC(map)

View File

@ -1,15 +1,4 @@
// by commy2
#include "script_component.hpp"
private ["_array", "_index"];
_array = [];
for "_index" from 0 to 10000 do {
if (str (findDisplay _index) != "No Display") then {
diag_log text str findDisplay _index;
_array pushBack _index;
};
};
_array;
[allDisplays, {ctrlIDD _this}] call FUNC(map)

View File

@ -12,33 +12,29 @@
*/
#include "script_component.hpp"
private ["_number", "_minLength", "_length", "_digits", "_index", "_count"];
private ["_number", "_minLength", "_length", "_digits"];
_number = _this select 0;
_minLength = _this select 1;
_number = _number min 999999;
_length = floor (log _number + 1);
if !(isNil "_minLength") then {_length = (_length max _minLength) min 6};
_number = str _number;
_length = count _number;
if (isNil "_minLength") then {_minLength = _length};
_minLength = _minLength min 6;
while {_length < _minLength} do {
_number = "0" + _number;
_length = _length + 1;
};
_digits = [];
if (_number < 1) exitWith {
for "_index" from 0 to (_length - 1) do {
_digits set [_index, 0];
};
_digits
for "_x" from 0 to (_length - 1) do {
_digits pushBack parseNumber (_number select [_x, 1]);
};
while {
_count = count _digits;
_count < _length
} do {
_digit = floor (_number / (10 ^ (_length - _count - 1)));
{
_digit = _digit - _x * (10 ^ (_count - _forEachIndex));
} forEach _digits;
_digits set [_count, _digit];
};
_digits

View File

@ -12,14 +12,24 @@
*/
#include "script_component.hpp"
private ["_digits", "_count", "_string", "_index"];
private ["_number", "_minLength", "_length"];
_digits = _this call FUNC(numberToDigits);
_number = _this select 0;
_minLength = _this select 1;
_count = count _digits;
_number = _number min 999999;
_string = "";
for "_index" from 0 to (_count - 1) do {
_string = _string + str (_digits select _index);
_number = str _number;
_length = count _number;
if (isNil "_minLength") then {_minLength = _length};
_minLength = _minLength min 6;
while {_length < _minLength} do {
_number = "0" + _number;
_length = _length + 1;
};
_string
_number

View File

@ -1,5 +1,5 @@
/*
* Author: CAA-Picard
* Author: esteldunedain
* Converts Arma "Position" to ASL
*
* Arguments:

View File

@ -53,6 +53,7 @@ _perFrameFunction = {
_elapsedTime = time - _startTime;
_errorCode = -1;
// this does not check: target fell unconscious, target died, target moved inside vehicle / left vehicle, target moved outside of players range, target moves at all.
if (isNull (uiNamespace getVariable [QGVAR(ctrlProgressBar), controlNull])) then {
_errorCode = 1;
} else {

View File

@ -1,5 +1,5 @@
/*
* Author: CAA-Picard
* Author: esteldunedain
*
* Reads a setting value from a module, set it and force it. Logs if the setting is missing from the module.
* Must be called on the server, effect is global.

Some files were not shown because too many files have changed in this diff Show More