mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into lasers
This commit is contained in:
commit
d6b227e654
@ -1,7 +1,7 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
end_of_line = crlf
|
||||
insert_final_newline = true
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
|
26
README.md
26
README.md
@ -1,21 +1,23 @@
|
||||
<p align="center">
|
||||
<img src="https://raw.githubusercontent.com/KoffeinFlummi/ACE3/new-readme/extras/logo.png?token=ACU2mWeJUeshQIVc52XPoNiPpc3PzTauks5Uv24rwA%3D%3D" height="150px" /><br />
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
|
||||
**ACE 3** is a join effort by the teams behind **ACE 2**, **AGM**, **CSE** and **RHS** to improve the realism and authenticity of Arma 3.
|
||||
**ACE3** is a joint effort by the teams behind **ACE2**, **AGM** and **CSE** to improve the realism and authenticity of Arma 3.
|
||||
|
||||
This mod is entirely **open-source**, and everyone is free to propose changes or maintain their own, customized version as long as they make their changes open to the public in accordance with the GNU General Public License (for more information check the license file attached to this project).
|
||||
|
||||
@ -32,7 +34,7 @@ More information on the purpose of the different components of ACE and which one
|
||||
* Realistic ballistics including wind and humidity
|
||||
* Backblast simulation
|
||||
* Weapon resting and bipod deployment
|
||||
* A fire control system for armored vehicles and helicopters
|
||||
* A fire control system for armored vehicles and helicopters
|
||||
***and more...***
|
||||
|
||||
For a full list of current features, check [the official wiki](https://github.com/KoffeinFlummi/ACE3/wiki).
|
||||
|
BIN
TO_MERGE/agm/Optics/agm_optics_pip.p3d
Normal file
BIN
TO_MERGE/agm/Optics/agm_optics_pip.p3d
Normal file
Binary file not shown.
25
TO_MERGE/agm/Optics/clientInit.sqf
Normal file
25
TO_MERGE/agm/Optics/clientInit.sqf
Normal file
@ -0,0 +1,25 @@
|
||||
// TMR: Optics initialization and functions
|
||||
// (C) 2013 Ryan Schultz. See LICENSE.
|
||||
|
||||
// Request a resource layer from the game engine.
|
||||
AGM_Optics_scopeRSC = ["AGM_Optics_Scope"] call BIS_fnc_rscLayer;
|
||||
|
||||
// Set global variables
|
||||
AGM_Optics_inScope = false; // Is the scope up?
|
||||
AGM_Optics_currentOptic = ""; // What optic is attached right now?
|
||||
|
||||
0 = 0 spawn {
|
||||
waituntil {!isNull (findDisplay 46)};
|
||||
|
||||
[] call AGM_Optics_fnc_initScope;
|
||||
|
||||
// PiP technique by BadBenson
|
||||
AGM_Optics_Camera = "camera" camCreate (positioncameratoworld [0,0,0]);
|
||||
AGM_Optics_Camera camSetFov 0.7;
|
||||
AGM_Optics_Camera camSetTarget player;
|
||||
AGM_Optics_Camera camCommit 1;
|
||||
"agm_optics_rendertarget0" setPiPEffect [2, 1.0, 1.0, 1.0, 0.0, [0.0, 1.0, 0.0, 0.25], [1.0, 0.0, 1.0, 1.0], [0.199, 0.587, 0.114, 0.0]];
|
||||
AGM_Optics_Camera cameraEffect ["INTERNAL", "BACK","agm_optics_rendertarget0"];
|
||||
|
||||
waitUntil {[] call AGM_Optics_fnc_mainLoop; False};
|
||||
};
|
454
TO_MERGE/agm/Optics/config.cpp
Normal file
454
TO_MERGE/agm/Optics/config.cpp
Normal file
@ -0,0 +1,454 @@
|
||||
class CfgPatches {
|
||||
class AGM_Optics {
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = 0.60;
|
||||
requiredAddons[] = {AGM_Core};
|
||||
version = 0.1;
|
||||
author[] = {"Taosenai"};
|
||||
authorUrl = "http://www.ryanschultz.org/tmr/";
|
||||
};
|
||||
};
|
||||
|
||||
class CfgFunctions {
|
||||
class AGM_Optics {
|
||||
class AGM_Optics {
|
||||
file = "AGM_Optics\functions";
|
||||
class firedEH;
|
||||
class hideScope;
|
||||
class initScope;
|
||||
class mainLoop;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class AGM_Optics {
|
||||
clientInit = "call compile preProcessFileLineNumbers '\AGM_Optics\clientInit.sqf'";
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_FiredBIS_EventHandlers {
|
||||
class CAManBase {
|
||||
class AGM_Optics {
|
||||
clientFiredBIS = "_this call AGM_Optics_fnc_firedEH;";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class CfgOpticsEffect {
|
||||
class AGM_OpticsRadBlur1 {
|
||||
type = "radialblur";
|
||||
params[] = {0.015, 0, 0.14, 0.2};
|
||||
priority = 950;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
class CfgWeapons {
|
||||
class ItemCore;
|
||||
class InventoryItem_Base_F;
|
||||
class InventoryMuzzleItem_Base_F;
|
||||
class InventoryOpticsItem_Base_F;
|
||||
|
||||
class optic_Hamr : ItemCore {
|
||||
displayName = "HAMR 4x";
|
||||
descriptionShort = "High Accuracy Multi-Range Optic<br />Magnification: 4x<br />Reticle: CM-RW 6.5mm";
|
||||
scope = 2;
|
||||
weaponInfoType = "AGM_RscWeapon";
|
||||
|
||||
AGM_Optics_enhanced = 1;
|
||||
AGM_Optics_reticle = "\AGM_Optics\data\hamr\hamr-reticle65_ca.paa";
|
||||
AGM_Optics_reticleIllum = "\AGM_Optics\data\hamr\hamr-reticle65Illum_ca.paa";
|
||||
AGM_Optics_body = "\AGM_Optics\data\hamr\hamr-body_ca.paa";
|
||||
AGM_Optics_bodyNight = "\AGM_Optics\data\hamr\hamr-bodyNight_ca.paa";
|
||||
|
||||
model = "\A3\weapons_f\acc\acco_hamr_F";
|
||||
|
||||
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||
mass = 4;
|
||||
optics = 1;
|
||||
optictype = 1;
|
||||
rmbhint = "HAMR";
|
||||
modeloptics = "\AGM_Optics\agm_optics_pip.p3d";
|
||||
|
||||
class OpticsModes {
|
||||
class Hamr2Collimator {
|
||||
AGM_Optics_enhanced = 0;
|
||||
opticsID = 1;
|
||||
useModelOptics = 0;
|
||||
opticsppeffects[] = {};
|
||||
opticsFlare = 0;
|
||||
opticsDisablePeripherialVision = 0;
|
||||
opticsZoomMin = 0.375;
|
||||
opticsZoomMax = 1;
|
||||
opticsZoomInit = 0.75;
|
||||
memoryPointCamera = "eye";
|
||||
visionMode[] = {};
|
||||
distanceZoomMin = 300;
|
||||
distanceZoomMax = 300;
|
||||
};
|
||||
|
||||
class Hamr2Scope {
|
||||
cameradir = "";
|
||||
distanceZoomMin = 300;
|
||||
distanceZoomMax = 300;
|
||||
memorypointcamera = "opticView";
|
||||
opticsdisableperipherialvision = 0;
|
||||
opticsdisplayname = "IHAMR";
|
||||
opticsflare = 1;
|
||||
opticsid = 2;
|
||||
opticsppeffects[] = {"OpticsCHAbera2", "OpticsBlur1", "AGM_OpticsRadBlur1"};
|
||||
opticszoominit = 0.0872664626;
|
||||
opticszoommax = 0.0872664626;
|
||||
opticszoommin = 0.0872664626;
|
||||
discretefov[] = {0.0872664626};
|
||||
discreteinitindex = 0;
|
||||
usemodeloptics = 1;
|
||||
modeloptics = "\AGM_Optics\agm_optics_pip.p3d";
|
||||
visionmode[] = {"Normal", "NVG"};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class optic_Arco : ItemCore {
|
||||
descriptionshort = "Advanced Rifle Combat Optic<br />Magnification: 4x<br />Reticle: SpecterDR 6.5mm";
|
||||
displayname = "ARCO 4x";
|
||||
picture = "\A3\weapons_F\Data\UI\gear_acco_Arco_CA.paa";
|
||||
scope = 2;
|
||||
weaponInfoType = "AGM_RscWeapon";
|
||||
|
||||
model = "\A3\weapons_f\acc\acco_Arco_F";
|
||||
|
||||
AGM_Optics_enhanced = 1;
|
||||
AGM_Optics_reticle = "\AGM_Optics\data\arco\arco-reticle65_ca.paa";
|
||||
AGM_Optics_reticleIllum = "\AGM_Optics\data\arco\arco-reticle65Illum_ca.paa";
|
||||
AGM_Optics_body = "\AGM_Optics\data\arco\arco-body_ca.paa";
|
||||
AGM_Optics_bodyNight = "\AGM_Optics\data\arco\arco-bodyNight_ca.paa";
|
||||
|
||||
class ItemInfo: InventoryOpticsItem_Base_F {
|
||||
mass = 4;
|
||||
optics = 1;
|
||||
optictype = 1;
|
||||
rmbhint = "ARCO";
|
||||
|
||||
class OpticsModes {
|
||||
class ARCO2collimator {
|
||||
AGM_Optics_enhanced = 0;
|
||||
cameradir = "";
|
||||
distancezoommax = 300;
|
||||
distancezoommin = 300;
|
||||
memorypointcamera = "eye";
|
||||
opticsdisableperipherialvision = 0;
|
||||
opticsdisplayname = "CQB";
|
||||
opticsflare = 0;
|
||||
opticsid = 1;
|
||||
opticsppeffects[] = {};
|
||||
opticszoominit = 0.75;
|
||||
opticszoommax = 1.1;
|
||||
opticszoommin = 0.375;
|
||||
usemodeloptics = 0;
|
||||
visionmode[] = {};
|
||||
};
|
||||
class ARCO2scope: ARCO2collimator {
|
||||
cameradir = "";
|
||||
distanceZoomMin = 300;
|
||||
distanceZoomMax = 300;
|
||||
memorypointcamera = "opticView";
|
||||
opticsdisableperipherialvision = 0;
|
||||
opticsdisplayname = "ARCO";
|
||||
opticsflare = 1;
|
||||
opticsid = 2;
|
||||
opticsppeffects[] = {"OpticsCHAbera2", "OpticsBlur1", "AGM_OpticsRadBlur1"};
|
||||
opticszoominit = 0.0872664626; // 0.0872664626 rad = 5 degrees
|
||||
opticszoommax = 0.0872664626; // SpecterDR 4x is 6 degrees
|
||||
opticszoommin = 0.0872664626; // Scope graphic in game covers 1 degree
|
||||
discretefov[] = {0.0872664626};
|
||||
discreteinitindex = 0;
|
||||
usemodeloptics = 1;
|
||||
modeloptics = "\AGM_Optics\data\AGM_Optics_reticle90.p3d";
|
||||
visionmode[] = {"Normal"};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class optic_MRCO : ItemCore {
|
||||
displayName = "MRCO 1x/4x";
|
||||
descriptionShort = "Medium Range Combat Optic<br />Magnification: 1x/4x<br />Reticle: Pitbull Gen II 5.56mm";
|
||||
scope = 2;
|
||||
weaponInfoType = "AGM_RscWeapon";
|
||||
|
||||
AGM_Optics_enhanced = 1;
|
||||
AGM_Optics_reticle = "\AGM_Optics\data\mrco\mrco-reticle556_ca.paa";
|
||||
AGM_Optics_reticleIllum = "\AGM_Optics\data\mrco\mrco-reticle556Illum_ca.paa";
|
||||
AGM_Optics_body = "\AGM_Optics\data\mrco\mrco-body_ca.paa";
|
||||
AGM_Optics_bodyNight = "\AGM_Optics\data\mrco\mrco-bodyNight_ca.paa";
|
||||
|
||||
class ItemInfo : InventoryOpticsItem_Base_F {
|
||||
opticType = 1;
|
||||
mass = 4;
|
||||
optics = 1;
|
||||
modelOptics = "\A3\Weapons_f_beta\acc\reticle_MRCO_F";
|
||||
|
||||
class OpticsModes {
|
||||
class MRCOcq {
|
||||
AGM_Optics_enhanced = 0;
|
||||
opticsID = 1;
|
||||
useModelOptics = 0;
|
||||
opticsPPEffects[] = {};
|
||||
opticsFlare = 0;
|
||||
opticsDisablePeripherialVision = 0;
|
||||
opticsZoomMin = 0.375;
|
||||
opticsZoomMax = 1;
|
||||
opticsZoomInit = 0.75;
|
||||
memoryPointCamera = "eye";
|
||||
visionMode[] = {};
|
||||
distanceZoomMin = 100;
|
||||
distanceZoomMax = 100;
|
||||
};
|
||||
|
||||
class MRCOscope {
|
||||
cameradir = "";
|
||||
distanceZoomMin = 300;
|
||||
distanceZoomMax = 300;
|
||||
memorypointcamera = "eye";
|
||||
opticsdisableperipherialvision = 0;
|
||||
opticsdisplayname = "MRCO";
|
||||
opticsflare = 1;
|
||||
opticsid = 2;
|
||||
opticsppeffects[] = {"OpticsCHAbera2", "OpticsBlur2", "AGM_OpticsRadBlur1"};
|
||||
opticszoominit = 0.0872664626;
|
||||
opticszoommax = 0.0872664626;
|
||||
opticszoommin = 0.0872664626;
|
||||
discretefov[] = {0.0872664626};
|
||||
discreteinitindex = 0;
|
||||
usemodeloptics = 1;
|
||||
modeloptics = "\AGM_Optics\data\AGM_Optics_reticle90.p3d";
|
||||
visionmode[] = {"Normal"};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class optic_Nightstalker : ItemCore {
|
||||
class ItemInfo: InventoryOpticsItem_Base_F {
|
||||
class OpticsModes {
|
||||
class NCTALKEP {};
|
||||
class Iron : NCTALKEP {
|
||||
opticsppeffects[] = {}; // Fix Arma 3 bug
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class optic_SOS: ItemCore {
|
||||
class ItemInfo: InventoryOpticsItem_Base_F {
|
||||
modelOptics = "\AGM_Optics\agm_optics_pip.p3d";
|
||||
class OpticsModes {
|
||||
class Snip {
|
||||
visionMode[] = {"Normal","TI","NVG"};
|
||||
thermalMode[] = {5,6};
|
||||
opticsPPEffects[] = {"OpticsCHAbera1","radblur"};
|
||||
modelOptics[] = {"\AGM_Optics\agm_optics_pip.p3d","\AGM_Optics\agm_optics_pip.p3d"};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
class optic_DMS : ItemCore {
|
||||
class ItemInfo: InventoryOpticsItem_Base_F {
|
||||
class OpticsModes {
|
||||
class Snip {};
|
||||
class Iron : Snip {
|
||||
opticsppeffects[] = {}; // Fix Arma 3 bug
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class optic_LRPS : ItemCore {
|
||||
descriptionshort = "Nightforce NXS Riflescope<br />Magnification: 5.5-22x";
|
||||
displayname = "NXS 5.5-22x";
|
||||
weaponinfotype = "AGM_RscWeapon";
|
||||
|
||||
AGM_Optics_enhanced = 1;
|
||||
AGM_Optics_reticle = "\AGM_Optics\data\sos\sos-reticleMLR_ca.paa";
|
||||
AGM_Optics_reticleIllum = "\AGM_Optics\data\sos\sos-reticleMLRIllum_ca.paa";
|
||||
AGM_Optics_body = "\AGM_Optics\data\sos\sos-body_ca.paa";
|
||||
AGM_Optics_bodyNight = "\AGM_Optics\data\sos\sos-bodyNight_ca.paa";
|
||||
|
||||
class ItemInfo: InventoryOpticsItem_Base_F {
|
||||
modeloptics = "\AGM_Optics\data\AGM_Optics_reticle90.p3d";
|
||||
weaponinfotype = "RscWeaponRangeZeroingFOV";
|
||||
opticType = 2; // Sniper optics
|
||||
|
||||
class OpticsModes {
|
||||
// Based on Nightforce NXS 5.5-22 scope
|
||||
class Snip {
|
||||
cameradir = "";
|
||||
discretedistance[] = {100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000, 2100, 2200, 2300};
|
||||
discretedistanceinitindex = 0;
|
||||
discreteinitindex = 0;
|
||||
distancezoommax = 2300;
|
||||
distancezoommin = 100;
|
||||
memorypointcamera = "opticView";
|
||||
modeloptics = "\AGM_Optics\data\AGM_Optics_reticle90.p3d";
|
||||
opticsdisableperipherialvision = 1;
|
||||
opticsdisplayname = "SOS";
|
||||
opticsflare = 1;
|
||||
opticsid = 1;
|
||||
opticsppeffects[] = {"OpticsCHAbera1", "OpticsBlur1", "AGM_OpticsRadBlur1"};
|
||||
// How to determine opticszoom
|
||||
// First do the basic math based on the listed FOV of the scope to
|
||||
// get a baseline FOV
|
||||
// 0.1 meter at 100 meters = 1 mrad
|
||||
//
|
||||
// 5.5x FOV -- 5.3 m at 100 m = 53 mrad
|
||||
// = 0.053 rad = 3.037 deg FOV
|
||||
|
||||
// 22x FOV -- 1.4 m at 100m = 14 mrad
|
||||
// = 0.014 rad = 0.802 deg
|
||||
|
||||
// The FOV you give the engine is based on a rather larger scope outline, so we
|
||||
// have to do this extra work ourselves.
|
||||
|
||||
// At 1680x1050
|
||||
// The width of a TMR optic viewfield is 864px
|
||||
// The engine viewport width (which is what the below FOV is based on) is 980
|
||||
// (864/980) = (FOV to give engine / true FOV of optic)
|
||||
// 864/980 * 0.053 = 0.04673
|
||||
// 864/980 * 0.014 = 0.01234
|
||||
|
||||
// Measured experimentally, these values seem quite right.
|
||||
// Certainly they're close enough after you account for pixel density, etc.
|
||||
|
||||
opticszoominit = 0.01234;
|
||||
opticszoommax = 0.04673;
|
||||
opticszoommin = 0.01234;
|
||||
discretefov[] = {};
|
||||
usemodeloptics = 1;
|
||||
visionmode[] = {"Normal"};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class optic_Yorris : ItemCore {
|
||||
descriptionshort = "Burris FastFire II Red Dot Sight<br />Magnification: 1x";
|
||||
displayname = "FastFire II";
|
||||
};
|
||||
|
||||
class optic_MRD : ItemCore {
|
||||
descriptionshort = "Eotech MRDS Red Dot Sight<br />Magnification: 1x";
|
||||
displayname = "MRDS";
|
||||
};
|
||||
|
||||
class optic_Holosight : ItemCore {
|
||||
descriptionshort = "Eotech XPS3 Holographic Sight<br />Magnification: 1x";
|
||||
displayname = "XPS3 Holo";
|
||||
};
|
||||
};
|
||||
|
||||
class RscOpticsText;
|
||||
class RscOpticsValue;
|
||||
class RscInGameUI {
|
||||
class RscUnitInfo;
|
||||
class RscWeaponZeroing;
|
||||
class AGM_RscWeapon : RscWeaponZeroing {
|
||||
idd = -1;
|
||||
controls[] = {"CA_Zeroing", "CA_FOVMode"};
|
||||
|
||||
onLoad ="with uiNameSpace do { AGM_OpticsIGUI = _this select 0 }";
|
||||
|
||||
class CA_FOVMode : RscOpticsValue {
|
||||
idc = 154;
|
||||
style = 2;
|
||||
colorText[] = {0, 0, 0, 0};
|
||||
x = 0;
|
||||
y = 0;
|
||||
w = 0;
|
||||
h = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class RscTitles {
|
||||
class AGM_Optics_Scope {
|
||||
idd = -1;
|
||||
onLoad = "with uiNameSpace do { AGM_Optics_Scope = _this select 0 };";
|
||||
onUnload = "";
|
||||
movingEnable = 1;
|
||||
duration = 10000;
|
||||
controls[] = {"Reticle", "ReticleNight", "BodyNight", "Body"};
|
||||
|
||||
class Reticle {
|
||||
colorBackground[] = {0,0,0, 0};
|
||||
colorText[] = {1,1,1, 1};
|
||||
fade = 0;
|
||||
font = "PuristaMedium";
|
||||
h = SafeZoneH;
|
||||
idc = 1;
|
||||
lineSpacing = 1.0;
|
||||
movingEnable = 1;
|
||||
size = 0;
|
||||
sizeEx = 1;
|
||||
style = 48;
|
||||
text = "";
|
||||
type = 0;
|
||||
w = SafeZoneWAbs / ((getResolution select 0) / (getResolution select 1));
|
||||
x = (SafeZoneXAbs + SafeZoneWAbs/2 - (SafeZoneWAbs / ((getResolution select 0) / (getResolution select 1)))/2);
|
||||
y = SafeZoneY;
|
||||
};
|
||||
|
||||
class ReticleNight : Reticle {
|
||||
idc = 2;
|
||||
text = "";
|
||||
};
|
||||
|
||||
class Body : Reticle {
|
||||
idc = 6;
|
||||
text = "";
|
||||
x = (SafeZoneXAbs + SafeZoneWAbs/2 - (SafeZoneWAbs / ((getResolution select 0) / (getResolution select 1))));
|
||||
y = SafeZoneY - (SafeZoneH/2);
|
||||
w = SafeZoneWAbs / ((getResolution select 0) / (getResolution select 1)) * 2;
|
||||
h = SafeZoneH * 2;
|
||||
};
|
||||
|
||||
class BodyNight : Body {
|
||||
idc = 5;
|
||||
text = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class PreloadTextures {
|
||||
class CfgWeapons {
|
||||
class optic_hamr {
|
||||
AGM_Optics_body= "*";
|
||||
AGM_Optics_bodyNight = "*";
|
||||
AGM_Optics_reticle = "*";
|
||||
AGM_Optics_reticleIllum = "*";
|
||||
};
|
||||
class optic_arco {
|
||||
AGM_Optics_body= "*";
|
||||
AGM_Optics_bodyNight = "*";
|
||||
AGM_Optics_reticle = "*";
|
||||
AGM_Optics_reticleIllum = "*";
|
||||
};
|
||||
class optic_mrco {
|
||||
AGM_Optics_body= "*";
|
||||
AGM_Optics_bodyNight = "*";
|
||||
AGM_Optics_reticle = "*";
|
||||
AGM_Optics_reticleIllum = "*";
|
||||
};
|
||||
class optic_LRPS {
|
||||
AGM_Optics_body= "*";
|
||||
AGM_Optics_bodyNight = "*";
|
||||
AGM_Optics_reticle = "*";
|
||||
AGM_Optics_reticleIllum = "*";
|
||||
};
|
||||
};
|
||||
};
|
BIN
TO_MERGE/agm/Optics/data/arco/arco-bodyNight_ca.paa
Normal file
BIN
TO_MERGE/agm/Optics/data/arco/arco-bodyNight_ca.paa
Normal file
Binary file not shown.
BIN
TO_MERGE/agm/Optics/data/arco/arco-body_ca.paa
Normal file
BIN
TO_MERGE/agm/Optics/data/arco/arco-body_ca.paa
Normal file
Binary file not shown.
BIN
TO_MERGE/agm/Optics/data/arco/arco-reticle65Illum_ca.paa
Normal file
BIN
TO_MERGE/agm/Optics/data/arco/arco-reticle65Illum_ca.paa
Normal file
Binary file not shown.
BIN
TO_MERGE/agm/Optics/data/arco/arco-reticle65_ca.paa
Normal file
BIN
TO_MERGE/agm/Optics/data/arco/arco-reticle65_ca.paa
Normal file
Binary file not shown.
8
TO_MERGE/agm/Optics/data/black.rvmat
Normal file
8
TO_MERGE/agm/Optics/data/black.rvmat
Normal file
@ -0,0 +1,8 @@
|
||||
ambient[]={0,0,0,0.89999998};
|
||||
diffuse[]={0,0,0,0.89999998};
|
||||
forcedDiffuse[]={0,0,0,1};
|
||||
emmisive[]={0,0,0,1};
|
||||
specular[]={0,0,0,0};
|
||||
specularPower=1;
|
||||
PixelShaderID="Normal";
|
||||
VertexShaderID="Basic";
|
20
TO_MERGE/agm/Optics/data/em.rvmat
Normal file
20
TO_MERGE/agm/Optics/data/em.rvmat
Normal file
@ -0,0 +1,20 @@
|
||||
ambient[]={1,1,1,1};
|
||||
diffuse[]={1,1,1,1};
|
||||
forcedDiffuse[]={0,0,0,0};
|
||||
emmisive[]={1,1,1,1};
|
||||
specular[]={1,0.99956858,1,1};
|
||||
specularPower=1;
|
||||
PixelShaderID="Normal";
|
||||
VertexShaderID="Basic";
|
||||
class Stage1
|
||||
{
|
||||
texture="#(argb,8,8,3)color(0.5,0.5,0.5,0.5,DT)";
|
||||
uvSource="tex";
|
||||
class uvTransform
|
||||
{
|
||||
aside[]={1,0,0};
|
||||
up[]={0,1,0};
|
||||
dir[]={0,0,0};
|
||||
pos[]={0,0,0};
|
||||
};
|
||||
};
|
BIN
TO_MERGE/agm/Optics/data/hamr/hamr-bodyNight_ca.paa
Normal file
BIN
TO_MERGE/agm/Optics/data/hamr/hamr-bodyNight_ca.paa
Normal file
Binary file not shown.
BIN
TO_MERGE/agm/Optics/data/hamr/hamr-body_ca.paa
Normal file
BIN
TO_MERGE/agm/Optics/data/hamr/hamr-body_ca.paa
Normal file
Binary file not shown.
BIN
TO_MERGE/agm/Optics/data/hamr/hamr-reticle65Illum_ca.paa
Normal file
BIN
TO_MERGE/agm/Optics/data/hamr/hamr-reticle65Illum_ca.paa
Normal file
Binary file not shown.
BIN
TO_MERGE/agm/Optics/data/hamr/hamr-reticle65_ca.paa
Normal file
BIN
TO_MERGE/agm/Optics/data/hamr/hamr-reticle65_ca.paa
Normal file
Binary file not shown.
BIN
TO_MERGE/agm/Optics/data/mrco/mrco-bodyNight_ca.paa
Normal file
BIN
TO_MERGE/agm/Optics/data/mrco/mrco-bodyNight_ca.paa
Normal file
Binary file not shown.
BIN
TO_MERGE/agm/Optics/data/mrco/mrco-body_ca.paa
Normal file
BIN
TO_MERGE/agm/Optics/data/mrco/mrco-body_ca.paa
Normal file
Binary file not shown.
BIN
TO_MERGE/agm/Optics/data/mrco/mrco-reticle556Illum_ca.paa
Normal file
BIN
TO_MERGE/agm/Optics/data/mrco/mrco-reticle556Illum_ca.paa
Normal file
Binary file not shown.
BIN
TO_MERGE/agm/Optics/data/mrco/mrco-reticle556_ca.paa
Normal file
BIN
TO_MERGE/agm/Optics/data/mrco/mrco-reticle556_ca.paa
Normal file
Binary file not shown.
BIN
TO_MERGE/agm/Optics/data/scopeblack-100_ca.paa
Normal file
BIN
TO_MERGE/agm/Optics/data/scopeblack-100_ca.paa
Normal file
Binary file not shown.
BIN
TO_MERGE/agm/Optics/data/scopeblack-70_ca.paa
Normal file
BIN
TO_MERGE/agm/Optics/data/scopeblack-70_ca.paa
Normal file
Binary file not shown.
BIN
TO_MERGE/agm/Optics/data/scopeblack-80_ca.paa
Normal file
BIN
TO_MERGE/agm/Optics/data/scopeblack-80_ca.paa
Normal file
Binary file not shown.
BIN
TO_MERGE/agm/Optics/data/scopeblack-90_ca.paa
Normal file
BIN
TO_MERGE/agm/Optics/data/scopeblack-90_ca.paa
Normal file
Binary file not shown.
BIN
TO_MERGE/agm/Optics/data/sos/sos-bodyNight_ca.paa
Normal file
BIN
TO_MERGE/agm/Optics/data/sos/sos-bodyNight_ca.paa
Normal file
Binary file not shown.
BIN
TO_MERGE/agm/Optics/data/sos/sos-body_ca.paa
Normal file
BIN
TO_MERGE/agm/Optics/data/sos/sos-body_ca.paa
Normal file
Binary file not shown.
BIN
TO_MERGE/agm/Optics/data/sos/sos-reticleMLRIllum_ca.paa
Normal file
BIN
TO_MERGE/agm/Optics/data/sos/sos-reticleMLRIllum_ca.paa
Normal file
Binary file not shown.
BIN
TO_MERGE/agm/Optics/data/sos/sos-reticleMLR_ca.paa
Normal file
BIN
TO_MERGE/agm/Optics/data/sos/sos-reticleMLR_ca.paa
Normal file
Binary file not shown.
BIN
TO_MERGE/agm/Optics/data/tmr_optics_reticle100.p3d
Normal file
BIN
TO_MERGE/agm/Optics/data/tmr_optics_reticle100.p3d
Normal file
Binary file not shown.
BIN
TO_MERGE/agm/Optics/data/tmr_optics_reticle70.p3d
Normal file
BIN
TO_MERGE/agm/Optics/data/tmr_optics_reticle70.p3d
Normal file
Binary file not shown.
BIN
TO_MERGE/agm/Optics/data/tmr_optics_reticle80.p3d
Normal file
BIN
TO_MERGE/agm/Optics/data/tmr_optics_reticle80.p3d
Normal file
Binary file not shown.
BIN
TO_MERGE/agm/Optics/data/tmr_optics_reticle90.p3d
Normal file
BIN
TO_MERGE/agm/Optics/data/tmr_optics_reticle90.p3d
Normal file
Binary file not shown.
BIN
TO_MERGE/agm/Optics/data/tmr_reticle_clear.p3d
Normal file
BIN
TO_MERGE/agm/Optics/data/tmr_reticle_clear.p3d
Normal file
Binary file not shown.
149
TO_MERGE/agm/Optics/functions/fn_firedEH.sqf
Normal file
149
TO_MERGE/agm/Optics/functions/fn_firedEH.sqf
Normal file
@ -0,0 +1,149 @@
|
||||
/*
|
||||
* Original Author: Taosenai
|
||||
* Adapted By: KoffeinFlummi
|
||||
*
|
||||
* Animates the scope when firing.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit
|
||||
* 1: Weapon
|
||||
* 2: Muzzle
|
||||
* 3: Mode
|
||||
* 4: Ammo
|
||||
* 5: Magazine
|
||||
* 6: Projectile
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*/
|
||||
|
||||
if (_this select 0 != AGM_player) exitwith {}; // Sanity check
|
||||
|
||||
0 = _this spawn {
|
||||
disableSerialization;
|
||||
|
||||
_weaponType = _this select 1;
|
||||
_config = configFile >> "CfgWeapons" >> _weaponType;
|
||||
_scope = uiNameSpace getVariable "AGM_Optics_Scope";
|
||||
|
||||
// @todo
|
||||
_recoilMulti = getNumber (_config >> "tmr_smallarms_recoil_shakeMultiplier"); // Will be 0 if undefined
|
||||
|
||||
if (_recoilMulti == 0) then {
|
||||
_recoilMulti = 1;
|
||||
};
|
||||
if (_recoilMulti > 2.6) then {
|
||||
_recoilMulti = 2.6; // Don't get too high
|
||||
};
|
||||
|
||||
// Reduce the reticle movement as the player drops into lower, supported stances.
|
||||
_detectStance = (player selectionPosition "Neck" select 2);
|
||||
if (_detectStance < 1.3) then {
|
||||
_recoilMulti = _recoilMulti - 0.10;
|
||||
};
|
||||
if (_detectStance < 0.7) then {
|
||||
_recoilMulti = _recoilMulti - 0.20;
|
||||
};
|
||||
|
||||
// Reduce reticle movement if the player is rested (tmr_autorest).
|
||||
if (player getVariable ["tmr_autorest_rested", false]) then {
|
||||
_recoilMulti = _recoilMulti - 0.20;
|
||||
};
|
||||
|
||||
// Reduce reticle movement if the player is deployed (tmr_autorest).
|
||||
if (player getVariable ["tmr_autorest_deployed", false]) then {
|
||||
_recoilMulti = _recoilMulti - 0.30;
|
||||
};
|
||||
_recoilMulti = 1;
|
||||
// @endtodo
|
||||
|
||||
|
||||
// Constants which determine how the scope recoils
|
||||
_recoilScope = 0.03 * _recoilMulti + random 0.0015;
|
||||
_recoilRing = 0.03 * _recoilMulti + random 0.0015;
|
||||
|
||||
_randomScopeShiftX = 0.005 * _recoilMulti - random 0.011;
|
||||
|
||||
_randomReticleShiftX = 0.0036 * _recoilMulti + random 0.0045; // Always tend up and right;
|
||||
_randomReticleShiftY = -0.0046 * _recoilMulti - random 0.0055;
|
||||
|
||||
/////////
|
||||
// Center everything
|
||||
|
||||
// getResolution select 4 should return the aspect ratio, but it's totally wrong
|
||||
// for triple head displays. We'll compute it manually.
|
||||
_aspectRatio = (getResolution select 0) / (getResolution select 1);
|
||||
|
||||
_reticleX = (SafeZoneXAbs + SafeZoneWAbs/2 - (SafeZoneWAbs / _aspectRatio)/2);
|
||||
_reticleY = SafeZoneY;
|
||||
_reticleW = SafeZoneWAbs / _aspectRatio;
|
||||
_reticleH = SafeZoneH;
|
||||
|
||||
// Reticle
|
||||
(_scope displayCtrl 1) ctrlSetPosition [_reticleX, _reticleY, _reticleW, _reticleH];
|
||||
// Reticle night (illum)
|
||||
(_scope displayCtrl 2) ctrlSetPosition [_reticleX, _reticleY, _reticleW, _reticleH];
|
||||
|
||||
_bodyX = (SafeZoneXAbs + SafeZoneWAbs/2 - (SafeZoneWAbs / _aspectRatio));
|
||||
_bodyY = SafeZoneY - (SafeZoneH/2);
|
||||
_bodyW = SafeZoneWAbs / _aspectRatio * 2;
|
||||
_bodyH = SafeZoneH * 2;
|
||||
|
||||
// Body night
|
||||
(_scope displayCtrl 5) ctrlSetPosition [_bodyX, _bodyY, _bodyW, _bodyH];
|
||||
// Body
|
||||
(_scope displayCtrl 6) ctrlSetPosition [_bodyX, _bodyY, _bodyW, _bodyH];
|
||||
|
||||
_centerDelay = 0.01;
|
||||
(_scope displayCtrl 1) ctrlCommit _centerDelay;
|
||||
(_scope displayCtrl 2) ctrlCommit _centerDelay;
|
||||
(_scope displayCtrl 5) ctrlCommit _centerDelay;
|
||||
(_scope displayCtrl 6) ctrlCommit _centerDelay;
|
||||
|
||||
/////////
|
||||
// Create and commit recoil effect
|
||||
|
||||
// Move reticle
|
||||
|
||||
(_scope displayCtrl 1) ctrlSetPosition [_reticleX - (_recoilScope/2) + _randomReticleShiftX, _reticleY - (_recoilScope/2) + _randomReticleShiftY, _reticleW + _recoilScope, _reticleH + _recoilScope];
|
||||
(_scope displayCtrl 2) ctrlSetPosition [_reticleX - (_recoilScope/2) + _randomReticleShiftX, _reticleY - (_recoilScope/2) + _randomReticleShiftY, _reticleW + _recoilScope, _reticleH + _recoilScope];
|
||||
|
||||
// Move body
|
||||
|
||||
(_scope displayCtrl 5) ctrlSetPosition [_bodyX - (_recoilScope/2) + _randomScopeShiftX, _bodyY - (_recoilScope/2), _bodyW + _recoilScope, _bodyH + _recoilScope];
|
||||
(_scope displayCtrl 6) ctrlSetPosition [_bodyX - (_recoilScope/2) + _randomScopeShiftX, _bodyY - (_recoilScope/2), _bodyW + _recoilScope, _bodyH + _recoilScope];
|
||||
|
||||
_recoilDelay = 0.036;
|
||||
_fa = false;
|
||||
_cwm = currentWeaponMode player;
|
||||
if (_cwm == "FullAuto" || _cwm == "manual" || _cwm == "Burst") then {
|
||||
_recoilDelay = getNumber (_config >> _cwm >> "reloadTime")/2.2;
|
||||
_fa = true;
|
||||
};
|
||||
(_scope displayCtrl 1) ctrlCommit _recoilDelay;
|
||||
(_scope displayCtrl 2) ctrlCommit _recoilDelay;
|
||||
(_scope displayCtrl 5) ctrlCommit _recoilDelay;
|
||||
(_scope displayCtrl 6) ctrlCommit _recoilDelay;
|
||||
|
||||
//////////////
|
||||
|
||||
waituntil {sleep 0.01; ctrlCommitted (_scope displayCtrl 6)};
|
||||
|
||||
//////////////
|
||||
|
||||
//////
|
||||
// Bring them all back
|
||||
(_scope displayCtrl 1) ctrlSetPosition [_reticleX, _reticleY, _reticleW, _reticleH];
|
||||
(_scope displayCtrl 2) ctrlSetPosition [_reticleX, _reticleY, _reticleW, _reticleH];
|
||||
(_scope displayCtrl 5) ctrlSetPosition [_bodyX, _bodyY, _bodyW, _bodyH];
|
||||
(_scope displayCtrl 6) ctrlSetPosition [_bodyX, _bodyY, _bodyW, _bodyH];
|
||||
|
||||
_recenterDelay = 0.09;
|
||||
if (_fa) then {
|
||||
_recenterDelay = getNumber (_config >> _cwm >> "reloadTime")/2.2;
|
||||
};
|
||||
(_scope displayCtrl 1) ctrlCommit _recenterDelay;
|
||||
(_scope displayCtrl 2) ctrlCommit _recenterDelay;
|
||||
(_scope displayCtrl 5) ctrlCommit _recenterDelay;
|
||||
(_scope displayCtrl 6) ctrlCommit _recenterDelay;
|
||||
};
|
19
TO_MERGE/agm/Optics/functions/fn_hideScope.sqf
Normal file
19
TO_MERGE/agm/Optics/functions/fn_hideScope.sqf
Normal file
@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Original Author: Taosenai
|
||||
* Adapted By: KoffeinFlummi
|
||||
*
|
||||
* Hides the scope.
|
||||
*
|
||||
*/
|
||||
|
||||
private ["_scope"];
|
||||
|
||||
((uiNameSpace getVariable "AGM_Optics_Scope") displayCtrl 1) ctrlSetTextColor [1,1,1,0];
|
||||
((uiNameSpace getVariable "AGM_Optics_Scope") displayCtrl 2) ctrlSetTextColor [1,1,1,0];
|
||||
((uiNameSpace getVariable "AGM_Optics_Scope") displayCtrl 5) ctrlSetTextColor [1,1,1,0];
|
||||
((uiNameSpace getVariable "AGM_Optics_Scope") displayCtrl 6) ctrlSetTextColor [1,1,1,0];
|
||||
|
||||
((uiNameSpace getVariable "AGM_Optics_Scope") displayCtrl 1) ctrlCommit 0;
|
||||
((uiNameSpace getVariable "AGM_Optics_Scope") displayCtrl 2) ctrlCommit 0;
|
||||
((uiNameSpace getVariable "AGM_Optics_Scope") displayCtrl 5) ctrlCommit 0;
|
||||
((uiNameSpace getVariable "AGM_Optics_Scope") displayCtrl 6) ctrlCommit 0;
|
25
TO_MERGE/agm/Optics/functions/fn_initScope.sqf
Normal file
25
TO_MERGE/agm/Optics/functions/fn_initScope.sqf
Normal file
@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Original Author: Taosenai
|
||||
* Adapted By: KoffeinFlummi
|
||||
*
|
||||
* Initializes the scope resources.
|
||||
*
|
||||
*/
|
||||
|
||||
private ["_display"];
|
||||
|
||||
// Make sure we only cutRsc when the resource isn't already available
|
||||
if (isNil {uiNameSpace getVariable "AGM_Optics_Scope"} or {isNull (uiNameSpace getVariable "AGM_Optics_Scope")}) exitWith {
|
||||
AGM_Optics_scopeRSC cutRsc ["AGM_Optics_Scope","PLAIN",0];
|
||||
((uiNameSpace getVariable "AGM_Optics_Scope") displayCtrl 1) ctrlSetTextColor [1,1,1,0];
|
||||
((uiNameSpace getVariable "AGM_Optics_Scope") displayCtrl 2) ctrlSetTextColor [1,1,1,0];
|
||||
((uiNameSpace getVariable "AGM_Optics_Scope") displayCtrl 5) ctrlSetTextColor [1,1,1,0];
|
||||
((uiNameSpace getVariable "AGM_Optics_Scope") displayCtrl 6) ctrlSetTextColor [1,1,1,0];
|
||||
|
||||
((uiNameSpace getVariable "AGM_Optics_Scope") displayCtrl 1) ctrlCommit 0;
|
||||
((uiNameSpace getVariable "AGM_Optics_Scope") displayCtrl 2) ctrlCommit 0;
|
||||
((uiNameSpace getVariable "AGM_Optics_Scope") displayCtrl 5) ctrlCommit 0;
|
||||
((uiNameSpace getVariable "AGM_Optics_Scope") displayCtrl 6) ctrlCommit 0;
|
||||
True
|
||||
};
|
||||
False
|
94
TO_MERGE/agm/Optics/functions/fn_mainLoop.sqf
Normal file
94
TO_MERGE/agm/Optics/functions/fn_mainLoop.sqf
Normal file
@ -0,0 +1,94 @@
|
||||
/*
|
||||
* Original Author: Taosenai
|
||||
* Adapted By: KoffeinFlummi
|
||||
*
|
||||
* Monitors the RscInGameUI and displays the overlays when needed.
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*/
|
||||
|
||||
if !(cameraOn == AGM_player && {alive AGM_player} && {!visibleMap} && {ctrlShown ((uinamespace getVariable "AGM_OpticsIGUI") displayCtrl 154)}) exitWith {
|
||||
// Failed the state check, hide the scope if it's up
|
||||
if (AGM_Optics_inScope) then {
|
||||
// Hide the scope
|
||||
AGM_Optics_inScope = false;
|
||||
AGM_Optics_inScope_FOV = ([] call cba_fnc_getFOV) select 0;
|
||||
|
||||
[] call AGM_Optics_fnc_hideScope;
|
||||
};
|
||||
};
|
||||
|
||||
AGM_Optics_Camera setposATL (positioncameratoworld [0,0,0.4]);
|
||||
AGM_Optics_Camera camPrepareTarget (positioncameratoworld [0,0,50]);
|
||||
AGM_Optics_Camera camCommitPrepared 0;
|
||||
|
||||
if (cameraView == "Gunner") then {
|
||||
AGM_Optics_Camera camsetFOV 0.7;
|
||||
AGM_Optics_Camera camcommit 0;
|
||||
} else {
|
||||
AGM_Optics_Camera camsetFOV 0.01;
|
||||
AGM_Optics_Camera camcommit 0;
|
||||
};
|
||||
|
||||
private ["_optic", "_scope"];
|
||||
|
||||
disableSerialization;
|
||||
|
||||
// Get the name of the attached optic
|
||||
_optic = (primaryWeaponItems AGM_player) select 2;
|
||||
_scope = uiNameSpace getVariable "AGM_Optics_Scope";
|
||||
|
||||
// Init the scope (if needed)
|
||||
[] call AGM_Optics_fnc_initScope;
|
||||
|
||||
// Check if the optic has changed since we last drew it
|
||||
_doUpdateAllLayers = false;
|
||||
if (AGM_Optics_currentOptic != _optic) then {
|
||||
AGM_Optics_currentOptic = _optic;
|
||||
_doUpdateAllLayers = true;
|
||||
};
|
||||
|
||||
// Check if Splendid Camera, unit switch, etc. has blanked out our displays for no good reason (grrr)
|
||||
if (ctrlText (_scope displayCtrl 1) == "") then {
|
||||
_doUpdateAllLayers = true;
|
||||
};
|
||||
|
||||
// Draw the correct layers (don't show them)
|
||||
if (_doUpdateAllLayers) then {
|
||||
(_scope displayCtrl 1) ctrlSetText getText (configFile >> "CfgWeapons" >> _optic >> "AGM_Optics_reticle");
|
||||
(_scope displayCtrl 2) ctrlSetText getText (configFile >> "CfgWeapons" >> _optic >> "AGM_Optics_reticleIllum");
|
||||
(_scope displayCtrl 5) ctrlSetText getText (configFile >> "CfgWeapons" >> _optic >> "AGM_Optics_bodyNight");
|
||||
(_scope displayCtrl 6) ctrlSetText getText (configFile >> "CfgWeapons" >> _optic >> "AGM_Optics_body");
|
||||
};
|
||||
|
||||
// Stop processing if already in the scope view and FOV hasn't changed
|
||||
if (AGM_Optics_inScope) exitwith {};
|
||||
|
||||
// Mark that we're in enhanced scope view
|
||||
AGM_Optics_inScope = true;
|
||||
|
||||
// Calculate lighting
|
||||
_lighting = sunOrMoon; // 1 is day, 0 is night
|
||||
|
||||
_nightOpacity = 1;
|
||||
_dayOpacity = (0 max moonIntensity * (1 - (0 max overcast)))/5;
|
||||
|
||||
if (_lighting == 1) then {
|
||||
_nightOpacity = 0;
|
||||
_dayOpacity = 1;
|
||||
};
|
||||
|
||||
// Apply lighting and make layers visible
|
||||
(_scope displayCtrl 1) ctrlSetTextColor [1,1,1,1];
|
||||
(_scope displayCtrl 2) ctrlSetTextColor [1,1,1,_nightOpacity];
|
||||
(_scope displayCtrl 5) ctrlSetTextColor [1,1,1,_nightOpacity];
|
||||
(_scope displayCtrl 6) ctrlSetTextColor [1,1,1,_dayOpacity];
|
||||
|
||||
(_scope displayCtrl 1) ctrlCommit 0;
|
||||
(_scope displayCtrl 2) ctrlCommit 0;
|
||||
(_scope displayCtrl 5) ctrlCommit 0;
|
||||
(_scope displayCtrl 6) ctrlCommit 0;
|
@ -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};
|
||||
};
|
||||
};
|
@ -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));
|
||||
};
|
||||
};
|
@ -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));
|
||||
};
|
||||
};
|
@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
@ -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;
|
||||
};
|
||||
};
|
@ -1,3 +1,3 @@
|
||||
#include "script_component.hpp"
|
||||
NO_DEDICATED;
|
||||
|
||||
#include "script_component.hpp"
|
||||
NO_DEDICATED;
|
||||
|
@ -1,2 +1,2 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
@ -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"
|
@ -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;
|
||||
};
|
||||
};
|
@ -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.
|
@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
@ -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"
|
BIN
ace_fcs.dll
BIN
ace_fcs.dll
Binary file not shown.
@ -217,9 +217,8 @@ class CfgVehicles {
|
||||
};*/
|
||||
};
|
||||
|
||||
class I_Heli_Transport_02_F: Heli_Transport_02_base_F {};
|
||||
|
||||
class I_Heli_light_03_base_F: Helicopter_Base_F {
|
||||
class Heli_light_03_base_F: Helicopter_Base_F {};
|
||||
class I_Heli_light_03_base_F: Heli_light_03_base_F {
|
||||
lockDetectionSystem = 0;
|
||||
incomingMissileDetectionSystem = 16;
|
||||
driverCanEject = 1;
|
||||
@ -242,15 +241,15 @@ class CfgVehicles {
|
||||
};
|
||||
};
|
||||
|
||||
class I_Heli_light_03_F: I_Heli_light_03_base_F {
|
||||
class I_Heli_light_03_F: Heli_light_03_base_F {
|
||||
class Turrets: Turrets {
|
||||
class MainTurret: MainTurret {};
|
||||
};
|
||||
};
|
||||
|
||||
class I_Heli_light_03_unarmed_base_F: I_Heli_light_03_base_F {};
|
||||
class Heli_light_03_unarmed_base_F: Heli_light_03_base_F {};
|
||||
|
||||
class I_Heli_light_03_unarmed_F: I_Heli_light_03_unarmed_base_F {};
|
||||
class I_Heli_light_03_unarmed_F: Heli_light_03_unarmed_base_F {};
|
||||
|
||||
class Plane_CAS_01_base_F: Plane_Base_F {
|
||||
lockDetectionSystem = 12;
|
||||
@ -303,7 +302,8 @@ class CfgVehicles {
|
||||
};*/
|
||||
};
|
||||
|
||||
class B_Heli_Transport_03_base_F: Helicopter_Base_H {
|
||||
class Heli_Transport_03_base_F: Helicopter_Base_H {};
|
||||
class B_Heli_Transport_03_base_F: Heli_Transport_03_base_F {
|
||||
lockDetectionSystem = 12;
|
||||
incomingMissileDetectionSystem = 16;
|
||||
driverCanEject = 1;
|
||||
@ -317,7 +317,7 @@ class CfgVehicles {
|
||||
};
|
||||
};
|
||||
|
||||
class B_Heli_Transport_03_unarmed_base_F: B_Heli_Transport_03_base_F {
|
||||
class B_Heli_Transport_03_unarmed_base_F: Heli_Transport_03_base_F {
|
||||
class Turrets: Turrets {
|
||||
class CopilotTurret: CopilotTurret {
|
||||
canEject = 1;
|
||||
|
@ -2,14 +2,11 @@
|
||||
#define MACRO_ATTACHTOVEHICLE \
|
||||
class ACE_Actions { \
|
||||
class ACE_MainActions { \
|
||||
selection = ""; \
|
||||
distance = 5; \
|
||||
condition = "true"; \
|
||||
class GVAR(AttachVehicle) { \
|
||||
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); \
|
||||
@ -19,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); \
|
||||
@ -60,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);
|
||||
@ -70,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);
|
||||
|
@ -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;
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Author: eRazeri and CAA-Picard
|
||||
* Author: eRazeri and esteldunedain
|
||||
* Attach an item to the unit
|
||||
*
|
||||
* Arguments:
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Author: eRazeri and CAA-Picard
|
||||
* Author: eRazeri and esteldunedain
|
||||
* Detach an item from a unit
|
||||
*
|
||||
* Arguments:
|
||||
|
@ -62,6 +62,5 @@ _attachables = items _unit;
|
||||
},
|
||||
{
|
||||
call EFUNC(interaction,hideMenu);
|
||||
if !(profileNamespace getVariable [QEGVAR(interaction,AutoCloseMenu), false]) then {"Default" call EFUNC(interaction,openMenuSelf)};
|
||||
}
|
||||
] call EFUNC(interaction,openSelectMenu);
|
||||
|
1
addons/backpacks/$PBOPREFIX$
Normal file
1
addons/backpacks/$PBOPREFIX$
Normal file
@ -0,0 +1 @@
|
||||
z\ace\addons\backpacks
|
@ -5,6 +5,12 @@ class Extended_PreInit_EventHandlers {
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_InventoryOpened_EventHandlers {
|
||||
class CAManBase {
|
||||
class GVAR(onOpenInventory) {
|
3
addons/backpacks/XEH_postInit.sqf
Normal file
3
addons/backpacks/XEH_postInit.sqf
Normal file
@ -0,0 +1,3 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
["backpackOpened", {_this call FUNC(backpackOpened)}] call EFUNC(common,addEventHandler);
|
@ -2,6 +2,7 @@
|
||||
|
||||
ADDON = false;
|
||||
|
||||
PREP(backpackOpened);
|
||||
PREP(getBackpackAssignedUnit);
|
||||
PREP(isBackpack);
|
||||
PREP(onOpenInventory);
|
@ -5,7 +5,7 @@ class CfgPatches {
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common","ace_interaction"};
|
||||
requiredAddons[] = {"ace_common"};
|
||||
author[] = {"bux","commy2"};
|
||||
authorUrl = "https://github.com/commy2/";
|
||||
VERSION_CONFIG;
|
||||
@ -13,4 +13,3 @@ class CfgPatches {
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
51
addons/backpacks/functions/fnc_backpackOpened.sqf
Normal file
51
addons/backpacks/functions/fnc_backpackOpened.sqf
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
*
|
||||
* Someone opened your backpack. Execute locally.
|
||||
*
|
||||
* Argument:
|
||||
* 0: Who accessed your inventory? (Object)
|
||||
* 1: Unit that wields the backpack (Object)
|
||||
* 2: The backpack object (Object)
|
||||
*
|
||||
* Return value:
|
||||
* None.
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_target"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_target = _this select 1;
|
||||
_backpack = _this select 2;
|
||||
|
||||
// do cam shake if the target is the player
|
||||
if ([_target] call EFUNC(common,isPlayer)) then {
|
||||
addCamShake [4, 0.5, 5];
|
||||
};
|
||||
|
||||
// play a rustling sound
|
||||
private ["_sounds", "_position"];
|
||||
|
||||
_sounds = [
|
||||
/*"a3\sounds_f\characters\ingame\AinvPknlMstpSlayWpstDnon_medic.wss",
|
||||
"a3\sounds_f\characters\ingame\AinvPknlMstpSlayWrflDnon_medic.wss",
|
||||
"a3\sounds_f\characters\ingame\AinvPpneMstpSlayWpstDnon_medic.wss",
|
||||
"a3\sounds_f\characters\ingame\AinvPpneMstpSlayWrflDnon_medic.wss"*/
|
||||
|
||||
QUOTE(PATHTO_R(sounds\zip_in.wav)),
|
||||
QUOTE(PATHTO_R(sounds\zip_out.wav))
|
||||
];
|
||||
|
||||
_position = _target modelToWorld (_target selectionPosition "Spine3");
|
||||
_position = _position call EFUNC(common,positionToASL);
|
||||
|
||||
playSound3D [
|
||||
_sounds select floor random count _sounds,
|
||||
objNull,
|
||||
false,
|
||||
_position,
|
||||
1,
|
||||
1,
|
||||
50
|
||||
];
|
30
addons/backpacks/functions/fnc_onOpenInventory.sqf
Normal file
30
addons/backpacks/functions/fnc_onOpenInventory.sqf
Normal file
@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
*
|
||||
* Handle the open inventory event. Display message on traget client.
|
||||
*
|
||||
* Argument:
|
||||
* Input from "InventoryOpened" eventhandler
|
||||
*
|
||||
* Return value:
|
||||
* false. Always open the inventory dialog. (Bool)
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_backpack"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_backpack = _this select 1;
|
||||
|
||||
// exit if the target is not a backpack
|
||||
if !([_backpack] call FUNC(isBackpack)) exitWith {};
|
||||
|
||||
// get the unit that wears the backpack object
|
||||
private "_target";
|
||||
_target = [_backpack] call FUNC(getBackpackAssignedUnit);
|
||||
|
||||
// raise event on target unit
|
||||
["backpackOpened", _target, [_unit, _target, _backpack]] call EFUNC(common,targetEvent);
|
||||
|
||||
// return false to open inventory as usual
|
||||
false
|
1
addons/backpacks/functions/script_component.hpp
Normal file
1
addons/backpacks/functions/script_component.hpp
Normal file
@ -0,0 +1 @@
|
||||
#include "\z\ace\addons\backpacks\script_component.hpp"
|
12
addons/backpacks/script_component.hpp
Normal file
12
addons/backpacks/script_component.hpp
Normal file
@ -0,0 +1,12 @@
|
||||
#define COMPONENT backpacks
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_BACKPACKS
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_ENABLED_BACKPACKS
|
||||
#define DEBUG_SETTINGS DEBUG_ENABLED_BACKPACKS
|
||||
#endif
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
BIN
addons/backpacks/sounds/zip_in.wav
Normal file
BIN
addons/backpacks/sounds/zip_in.wav
Normal file
Binary file not shown.
BIN
addons/backpacks/sounds/zip_out.wav
Normal file
BIN
addons/backpacks/sounds/zip_out.wav
Normal file
Binary file not shown.
@ -9,7 +9,6 @@ class Extended_PostInit_EventHandlers {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
||||
};
|
||||
};
|
||||
|
||||
//release escorted captive when entering a vehicle
|
||||
class Extended_GetIn_EventHandlers {
|
||||
class All {
|
||||
@ -18,7 +17,6 @@ class Extended_GetIn_EventHandlers {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
//reset captive animation after leaving vehicle
|
||||
class Extended_GetOut_EventHandlers {
|
||||
class All {
|
||||
@ -27,7 +25,6 @@ class Extended_GetOut_EventHandlers {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
//reset captivity and escorting status when getting killed
|
||||
class Extended_Killed_EventHandlers {
|
||||
class CAManBase {
|
||||
@ -36,7 +33,6 @@ class Extended_Killed_EventHandlers {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
//mission start
|
||||
class Extended_InitPost_EventHandlers {
|
||||
class CAManBase {
|
||||
@ -45,4 +41,3 @@ class Extended_InitPost_EventHandlers {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -72,7 +72,7 @@ class CfgMovesMaleSdr: CfgMovesBasic {
|
||||
InterpolateTo[] = {"Unconscious",0.01};
|
||||
};
|
||||
class ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon: ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon {
|
||||
speed = 0.333; //for gameplay reasons, slow this down
|
||||
speed = 0.5; //for gameplay reasons, slow this down
|
||||
actions = "CivilStandActions";
|
||||
file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\sur\non\AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon";
|
||||
ConnectTo[] = {"AmovPercMstpSnonWnonDnon",0.1};
|
||||
|
@ -2,34 +2,26 @@ class CfgVehicles {
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
class ACE_Actions {
|
||||
class ACE_RightHandActions {
|
||||
|
||||
class ACE_ApplyHandcuffs {
|
||||
displayName = "$STR_ACE_Captives_SetCaptive";
|
||||
selection = "righthand";
|
||||
displayName = "Right hand";
|
||||
distance = 5;
|
||||
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(canApplyHandcuffs)) || ([ARR_2(_player, _target)] call FUNC(canRemoveHandcuffs)));
|
||||
class ACE_ApplyHandcuffs {
|
||||
displayName = "$STR_ACE_Captives_SetCaptive";
|
||||
distance = 4;
|
||||
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canApplyHandcuffs));
|
||||
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doApplyHandcuffs));
|
||||
exceptions[] = {};
|
||||
showDisabled = 0;
|
||||
priority = 2.4;
|
||||
icon = QUOTE(PATHTOF(UI\handcuff_ca.paa));
|
||||
hotkey = "C";
|
||||
};
|
||||
class ACE_RemoveHandcuffs {
|
||||
displayName = "$STR_ACE_Captives_ReleaseCaptive";
|
||||
distance = 4;
|
||||
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canRemoveHandcuffs));
|
||||
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doRemoveHandcuffs));
|
||||
exceptions[] = {};
|
||||
showDisabled = 0;
|
||||
priority = 2.4;
|
||||
icon = QUOTE(PATHTOF(UI\handcuff_ca.paa));
|
||||
hotkey = "R";
|
||||
};
|
||||
distance = 2;
|
||||
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canApplyHandcuffs));
|
||||
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doApplyHandcuffs));
|
||||
exceptions[] = {};
|
||||
icon = QUOTE(PATHTOF(UI\handcuff_ca.paa));
|
||||
};
|
||||
class ACE_RemoveHandcuffs {
|
||||
displayName = "$STR_ACE_Captives_ReleaseCaptive";
|
||||
selection = "righthand";
|
||||
distance = 2;
|
||||
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canRemoveHandcuffs));
|
||||
statement = QUOTE([ARR_2(_player, _target)] call FUNC(doRemoveHandcuffs));
|
||||
exceptions[] = {};
|
||||
icon = QUOTE(PATHTOF(UI\handcuff_ca.paa));
|
||||
};
|
||||
|
||||
class ACE_MainActions {
|
||||
class ACE_EscortCaptive {
|
||||
displayName = "$STR_ACE_Captives_EscortCaptive";
|
||||
@ -47,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;
|
||||
@ -58,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;
|
||||
@ -82,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";
|
||||
@ -90,7 +82,7 @@ class CfgVehicles {
|
||||
class ACE_StartSurrenderingSelf {
|
||||
displayName = "$STR_ACE_Captives_StartSurrendering";
|
||||
condition = QUOTE([ARR_2(_player, true)] call FUNC(canSurrender));
|
||||
statement = QUOTE([ARR_2(_player, true)] call FUNC(surrender));
|
||||
statement = QUOTE([ARR_2(_player, true)] call FUNC(setSurrendered));
|
||||
exceptions[] = {};
|
||||
showDisabled = 0;
|
||||
priority = 0;
|
||||
@ -98,8 +90,8 @@ class CfgVehicles {
|
||||
class ACE_StopSurrenderingSelf {
|
||||
displayName = "$STR_ACE_Captives_StopSurrendering";
|
||||
condition = QUOTE([ARR_2(_player, false)] call FUNC(canSurrender));
|
||||
statement = QUOTE([ARR_2(_player, false)] call FUNC(surrender));
|
||||
exceptions[] = {QGVAR(isNotSurrendering)};
|
||||
statement = QUOTE([ARR_2(_player, false)] call FUNC(setSurrendered));
|
||||
exceptions[] = {"isNotSurrendering"};
|
||||
showDisabled = 0;
|
||||
priority = 0;
|
||||
};
|
||||
@ -115,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"; \
|
||||
@ -162,15 +154,10 @@ class CfgVehicles {
|
||||
MACRO_LOADUNLOADCAPTIVE
|
||||
};
|
||||
|
||||
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
|
||||
name = #ITEM; \
|
||||
count = COUNT; \
|
||||
};
|
||||
|
||||
class Box_NATO_Support_F;
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_CableTie,12)
|
||||
MACRO_ADDITEM(ACE_CableTie,12);
|
||||
};
|
||||
};
|
||||
|
||||
@ -191,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 {
|
||||
|
BIN
addons/captives/UI/Icon_Module_Make_Unit_Surrender_ca.paa
Normal file
BIN
addons/captives/UI/Icon_Module_Make_Unit_Surrender_ca.paa
Normal file
Binary file not shown.
@ -1,12 +1,9 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
|
||||
["MoveInCaptive", {_this call FUNC(vehicleCaptiveMoveIn)}] call EFUNC(common,addEventHandler);
|
||||
["MoveOutCaptive", {_this call FUNC(vehicleCaptiveMoveOut)}] call EFUNC(common,addEventHandler);
|
||||
["SetHandcuffed", {_this call FUNC(setHandcuffed)}] call EFUNC(common,addEventHandler);
|
||||
|
||||
//Handles when someone starts escorting and then disconnects, leaving the captive attached
|
||||
//This is normaly handled by the PFEH in doEscortCaptive, but that won't be running if they DC
|
||||
|
||||
if (isServer) then {
|
||||
addMissionEventHandler ["HandleDisconnect", {
|
||||
PARAMS_1(_disconnectedPlayer);
|
||||
@ -21,12 +18,20 @@ if (isServer) then {
|
||||
}];
|
||||
};
|
||||
|
||||
//TODO: Medical Integration Events???
|
||||
["playerVehicleChanged", {_this call FUNC(handleVehicleChanged)}] call EFUNC(common,addEventHandler);
|
||||
["zeusDisplayChanged", {_this call FUNC(handleZeusDisplayChanged)}] call EFUNC(common,addEventHandler);
|
||||
["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
|
||||
["MoveInCaptive", {_this call FUNC(vehicleCaptiveMoveIn)}] call EFUNC(common,addEventHandler);
|
||||
["MoveOutCaptive", {_this call FUNC(vehicleCaptiveMoveOut)}] call EFUNC(common,addEventHandler);
|
||||
|
||||
// [_unit, "knockedOut", {
|
||||
// if (local (_this select 0)) then {_this call ACE_Captives_fnc_handleKnockedOut};
|
||||
// }] call ACE_Core_fnc_addCustomEventhandler;
|
||||
["SetHandcuffed", {_this call FUNC(setHandcuffed)}] call EFUNC(common,addEventHandler);
|
||||
["SetSurrendered", {_this call FUNC(setSurrendered)}] call EFUNC(common,addEventHandler);
|
||||
|
||||
// [_unit, "wokeUp", {
|
||||
// if (local (_this select 0)) then {_this call ACE_Captives_fnc_handleWokeUp};
|
||||
// }] call ACE_Core_fnc_addCustomEventhandler;
|
||||
//Medical Integration Events???
|
||||
["medical_onUnconscious", {_this call ACE_Captives_fnc_handleOnUnconscious}] call EFUNC(common,addEventHandler);
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
["isNotEscorting", {!(GETVAR(_this select 0,GVAR(isEscorting),false))}] call EFUNC(common,addCanInteractWithCondition);
|
||||
["isNotHandcuffed", {!(GETVAR(_this select 0,GVAR(isHandcuffed),false))}] call EFUNC(common,addCanInteractWithCondition);
|
||||
["isNotSurrendering", {!(GETVAR(_this select 0,GVAR(isSurrendering),false))}] call EFUNC(common,addCanInteractWithCondition);
|
||||
|
@ -19,13 +19,13 @@ PREP(doUnloadCaptive);
|
||||
PREP(handleGetIn);
|
||||
PREP(handleGetOut);
|
||||
PREP(handleKilled);
|
||||
PREP(handleKnockedOut);
|
||||
PREP(handleOnUnconscious);
|
||||
PREP(handlePlayerChanged);
|
||||
PREP(handleUnitInitPost);
|
||||
PREP(handleWokeUp);
|
||||
PREP(handleZeusDisplayChanged);
|
||||
PREP(moduleSurrender);
|
||||
PREP(setHandcuffed);
|
||||
PREP(surrender);
|
||||
PREP(setSurrendered);
|
||||
PREP(vehicleCaptiveMoveIn);
|
||||
PREP(vehicleCaptiveMoveOut);
|
||||
|
||||
|
@ -16,16 +16,3 @@ class CfgPatches {
|
||||
#include "CfgMoves.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
|
||||
|
||||
class ACE_canInteractConditions {
|
||||
class GVAR(isNotEscorting) {
|
||||
condition = QUOTE(!(GETVAR(player,QGVAR(isEscorting),false)));
|
||||
};
|
||||
class GVAR(isNotHandcuffed) {
|
||||
condition = QUOTE(!(GETVAR(player,QGVAR(isHandcuffed),false)));
|
||||
};
|
||||
class GVAR(isNotSurrendering) {
|
||||
condition = QUOTE(!(GETVAR(player,QGVAR(isSurrendering),false)));
|
||||
};
|
||||
};
|
||||
|
@ -18,5 +18,12 @@
|
||||
|
||||
PARAMS_2(_unit,_newSurrenderState);
|
||||
|
||||
//TODO: any other conditions??
|
||||
(!((_unit getVariable [QGVAR(isSurrendering), false]) isEqualTo _newSurrenderState))
|
||||
private "_returnValue";
|
||||
|
||||
_returnValue = if (_newSurrenderState) then {
|
||||
!(_unit getVariable [QGVAR(isSurrendering), false]); //Not currently surrendering
|
||||
} else {
|
||||
(_unit getVariable [QGVAR(isSurrendering), false]); //is Surrendering
|
||||
};
|
||||
|
||||
_returnValue
|
||||
|
@ -51,7 +51,7 @@ if (_state) then {
|
||||
_unit setVariable [QGVAR(escortedUnit), objNull, true];
|
||||
};
|
||||
};
|
||||
[_escortFnc, 0.2, [_unit, _target, _actionID]] call CBA_fnc_addPerFrameHandler;
|
||||
[_escortFnc, 0, [_unit, _target, _actionID]] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
} else {
|
||||
_unit setVariable [QGVAR(isEscorting), false, true];
|
||||
|
@ -19,6 +19,12 @@
|
||||
|
||||
PARAMS_3(_vehicle,_dontcare,_unit);
|
||||
|
||||
if ((local _unit) && (_unit getVariable [QGVAR(isEscorting), false])) then {
|
||||
_unit setVariable [QGVAR(isEscorting), false, true];
|
||||
if (local _unit) then {
|
||||
if (_unit getVariable [QGVAR(isEscorting), false]) then {
|
||||
_unit setVariable [QGVAR(isEscorting), false, true];
|
||||
};
|
||||
|
||||
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
|
||||
[_unit, false] call FUNC(setSurrender);
|
||||
};
|
||||
};
|
||||
|
@ -1,2 +0,0 @@
|
||||
// by commy2
|
||||
|
36
addons/captives/functions/fnc_handleOnUnconscious.sqf
Normal file
36
addons/captives/functions/fnc_handleOnUnconscious.sqf
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Author: commy2, PabstMirror
|
||||
* Handles the "medical_onUnconscious" event
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
* 0: Is Unconsisisiouses <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [bob, true] call ACE_captives_fnc_handleOnUnconscious
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_isUnconc);
|
||||
|
||||
if (!local _unit) exitWith {};
|
||||
|
||||
systemChat format ["med: %1", _this];
|
||||
|
||||
if (_isUnconc) then {
|
||||
//Knocked out: If surrendering, stop
|
||||
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
|
||||
[_unit, false] call FUNC(setSurrendered);
|
||||
};
|
||||
} else {
|
||||
//Woke up: if handcuffed, goto animation
|
||||
if (_unit getVariable [QGVAR(isHandcuffed), false] && {vehicle _unit == _unit}) then {
|
||||
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
|
||||
[_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation);
|
||||
};
|
||||
};
|
@ -18,10 +18,16 @@
|
||||
|
||||
PARAMS_2(_newUnit,_oldUnit);
|
||||
|
||||
//set showHUD based on new unit status:
|
||||
if ((_newUnit getVariable [QGVAR(isHandcuffed), false]) || {_newUnit getVariable [QGVAR(isSurrendering), false]}) then {
|
||||
TRACE_1("Player Change (showHUD false)",_newUnit);
|
||||
showHUD false;
|
||||
showHUD false;
|
||||
} else {
|
||||
TRACE_1("Player Change (showHUD true)",_newUnit);
|
||||
showHUD true;
|
||||
};
|
||||
|
||||
//If old player was escorting, stop
|
||||
if (_oldUnit getVariable [QGVAR(isEscorting), false]) then {
|
||||
_oldUnit setVariable [QGVAR(isEscorting), false, true];
|
||||
};
|
||||
|
@ -29,6 +29,6 @@ if (local _unit) then {
|
||||
|
||||
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
|
||||
_unit setVariable [QGVAR(isSurrendering), false];
|
||||
[_unit, true] call FUNC(surrender);
|
||||
[_unit, true] call FUNC(setSurrendered);
|
||||
};
|
||||
};
|
||||
|
@ -1,23 +0,0 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
* TODO
|
||||
*
|
||||
* Arguments:
|
||||
* 0: _unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* The return value <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [bob] call ACE_captives_fnc_handleWokeUp
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_unit);
|
||||
|
||||
if (_unit getVariable [QGVAR(isHandcuffed), false] && {vehicle _unit == _unit}) then {
|
||||
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
|
||||
[_unit, "ACE_AmovPercMstpScapWnonDnon", 0] call EFUNC(common,doAnimation);
|
||||
};
|
31
addons/captives/functions/fnc_handleZeusDisplayChanged.sqf
Normal file
31
addons/captives/functions/fnc_handleZeusDisplayChanged.sqf
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Handles ZeusDisplayChanged event
|
||||
* Need to reset showHUD after closing zeus
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
* 1: Display is now open <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [bob1, false] call ACE_captives_fnc_handleZeusDisplayChanged
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_zeusIsOpen);
|
||||
|
||||
//set showHUD based on unit status:
|
||||
if (!_zeusIsOpen) then {
|
||||
if ((_unit getVariable [QGVAR(isHandcuffed), false]) || {_unit getVariable [QGVAR(isSurrendering), false]}) then {
|
||||
TRACE_1("Player Change (showHUD false)",_unit);
|
||||
showHUD false;
|
||||
} else {
|
||||
TRACE_1("Player Change (showHUD true)",_unit);
|
||||
showHUD true;
|
||||
};
|
||||
};
|
@ -27,19 +27,31 @@ if (local _logic) then {
|
||||
if ((count _bisMouseOver) == 2) then {//check what mouse was over before the module was placed
|
||||
_mouseOverObject = _bisMouseOver select 1;
|
||||
if ((_mouseOverObject isKindOf "CAManBase") && {(vehicle _mouseOverObject) == _mouseOverObject}) then {
|
||||
systemChat format ["Debug - module surrendering %1", (name _mouseOverObject)];
|
||||
[_mouseOverObject, true] call FUNC(surrender);
|
||||
TRACE_2("Debug - module surrendering %1",_mouseOverObject,(name _mouseOverObject));
|
||||
if (alive _mouseOverObject) then {
|
||||
if (!(_mouseOverObject getVariable [QGVAR(isSurrendering), false])) then {
|
||||
["SetSurrendered", [_mouseOverObject], [_mouseOverObject, true]] call EFUNC(common,targetEvent);
|
||||
} else {
|
||||
["SetSurrendered", [_mouseOverObject], [_mouseOverObject, false]] call EFUNC(common,targetEvent);
|
||||
};
|
||||
} else {
|
||||
["STR_ACE_Captives_Zeus_OnlyAlive"] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
} else {
|
||||
systemChat format ["Only use on dismounted inf"];
|
||||
["STR_ACE_Captives_Zeus_OnlyInfentry"] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
} else {
|
||||
systemChat format ["Nothing under mouse"];
|
||||
["STR_ACE_Captives_Zeus_NothingSelected"] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
} else {//an editor module
|
||||
{
|
||||
systemChat format ["Debug - module surrendering %1", (name _x)];
|
||||
[_x, true] call FUNC(surrender);
|
||||
} forEach _units;
|
||||
} else {
|
||||
//an editor module
|
||||
//Modules run before postInit can instal the event handler, so we need to wait a little bit
|
||||
[{
|
||||
PARAMS_1(_units);
|
||||
{
|
||||
["SetSurrendered", [_x], [_x, true]] call EFUNC(common,targetEvent);
|
||||
} forEach _units;
|
||||
}, [_units], 0.05, 0.05]call EFUNC(common,waitAndExecute);
|
||||
};
|
||||
|
||||
deleteVehicle _logic;
|
||||
|
@ -18,19 +18,23 @@
|
||||
|
||||
PARAMS_2(_unit,_state);
|
||||
|
||||
// We only want this function to work on local machines
|
||||
if (!local _unit) exitwith {
|
||||
[_this, QUOTE(FUNC(setHandcuffed)), _unit] call EFUNC(common,execRemoteFnc);
|
||||
TRACE_2("running setHandcuffed on remote unit",_unit,_state);
|
||||
};
|
||||
|
||||
if (_state isEqualTo (_unit getVariable [QGVAR(isHandcuffed), false])) then {
|
||||
LOG("setHandcuffed: current state same as new");
|
||||
if (!local _unit) exitwith {
|
||||
ERROR("running setHandcuffed on remote unit");
|
||||
};
|
||||
if ((_unit getVariable [QGVAR(isHandcuffed), false]) isEqualTo _state) exitWith {
|
||||
ERROR("setHandcuffed: current state same as new");
|
||||
};
|
||||
|
||||
if (_state) then {
|
||||
_unit setVariable [QGVAR(isHandcuffed), true, true];
|
||||
[_unit, QGVAR(Handcuffed), true] call EFUNC(common,setCaptivityStatus);
|
||||
|
||||
if (_unit getVariable [QGVAR(isSurrendering), false]) then { //If surrendering, stop
|
||||
[_unit, false] call FUNC(setSurrendered);
|
||||
};
|
||||
|
||||
//Set unit cargoIndex (will be -1 if dismounted)
|
||||
_unit setVariable [QGVAR(CargoIndex), ((vehicle _unit) getCargoIndex _unit), true];
|
||||
|
||||
if (_unit == ACE_player) then {
|
||||
@ -43,13 +47,32 @@ if (_state) then {
|
||||
if (_unit getVariable [QGVAR(isHandcuffed), false] && {vehicle _unit == _unit}) then {
|
||||
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
|
||||
[_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation);
|
||||
|
||||
//Adds an animation changed eh
|
||||
//If we get a change in animation then redo the animation (handles people vaulting to break the animation chain)
|
||||
_animChangedEHID = _unit addEventHandler ["AnimChanged", {
|
||||
PARAMS_2(_unit,_newAnimation);
|
||||
if ((_newAnimation != "ACE_AmovPercMstpSsurWnonDnon") && {!(_unit getVariable ["ACE_isUnconscious", false])}) then {
|
||||
ERROR("Handcuff animation interrupted");
|
||||
systemChat format ["debug %2: new %1", _newAnimation, time];
|
||||
[_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation);
|
||||
};
|
||||
}];
|
||||
_unit setVariable [QGVAR(handcuffAnimEHID), _animChangedEHID];
|
||||
|
||||
};
|
||||
}, [_unit], 0.01, 0] call EFUNC(common,waitAndExecute);
|
||||
} else {
|
||||
_unit setVariable [QGVAR(isHandcuffed), false, true];
|
||||
[_unit, QGVAR(Handcuffed), false] call EFUNC(common,setCaptivityStatus);
|
||||
if ((vehicle _unit) == _unit) then {
|
||||
//Break out of hands up animation loop (doAnimation handles Unconscious prioity)
|
||||
|
||||
//remove AnimChanged EH
|
||||
_animChangedEHID = _unit getVariable [QGVAR(handcuffAnimEHID), -1];
|
||||
_unit removeEventHandler ["AnimChanged", _animChangedEHID];
|
||||
_unit setVariable [QGVAR(handcuffAnimEHID), -1];
|
||||
|
||||
if (((vehicle _unit) == _unit) && {!(_unit getVariable ["ACE_isUnconscious", false])}) then {
|
||||
//Break out of hands up animation loop
|
||||
[_unit, "ACE_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation);
|
||||
};
|
||||
|
||||
|
101
addons/captives/functions/fnc_setSurrendered.sqf
Normal file
101
addons/captives/functions/fnc_setSurrendered.sqf
Normal file
@ -0,0 +1,101 @@
|
||||
/*
|
||||
* Author: commy2 PabstMirror
|
||||
* Lets a unit surrender
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
* 1: True to surrender, false to un-surrender <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [Pierre, true] call ACE_captives_fnc_setSurrendered;
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_state);
|
||||
|
||||
|
||||
if (!local _unit) exitwith {
|
||||
ERROR("running surrender on remote unit");
|
||||
};
|
||||
|
||||
if ((_unit getVariable [QGVAR(isSurrendering), false]) isEqualTo _state) exitWith {
|
||||
ERROR("Surrender: current state same as new");
|
||||
};
|
||||
|
||||
if (_state) then {
|
||||
if ((vehicle _unit) != _unit) exitWith {ERROR("Cannot surrender while mounted");};
|
||||
if (_unit getVariable [QGVAR(isHandcuffed), false]) exitWith {ERROR("Cannot surrender while handcuffed");};
|
||||
|
||||
_unit setVariable [QGVAR(isSurrendering), true, true];
|
||||
|
||||
[_unit, QGVAR(Surrendered), true] call EFUNC(common,setCaptivityStatus);
|
||||
|
||||
if (_unit == ACE_player) then {
|
||||
showHUD false;
|
||||
};
|
||||
|
||||
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
|
||||
[_unit, "ACE_AmovPercMstpSsurWnonDnon", 1] call EFUNC(common,doAnimation);
|
||||
|
||||
// fix anim on mission start (should work on dedicated servers)
|
||||
[{
|
||||
PARAMS_1(_unit);
|
||||
if (_unit getVariable [QGVAR(isSurrendering), false] && {(vehicle _unit) == _unit}) then {
|
||||
//Adds an animation changed eh
|
||||
//If we get a change in animation then redo the animation (handles people vaulting to break the animation chain)
|
||||
_animChangedEHID = _unit addEventHandler ["AnimChanged", {
|
||||
PARAMS_2(_unit,_newAnimation);
|
||||
if ((_newAnimation != "ACE_AmovPercMstpSsurWnonDnon") && {!(_unit getVariable ["ACE_isUnconscious", false])}) then {
|
||||
ERROR("Surrender animation interrupted");
|
||||
systemChat format ["debug %2: new %1", _newAnimation, time];
|
||||
[_unit, "ACE_AmovPercMstpSsurWnonDnon", 1] call EFUNC(common,doAnimation);
|
||||
};
|
||||
}];
|
||||
_unit setVariable [QGVAR(surrenderAnimEHID), _animChangedEHID];
|
||||
};
|
||||
}, [_unit], 0.01, 0] call EFUNC(common,waitAndExecute);
|
||||
} else {
|
||||
_unit setVariable [QGVAR(isSurrendering), false, true];
|
||||
[_unit, QGVAR(Surrendered), false] call EFUNC(common,setCaptivityStatus);
|
||||
|
||||
//remove AnimChanged EH
|
||||
_animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1];
|
||||
_unit removeEventHandler ["AnimChanged", _animChangedEHID];
|
||||
_unit setVariable [QGVAR(surrenderAnimEHID), -1];
|
||||
|
||||
if (_unit == ACE_player) then {
|
||||
//only re-enable HUD if not handcuffed
|
||||
if (!(_unit getVariable [QGVAR(isHandcuffed), false])) then {
|
||||
showHUD true;
|
||||
};
|
||||
};
|
||||
|
||||
if (_unit getVariable ["ACE_isUnconscious", false]) exitWith {}; //don't touch animations if unconscious
|
||||
|
||||
//if we are in "hands up" animationState, crack it now
|
||||
if (((vehicle _unit) == _unit) && {(animationState _unit) == "ACE_AmovPercMstpSsurWnonDnon"}) then {
|
||||
[_unit, "ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation);
|
||||
} else {
|
||||
//spin up a PFEH, to watching animationState for the next 20 seconds to make sure we don't enter "hands up"
|
||||
//Handles long animation chains
|
||||
[{
|
||||
PARAMS_2(_args,_pfID);
|
||||
EXPLODE_2_PVT(_args,_unit,_maxTime);
|
||||
//If waited long enough or they re-surrendered or they are unconscious, exit loop
|
||||
if ((time > _maxTime) || {_unit getVariable [QGVAR(isSurrendering), false]} || {_unit getVariable ["ACE_isUnconscious", false]}) exitWith {
|
||||
[_pfID] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
//Only break animation if they are actualy the "hands up" animation (because we are using switchmove there won't be an transition)
|
||||
if (((vehicle _unit) == _unit) && {(animationState _unit) == "ACE_AmovPercMstpSsurWnonDnon"}) exitWith {
|
||||
[_pfID] call CBA_fnc_removePerFrameHandler;
|
||||
//Break out of hands up animation loop
|
||||
[_unit, "ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation);
|
||||
};
|
||||
}, 0, [_unit, (time + 20)]] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
||||
};
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user