mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge remote-tracking branch 'origin' into pl-translation-7
This commit is contained in:
commit
1edcc320d1
@ -17,6 +17,9 @@
|
|||||||
<a href="https://github.com/acemod/ACE3/blob/master/LICENSE">
|
<a href="https://github.com/acemod/ACE3/blob/master/LICENSE">
|
||||||
<img src="http://img.shields.io/badge/License-GPLv2-red.svg" alt="ACE3 License">
|
<img src="http://img.shields.io/badge/License-GPLv2-red.svg" alt="ACE3 License">
|
||||||
</a>
|
</a>
|
||||||
|
<a href="http://slackin.koffeinflummi.de">
|
||||||
|
<img src="http://slackin.koffeinflummi.de/badge.svg" alt="ACE3 Slack">
|
||||||
|
</a>
|
||||||
</p>
|
</p>
|
||||||
<p align="center"><sup><strong>Requires the latest version of <a href="https://github.com/CBATeam/CBA_A3/releases">CBA A3</a>. Visit us on <a href="https://www.facebook.com/ACE3Mod">Facebook</a> | <a href="https://www.youtube.com/c/ACE3Mod">YouTube</a> | <a href="https://twitter.com/ACE3Mod">Twitter</a> | <a href="http://www.reddit.com/r/arma/search?q=ACE&restrict_sr=on&sort=new&t=all">Reddit</a></strong></sup></p>
|
<p align="center"><sup><strong>Requires the latest version of <a href="https://github.com/CBATeam/CBA_A3/releases">CBA A3</a>. Visit us on <a href="https://www.facebook.com/ACE3Mod">Facebook</a> | <a href="https://www.youtube.com/c/ACE3Mod">YouTube</a> | <a href="https://twitter.com/ACE3Mod">Twitter</a> | <a href="http://www.reddit.com/r/arma/search?q=ACE&restrict_sr=on&sort=new&t=all">Reddit</a></strong></sup></p>
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
ADDON = false;
|
ADDON = false;
|
||||||
|
|
||||||
PREP(backpackOpened);
|
PREP(backpackOpened);
|
||||||
PREP(getBackpackAssignedUnit);
|
|
||||||
PREP(isBackpack);
|
PREP(isBackpack);
|
||||||
PREP(onOpenInventory);
|
PREP(onOpenInventory);
|
||||||
|
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
/*
|
|
||||||
* Author: commy2
|
|
||||||
*
|
|
||||||
* Returns the unit that has the given backpack object equipped.
|
|
||||||
*
|
|
||||||
* Argument:
|
|
||||||
* 0: Executing Unit (Object)
|
|
||||||
* 1: A backpack object (Object)
|
|
||||||
*
|
|
||||||
* Return value:
|
|
||||||
* Unit that has the backpack equipped. (Object)
|
|
||||||
*/
|
|
||||||
#include "script_component.hpp"
|
|
||||||
scopeName "main";
|
|
||||||
|
|
||||||
params ["_unit","_backpack"];
|
|
||||||
_target = objNull;
|
|
||||||
{
|
|
||||||
if (backpackContainer _x == _backpack) then {_target = _x; breakTo "main"};
|
|
||||||
} count nearestObjects [_unit, ["Man"], 5];
|
|
||||||
if (isNull _target) exitWith {ACE_Player};
|
|
||||||
_target
|
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Author: commy2
|
* Author: commy2
|
||||||
*
|
*
|
||||||
* Handle the open inventory event. Display message on traget client.
|
* Handle the open inventory event. Display message on target client.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Argument:
|
||||||
* Input from "InventoryOpened" eventhandler
|
* Input from "InventoryOpened" eventhandler
|
||||||
@ -11,16 +11,17 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private "_target";
|
params ["_unit","_backpack"];
|
||||||
params ["","_backpack"];
|
|
||||||
|
|
||||||
// exit if the target is not a backpack
|
// exit if the target is not a real backpack, i.e. parachute, static weapon bag etc.
|
||||||
if !([_backpack] call FUNC(isBackpack)) exitWith {};
|
if !([_backpack] call FUNC(isBackpack)) exitWith {false};
|
||||||
|
|
||||||
// get the unit that wears the backpack object
|
// get the unit that wears the backpack object
|
||||||
_target = _this call FUNC(getBackpackAssignedUnit);
|
private "_target";
|
||||||
|
_target = objectParent _backpack;
|
||||||
|
|
||||||
if (isNull _target) exitWith {false};
|
if (isNull _target) exitWith {false};
|
||||||
|
|
||||||
// raise event on target unit
|
// raise event on target unit
|
||||||
["backpackOpened", _target, [_target, _backpack]] call EFUNC(common,targetEvent);
|
["backpackOpened", _target, [_target, _backpack]] call EFUNC(common,targetEvent);
|
||||||
|
|
||||||
|
@ -6,23 +6,11 @@ class CfgAmmo {
|
|||||||
timeToLive=6;
|
timeToLive=6;
|
||||||
};
|
};
|
||||||
|
|
||||||
class B_20mm : BulletBase {
|
|
||||||
timeToLive=30;
|
|
||||||
};
|
|
||||||
class B_25mm : BulletBase {
|
|
||||||
timeToLive=30;
|
|
||||||
};
|
|
||||||
class B_35mm_AA : BulletBase {
|
|
||||||
timeToLive=30;
|
|
||||||
};
|
|
||||||
class B_30mm_AP : BulletBase {
|
|
||||||
timeToLive=30;
|
|
||||||
};
|
|
||||||
|
|
||||||
class B_556x45_Ball : BulletBase {
|
class B_556x45_Ball : BulletBase {
|
||||||
airFriction=-0.00126466;
|
airFriction=-0.00126466;
|
||||||
hit=8;
|
hit=8;
|
||||||
typicalSpeed=750;
|
typicalSpeed=750;
|
||||||
|
tracerScale = 1;
|
||||||
tracerStartTime=0.073; // M856 tracer burns out to 800m
|
tracerStartTime=0.073; // M856 tracer burns out to 800m
|
||||||
tracerEndTime=1.57123; // Time in seconds calculated with ballistics calculator
|
tracerEndTime=1.57123; // Time in seconds calculated with ballistics calculator
|
||||||
ACE_caliber=5.69;
|
ACE_caliber=5.69;
|
||||||
@ -128,9 +116,13 @@ class CfgAmmo {
|
|||||||
ACE_muzzleVelocities[]={785, 883, 925};
|
ACE_muzzleVelocities[]={785, 883, 925};
|
||||||
ACE_barrelLengths[]={254.0, 414.02, 508.0};
|
ACE_barrelLengths[]={254.0, 414.02, 508.0};
|
||||||
};
|
};
|
||||||
|
class B_56x15_dual: BulletBase {
|
||||||
|
tracerScale = 0.5;
|
||||||
|
};
|
||||||
class B_65x39_Caseless : BulletBase {
|
class B_65x39_Caseless : BulletBase {
|
||||||
airFriction=-0.00075308;
|
airFriction=-0.00075308;
|
||||||
typicalSpeed=800;
|
typicalSpeed=800;
|
||||||
|
tracerScale = 1.1; //1.0;
|
||||||
ACE_caliber=6.706;
|
ACE_caliber=6.706;
|
||||||
ACE_bulletLength=32.893;
|
ACE_bulletLength=32.893;
|
||||||
ACE_bulletMass=7.9704;
|
ACE_bulletMass=7.9704;
|
||||||
@ -180,10 +172,15 @@ class CfgAmmo {
|
|||||||
ACE_muzzleVelocities[]={750, 820, 840, 852, 860};
|
ACE_muzzleVelocities[]={750, 820, 840, 852, 860};
|
||||||
ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4};
|
ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4};
|
||||||
};
|
};
|
||||||
|
class SubmunitionBullet;
|
||||||
|
class B_65x39_Minigun_Caseless: SubmunitionBullet {
|
||||||
|
tracerScale = 1.1; //1.0;
|
||||||
|
};
|
||||||
class B_762x51_Ball : BulletBase {
|
class B_762x51_Ball : BulletBase {
|
||||||
airFriction=-0.00100957;
|
airFriction=-0.00100957;
|
||||||
typicalSpeed=833;
|
typicalSpeed=833;
|
||||||
hit=9;
|
hit=9;
|
||||||
|
tracerScale = 1.2; //0.6;
|
||||||
tracerStartTime=0.073; // Based on the British L5A1 which burns out to 1000m
|
tracerStartTime=0.073; // Based on the British L5A1 which burns out to 1000m
|
||||||
tracerEndTime=2.15957; // Time in seconds calculated with ballistics calculator
|
tracerEndTime=2.15957; // Time in seconds calculated with ballistics calculator
|
||||||
ACE_caliber=7.823;
|
ACE_caliber=7.823;
|
||||||
@ -479,6 +476,7 @@ class CfgAmmo {
|
|||||||
class B_9x21_Ball : BulletBase {
|
class B_9x21_Ball : BulletBase {
|
||||||
airFriction=-0.00226847;
|
airFriction=-0.00226847;
|
||||||
typicalSpeed=390;
|
typicalSpeed=390;
|
||||||
|
tracerScale = 0.5;
|
||||||
hit=6;
|
hit=6;
|
||||||
ACE_caliber=9.042;
|
ACE_caliber=9.042;
|
||||||
ACE_bulletLength=15.494;
|
ACE_bulletLength=15.494;
|
||||||
@ -491,6 +489,9 @@ class CfgAmmo {
|
|||||||
ACE_muzzleVelocities[]={440, 460, 480};
|
ACE_muzzleVelocities[]={440, 460, 480};
|
||||||
ACE_barrelLengths[]={101.6, 127.0, 228.6};
|
ACE_barrelLengths[]={101.6, 127.0, 228.6};
|
||||||
};
|
};
|
||||||
|
class B_9x21_Ball_Tracer_Green: B_9x21_Ball {
|
||||||
|
tracerScale = 0.5;
|
||||||
|
};
|
||||||
class ACE_9x18_Ball_57N181S : B_9x21_Ball {
|
class ACE_9x18_Ball_57N181S : B_9x21_Ball {
|
||||||
hit=5;
|
hit=5;
|
||||||
airFriction=-0.00190333;
|
airFriction=-0.00190333;
|
||||||
@ -584,6 +585,7 @@ class CfgAmmo {
|
|||||||
timeToLive=10;
|
timeToLive=10;
|
||||||
airFriction=-0.00038944;
|
airFriction=-0.00038944;
|
||||||
typicalSpeed=910;
|
typicalSpeed=910;
|
||||||
|
tracerScale = 1.3; //1.2;
|
||||||
ACE_caliber=10.363;
|
ACE_caliber=10.363;
|
||||||
ACE_bulletLength=54.0;
|
ACE_bulletLength=54.0;
|
||||||
ACE_bulletMass=26.568;
|
ACE_bulletMass=26.568;
|
||||||
@ -670,9 +672,13 @@ class CfgAmmo {
|
|||||||
ACE_muzzleVelocities[]={880, 915, 925};
|
ACE_muzzleVelocities[]={880, 915, 925};
|
||||||
ACE_barrelLengths[]={508.0, 660.4, 711.2};
|
ACE_barrelLengths[]={508.0, 660.4, 711.2};
|
||||||
};
|
};
|
||||||
|
class B_127x33_Ball: BulletBase {
|
||||||
|
tracerScale = 1.3; //1.2;
|
||||||
|
};
|
||||||
class B_127x54_Ball : BulletBase {
|
class B_127x54_Ball : BulletBase {
|
||||||
airFriction=-0.00019268;
|
airFriction=-0.00019268;
|
||||||
typicalSpeed=300;
|
typicalSpeed=300;
|
||||||
|
tracerScale = 1.3;//
|
||||||
ACE_caliber=12.954;
|
ACE_caliber=12.954;
|
||||||
ACE_bulletLength=64.516;
|
ACE_bulletLength=64.516;
|
||||||
ACE_bulletMass=48.6;
|
ACE_bulletMass=48.6;
|
||||||
@ -688,6 +694,7 @@ class CfgAmmo {
|
|||||||
timeToLive=10;
|
timeToLive=10;
|
||||||
airFriction=-0.00057503;
|
airFriction=-0.00057503;
|
||||||
typicalSpeed=900;
|
typicalSpeed=900;
|
||||||
|
tracerScale = 1.3; //1.2;
|
||||||
ACE_caliber=12.954;
|
ACE_caliber=12.954;
|
||||||
ACE_bulletLength=58.674;
|
ACE_bulletLength=58.674;
|
||||||
ACE_bulletMass=41.9256;
|
ACE_bulletMass=41.9256;
|
||||||
@ -703,6 +710,7 @@ class CfgAmmo {
|
|||||||
timeToLive=10;
|
timeToLive=10;
|
||||||
airFriction=-0.00057503;
|
airFriction=-0.00057503;
|
||||||
typicalSpeed=900;
|
typicalSpeed=900;
|
||||||
|
tracerScale = 1.3;//
|
||||||
hit=25;
|
hit=25;
|
||||||
caliber=4.0;
|
caliber=4.0;
|
||||||
ACE_caliber=12.954;
|
ACE_caliber=12.954;
|
||||||
@ -736,6 +744,7 @@ class CfgAmmo {
|
|||||||
timeToLive=10;
|
timeToLive=10;
|
||||||
airFriction=-0.00063800;
|
airFriction=-0.00063800;
|
||||||
typicalSpeed=820;
|
typicalSpeed=820;
|
||||||
|
tracerScale = 1.3; //1.5;
|
||||||
ACE_caliber=12.979;
|
ACE_caliber=12.979;
|
||||||
ACE_bulletLength=64.008;
|
ACE_bulletLength=64.008;
|
||||||
ACE_bulletMass=48.276;
|
ACE_bulletMass=48.276;
|
||||||
@ -750,6 +759,7 @@ class CfgAmmo {
|
|||||||
class B_45ACP_Ball : BulletBase {
|
class B_45ACP_Ball : BulletBase {
|
||||||
airFriction=-0.00081221;
|
airFriction=-0.00081221;
|
||||||
typicalSpeed=250;
|
typicalSpeed=250;
|
||||||
|
tracerScale = 0.6;
|
||||||
ACE_caliber=11.481;
|
ACE_caliber=11.481;
|
||||||
ACE_bulletLength=17.272;
|
ACE_bulletLength=17.272;
|
||||||
ACE_bulletMass=14.904;
|
ACE_bulletMass=14.904;
|
||||||
@ -761,4 +771,36 @@ class CfgAmmo {
|
|||||||
ACE_muzzleVelocities[]={230, 250, 285};
|
ACE_muzzleVelocities[]={230, 250, 285};
|
||||||
ACE_barrelLengths[]={101.6, 127.0, 228.6};
|
ACE_barrelLengths[]={101.6, 127.0, 228.6};
|
||||||
};
|
};
|
||||||
|
class B_19mm_HE: BulletBase {
|
||||||
|
tracerScale = 1;
|
||||||
|
};
|
||||||
|
class B_30mm_HE: B_19mm_HE {
|
||||||
|
tracerScale = 2.5;
|
||||||
|
};
|
||||||
|
class B_20mm: BulletBase {
|
||||||
|
timeToLive=30;
|
||||||
|
tracerScale = 1.5; //1;
|
||||||
|
};
|
||||||
|
class B_25mm: BulletBase {
|
||||||
|
timeToLive=30;
|
||||||
|
tracerScale = 2.0; //1;
|
||||||
|
};
|
||||||
|
class B_30mm_AP: BulletBase {
|
||||||
|
timeToLive=30;
|
||||||
|
tracerScale = 2.5;
|
||||||
|
};
|
||||||
|
class B_35mm_AA: BulletBase {
|
||||||
|
timeToLive=30;
|
||||||
|
tracerScale = 2.75; //1.85;
|
||||||
|
};
|
||||||
|
class ShellBase;
|
||||||
|
class Sh_120mm_HE: ShellBase {
|
||||||
|
tracerScale = 3;
|
||||||
|
};
|
||||||
|
class Sh_120mm_APFSDS: ShellBase {
|
||||||
|
tracerScale = 3;
|
||||||
|
};
|
||||||
|
class Gatling_30mm_HE_Plane_CAS_01_F: BulletBase {
|
||||||
|
tracerScale = 2.5;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
@ -35,6 +35,12 @@ class CfgMovesMaleSdr: CfgMovesBasic {
|
|||||||
|
|
||||||
class CutSceneAnimationBase;
|
class CutSceneAnimationBase;
|
||||||
|
|
||||||
|
#define MACRO_ANIMATION \
|
||||||
|
head = "headDefault"; \
|
||||||
|
aimingBody = "aimingNo"; \
|
||||||
|
forceAim = 1; \
|
||||||
|
static = 1;
|
||||||
|
|
||||||
//Handcuffed Anims:
|
//Handcuffed Anims:
|
||||||
class ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon: CutSceneAnimationBase {
|
class ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon: CutSceneAnimationBase {
|
||||||
actions = "ACE_CivilStandHandcuffedActions";
|
actions = "ACE_CivilStandHandcuffedActions";
|
||||||
@ -45,6 +51,7 @@ class CfgMovesMaleSdr: CfgMovesBasic {
|
|||||||
ConnectTo[] = {"ACE_AmovPercMstpScapWnonDnon",0.1};
|
ConnectTo[] = {"ACE_AmovPercMstpScapWnonDnon",0.1};
|
||||||
InterpolateTo[] = {"Unconscious",0.01,"ACE_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon",0.1};
|
InterpolateTo[] = {"Unconscious",0.01,"ACE_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon",0.1};
|
||||||
canReload = 0;
|
canReload = 0;
|
||||||
|
MACRO_ANIMATION
|
||||||
};
|
};
|
||||||
class ACE_AmovPercMstpScapWnonDnon: ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon {
|
class ACE_AmovPercMstpScapWnonDnon: ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon {
|
||||||
file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\non\non\AmovPercMstpSnonWnonDnon_Ease";
|
file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\non\non\AmovPercMstpSnonWnonDnon_Ease";
|
||||||
@ -52,12 +59,14 @@ class CfgMovesMaleSdr: CfgMovesBasic {
|
|||||||
ConnectTo[] = {"ACE_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon",0.1};
|
ConnectTo[] = {"ACE_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon",0.1};
|
||||||
InterpolateTo[] = {"Unconscious",0.01};
|
InterpolateTo[] = {"Unconscious",0.01};
|
||||||
looped = 1;
|
looped = 1;
|
||||||
|
MACRO_ANIMATION
|
||||||
};
|
};
|
||||||
class ACE_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon: ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon {
|
class ACE_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon: ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon {
|
||||||
actions = "CivilStandActions";
|
actions = "CivilStandActions";
|
||||||
file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\non\non\amovpercmstpsnonwnondnon_easeout";
|
file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\non\non\amovpercmstpsnonwnondnon_easeout";
|
||||||
ConnectTo[] = {"AmovPercMstpSnonWnonDnon",0.1};
|
ConnectTo[] = {"AmovPercMstpSnonWnonDnon",0.1};
|
||||||
InterpolateTo[] = {"Unconscious",0.01,"ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon",0.1};
|
InterpolateTo[] = {"Unconscious",0.01,"ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpScapWnonDnon",0.1};
|
||||||
|
MACRO_ANIMATION
|
||||||
};
|
};
|
||||||
|
|
||||||
//Handcuffed-FFV:
|
//Handcuffed-FFV:
|
||||||
@ -65,6 +74,7 @@ class CfgMovesMaleSdr: CfgMovesBasic {
|
|||||||
file = "\A3\cargoposes_F_heli\anim\passenger_flatground_3idleunarmed.rtm";
|
file = "\A3\cargoposes_F_heli\anim\passenger_flatground_3idleunarmed.rtm";
|
||||||
actions = "ACE_CivilHandCuffedFFVActions";
|
actions = "ACE_CivilHandCuffedFFVActions";
|
||||||
ConnectTo[] = {};
|
ConnectTo[] = {};
|
||||||
|
MACRO_ANIMATION
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -78,6 +88,7 @@ class CfgMovesMaleSdr: CfgMovesBasic {
|
|||||||
ConnectTo[] = {"ACE_AmovPercMstpSsurWnonDnon",0.1};
|
ConnectTo[] = {"ACE_AmovPercMstpSsurWnonDnon",0.1};
|
||||||
InterpolateTo[] = {"Unconscious",0.01,"ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon",0.1};
|
InterpolateTo[] = {"Unconscious",0.01,"ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon",0.1};
|
||||||
canReload = 0;
|
canReload = 0;
|
||||||
|
MACRO_ANIMATION
|
||||||
};
|
};
|
||||||
class ACE_AmovPercMstpSsurWnonDnon: ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon {
|
class ACE_AmovPercMstpSsurWnonDnon: ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon {
|
||||||
file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\sur\non\AmovPercMstpSsurWnonDnon";
|
file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\sur\non\AmovPercMstpSsurWnonDnon";
|
||||||
@ -85,6 +96,7 @@ class CfgMovesMaleSdr: CfgMovesBasic {
|
|||||||
looped = 1;
|
looped = 1;
|
||||||
ConnectTo[] = {"ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon",0.1};
|
ConnectTo[] = {"ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon",0.1};
|
||||||
InterpolateTo[] = {"Unconscious",0.01};
|
InterpolateTo[] = {"Unconscious",0.01};
|
||||||
|
MACRO_ANIMATION
|
||||||
};
|
};
|
||||||
class ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon: ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon {
|
class ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon: ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon {
|
||||||
speed = 0.5; //for gameplay reasons, slow this down
|
speed = 0.5; //for gameplay reasons, slow this down
|
||||||
@ -92,6 +104,7 @@ class CfgMovesMaleSdr: CfgMovesBasic {
|
|||||||
file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\sur\non\AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon";
|
file = "\A3\anims_f\Data\Anim\Sdr\mov\erc\stp\sur\non\AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon";
|
||||||
ConnectTo[] = {"AmovPercMstpSnonWnonDnon",0.1};
|
ConnectTo[] = {"AmovPercMstpSnonWnonDnon",0.1};
|
||||||
InterpolateTo[] = {"Unconscious",0.01,"ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon",0.1};
|
InterpolateTo[] = {"Unconscious",0.01,"ACE_AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon",0.1};
|
||||||
|
MACRO_ANIMATION
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -41,7 +41,7 @@ if (getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(hasCargo)) != 1) ex
|
|||||||
private ["_text", "_condition", "_statement", "_icon", "_action"];
|
private ["_text", "_condition", "_statement", "_icon", "_action"];
|
||||||
_condition = {
|
_condition = {
|
||||||
params ["_target", "_player"];
|
params ["_target", "_player"];
|
||||||
GVAR(enable) && {[_player, _target, []] call EFUNC(common,canInteractWith)}
|
GVAR(enable) && {locked _target < 2} && {[_player, _target, []] call EFUNC(common,canInteractWith)}
|
||||||
};
|
};
|
||||||
_text = localize LSTRING(openMenu);
|
_text = localize LSTRING(openMenu);
|
||||||
_statement = {GVAR(interactionVehicle) = _target; createDialog QGVAR(menu);};
|
_statement = {GVAR(interactionVehicle) = _target; createDialog QGVAR(menu);};
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
// ACE - Common
|
// ACE - Common
|
||||||
|
|
||||||
|
// #define ENABLE_PERFORMANCE_COUNTERS
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
//IGNORE_PRIVATE_WARNING("_handleNetEvent", "_handleRequestAllSyncedEvents", "_handleRequestSyncedEvent", "_handleSyncedEvent");
|
//IGNORE_PRIVATE_WARNING("_handleNetEvent", "_handleRequestAllSyncedEvents", "_handleRequestSyncedEvent", "_handleSyncedEvent");
|
||||||
@ -148,6 +150,15 @@ call FUNC(checkFiles);
|
|||||||
//Event that settings are safe to use:
|
//Event that settings are safe to use:
|
||||||
["SettingsInitialized", []] call FUNC(localEvent);
|
["SettingsInitialized", []] call FUNC(localEvent);
|
||||||
|
|
||||||
|
//Set init finished and run all delayed functions:
|
||||||
|
GVAR(settingsInitFinished) = true;
|
||||||
|
diag_log text format ["[ACE] %1 delayed functions running", (count GVAR(runAtSettingsInitialized))];
|
||||||
|
{
|
||||||
|
_x params ["_func", "_params"];
|
||||||
|
_params call _func;
|
||||||
|
} forEach GVAR(runAtSettingsInitialized);
|
||||||
|
GVAR(runAtSettingsInitialized) = nil; //cleanup
|
||||||
|
|
||||||
}, 0, [false]] call CBA_fnc_addPerFrameHandler;
|
}, 0, [false]] call CBA_fnc_addPerFrameHandler;
|
||||||
|
|
||||||
|
|
||||||
@ -208,6 +219,7 @@ GVAR(OldVisibleMap) = false;
|
|||||||
|
|
||||||
// PFH to raise varios events
|
// PFH to raise varios events
|
||||||
[{
|
[{
|
||||||
|
BEGIN_COUNTER(stateChecker);
|
||||||
private ["_newCameraView", "_newInventoryDisplayIsOpen", "_newPlayerInventory", "_newPlayerTurret", "_newPlayerVehicle", "_newPlayerVisionMode", "_newPlayerWeapon", "_newZeusDisplayIsOpen", "_newVisibleMap"];
|
private ["_newCameraView", "_newInventoryDisplayIsOpen", "_newPlayerInventory", "_newPlayerTurret", "_newPlayerVehicle", "_newPlayerVisionMode", "_newPlayerWeapon", "_newZeusDisplayIsOpen", "_newVisibleMap"];
|
||||||
// "playerInventoryChanged" event
|
// "playerInventoryChanged" event
|
||||||
_newPlayerInventory = [ACE_player] call FUNC(getAllGear);
|
_newPlayerInventory = [ACE_player] call FUNC(getAllGear);
|
||||||
@ -281,25 +293,18 @@ GVAR(OldVisibleMap) = false;
|
|||||||
["visibleMapChanged", [ACE_player, _newVisibleMap]] call FUNC(localEvent);
|
["visibleMapChanged", [ACE_player, _newVisibleMap]] call FUNC(localEvent);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
END_COUNTER(stateChecker);
|
||||||
|
|
||||||
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
||||||
|
|
||||||
|
|
||||||
// PFH to raise camera created event. Only works on these cams by BI.
|
|
||||||
#define ALL_CAMERAS [ \
|
|
||||||
missionNamespace getVariable ["BIS_DEBUG_CAM", objNull], \
|
|
||||||
missionNamespace getVariable ["BIS_fnc_camera_cam", objNull], \
|
|
||||||
uiNamespace getVariable ["BIS_fnc_arsenal_cam", objNull], \
|
|
||||||
uiNamespace getVariable ["BIS_fnc_animViewer_cam", objNull], \
|
|
||||||
missionNamespace getVariable ["BIS_fnc_establishingShot_fakeUAV", objNull] \
|
|
||||||
]
|
|
||||||
|
|
||||||
GVAR(OldIsCamera) = false;
|
GVAR(OldIsCamera) = false;
|
||||||
|
|
||||||
[{
|
[{
|
||||||
|
|
||||||
// "activeCameraChanged" event
|
// "activeCameraChanged" event
|
||||||
private ["_isCamera"];
|
private ["_isCamera"];
|
||||||
_isCamera = {!isNull _x} count ALL_CAMERAS > 0;
|
_isCamera = call FUNC(isfeatureCameraActive);
|
||||||
if !(_isCamera isEqualTo GVAR(OldIsCamera)) then {
|
if !(_isCamera isEqualTo GVAR(OldIsCamera)) then {
|
||||||
// Raise ACE event locally
|
// Raise ACE event locally
|
||||||
GVAR(OldIsCamera) = _isCamera;
|
GVAR(OldIsCamera) = _isCamera;
|
||||||
@ -330,7 +335,7 @@ GVAR(OldIsCamera) = false;
|
|||||||
if (didJip) then {
|
if (didJip) then {
|
||||||
// We are jipping! Get ready and wait, and throw the event
|
// We are jipping! Get ready and wait, and throw the event
|
||||||
[{
|
[{
|
||||||
if(!(isNull player)) then {
|
if((!(isNull player)) && GVAR(settingsInitFinished)) then {
|
||||||
["PlayerJip", [player] ] call FUNC(localEvent);
|
["PlayerJip", [player] ] call FUNC(localEvent);
|
||||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||||
};
|
};
|
||||||
@ -381,5 +386,4 @@ GVAR(deviceKeyCurrentIndex) = -1;
|
|||||||
{false},
|
{false},
|
||||||
[0xC7, [true, false, false]], false] call cba_fnc_addKeybind; //SHIFT + Home Key
|
[0xC7, [true, false, false]], false] call cba_fnc_addKeybind; //SHIFT + Home Key
|
||||||
|
|
||||||
|
|
||||||
GVAR(commonPostInited) = true;
|
GVAR(commonPostInited) = true;
|
||||||
|
@ -157,6 +157,7 @@ PREP(requestCallback);
|
|||||||
PREP(resetAllDefaults);
|
PREP(resetAllDefaults);
|
||||||
PREP(restoreVariablesJIP);
|
PREP(restoreVariablesJIP);
|
||||||
PREP(revertKeyCodeLocalized);
|
PREP(revertKeyCodeLocalized);
|
||||||
|
PREP(runAfterSettingsInit);
|
||||||
PREP(sanitizeString);
|
PREP(sanitizeString);
|
||||||
PREP(sendRequest);
|
PREP(sendRequest);
|
||||||
PREP(serverLog);
|
PREP(serverLog);
|
||||||
@ -303,6 +304,9 @@ GVAR(nextFrameNo) = diag_frameno;
|
|||||||
GVAR(nextFrameBufferA) = [];
|
GVAR(nextFrameBufferA) = [];
|
||||||
GVAR(nextFrameBufferB) = [];
|
GVAR(nextFrameBufferB) = [];
|
||||||
|
|
||||||
|
GVAR(settingsInitFinished) = false;
|
||||||
|
GVAR(runAtSettingsInitialized) = [];
|
||||||
|
|
||||||
// @TODO: Generic local-managed global-synced objects (createVehicleLocal)
|
// @TODO: Generic local-managed global-synced objects (createVehicleLocal)
|
||||||
|
|
||||||
//Debug
|
//Debug
|
||||||
|
@ -20,7 +20,9 @@ _version = getText (configFile >> "CfgPatches" >> "ace_main" >> "versionStr");
|
|||||||
diag_log text format ["[ACE]: ACE is version %1.", _version];
|
diag_log text format ["[ACE]: ACE is version %1.", _version];
|
||||||
|
|
||||||
private "_addons";
|
private "_addons";
|
||||||
_addons = activatedAddons;
|
//_addons = activatedAddons; // broken with High-Command module, see #2134
|
||||||
|
_addons = "true" configClasses (configFile >> "CfgPatches");//
|
||||||
|
_addons = [_addons, {toLower configName _this}] call FUNC(map);//
|
||||||
_addons = [_addons, {_this find "ace_" == 0}] call FUNC(filter);
|
_addons = [_addons, {_this find "ace_" == 0}] call FUNC(filter);
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -80,7 +82,7 @@ if (isMultiplayer) then {
|
|||||||
|
|
||||||
diag_log text format ["[ACE] ERROR: %1", _errorMsg];
|
diag_log text format ["[ACE] ERROR: %1", _errorMsg];
|
||||||
|
|
||||||
if (hasInterface) then {diag_log str "1";
|
if (hasInterface) then {
|
||||||
["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
|
["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -91,7 +93,7 @@ if (isMultiplayer) then {
|
|||||||
|
|
||||||
diag_log text format ["[ACE] ERROR: %1", _errorMsg];
|
diag_log text format ["[ACE] ERROR: %1", _errorMsg];
|
||||||
|
|
||||||
if (hasInterface) then {diag_log str "1";
|
if (hasInterface) then {
|
||||||
["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
|
["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
27
addons/common/functions/fnc_runAfterSettingsInit.sqf
Normal file
27
addons/common/functions/fnc_runAfterSettingsInit.sqf
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
/*
|
||||||
|
* Author: PabstMirror
|
||||||
|
* Executes code after setting are initilized.
|
||||||
|
*
|
||||||
|
* Argument:
|
||||||
|
* 0: Code to execute <CODE>
|
||||||
|
* 1: Parameters to run the code with <ANY>
|
||||||
|
*
|
||||||
|
* Return value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [{if (GVAR(setting) then {x} else {y};}, []] call ace_common_fnc_runAfterSettingsInit
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
params ["_func", "_params"];
|
||||||
|
|
||||||
|
if (GVAR(settingsInitFinished)) then {
|
||||||
|
//Setting Already Finished, Direct Run the code
|
||||||
|
_params call _func;
|
||||||
|
} else {
|
||||||
|
//Waiting on settings, throw it on the delayed run array
|
||||||
|
GVAR(runAtSettingsInitialized) pushBack [_func, _params];
|
||||||
|
};
|
@ -41,7 +41,7 @@ _iconSize = BASE_SIZE * _fovCorrection;
|
|||||||
_drawColor set [3, ((_drawColor select 3) * (_timeLeftToShow / 0.5))];
|
_drawColor set [3, ((_drawColor select 3) * (_timeLeftToShow / 0.5))];
|
||||||
};
|
};
|
||||||
|
|
||||||
drawIcon3D [QUOTE(PATHTOF(UI\fp_icon.paa)), _drawColor, _pos, _iconSize, _iconSize, 0, _name, 1, 0.03, "PuristaMedium"];
|
drawIcon3D [QUOTE(PATHTOF(UI\fp_icon2.paa)), _drawColor, _pos, _iconSize, _iconSize, 0, _name, 1, 0.03, "PuristaMedium"];
|
||||||
};
|
};
|
||||||
} count (GVAR(fingersHash) select 0);
|
} count (GVAR(fingersHash) select 0);
|
||||||
|
|
||||||
|
BIN
addons/finger/ui/fp_icon2.paa
Normal file
BIN
addons/finger/ui/fp_icon2.paa
Normal file
Binary file not shown.
@ -18,7 +18,7 @@
|
|||||||
if (!alive ace_player) exitWith {};
|
if (!alive ace_player) exitWith {};
|
||||||
if (true) then {
|
if (true) then {
|
||||||
// Detect if curator interface is open and disable effects
|
// Detect if curator interface is open and disable effects
|
||||||
if (!isNull(findDisplay 312)) exitWith {
|
if !(isNull curatorCamera) exitWith {
|
||||||
if (GVAR(EffectsActive)) then {
|
if (GVAR(EffectsActive)) then {
|
||||||
call FUNC(removeGlassesEffect);
|
call FUNC(removeGlassesEffect);
|
||||||
};
|
};
|
||||||
|
@ -15,17 +15,14 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_1(_unit);
|
params ["_unit"];
|
||||||
|
|
||||||
private ["_currentGlasses", "_result", "_position", "_visible"];
|
private ["_currentGlasses", "_result", "_position", "_visible"];
|
||||||
|
|
||||||
_currentGlasses = goggles _unit;
|
_currentGlasses = goggles _unit;
|
||||||
_result = false;
|
_result = false;
|
||||||
|
|
||||||
if ((vehicle _unit) != _unit) exitWith {(cameraView != "GUNNER")};
|
|
||||||
|
|
||||||
if (_currentGlasses != "") then {
|
if (_currentGlasses != "") then {
|
||||||
_position =(getPosASLW _unit);
|
_position = getPosASLW _unit;
|
||||||
if (surfaceIsWater _position && {((_position select 2) < 0.25)}) exitWith {
|
if (surfaceIsWater _position && {((_position select 2) < 0.25)}) exitWith {
|
||||||
_result = ([_currentGlasses] call FUNC(isDivingGoggles));
|
_result = ([_currentGlasses] call FUNC(isDivingGoggles));
|
||||||
};
|
};
|
||||||
|
@ -5,87 +5,95 @@ class CfgAmmo {
|
|||||||
flareSize = 12;
|
flareSize = 12;
|
||||||
timeToLive = 60;
|
timeToLive = 60;
|
||||||
};
|
};
|
||||||
|
|
||||||
class F_40mm_White: FlareBase {
|
class F_40mm_White: FlareBase {
|
||||||
intensity = 40000;
|
intensity = 40000;
|
||||||
flareSize = 12;
|
flareSize = 12;
|
||||||
};
|
};
|
||||||
|
|
||||||
class F_20mm_White: FlareBase {
|
class F_20mm_White: FlareBase {
|
||||||
intensity = 20000;
|
intensity = 20000;
|
||||||
flareSize = 6;
|
flareSize = 6;
|
||||||
};
|
};
|
||||||
|
|
||||||
class F_Signal_Green: FlareBase {
|
class F_Signal_Green: FlareBase {
|
||||||
intensity = 20000;
|
intensity = 20000;
|
||||||
flareSize = 12;
|
flareSize = 12;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Flare_82mm_AMOS_White: FlareCore {
|
class Flare_82mm_AMOS_White: FlareCore {
|
||||||
intensity = 80000;
|
intensity = 80000;
|
||||||
flareSize = 12;
|
flareSize = 12;
|
||||||
timeToLive = 60;
|
timeToLive = 60;
|
||||||
};
|
};
|
||||||
|
|
||||||
class F_20mm_Red: F_20mm_White {};
|
|
||||||
class F_20mm_Green: F_20mm_White {};
|
|
||||||
class F_20mm_Yellow: F_20mm_White {};
|
|
||||||
|
|
||||||
class ACE_F_Hand_White: F_20mm_White {
|
class ACE_F_Hand_White: F_20mm_White {
|
||||||
grenadeBurningSound[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
|
|
||||||
grenadeFireSound[] = {"SmokeShellSoundHit1",0.25,"SmokeShellSoundHit2",0.25,"SmokeShellSoundHit3",0.5};
|
|
||||||
soundTrigger[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
|
|
||||||
SmokeShellSoundHit1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_1",1.25893,1,100};
|
|
||||||
SmokeShellSoundHit2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_2",1.25893,1,100};
|
|
||||||
SmokeShellSoundHit3[] = {"A3\Sounds_F\weapons\smokeshell\smoke_3",1.25893,1,100};
|
|
||||||
SmokeShellSoundLoop1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop1",0.125893,1,70};
|
|
||||||
SmokeShellSoundLoop2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop2",0.125893,1,70};
|
|
||||||
timeToLive = 60;
|
|
||||||
};
|
|
||||||
class ACE_F_Hand_Red: F_20mm_Red {
|
|
||||||
grenadeBurningSound[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
|
|
||||||
grenadeFireSound[] = {"SmokeShellSoundHit1",0.25,"SmokeShellSoundHit2",0.25,"SmokeShellSoundHit3",0.5};
|
|
||||||
soundTrigger[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
|
|
||||||
SmokeShellSoundHit1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_1",1.25893,1,100};
|
|
||||||
SmokeShellSoundHit2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_2",1.25893,1,100};
|
|
||||||
SmokeShellSoundHit3[] = {"A3\Sounds_F\weapons\smokeshell\smoke_3",1.25893,1,100};
|
|
||||||
SmokeShellSoundLoop1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop1",0.125893,1,70};
|
|
||||||
SmokeShellSoundLoop2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop2",0.125893,1,70};
|
|
||||||
timeToLive = 60;
|
|
||||||
};
|
|
||||||
class ACE_F_Hand_Green: F_20mm_Green {
|
|
||||||
grenadeBurningSound[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
|
|
||||||
grenadeFireSound[] = {"SmokeShellSoundHit1",0.25,"SmokeShellSoundHit2",0.25,"SmokeShellSoundHit3",0.5};
|
|
||||||
soundTrigger[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
|
|
||||||
SmokeShellSoundHit1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_1",1.25893,1,100};
|
|
||||||
SmokeShellSoundHit2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_2",1.25893,1,100};
|
|
||||||
SmokeShellSoundHit3[] = {"A3\Sounds_F\weapons\smokeshell\smoke_3",1.25893,1,100};
|
|
||||||
SmokeShellSoundLoop1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop1",0.125893,1,70};
|
|
||||||
SmokeShellSoundLoop2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop2",0.125893,1,70};
|
|
||||||
timeToLive = 60;
|
|
||||||
};
|
|
||||||
class ACE_F_Hand_Yellow: F_20mm_Yellow {
|
|
||||||
grenadeBurningSound[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
|
|
||||||
grenadeFireSound[] = {"SmokeShellSoundHit1",0.25,"SmokeShellSoundHit2",0.25,"SmokeShellSoundHit3",0.5};
|
|
||||||
soundTrigger[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
|
|
||||||
SmokeShellSoundHit1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_1",1.25893,1,100};
|
|
||||||
SmokeShellSoundHit2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_2",1.25893,1,100};
|
|
||||||
SmokeShellSoundHit3[] = {"A3\Sounds_F\weapons\smokeshell\smoke_3",1.25893,1,100};
|
|
||||||
SmokeShellSoundLoop1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop1",0.125893,1,70};
|
|
||||||
SmokeShellSoundLoop2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop2",0.125893,1,70};
|
|
||||||
timeToLive = 60;
|
timeToLive = 60;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ACE_G_M84: F_20mm_Yellow {
|
class F_20mm_Red;
|
||||||
useFlare = 0;
|
class ACE_F_Hand_Red: F_20mm_Red {
|
||||||
flareSize = 0;
|
timeToLive = 60;
|
||||||
intensity = 0;
|
};
|
||||||
grenadeBurningSound[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
|
|
||||||
grenadeFireSound[] = {"SmokeShellSoundHit1",0.25,"SmokeShellSoundHit2",0.25,"SmokeShellSoundHit3",0.5};
|
class F_20mm_Green;
|
||||||
soundTrigger[] = {"SmokeShellSoundLoop1",0.5,"SmokeShellSoundLoop2",0.5};
|
class ACE_F_Hand_Green: F_20mm_Green {
|
||||||
SmokeShellSoundHit1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_1",1.25893,1,100};
|
timeToLive = 60;
|
||||||
SmokeShellSoundHit2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_2",1.25893,1,100};
|
};
|
||||||
SmokeShellSoundHit3[] = {"A3\Sounds_F\weapons\smokeshell\smoke_3",1.25893,1,100};
|
|
||||||
SmokeShellSoundLoop1[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop1",0.125893,1,70};
|
class F_20mm_Yellow;
|
||||||
SmokeShellSoundLoop2[] = {"A3\Sounds_F\weapons\smokeshell\smoke_loop2",0.125893,1,70};
|
class ACE_F_Hand_Yellow: F_20mm_Yellow {
|
||||||
timeToLive = 6;
|
timeToLive = 60;
|
||||||
fuseDistance = 2.3;
|
};
|
||||||
|
|
||||||
|
class SmokeShell;
|
||||||
|
class ACE_G_Handflare_White: SmokeShell {
|
||||||
|
GVAR(flare) = 1;
|
||||||
|
GVAR(color)[] = {0.5,0.5,0.5,0.5};
|
||||||
|
model = "\A3\weapons_f\ammo\flare_white";
|
||||||
|
dangerRadiusHit = -1;
|
||||||
|
suppressionRadiusHit = -1;
|
||||||
|
typicalSpeed = 22;
|
||||||
|
cost = 100;
|
||||||
|
deflecting = 30;
|
||||||
|
explosionTime = 3;
|
||||||
|
timeToLive = 60;
|
||||||
|
grenadeFireSound[] = {};
|
||||||
|
grenadeBurningSound[] = {};
|
||||||
|
aiAmmoUsageFlags = "4 + 2";
|
||||||
|
smokeColor[] = {0,0,0,0};
|
||||||
|
effectsSmoke = "ACE_HandFlareEffect";
|
||||||
|
whistleDist = 0;
|
||||||
|
};
|
||||||
|
class ACE_G_Handflare_Red: ACE_G_Handflare_White {
|
||||||
|
GVAR(color)[] = {0.5,0.25,0.25,0.5};
|
||||||
|
model = "\A3\weapons_f\ammo\flare_red";
|
||||||
|
};
|
||||||
|
class ACE_G_Handflare_Green: ACE_G_Handflare_White {
|
||||||
|
GVAR(color)[] = {0.25,0.5,0.25,0.5};
|
||||||
|
model = "\A3\weapons_f\ammo\flare_green";
|
||||||
|
};
|
||||||
|
class ACE_G_Handflare_Yellow: ACE_G_Handflare_White {
|
||||||
|
GVAR(color)[] = {0.5,0.5,0.25,0.5};
|
||||||
|
model = "\A3\weapons_f\ammo\flare_yellow";
|
||||||
|
};
|
||||||
|
|
||||||
|
class ACE_G_M84: SmokeShell {
|
||||||
|
GVAR(flashbang) = 1;
|
||||||
model = PATHTOF(models\ACE_m84_thrown.p3d);
|
model = PATHTOF(models\ACE_m84_thrown.p3d);
|
||||||
|
dangerRadiusHit = -1;
|
||||||
|
suppressionRadiusHit = 20;
|
||||||
|
typicalSpeed = 22;
|
||||||
|
cost = 40;
|
||||||
|
explosive = 1E-7;
|
||||||
|
deflecting = 15;
|
||||||
|
explosionTime = 2.3;
|
||||||
|
timeToLive = 6;
|
||||||
|
grenadeFireSound[] = {};
|
||||||
|
grenadeBurningSound[] = {};
|
||||||
|
aiAmmoUsageFlags = "0";
|
||||||
|
smokeColor[] = {0,0,0,0};
|
||||||
|
effectsSmoke = "ACE_M84FlashbangEffect";
|
||||||
|
whistleDist = 0;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
class CfgMagazines {
|
class CfgMagazines {
|
||||||
class HandGrenade;
|
class HandGrenade;
|
||||||
class ACE_HandFlare_Base: HandGrenade {
|
class ACE_HandFlare_Base: HandGrenade {
|
||||||
@ -8,55 +9,60 @@ class CfgMagazines {
|
|||||||
mass = 4;
|
mass = 4;
|
||||||
initSpeed = 22;
|
initSpeed = 22;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ACE_HandFlare_White: ACE_HandFlare_Base {
|
class ACE_HandFlare_White: ACE_HandFlare_Base {
|
||||||
author = ECSTRING(common,ACETeam);
|
author = ECSTRING(common,ACETeam);
|
||||||
scope = 2;
|
scope = 2;
|
||||||
ammo = "ACE_F_Hand_White";
|
|
||||||
displayname = CSTRING(M127A1_White_Name);
|
displayname = CSTRING(M127A1_White_Name);
|
||||||
descriptionshort = CSTRING(M127A1_White_Description);
|
descriptionshort = CSTRING(M127A1_White_Description);
|
||||||
displayNameShort = CSTRING(M127A1_White_NameShort);
|
displayNameShort = CSTRING(M127A1_White_NameShort);
|
||||||
model = "\A3\weapons_f\ammo\flare_white";
|
model = "\A3\weapons_f\ammo\flare_white";
|
||||||
picture = "\A3\Weapons_F\Data\UI\gear_flare_white_ca.paa";
|
picture = "\A3\Weapons_F\Data\UI\gear_flare_white_ca.paa";
|
||||||
|
ammo = "ACE_G_Handflare_White";
|
||||||
};
|
};
|
||||||
|
|
||||||
class ACE_HandFlare_Red: ACE_HandFlare_Base {
|
class ACE_HandFlare_Red: ACE_HandFlare_Base {
|
||||||
author = ECSTRING(common,ACETeam);
|
author = ECSTRING(common,ACETeam);
|
||||||
scope = 2;
|
scope = 2;
|
||||||
ammo = "ACE_F_Hand_Red";
|
|
||||||
displayname = CSTRING(M127A1_Red_Name);
|
displayname = CSTRING(M127A1_Red_Name);
|
||||||
descriptionshort = CSTRING(M127A1_Red_Description);
|
descriptionshort = CSTRING(M127A1_Red_Description);
|
||||||
displayNameShort = CSTRING(M127A1_Red_NameShort);
|
displayNameShort = CSTRING(M127A1_Red_NameShort);
|
||||||
model = "\A3\weapons_f\ammo\flare_red";
|
model = "\A3\weapons_f\ammo\flare_red";
|
||||||
picture = "\A3\Weapons_F\Data\UI\gear_flare_red_ca.paa";
|
picture = "\A3\Weapons_F\Data\UI\gear_flare_red_ca.paa";
|
||||||
|
ammo = "ACE_G_Handflare_Red";
|
||||||
};
|
};
|
||||||
|
|
||||||
class ACE_HandFlare_Green: ACE_HandFlare_Base {
|
class ACE_HandFlare_Green: ACE_HandFlare_Base {
|
||||||
author = ECSTRING(common,ACETeam);
|
author = ECSTRING(common,ACETeam);
|
||||||
scope = 2;
|
scope = 2;
|
||||||
ammo = "ACE_F_Hand_Green";
|
|
||||||
displayname = CSTRING(M127A1_Green_Name);
|
displayname = CSTRING(M127A1_Green_Name);
|
||||||
descriptionshort = CSTRING(M127A1_Green_Description);
|
descriptionshort = CSTRING(M127A1_Green_Description);
|
||||||
displayNameShort = CSTRING(M127A1_Green_NameShort);
|
displayNameShort = CSTRING(M127A1_Green_NameShort);
|
||||||
model = "\A3\weapons_f\ammo\flare_green";
|
model = "\A3\weapons_f\ammo\flare_green";
|
||||||
picture = "\A3\Weapons_F\Data\UI\gear_flare_green_ca.paa";
|
picture = "\A3\Weapons_F\Data\UI\gear_flare_green_ca.paa";
|
||||||
|
ammo = "ACE_G_Handflare_Green";
|
||||||
};
|
};
|
||||||
|
|
||||||
class ACE_HandFlare_Yellow: ACE_HandFlare_Base {
|
class ACE_HandFlare_Yellow: ACE_HandFlare_Base {
|
||||||
author = ECSTRING(common,ACETeam);
|
author = ECSTRING(common,ACETeam);
|
||||||
scope = 2;
|
scope = 2;
|
||||||
ammo = "ACE_F_Hand_Yellow";
|
|
||||||
displayname = CSTRING(M127A1_Yellow_Name);
|
displayname = CSTRING(M127A1_Yellow_Name);
|
||||||
descriptionshort = CSTRING(M127A1_Yellow_Description);
|
descriptionshort = CSTRING(M127A1_Yellow_Description);
|
||||||
displayNameShort = CSTRING(M127A1_Yellow_NameShort);
|
displayNameShort = CSTRING(M127A1_Yellow_NameShort);
|
||||||
model = "\A3\weapons_f\ammo\flare_yellow";
|
model = "\A3\weapons_f\ammo\flare_yellow";
|
||||||
picture = "\A3\Weapons_F\Data\UI\gear_flare_yellow_ca.paa";
|
picture = "\A3\Weapons_F\Data\UI\gear_flare_yellow_ca.paa";
|
||||||
|
ammo = "ACE_G_Handflare_Yellow";
|
||||||
};
|
};
|
||||||
|
|
||||||
class ACE_M84: HandGrenade {
|
class ACE_M84: HandGrenade {
|
||||||
author = ECSTRING(common,ACETeam);
|
author = ECSTRING(common,ACETeam);
|
||||||
ammo = "ACE_G_M84";
|
|
||||||
displayname = CSTRING(M84_Name);
|
displayname = CSTRING(M84_Name);
|
||||||
descriptionshort = CSTRING(M84_Description);
|
descriptionshort = CSTRING(M84_Description);
|
||||||
displayNameShort = "M84";
|
displayNameShort = "M84";
|
||||||
mass = 4;
|
|
||||||
model = PATHTOF(models\ACE_m84.p3d);
|
model = PATHTOF(models\ACE_m84.p3d);
|
||||||
picture = PATHTOF(UI\ACE_m84_x_ca.paa);
|
picture = PATHTOF(UI\ACE_m84_x_ca.paa);
|
||||||
|
ammo = "ACE_G_M84";
|
||||||
|
mass = 4;
|
||||||
};
|
};
|
||||||
|
|
||||||
class 3Rnd_UGL_FlareGreen_F;
|
class 3Rnd_UGL_FlareGreen_F;
|
||||||
@ -65,6 +71,7 @@ class CfgMagazines {
|
|||||||
ammo = "F_40mm_Green";
|
ammo = "F_40mm_Green";
|
||||||
initSpeed = 120;
|
initSpeed = 120;
|
||||||
};
|
};
|
||||||
|
|
||||||
class 6Rnd_RedSignal_F: 6Rnd_GreenSignal_F {
|
class 6Rnd_RedSignal_F: 6Rnd_GreenSignal_F {
|
||||||
author = ECSTRING(common,ACETeam);
|
author = ECSTRING(common,ACETeam);
|
||||||
ammo = "F_40mm_Red";
|
ammo = "F_40mm_Red";
|
||||||
|
8
addons/grenades/Effects.hpp
Normal file
8
addons/grenades/Effects.hpp
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
class ACE_M84FlashbangEffect {
|
||||||
|
// empty
|
||||||
|
};
|
||||||
|
|
||||||
|
class ACE_HandFlareEffect {
|
||||||
|
// empty
|
||||||
|
};
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
ADDON = false;
|
ADDON = false;
|
||||||
|
|
||||||
|
PREP(flare);
|
||||||
PREP(flashbangExplosionEH);
|
PREP(flashbangExplosionEH);
|
||||||
PREP(flashbangThrownFuze);
|
PREP(flashbangThrownFuze);
|
||||||
PREP(nextMode);
|
PREP(nextMode);
|
||||||
|
@ -17,3 +17,5 @@ class CfgPatches {
|
|||||||
#include "CfgWeapons.hpp"
|
#include "CfgWeapons.hpp"
|
||||||
#include "CfgMagazines.hpp"
|
#include "CfgMagazines.hpp"
|
||||||
#include "CfgVehicles.hpp"
|
#include "CfgVehicles.hpp"
|
||||||
|
|
||||||
|
#include "Effects.hpp"
|
||||||
|
40
addons/grenades/functions/fnc_flare.sqf
Normal file
40
addons/grenades/functions/fnc_flare.sqf
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* Author: commy2
|
||||||
|
* Makes flare shine.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: The flare <OBJECT>
|
||||||
|
* 1: Color of flare <ARRAY>
|
||||||
|
* 2: Intensity of flare <NUMBER>
|
||||||
|
* 3: Flare lifetime <OBJECT>
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [_nade, [0.5,0.5,0.5], 0.5, 60] call ace_grenades_fnc_flare
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
|
*/
|
||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
params ["_projectile", "_color", "_intensity", "_timeToLive"];
|
||||||
|
|
||||||
|
private "_light";
|
||||||
|
_light = "#lightpoint" createVehicleLocal position _projectile;
|
||||||
|
|
||||||
|
_light setLightColor _color;
|
||||||
|
_light setLightAmbient _color;
|
||||||
|
_light setLightIntensity _intensity;
|
||||||
|
_light setLightBrightness 0.8;
|
||||||
|
|
||||||
|
_light setLightUseFlare true;
|
||||||
|
_light setLightFlareSize 3.0;
|
||||||
|
_light setLightFlareMaxDistance 1000;
|
||||||
|
|
||||||
|
_light setLightDayLight true;
|
||||||
|
|
||||||
|
_light lightAttachObject [_projectile, [0,0,0]];
|
||||||
|
//_light attachTo [_projectile, [0,0,0]];
|
||||||
|
|
||||||
|
[{deleteVehicle _this}, _light, _timeToLive, 1] call EFUNC(common,waitAndExecute);
|
@ -21,22 +21,50 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_mode", "_fuzeTime"];
|
params ["_unit", "_weapon", "", "", "_ammo", "", "_projectile"];
|
||||||
params ["_unit", "_weapon", "", "", "", "", "_projectile"];
|
|
||||||
|
|
||||||
if (_unit != ACE_player) exitWith {};
|
|
||||||
if (_weapon != "Throw") exitWith {};
|
if (_weapon != "Throw") exitWith {};
|
||||||
|
|
||||||
|
// http://feedback.arma3.com/view.php?id=12340
|
||||||
|
if (isNull _projectile) then {
|
||||||
|
_projectile = nearestObject [_unit, _ammo];
|
||||||
|
};
|
||||||
|
|
||||||
|
// handle special grenades
|
||||||
|
if (local _unit) then {
|
||||||
|
if (getNumber (configFile >> "CfgAmmo" >> _ammo >> QGVAR(flashbang)) == 1) then {
|
||||||
|
private "_fuzeTime";
|
||||||
|
_fuzeTime = getNumber (configFile >> "CfgAmmo" >> _ammo >> "explosionTime");
|
||||||
|
|
||||||
|
[FUNC(flashbangThrownFuze), [_projectile], _fuzeTime, 0] call EFUNC(common,waitAndExecute);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if (getNumber (configFile >> "CfgAmmo" >> _ammo >> QGVAR(flare)) == 1) then {
|
||||||
|
private ["_fuzeTime", "_timeToLive", "_color", "_intensity"];
|
||||||
|
|
||||||
|
_fuzeTime = getNumber (configFile >> "CfgAmmo" >> _ammo >> "explosionTime");
|
||||||
|
_timeToLive = getNumber (configFile >> "CfgAmmo" >> _ammo >> "timeToLive");
|
||||||
|
_color = getArray (configFile >> "CfgAmmo" >> _ammo >> QGVAR(color));
|
||||||
|
_intensity = _color select 3;
|
||||||
|
_color resize 3;
|
||||||
|
|
||||||
|
[FUNC(flare), [_projectile, _color, _intensity, _timeToLive], _fuzeTime, 0] call EFUNC(common,waitAndExecute);
|
||||||
|
};
|
||||||
|
|
||||||
|
// handle throw modes
|
||||||
|
if (_unit != ACE_player) exitWith {};
|
||||||
|
|
||||||
|
private "_mode";
|
||||||
_mode = missionNamespace getVariable [QGVAR(currentThrowMode), 0];
|
_mode = missionNamespace getVariable [QGVAR(currentThrowMode), 0];
|
||||||
|
|
||||||
if (_mode != 0) then {
|
if (_mode != 0) then {
|
||||||
private "_velocity";
|
private "_velocity";
|
||||||
|
|
||||||
_velocity = velocity _projectile;
|
_velocity = velocity _projectile;
|
||||||
|
|
||||||
switch (_mode) do {
|
switch (_mode) do {
|
||||||
//high throw
|
//high throw
|
||||||
case 1 : {
|
case 1 : {
|
||||||
_velocity = [
|
_velocity = [
|
||||||
0.5 * (_velocity select 0),
|
0.5 * (_velocity select 0),
|
||||||
0.5 * (_velocity select 1),
|
0.5 * (_velocity select 1),
|
||||||
@ -44,24 +72,18 @@ if (_mode != 0) then {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
//precise throw
|
//precise throw
|
||||||
case 2 : {
|
case 2 : {
|
||||||
_velocity = (_unit weaponDirection _weapon) vectorMultiply (vectorMagnitude _velocity);
|
_velocity = (_unit weaponDirection _weapon) vectorMultiply (vectorMagnitude _velocity);
|
||||||
};
|
};
|
||||||
//roll grande
|
//roll grande
|
||||||
case 3 : {
|
case 3 : {
|
||||||
//@todo
|
//@todo
|
||||||
};
|
};
|
||||||
//drop grenade
|
//drop grenade
|
||||||
case 4 : {
|
case 4 : {
|
||||||
_velocity = [0, 0, 0];
|
_velocity = [0, 0, 0];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
_projectile setVelocity _velocity;
|
_projectile setVelocity _velocity;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (typeOf _projectile == "ACE_G_M84") then {
|
|
||||||
_fuzeTime = getNumber (configFile >> "CfgAmmo" >> typeOf _projectile >> "fuseDistance");
|
|
||||||
// _fuzeTime = getNumber (configFile >> "CfgAmmo" >> typeOf _projectile >> "explosionTime"); //@toDo pretty sure this should be explosionTime not fuseDistance
|
|
||||||
[FUNC(flashbangThrownFuze), [_projectile], _fuzeTime, 0] call EFUNC(common,waitAndExecute);
|
|
||||||
};
|
|
||||||
|
@ -29,7 +29,7 @@ class Extended_FiredNear_EventHandlers {
|
|||||||
class Extended_Explosion_EventHandlers {
|
class Extended_Explosion_EventHandlers {
|
||||||
class CAManBase {
|
class CAManBase {
|
||||||
class GVAR(ExplosionNear) {
|
class GVAR(ExplosionNear) {
|
||||||
clientExplosion = QUOTE( if (GVAR(enableCombatDeafness) && {_this select 0 == ACE_player}) then {_this call FUNC(explosionNear)}; );
|
clientExplosion = QUOTE(_this call FUNC(explosionNear););
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -15,7 +15,7 @@ GVAR(time4) = 0;
|
|||||||
|
|
||||||
["SettingsInitialized", {
|
["SettingsInitialized", {
|
||||||
// Spawn volume updating process
|
// Spawn volume updating process
|
||||||
[FUNC(updateVolume), 1, [false] ] call CBA_fnc_addPerFrameHandler;
|
[FUNC(updateVolume), 1, [false]] call CBA_fnc_addPerFrameHandler;
|
||||||
}] call EFUNC(common,addEventHandler);
|
}] call EFUNC(common,addEventHandler);
|
||||||
|
|
||||||
//Update veh attunation when player veh changes
|
//Update veh attunation when player veh changes
|
||||||
|
@ -14,8 +14,7 @@
|
|||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
params ["_unit"];
|
||||||
PARAMS_1(_unit);
|
|
||||||
|
|
||||||
// Exit if hearing is disabled or soldier has earplugs already in (persistence scenarios)
|
// Exit if hearing is disabled or soldier has earplugs already in (persistence scenarios)
|
||||||
if (!GVAR(enableCombatDeafness) || {[_unit] call FUNC(hasEarPlugsIn)}) exitWith {};
|
if (!GVAR(enableCombatDeafness) || {[_unit] call FUNC(hasEarPlugsIn)}) exitWith {};
|
||||||
|
@ -15,8 +15,7 @@
|
|||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
params ["_unit", "_strength"];
|
||||||
PARAMS_2(_unit,_strength);
|
|
||||||
|
|
||||||
if (_unit != ACE_player) exitWith {};
|
if (_unit != ACE_player) exitWith {};
|
||||||
if (_strength < 0.05) exitWith {};
|
if (_strength < 0.05) exitWith {};
|
||||||
|
@ -19,10 +19,14 @@
|
|||||||
//Only run if deafness or ear ringing is enabled:
|
//Only run if deafness or ear ringing is enabled:
|
||||||
if ((!GVAR(enableCombatDeafness)) && GVAR(DisableEarRinging)) exitWith {};
|
if ((!GVAR(enableCombatDeafness)) && GVAR(DisableEarRinging)) exitWith {};
|
||||||
|
|
||||||
PARAMS_2(_unit,_damage);
|
params ["_unit", "_damage"];
|
||||||
|
|
||||||
|
if (_unit != ACE_player) exitWith {};
|
||||||
|
|
||||||
|
TRACE_2("explosion near player",_unit,_damage);
|
||||||
|
|
||||||
private ["_strength"];
|
private ["_strength"];
|
||||||
_strength = 0 max _damage;
|
_strength = (0 max _damage) * 30;
|
||||||
if (_strength < 0.01) exitWith {};
|
if (_strength < 0.01) exitWith {};
|
||||||
|
|
||||||
[{_this call FUNC(earRinging)}, [_unit, _strength], 0.2, 0] call EFUNC(common,waitAndExecute);
|
[{_this call FUNC(earRinging)}, [_unit, _strength], 0.2] call EFUNC(common,waitAndExecute);
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
* 1: Firer: Object - Object which fires a weapon near the unit <OBJECT>
|
* 1: Firer: Object - Object which fires a weapon near the unit <OBJECT>
|
||||||
* 2: Distance - Distance in meters between the unit and firer <NUMBER>
|
* 2: Distance - Distance in meters between the unit and firer <NUMBER>
|
||||||
* 3: weapon - Fired weapon <STRING>
|
* 3: weapon - Fired weapon <STRING>
|
||||||
* 4: muzzle - Muzzle that was used <STRING>
|
* 4: muzzle - Muzzle that was used (not used) <STRING>
|
||||||
* 5: mod - Current mode of the fired weapon <STRING>
|
* 5: mode - Current mode of the fired weapon (not used) <STRING>
|
||||||
* 6: ammo - Ammo used <STRING>
|
* 6: ammo - Ammo used <STRING>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
@ -16,6 +16,7 @@
|
|||||||
*
|
*
|
||||||
* Example:
|
* Example:
|
||||||
* [clientFiredNearEvent] call ace_hearing_fnc_firedNear
|
* [clientFiredNearEvent] call ace_hearing_fnc_firedNear
|
||||||
|
* [player, player, 10, "arifle_MX_ACO_pointer_F", "arifle_MX_ACO_pointer_F", "single", "B_65x39_Caseless"] call ace_hearing_fnc_firedNear
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
@ -24,14 +25,14 @@
|
|||||||
//Only run if deafness or ear ringing is enabled:
|
//Only run if deafness or ear ringing is enabled:
|
||||||
if ((!GVAR(enableCombatDeafness)) && GVAR(DisableEarRinging)) exitWith {};
|
if ((!GVAR(enableCombatDeafness)) && GVAR(DisableEarRinging)) exitWith {};
|
||||||
|
|
||||||
PARAMS_7(_object,_firer,_distance,_weapon,_muzzle,_mode,_ammo);
|
params ["_object", "_firer", "_distance", "_weapon", "", "", "_ammo"];
|
||||||
|
|
||||||
//Only run if firedNear object is player or player's vehicle:
|
//Only run if firedNear object is player or player's vehicle:
|
||||||
if ((ACE_player != _object) && {(vehicle ACE_player) != _object}) exitWith {};
|
if ((ACE_player != _object) && {(vehicle ACE_player) != _object}) exitWith {};
|
||||||
if (_weapon in ["Throw", "Put"]) exitWith {};
|
if (_weapon in ["Throw", "Put"]) exitWith {};
|
||||||
if (_distance > 50) exitWith {};
|
if (_distance > 50) exitWith {};
|
||||||
|
|
||||||
private ["_silencer", "_audibleFireCoef", "_loudness", "_strength", "_vehAttenuation", "_magazine", "_muzzles", "_weaponMagazines", "_muzzleMagazines", "_ammoType", "_initSpeed", "_ammoConfig", "_caliber", "_parentClasses"];
|
private ["_silencer", "_audibleFireCoef", "_loudness", "_strength", "_vehAttenuation", "_magazine", "_muzzles", "_weaponMagazines", "_muzzleMagazines", "_ammoType", "_initSpeed", "_ammoConfig", "_caliber"];
|
||||||
|
|
||||||
_vehAttenuation = if ((ACE_player == (vehicle ACE_player)) || {isTurnedOut ACE_player}) then {1} else {GVAR(playerVehAttenuation)};
|
_vehAttenuation = if ((ACE_player == (vehicle ACE_player)) || {isTurnedOut ACE_player}) then {1} else {GVAR(playerVehAttenuation)};
|
||||||
|
|
||||||
@ -58,7 +59,7 @@ if (count _weaponMagazines == 0) then {
|
|||||||
_muzzleMagazines = getArray (configFile >> "CfgWeapons" >> _weapon >> _x >> "magazines");
|
_muzzleMagazines = getArray (configFile >> "CfgWeapons" >> _weapon >> _x >> "magazines");
|
||||||
_weaponMagazines append _muzzleMagazines;
|
_weaponMagazines append _muzzleMagazines;
|
||||||
};
|
};
|
||||||
} forEach _muzzles;
|
} count _muzzles;
|
||||||
{
|
{
|
||||||
_ammoType = getText(configFile >> "CfgMagazines" >> _x >> "ammo");
|
_ammoType = getText(configFile >> "CfgMagazines" >> _x >> "ammo");
|
||||||
_weaponMagazines set [_forEachIndex, [_x, _ammoType]];
|
_weaponMagazines set [_forEachIndex, [_x, _ammoType]];
|
||||||
@ -68,33 +69,30 @@ if (count _weaponMagazines == 0) then {
|
|||||||
|
|
||||||
_magazine = "";
|
_magazine = "";
|
||||||
{
|
{
|
||||||
EXPLODE_2_PVT(_x,_magazineType,_ammoType);
|
_x params ["_magazineType", "_ammoType"];
|
||||||
if (_ammoType == _ammo) exitWith {
|
if (_ammoType == _ammo) exitWith {
|
||||||
_magazine = _magazineType;
|
_magazine = _magazineType;
|
||||||
};
|
};
|
||||||
} forEach _weaponMagazines;
|
} count _weaponMagazines;
|
||||||
|
|
||||||
if (_magazine == "") exitWith {};
|
if (_magazine == "") exitWith {};
|
||||||
|
|
||||||
_initSpeed = getNumber(configFile >> "CfgMagazines" >> _magazine >> "initSpeed");
|
_initSpeed = getNumber(configFile >> "CfgMagazines" >> _magazine >> "initSpeed");
|
||||||
_ammoConfig = (configFile >> "CfgAmmo" >> _ammo);
|
_ammoConfig = (configFile >> "CfgAmmo" >> _ammo);
|
||||||
_parentClasses = [_ammoConfig, true] call BIS_fnc_returnParents;
|
|
||||||
_caliber = getNumber(_ammoConfig >> "ACE_caliber");
|
_caliber = getNumber(_ammoConfig >> "ACE_caliber");
|
||||||
_caliber = switch (true) do {
|
_caliber = call {
|
||||||
case ("ShellBase" in _parentClasses): { 80 };
|
if (_ammo isKindOf ["ShellBase", (configFile >> "CfgAmmo")]) exitWith { 80 };
|
||||||
case ("RocketBase" in _parentClasses): { 200 };
|
if (_ammo isKindOf ["RocketBase", (configFile >> "CfgAmmo")]) exitWith { 200 };
|
||||||
case ("MissileBase" in _parentClasses): { 600 };
|
if (_ammo isKindOf ["MissileBase", (configFile >> "CfgAmmo")]) exitWith { 600 };
|
||||||
case ("SubmunitionBase" in _parentClasses): { 80 };
|
if (_ammo isKindOf ["SubmunitionBase", (configFile >> "CfgAmmo")]) exitWith { 80 };
|
||||||
default {
|
if (_caliber <= 0) then { 6.5 } else { _caliber };
|
||||||
if (_caliber <= 0) then { 6.5 } else { _caliber };
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
_loudness = (_caliber ^ 1.25 / 10) * (_initspeed / 1000) * _audibleFireCoef / 5;
|
_loudness = (_caliber ^ 1.25 / 10) * (_initspeed / 1000) * _audibleFireCoef / 5;
|
||||||
_strength = _vehAttenuation * (_loudness - (_loudness / 50 * _distance)); // linear drop off
|
_strength = _vehAttenuation * (_loudness - (_loudness / 50 * _distance)); // linear drop off
|
||||||
|
|
||||||
//systemChat format["%1 : %2 : %3", _strength, _initSpeed, _parentClasses];
|
//systemChat format["%1 : %2", _strength, _initSpeed];
|
||||||
//systemChat format["%1 : %2 : %3", _weapon, _magazine, _initSpeed];
|
//systemChat format["%1 : %2 : %3", _weapon, _magazine, _initSpeed];
|
||||||
|
|
||||||
if (_strength < 0.01) exitWith {};
|
if (_strength < 0.01) exitWith {};
|
||||||
|
|
||||||
[{_this call FUNC(earRinging)}, [ACE_player, _strength], 0.2, 0] call EFUNC(common,waitAndExecute);
|
[{_this call FUNC(earRinging)}, [ACE_player, _strength], 0.2] call EFUNC(common,waitAndExecute);
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
params ["_unit"];
|
||||||
PARAMS_1(_unit);
|
|
||||||
|
|
||||||
_unit getVariable ["ACE_hasEarPlugsin", false]
|
_unit getVariable ["ACE_hasEarPlugsin", false]
|
||||||
|
@ -10,9 +10,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_3(_logic,_units,_activated);
|
params ["_logic"];
|
||||||
|
|
||||||
if !(_activated) exitWith {};
|
|
||||||
|
|
||||||
[_logic, QGVAR(enableCombatDeafness), "EnableCombatDeafness"] call EFUNC(common,readSettingFromModule);
|
[_logic, QGVAR(enableCombatDeafness), "EnableCombatDeafness"] call EFUNC(common,readSettingFromModule);
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_1(_player);
|
params ["_player"];
|
||||||
|
|
||||||
// Plugs in inventory, putting them in
|
// Plugs in inventory, putting them in
|
||||||
_player removeItem "ACE_EarPlugs";
|
_player removeItem "ACE_EarPlugs";
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_1(_player);
|
params ["_player"];
|
||||||
|
|
||||||
if !(_player canAdd "ACE_EarPlugs") exitWith { // inventory full
|
if !(_player canAdd "ACE_EarPlugs") exitWith { // inventory full
|
||||||
[localize LSTRING(Inventory_Full)] call EFUNC(common,displayTextStructured);
|
[localize LSTRING(Inventory_Full)] call EFUNC(common,displayTextStructured);
|
||||||
|
@ -19,9 +19,9 @@
|
|||||||
//Only run if deafness or ear ringing is enabled:
|
//Only run if deafness or ear ringing is enabled:
|
||||||
if ((!GVAR(enableCombatDeafness)) && GVAR(DisableEarRinging)) exitWith {};
|
if ((!GVAR(enableCombatDeafness)) && GVAR(DisableEarRinging)) exitWith {};
|
||||||
|
|
||||||
EXPLODE_1_PVT((_this select 0),_justUpdateVolume);
|
|
||||||
|
|
||||||
private["_volume", "_soundTransitionTime"];
|
private["_volume", "_soundTransitionTime"];
|
||||||
|
(_this select 0) params ["_justUpdateVolume"];
|
||||||
|
|
||||||
|
|
||||||
GVAR(deafnessDV) = (GVAR(deafnessDV) min 20) max 0;
|
GVAR(deafnessDV) = (GVAR(deafnessDV) min 20) max 0;
|
||||||
GVAR(volume) = (1 - (GVAR(deafnessDV) / 20)) max 0;
|
GVAR(volume) = (1 - (GVAR(deafnessDV) / 20)) max 0;
|
||||||
|
@ -75,10 +75,32 @@ addMissionEventHandler ["Draw3D", DFUNC(render)];
|
|||||||
if (GVAR(menuBackground)==2) then {(uiNamespace getVariable [QGVAR(menuBackground), displayNull]) closeDisplay 0;};
|
if (GVAR(menuBackground)==2) then {(uiNamespace getVariable [QGVAR(menuBackground), displayNull]) closeDisplay 0;};
|
||||||
}] call EFUNC(common,addEventHandler);
|
}] call EFUNC(common,addEventHandler);
|
||||||
|
|
||||||
// Let key work with zeus open (not perfect, enables all added hotkeys in zeus interface rather than only menu)
|
// Let key work with zeus open (not perfect, contains workaround to prevent other CBA keybindings)
|
||||||
["zeusDisplayChanged",{
|
["zeusDisplayChanged",{
|
||||||
if (_this select 1) then {
|
if (_this select 1) then {
|
||||||
(finddisplay 312) displayAddEventHandler ["KeyUp", {[_this,'keyup'] call CBA_events_fnc_keyHandler}];
|
(finddisplay 312) displayAddEventHandler ["KeyUp", {
|
||||||
(finddisplay 312) displayAddEventHandler ["KeyDown", {[_this,'keydown'] call CBA_events_fnc_keyHandler}];
|
_key = ["ACE3 Common","ace_interact_menu_InteractKey"] call CBA_fnc_getKeybind;
|
||||||
|
_key = _key select 5;
|
||||||
|
_dik = _key select 0;
|
||||||
|
_mods = _key select 1;
|
||||||
|
|
||||||
|
if ((_this select 1) == _dik) then {
|
||||||
|
if ((_this select [2,3]) isEqualTo _mods) then {
|
||||||
|
[_this,'keyup'] call CBA_events_fnc_keyHandler
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}];
|
||||||
|
(finddisplay 312) displayAddEventHandler ["KeyDown", {
|
||||||
|
_key = ["ACE3 Common","ace_interact_menu_InteractKey"] call CBA_fnc_getKeybind;
|
||||||
|
_key = _key select 5;
|
||||||
|
_dik = _key select 0;
|
||||||
|
_mods = _key select 1;
|
||||||
|
|
||||||
|
if ((_this select 1) == _dik) then {
|
||||||
|
if ((_this select [2,3]) isEqualTo _mods) then {
|
||||||
|
[_this,'keydown'] call CBA_events_fnc_keyHandler
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}];
|
||||||
};
|
};
|
||||||
}] call EFUNC(common,addEventHandler);
|
}] call EFUNC(common,addEventHandler);
|
||||||
|
@ -122,7 +122,7 @@ _actions = if (_isMan) then {
|
|||||||
// Dummy statement so it's not collapsed when there's no available actions
|
// Dummy statement so it's not collapsed when there's no available actions
|
||||||
true
|
true
|
||||||
},
|
},
|
||||||
{[ACE_player, _target, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering", "isNotSitting"]] call EFUNC(common,canInteractWith)},
|
{[ACE_player, _target, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering", "isNotSitting", "isNotOnLadder"]] call EFUNC(common,canInteractWith)},
|
||||||
{},
|
{},
|
||||||
{},
|
{},
|
||||||
"Spine3",
|
"Spine3",
|
||||||
|
@ -18,7 +18,7 @@ if (GVAR(openedMenuType) == _menuType) exitWith {true};
|
|||||||
|
|
||||||
// Conditions: canInteract (these don't apply to zeus)
|
// Conditions: canInteract (these don't apply to zeus)
|
||||||
if ((isNull curatorCamera) && {
|
if ((isNull curatorCamera) && {
|
||||||
!([ACE_player, objNull, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering", "isNotSitting"]] call EFUNC(common,canInteractWith))
|
!([ACE_player, objNull, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering", "isNotSitting", "isNotOnLadder"]] call EFUNC(common,canInteractWith))
|
||||||
}) exitWith {false};
|
}) exitWith {false};
|
||||||
|
|
||||||
while {dialog} do {
|
while {dialog} do {
|
||||||
|
@ -191,7 +191,7 @@ class CfgVehicles {
|
|||||||
class ACE_TeamManagement {
|
class ACE_TeamManagement {
|
||||||
displayName = CSTRING(TeamManagement);
|
displayName = CSTRING(TeamManagement);
|
||||||
condition = QUOTE(GVAR(EnableTeamManagement));
|
condition = QUOTE(GVAR(EnableTeamManagement));
|
||||||
exceptions[] = {"isNotInside", "isNotSitting"};
|
exceptions[] = {"isNotInside", "isNotSitting", "isNotOnLadder"};
|
||||||
statement = "";
|
statement = "";
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
priority = 3.2;
|
priority = 3.2;
|
||||||
@ -201,7 +201,7 @@ class CfgVehicles {
|
|||||||
class ACE_JoinTeamRed {
|
class ACE_JoinTeamRed {
|
||||||
displayName = CSTRING(JoinTeamRed);
|
displayName = CSTRING(JoinTeamRed);
|
||||||
condition = QUOTE(true);
|
condition = QUOTE(true);
|
||||||
exceptions[] = {"isNotInside", "isNotSitting"};
|
exceptions[] = {"isNotInside", "isNotSitting", "isNotOnLadder"};
|
||||||
statement = QUOTE([ARR_2(_player,'RED')] call DFUNC(joinTeam));
|
statement = QUOTE([ARR_2(_player,'RED')] call DFUNC(joinTeam));
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
priority = 2.4;
|
priority = 2.4;
|
||||||
@ -211,7 +211,7 @@ class CfgVehicles {
|
|||||||
class ACE_JoinTeamGreen {
|
class ACE_JoinTeamGreen {
|
||||||
displayName = CSTRING(JoinTeamGreen);
|
displayName = CSTRING(JoinTeamGreen);
|
||||||
condition = QUOTE(true);
|
condition = QUOTE(true);
|
||||||
exceptions[] = {"isNotInside", "isNotSitting"};
|
exceptions[] = {"isNotInside", "isNotSitting", "isNotOnLadder"};
|
||||||
statement = QUOTE([ARR_2(_player,'GREEN')] call DFUNC(joinTeam));
|
statement = QUOTE([ARR_2(_player,'GREEN')] call DFUNC(joinTeam));
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
priority = 2.3;
|
priority = 2.3;
|
||||||
@ -221,7 +221,7 @@ class CfgVehicles {
|
|||||||
class ACE_JoinTeamBlue {
|
class ACE_JoinTeamBlue {
|
||||||
displayName = CSTRING(JoinTeamBlue);
|
displayName = CSTRING(JoinTeamBlue);
|
||||||
condition = QUOTE(true);
|
condition = QUOTE(true);
|
||||||
exceptions[] = {"isNotInside", "isNotSitting"};
|
exceptions[] = {"isNotInside", "isNotSitting", "isNotOnLadder"};
|
||||||
statement = QUOTE([ARR_2(_player,'BLUE')] call DFUNC(joinTeam));
|
statement = QUOTE([ARR_2(_player,'BLUE')] call DFUNC(joinTeam));
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
priority = 2.2;
|
priority = 2.2;
|
||||||
@ -231,7 +231,7 @@ class CfgVehicles {
|
|||||||
class ACE_JoinTeamYellow {
|
class ACE_JoinTeamYellow {
|
||||||
displayName = CSTRING(JoinTeamYellow);
|
displayName = CSTRING(JoinTeamYellow);
|
||||||
condition = QUOTE(true);
|
condition = QUOTE(true);
|
||||||
exceptions[] = {"isNotInside", "isNotSitting"};
|
exceptions[] = {"isNotInside", "isNotSitting", "isNotOnLadder"};
|
||||||
statement = QUOTE([ARR_2(_player,'YELLOW')] call DFUNC(joinTeam));
|
statement = QUOTE([ARR_2(_player,'YELLOW')] call DFUNC(joinTeam));
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
priority = 2.1;
|
priority = 2.1;
|
||||||
@ -242,7 +242,7 @@ class CfgVehicles {
|
|||||||
class ACE_LeaveTeam {
|
class ACE_LeaveTeam {
|
||||||
displayName = CSTRING(LeaveTeam);
|
displayName = CSTRING(LeaveTeam);
|
||||||
condition = QUOTE(assignedTeam _player != 'MAIN');
|
condition = QUOTE(assignedTeam _player != 'MAIN');
|
||||||
exceptions[] = {"isNotInside", "isNotSitting"};
|
exceptions[] = {"isNotInside", "isNotSitting", "isNotOnLadder"};
|
||||||
statement = QUOTE([ARR_2(_player,'MAIN')] call DFUNC(joinTeam));
|
statement = QUOTE([ARR_2(_player,'MAIN')] call DFUNC(joinTeam));
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
priority = 2.5;
|
priority = 2.5;
|
||||||
@ -252,7 +252,7 @@ class CfgVehicles {
|
|||||||
class ACE_BecomeLeader {
|
class ACE_BecomeLeader {
|
||||||
displayName = CSTRING(BecomeLeader);
|
displayName = CSTRING(BecomeLeader);
|
||||||
condition = QUOTE(_this call DFUNC(canBecomeLeader));
|
condition = QUOTE(_this call DFUNC(canBecomeLeader));
|
||||||
exceptions[] = {"isNotInside", "isNotSitting"};
|
exceptions[] = {"isNotInside", "isNotSitting", "isNotOnLadder"};
|
||||||
statement = QUOTE(_this call DFUNC(doBecomeLeader));
|
statement = QUOTE(_this call DFUNC(doBecomeLeader));
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
priority = 1.0;
|
priority = 1.0;
|
||||||
@ -262,7 +262,7 @@ class CfgVehicles {
|
|||||||
class ACE_LeaveGroup {
|
class ACE_LeaveGroup {
|
||||||
displayName = CSTRING(LeaveGroup);
|
displayName = CSTRING(LeaveGroup);
|
||||||
condition = QUOTE(count (units group _player) > 1);
|
condition = QUOTE(count (units group _player) > 1);
|
||||||
exceptions[] = {"isNotInside", "isNotSitting"};
|
exceptions[] = {"isNotInside", "isNotSitting", "isNotOnLadder"};
|
||||||
statement = QUOTE(_oldGroup = units group _player; _newGroup = createGroup side _player; [_player] joinSilent _newGroup; {_player reveal _x} forEach _oldGroup;);
|
statement = QUOTE(_oldGroup = units group _player; _newGroup = createGroup side _player; [_player] joinSilent _newGroup; {_player reveal _x} forEach _oldGroup;);
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
priority = 1.2;
|
priority = 1.2;
|
||||||
@ -379,7 +379,7 @@ class CfgVehicles {
|
|||||||
class ACE_Equipment {
|
class ACE_Equipment {
|
||||||
displayName = CSTRING(Equipment);
|
displayName = CSTRING(Equipment);
|
||||||
condition = QUOTE(true);
|
condition = QUOTE(true);
|
||||||
exceptions[] = {"isNotInside","notOnMap", "isNotSitting"};
|
exceptions[] = {"isNotInside", "notOnMap", "isNotSitting"};
|
||||||
statement = "";
|
statement = "";
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
priority = 4.5;
|
priority = 4.5;
|
||||||
|
@ -35,7 +35,7 @@ private ["_team"];
|
|||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if (GVAR(isOpeningDoor) || {[2] call FUNC(getDoor) select 1 == ''}) exitWith {false};
|
if (GVAR(isOpeningDoor) || {[MACRO_DOOR_REACH_DISTANCE] call FUNC(getDoor) select 1 == ''}) exitWith {false};
|
||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
call EFUNC(interaction,openDoor);
|
call EFUNC(interaction,openDoor);
|
||||||
@ -82,3 +82,4 @@ private ["_team"];
|
|||||||
[29, [false, false, false]], false] call cba_fnc_addKeybind;
|
[29, [false, false, false]], false] call cba_fnc_addKeybind;
|
||||||
|
|
||||||
["isNotSwimming", {!underwater (_this select 0)}] call EFUNC(common,addCanInteractWithCondition);
|
["isNotSwimming", {!underwater (_this select 0)}] call EFUNC(common,addCanInteractWithCondition);
|
||||||
|
["isNotOnLadder", {getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> animationState (_this select 0) >> "ACE_isLadder") != 1}] call EFUNC(common,addCanInteractWithCondition);
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
private ["_info", "_phase", "_position", "_time", "_usedMouseWheel", "_getDoorAnimations"];
|
private ["_info", "_phase", "_position", "_time", "_usedMouseWheel", "_getDoorAnimations"];
|
||||||
|
|
||||||
_info = [2] call FUNC(getDoor);
|
_info = [MACRO_DOOR_REACH_DISTANCE] call FUNC(getDoor);
|
||||||
|
|
||||||
EXPLODE_2_PVT(_info,_house,_door);
|
EXPLODE_2_PVT(_info,_house,_door);
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ if (_house animationPhase (_animations select 0) <= 0 && {_house getVariable [_l
|
|||||||
};
|
};
|
||||||
|
|
||||||
GVAR(isOpeningDoor) = true;
|
GVAR(isOpeningDoor) = true;
|
||||||
playSound "ACE_Sound_Click";
|
playSound "ACE_Sound_Click"; //@todo replace with smth. more fitting
|
||||||
|
|
||||||
[_house, _animations] spawn {
|
[_house, _animations] spawn {
|
||||||
private ["_house", "_animations", "_phase", "_position", "_time", "_usedMouseWheel"];
|
private ["_house", "_animations", "_phase", "_position", "_time", "_usedMouseWheel"];
|
||||||
|
@ -9,4 +9,6 @@
|
|||||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_INTERACTION
|
#define DEBUG_SETTINGS DEBUG_SETTINGS_INTERACTION
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "\z\ace\addons\main\script_macros.hpp"
|
#include "\z\ace\addons\main\script_macros.hpp"
|
||||||
|
|
||||||
|
#define MACRO_DOOR_REACH_DISTANCE (AGLToASL positionCameraToWorld [0,0,0] vectorDistance AGLToASL (ACE_player modelToWorld (ACE_player selectionPosition "Head"))) + 2
|
||||||
|
@ -1,30 +1,11 @@
|
|||||||
// by commy2 and esteldunedain
|
// by commy2 and esteldunedain
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_p0", "_p1", "_p0Pos", "_offV1", "_offV2", "_offV3", "_camPos", "_intermediatePos", "_iteration", "_light", "_line", "_pL", "_pL2", "_pX", "_size", "_units", "_fnc_getDistanceToTerrain", "_fnc_doesIntersectWithMan"];
|
params ["_unit", "_range", "_isGreen", "_brightness"];
|
||||||
|
|
||||||
// init object
|
private ["_p0", "_v1", "_v2", "_v3", "_p1", "_pL", "_distance", "_pL2", "_camPos", "_size"];
|
||||||
/*if (isNil QGVAR(laserdot)) then {
|
|
||||||
_light = "#lightpoint" createVehicleLocal [0,0,0];
|
|
||||||
_light setLightBrightness 10;
|
|
||||||
_light setLightColor [1,0,0];
|
|
||||||
_light setLightAmbient [1,0,0];
|
|
||||||
_light setLightDayLight true;
|
|
||||||
//_light lightAttachObject [GVAR(laserdot), [0,0,0]];
|
|
||||||
_light setLightAttenuation [0.04,4,4,0,0.04,0.08];
|
|
||||||
|
|
||||||
GVAR(laserdot) = _light;
|
_p0 = AGLToASL (_unit modelToWorldVisual (_unit selectionPosition "righthand"));
|
||||||
};*/
|
|
||||||
|
|
||||||
EXPLODE_4_PVT(_this,_unit,_range,_isGreen,_brightness);
|
|
||||||
|
|
||||||
_p0Pos = _unit modelToWorldVisual (_unit selectionPosition "righthand");
|
|
||||||
|
|
||||||
// Convert _p0Pos to ASL
|
|
||||||
_p0 = + _p0Pos;
|
|
||||||
if (!surfaceIsWater _p0) then {
|
|
||||||
_p0 = ATLtoASL _p0;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Find a system of orthogonal reference vectors
|
// Find a system of orthogonal reference vectors
|
||||||
// _v1 points in the direction of the weapon
|
// _v1 points in the direction of the weapon
|
||||||
@ -36,68 +17,22 @@ _v3 = _v2 vectorCrossProduct _v1;
|
|||||||
|
|
||||||
// Offset over the 3 reference axis
|
// Offset over the 3 reference axis
|
||||||
// This offset could eventually be configured by weapon in the config
|
// This offset could eventually be configured by weapon in the config
|
||||||
_offV1 = 0.31;
|
#define OFFV1 0.31
|
||||||
_offV2 = 0;
|
#define OFFV2 0
|
||||||
_offV3 = 0.08;
|
#define OFFV3 0.08
|
||||||
|
|
||||||
// Offset _p0, the start of the laser
|
// Offset _p0, the start of the laser
|
||||||
_p0 = _p0 vectorAdd (_v1 vectorMultiply _offV1) vectorAdd (_v3 vectorMultiply _offV3) vectorAdd (_v2 vectorMultiply _offV2);
|
_p0 = _p0 vectorAdd (_v1 vectorMultiply OFFV1) vectorAdd (_v3 vectorMultiply OFFV3) vectorAdd (_v2 vectorMultiply OFFV2);
|
||||||
_p0Pos = _p0Pos vectorAdd (_v1 vectorMultiply _offV1) vectorAdd (_v3 vectorMultiply _offV3) vectorAdd (_v2 vectorMultiply _offV2);
|
|
||||||
// Calculate _p1, the potential end of the laser
|
// Calculate _p1, the potential end of the laser
|
||||||
_p1 = _p0 vectorAdd (_v1 vectorMultiply _range);
|
_p1 = _p0 vectorAdd (_v1 vectorMultiply _range);
|
||||||
|
|
||||||
//Debugaaa = lineIntersectsObjs [_p0, _p1, objNull, _unit, false, 2];
|
_pL = lineIntersectsSurfaces [_p0, _p1, ACE_player, vehicle ACE_player, true, 1, "GEOM", "FIRE"] select 0 select 0;
|
||||||
|
|
||||||
_fnc_getDistanceToTerrain = {
|
// no intersection found, quit
|
||||||
private ["_distance"];
|
if (isNil "_pL") exitWith {};
|
||||||
|
|
||||||
_pX = + _p0;
|
_distance = _p0 vectorDistance _pL;
|
||||||
_line = [_p0, _pX];
|
|
||||||
|
|
||||||
_distance = _this;
|
|
||||||
_iteration = _distance;
|
|
||||||
|
|
||||||
while {_iteration > 0.05 / 2} do {
|
|
||||||
_iteration = _iteration / 2;
|
|
||||||
|
|
||||||
_pX = _p0 vectorAdd (_v1 vectorMultiply _distance);
|
|
||||||
|
|
||||||
_line set [1, _pX];
|
|
||||||
|
|
||||||
_distance = _distance + (([1, -1] select (lineIntersects (_line + [_unit]) || {terrainIntersectASL _line})) * _iteration);
|
|
||||||
|
|
||||||
if (_distance > _this) exitWith {_distance = _this};
|
|
||||||
};
|
|
||||||
|
|
||||||
_distance
|
|
||||||
};
|
|
||||||
|
|
||||||
// Get distance to nearest object or terrain (excluding men)
|
|
||||||
_distance = _range call _fnc_getDistanceToTerrain;
|
|
||||||
|
|
||||||
// Find all men potentially intercepted by the ray
|
|
||||||
_intermediatePos = _p0 vectorAdd (_v1 vectorMultiply _distance/2);
|
|
||||||
if (!surfaceIsWater _intermediatePos) then {
|
|
||||||
_intermediatePos = ASLtoATL _intermediatePos;
|
|
||||||
};
|
|
||||||
_units = nearestObjects [_intermediatePos, ["Man"], _distance/2];
|
|
||||||
|
|
||||||
_units deleteAt (_units find _unit);
|
|
||||||
|
|
||||||
_fnc_doesIntersectWithMan = {
|
|
||||||
_pX = _p0 vectorAdd (_v1 vectorMultiply (_this select 1));
|
|
||||||
if (!surfaceIsWater _pX) then {
|
|
||||||
_pX = ASLtoATL _pX;
|
|
||||||
};
|
|
||||||
count ([_this select 0, "FIRE"] intersect [_p0Pos, _pX]) > 0
|
|
||||||
};
|
|
||||||
|
|
||||||
// Test intersection with nearby men
|
|
||||||
{
|
|
||||||
if ([_x, _distance] call _fnc_doesIntersectWithMan) then {
|
|
||||||
_distance = _distance min ((_unit distance _x) - _offV1);
|
|
||||||
};
|
|
||||||
} forEach _units;
|
|
||||||
|
|
||||||
//systemChat str _distance;
|
//systemChat str _distance;
|
||||||
if (_distance < 0.5) exitWith {};
|
if (_distance < 0.5) exitWith {};
|
||||||
@ -105,31 +40,29 @@ if (_distance < 0.5) exitWith {};
|
|||||||
_pL = _p0 vectorAdd (_v1 vectorMultiply _distance);
|
_pL = _p0 vectorAdd (_v1 vectorMultiply _distance);
|
||||||
_pL2 = _p0 vectorAdd (_v1 vectorMultiply (_distance - 0.5));
|
_pL2 = _p0 vectorAdd (_v1 vectorMultiply (_distance - 0.5));
|
||||||
|
|
||||||
// Convert _pL to pos
|
_pL = ASLtoAGL _pL;
|
||||||
if (!surfaceIsWater _pL) then {
|
|
||||||
_pL = ASLtoATL _pL;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
drawLine3D [
|
drawLine3D [
|
||||||
_p0Pos,
|
_p0,
|
||||||
_pL,
|
_pL,
|
||||||
[[1,0,0,1], [0,1,0,1]] select _isGreen
|
[[1,0,0,1], [0,1,0,1]] select _isGreen
|
||||||
];
|
];
|
||||||
*/
|
*/
|
||||||
|
|
||||||
_size = 2 * (_range - (positionCameraToWorld [0,0,0] vectorDistance _pL)) / _range;
|
//systemChat str [_unit, "FIRE"] intersect [_camPos, _pL];
|
||||||
|
|
||||||
_camPos = positionCameraToWorld [0,0,0.2];
|
_camPos = positionCameraToWorld [0,0,0.2];
|
||||||
if (count ([_unit, "FIRE"] intersect [_camPos, _pL]) > 0) exitWith {};
|
if (count ([_unit, "FIRE"] intersect [_camPos, _pL]) > 0) exitWith {};
|
||||||
if (count ([ACE_player, "FIRE"] intersect [_camPos, _pL]) > 0) exitWith {};
|
if (count ([ACE_player, "FIRE"] intersect [_camPos, _pL]) > 0) exitWith {};
|
||||||
|
|
||||||
// Convert _camPos to ASL
|
// Convert _camPos to ASL
|
||||||
if (!surfaceIsWater _camPos) then { _camPos = ATLtoASL _camPos; };
|
_camPos = AGLToASL _camPos;
|
||||||
|
|
||||||
if ( terrainIntersectASL [_camPos, _pL2]) exitWith {};
|
if ( terrainIntersectASL [_camPos, _pL2]) exitWith {};
|
||||||
if ( lineIntersects [_camPos, _pL2]) exitWith {};
|
if ( lineIntersects [_camPos, _pL2]) exitWith {};
|
||||||
|
|
||||||
//GVAR(laserdot) setPos _pL;
|
_size = 2 * (_range - (positionCameraToWorld [0,0,0] vectorDistance _pL)) / _range;
|
||||||
|
|
||||||
drawIcon3D [
|
drawIcon3D [
|
||||||
format ["\a3\weapons_f\acc\data\collimdot_%1_ca.paa", ["red", "green"] select _isGreen],
|
format ["\a3\weapons_f\acc\data\collimdot_%1_ca.paa", ["red", "green"] select _isGreen],
|
||||||
|
@ -35,7 +35,7 @@ _brightness = 2 - call EFUNC(common,ambientBrightness);
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (_laserID > 0 && {_x isFlashlightOn _weapon}) then {
|
if (_laserID > 0 && {_x isFlashlightOn _weapon}) then {
|
||||||
[_x, 50, (_laserID == 2 || _isIR), _brightness] call FUNC(drawLaserpoint);
|
[_x, 100, (_laserID == 2 || _isIR), _brightness] call FUNC(drawLaserpoint);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -545,7 +545,6 @@ class CfgPatches {
|
|||||||
};
|
};
|
||||||
author[] = {ECSTRING(common,ACETeam)};
|
author[] = {ECSTRING(common,ACETeam)};
|
||||||
authorUrl = "http://ace3mod.com/";
|
authorUrl = "http://ace3mod.com/";
|
||||||
versionDesc = "ACE3";
|
|
||||||
VERSION_CONFIG;
|
VERSION_CONFIG;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#define MAJOR 3
|
#define MAJOR 3
|
||||||
#define MINOR 2
|
#define MINOR 2
|
||||||
#define PATCHLVL 2
|
#define PATCHLVL 3
|
||||||
#define BUILD 0
|
#define BUILD 0
|
||||||
|
|
||||||
#define VERSION MAJOR.MINOR.PATCHLVL.BUILD
|
#define VERSION MAJOR.MINOR.PATCHLVL.BUILD
|
||||||
|
@ -98,4 +98,14 @@ call FUNC(determineZoom);
|
|||||||
}] call EFUNC(common,addEventHandler);
|
}] call EFUNC(common,addEventHandler);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}] call EFUNC(common,addEventHandler);
|
}] call EFUNC(common,addEventHandler);
|
||||||
|
|
||||||
|
// hide clock on map if player has no watch
|
||||||
|
GVAR(hasWatch) = true;
|
||||||
|
|
||||||
|
["playerInventoryChanged", {
|
||||||
|
if (isNull (_this select 0)) exitWith {
|
||||||
|
GVAR(hasWatch) = true;
|
||||||
|
};
|
||||||
|
GVAR(hasWatch) = "ItemWatch" in (_this select 1 select 17);
|
||||||
|
}] call EFUNC(common,addEventHandler);
|
||||||
|
@ -2,3 +2,6 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
((_this select 0) displayCtrl 1016) ctrlShow GVAR(mapShowCursorCoordinates);
|
((_this select 0) displayCtrl 1016) ctrlShow GVAR(mapShowCursorCoordinates);
|
||||||
|
|
||||||
|
// hide clock when no watch in inventory, or whatever never ever
|
||||||
|
((_this select 0) displayCtrl 101) ctrlShow GVAR(hasWatch);
|
||||||
|
@ -14,7 +14,7 @@ class CfgVehicles {
|
|||||||
class ACE_MapToolsHide {
|
class ACE_MapToolsHide {
|
||||||
displayName = CSTRING(MapToolsHide);
|
displayName = CSTRING(MapToolsHide);
|
||||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0}));
|
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0}));
|
||||||
statement = QUOTE(GVAR(mapTool_Shown) = 0; [] call FUNC(updateMapToolMarkers));
|
statement = QUOTE(GVAR(mapTool_Shown) = 0;);
|
||||||
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"};
|
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"};
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
priority = 5;
|
priority = 5;
|
||||||
@ -22,7 +22,7 @@ class CfgVehicles {
|
|||||||
class ACE_MapToolsShowNormal {
|
class ACE_MapToolsShowNormal {
|
||||||
displayName = CSTRING(MapToolsShowNormal);
|
displayName = CSTRING(MapToolsShowNormal);
|
||||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 1}));
|
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 1}));
|
||||||
statement = QUOTE(GVAR(mapTool_Shown) = 1; [] call FUNC(updateMapToolMarkers));
|
statement = QUOTE(GVAR(mapTool_Shown) = 1;);
|
||||||
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"};
|
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"};
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
priority = 4;
|
priority = 4;
|
||||||
@ -30,7 +30,7 @@ class CfgVehicles {
|
|||||||
class ACE_MapToolsShowSmall {
|
class ACE_MapToolsShowSmall {
|
||||||
displayName = CSTRING(MapToolsShowSmall);
|
displayName = CSTRING(MapToolsShowSmall);
|
||||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 2}));
|
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 2}));
|
||||||
statement = QUOTE(GVAR(mapTool_Shown) = 2; [] call FUNC(updateMapToolMarkers));
|
statement = QUOTE(GVAR(mapTool_Shown) = 2;);
|
||||||
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"};
|
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"};
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
priority = 3;
|
priority = 3;
|
||||||
@ -38,7 +38,7 @@ class CfgVehicles {
|
|||||||
class ACE_MapToolsAlignNorth {
|
class ACE_MapToolsAlignNorth {
|
||||||
displayName = CSTRING(MapToolsAlignNorth);
|
displayName = CSTRING(MapToolsAlignNorth);
|
||||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0}));
|
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0}));
|
||||||
statement = QUOTE(GVAR(mapTool_angle) = 0; [] call FUNC(updateMapToolMarkers));
|
statement = QUOTE(GVAR(mapTool_angle) = 0;);
|
||||||
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"};
|
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"};
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
priority = 2;
|
priority = 2;
|
||||||
@ -46,7 +46,7 @@ class CfgVehicles {
|
|||||||
class ACE_MapToolsAlignCompass {
|
class ACE_MapToolsAlignCompass {
|
||||||
displayName = CSTRING(MapToolsAlignCompass);
|
displayName = CSTRING(MapToolsAlignCompass);
|
||||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0} && {('ItemCompass' in assigneditems ACE_player) || {'ItemCompass' in assigneditems ACE_player}}));
|
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0} && {('ItemCompass' in assigneditems ACE_player) || {'ItemCompass' in assigneditems ACE_player}}));
|
||||||
statement = QUOTE(GVAR(mapTool_angle) = getDir ACE_player; [] call FUNC(updateMapToolMarkers));
|
statement = QUOTE(GVAR(mapTool_angle) = getDir ACE_player;);
|
||||||
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"};
|
exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"};
|
||||||
showDisabled = 1;
|
showDisabled = 1;
|
||||||
priority = 1;
|
priority = 1;
|
||||||
|
@ -26,11 +26,11 @@ GVAR(drawing_controls) = [36732, 36733, 36734, 36735, 36736, 36737];
|
|||||||
_fnc_installMapEvents = {
|
_fnc_installMapEvents = {
|
||||||
private "_d";
|
private "_d";
|
||||||
_d = _this;
|
_d = _this;
|
||||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseMoving", {_this call FUNC(handleMouseMove);}];
|
((findDisplay _d) displayCtrl 51) ctrlAddEventHandler ["MouseMoving", {_this call FUNC(handleMouseMove);}];
|
||||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseButtonDown", {[1, _this] call FUNC(handleMouseButton);}];
|
((findDisplay _d) displayCtrl 51) ctrlAddEventHandler ["MouseButtonDown", {[1, _this] call FUNC(handleMouseButton);}];
|
||||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseButtonUp", {[0, _this] call FUNC(handleMouseButton)}];
|
((findDisplay _d) displayCtrl 51) ctrlAddEventHandler ["MouseButtonUp", {[0, _this] call FUNC(handleMouseButton)}];
|
||||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["Draw", {_this call FUNC(updateMapToolMarkers);}];
|
((findDisplay _d) displayCtrl 51) ctrlAddEventHandler ["Draw", {_this call FUNC(updateMapToolMarkers);}];
|
||||||
(finddisplay _d) displayAddEventHandler ["KeyDown", {_this call FUNC(handleKeyDown);}];
|
(findDisplay _d) displayAddEventHandler ["KeyDown", {_this call FUNC(handleKeyDown);}];
|
||||||
};
|
};
|
||||||
|
|
||||||
// Wait until the briefing map is detected
|
// Wait until the briefing map is detected
|
||||||
@ -64,9 +64,17 @@ GVAR(drawing_controls) = [36732, 36733, 36734, 36735, 36736, 36737];
|
|||||||
// Install event handlers on the map control and display (control = 51)
|
// Install event handlers on the map control and display (control = 51)
|
||||||
GVAR(drawing_syncMarkers) = false;
|
GVAR(drawing_syncMarkers) = false;
|
||||||
12 call _fnc_installMapEvents;
|
12 call _fnc_installMapEvents;
|
||||||
|
|
||||||
// Update the size and rotation of map tools
|
|
||||||
[] call FUNC(updateMapToolMarkers);
|
|
||||||
|
|
||||||
[FUNC(mapStateUpdater), 0, []] call CBA_fnc_addPerFrameHandler;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
["visibleMapChanged", {
|
||||||
|
params ["", "_mapOn"];
|
||||||
|
if (_mapOn) then {
|
||||||
|
// Show GPS if required
|
||||||
|
[GVAR(mapGpsShow)] call FUNC(openMapGps);
|
||||||
|
} else {
|
||||||
|
// Hide GPS
|
||||||
|
[false] call FUNC(openMapGps);
|
||||||
|
// Cancel drawing
|
||||||
|
call FUNC(cancelDrawing);
|
||||||
|
};
|
||||||
|
}] call EFUNC(common,addEventHandler);
|
||||||
|
@ -16,7 +16,6 @@ PREP(handleMouseButton);
|
|||||||
PREP(handleMouseMove);
|
PREP(handleMouseMove);
|
||||||
PREP(handleMouseZChanged);
|
PREP(handleMouseZChanged);
|
||||||
PREP(isInsideMapTool);
|
PREP(isInsideMapTool);
|
||||||
PREP(mapStateUpdater);
|
|
||||||
PREP(openMapGps);
|
PREP(openMapGps);
|
||||||
PREP(openMapGpsUpdate);
|
PREP(openMapGpsUpdate);
|
||||||
PREP(removeLineMarker);
|
PREP(removeLineMarker);
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_4(_name,_startPos,_endPos,_color);
|
params ["_name", "_startPos", "_endPos", "_color"];
|
||||||
|
|
||||||
private ["_marker", "_difPos", "_mag"];
|
private ["_marker", "_difPos", "_mag"];
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
private ["_screenOffset", "_pos"];
|
private ["_screenOffset", "_pos"];
|
||||||
|
|
||||||
_pos = ((finddisplay 12) displayctrl 51) ctrlMapScreenToWorld [0.5, 0.5];
|
_pos = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld [0.5, 0.5];
|
||||||
_screenOffset = ((finddisplay 12) displayctrl 51) posWorldToScreen [(_pos select 0) + 100, (_pos select 1)];
|
_screenOffset = ((findDisplay 12) displayCtrl 51) posWorldToScreen [(_pos select 0) + 100, (_pos select 1)];
|
||||||
|
|
||||||
(_screenOffset select 0) - 0.5
|
(_screenOffset select 0) - 0.5
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_1(_lineMarkers);
|
params ["_lineMarkers"];
|
||||||
|
|
||||||
{
|
{
|
||||||
private "_marker";
|
private "_marker";
|
||||||
|
@ -12,6 +12,6 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_1(_requester);
|
params ["_requester"];
|
||||||
|
|
||||||
["drawing_sendbackMarkers", _requester, [GVAR(drawing_lineMarkers)]] call EFUNC(common,targetEvent);
|
["drawing_sendbackMarkers", _requester, [GVAR(drawing_lineMarkers)]] call EFUNC(common,targetEvent);
|
||||||
|
@ -17,6 +17,6 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_1(_player,_target);
|
params ["_player", "_target"];
|
||||||
|
|
||||||
["drawing_requestMarkers", _target, [_player]] call EFUNC(common,targetEvent);
|
["drawing_requestMarkers", _target, [_player]] call EFUNC(common,targetEvent);
|
||||||
|
@ -15,11 +15,12 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_5(_display,_code,_shiftKey,_ctrlKey,_altKey);
|
params ["", "_code"];
|
||||||
|
TRACE_1("params",_code);
|
||||||
|
|
||||||
private ["_handled", "_relPos", "_diffVector", "_magDiffVector", "_lambdaLong", "_lambdaTrasAbs"];
|
private ["_handled", "_relPos", "_diffVector", "_magDiffVector", "_lambdaLong", "_lambdaTrasAbs"];
|
||||||
|
|
||||||
_handled = false;
|
_handled = false;
|
||||||
|
|
||||||
#define DIK_ESCAPE 0x01
|
#define DIK_ESCAPE 0x01
|
||||||
#define DIK_DELETE 0xD3
|
#define DIK_DELETE 0xD3
|
||||||
@ -30,6 +31,7 @@ if (_code == DIK_ESCAPE) exitWith {
|
|||||||
call FUNC(cancelDrawing);
|
call FUNC(cancelDrawing);
|
||||||
_handled = true;
|
_handled = true;
|
||||||
};
|
};
|
||||||
|
_handled
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_code == DIK_DELETE) exitWith {
|
if (_code == DIK_DELETE) exitWith {
|
||||||
@ -65,6 +67,7 @@ if (_code == DIK_DELETE) exitWith {
|
|||||||
};
|
};
|
||||||
} forEach GVAR(drawing_lineMarkers);
|
} forEach GVAR(drawing_lineMarkers);
|
||||||
};
|
};
|
||||||
|
_handled
|
||||||
};
|
};
|
||||||
|
|
||||||
_handled
|
_handled
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Author: esteldunedain
|
* Author: esteldunedain
|
||||||
*
|
|
||||||
* Handle mouse buttons.
|
* Handle mouse buttons.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Argument:
|
||||||
@ -13,46 +12,39 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_control", "_button", "_screenPos", "_shiftKey", "_ctrlKey", "_handled", "_pos", "_altKey", "_gui", "_marker"];
|
params ["_dir", "_params"];
|
||||||
|
_params params ["_control", "_button", "_screenPosX", "_screenPosY", "_shiftKey", "_ctrlKey", "_altKey"];
|
||||||
|
TRACE_2("params",_dir,_params);
|
||||||
|
|
||||||
PARAMS_2(_dir,_params);
|
private["_gui", "_handled", "_marker", "_pos"];
|
||||||
_control = _params select 0;
|
|
||||||
_button = _params select 1;
|
|
||||||
_screenPos = [_params select 2, _params select 3];
|
|
||||||
_shiftKey = _params select 4;
|
|
||||||
_ctrlKey = _params select 5;
|
|
||||||
_altKey = _params select 6;
|
|
||||||
_handled = false;
|
|
||||||
|
|
||||||
|
_handled = false;
|
||||||
|
|
||||||
// If it's not a left button event, exit
|
// If it's not a left button event, exit
|
||||||
if (_button != 0) exitWith {};
|
if (_button != 0) exitWith {_handled};
|
||||||
|
|
||||||
// If releasing
|
// If releasing
|
||||||
if (_dir != 1 && (GVAR(mapTool_isDragging) or GVAR(mapTool_isRotating))) exitWith {
|
if (_dir != 1) then {
|
||||||
GVAR(mapTool_isDragging) = false;
|
if (GVAR(mapTool_isDragging) || GVAR(mapTool_isRotating)) then {
|
||||||
GVAR(mapTool_isRotating) = false;
|
GVAR(mapTool_isDragging) = false;
|
||||||
_handled = true;
|
GVAR(mapTool_isRotating) = false;
|
||||||
_handled
|
_handled = true;
|
||||||
};
|
};
|
||||||
|
} else {
|
||||||
// If clicking
|
// If clicking
|
||||||
if (_dir == 1) exitWith {
|
|
||||||
|
|
||||||
if !(call FUNC(canDraw)) exitWith {_handled = false;};
|
if !(call FUNC(canDraw)) exitWith {_handled = false;};
|
||||||
|
|
||||||
// Transform mouse screen position to coordinates
|
// Transform mouse screen position to coordinates
|
||||||
_pos = _control ctrlMapScreenToWorld _screenPos;
|
_pos = _control ctrlMapScreenToWorld [_screenPosX, _screenPosY];
|
||||||
_pos set [count _pos, 0];
|
_pos set [count _pos, 0];
|
||||||
|
|
||||||
if (GVAR(drawing_isDrawing)) exitWith {
|
if (GVAR(drawing_isDrawing)) exitWith {
|
||||||
// Already drawing -> Add tempLineMarker to permanent list
|
// Already drawing -> Add tempLineMarker to permanent list
|
||||||
if (GVAR(drawing_syncMarkers)) then {
|
if (GVAR(drawing_syncMarkers)) then {
|
||||||
deleteMarkerLocal (GVAR(drawing_tempLineMarker) select 0);
|
deleteMarkerLocal (GVAR(drawing_tempLineMarker) select 0);
|
||||||
// [GVAR(drawing_tempLineMarker), "FUNC(addLineMarker)", 2] call EFUNC(common,execRemoteFnc);
|
|
||||||
["drawing_addLineMarker", GVAR(drawing_tempLineMarker)] call EFUNC(common,globalEvent);
|
["drawing_addLineMarker", GVAR(drawing_tempLineMarker)] call EFUNC(common,globalEvent);
|
||||||
// Log who drew on the briefing screen
|
// Log who drew on the briefing screen
|
||||||
(text format ["[ACE] Server: Player %1 drew on the briefing screen", name player]) call EFUNC(common,serverLog);
|
(text format ["[ACE] Server: Player %1 drew on the briefing screen", profileName]) call EFUNC(common,serverLog);
|
||||||
} else {
|
} else {
|
||||||
GVAR(drawing_tempLineMarker) call FUNC(updateLineMarker);
|
GVAR(drawing_tempLineMarker) call FUNC(updateLineMarker);
|
||||||
GVAR(drawing_lineMarkers) pushBack (+GVAR(drawing_tempLineMarker));
|
GVAR(drawing_lineMarkers) pushBack (+GVAR(drawing_tempLineMarker));
|
||||||
@ -96,6 +88,9 @@ if (_dir == 1) exitWith {
|
|||||||
};
|
};
|
||||||
_handled = true;
|
_handled = true;
|
||||||
};
|
};
|
||||||
|
_handled
|
||||||
};
|
};
|
||||||
|
|
||||||
|
diag_log text format ["HJa %1", _handled];
|
||||||
|
|
||||||
_handled
|
_handled
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Author: esteldunedain
|
* Author: esteldunedain
|
||||||
*
|
|
||||||
* Handle mouse movement over the map tool.
|
* Handle mouse movement over the map tool.
|
||||||
*
|
*
|
||||||
* Argument:
|
* Argument:
|
||||||
@ -13,11 +12,12 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
params ["_control", "_mousePosX", "_mousePosY"];
|
||||||
|
TRACE_3("params",_control,_mousePosX,_mousePosY);
|
||||||
|
|
||||||
private ["_control", "_pos"];
|
private ["_control", "_pos"];
|
||||||
|
|
||||||
_control = _this select 0;
|
GVAR(mousePosition) = _control ctrlMapScreenToWorld [_mousePosX, _mousePosY];
|
||||||
_pos = [_this select 1, _this select 2];
|
|
||||||
GVAR(mousePosition) = _control ctrlMapScreenToWorld _pos;
|
|
||||||
GVAR(mousePosition) set [2, 0]; //convert 2d pos to 3d
|
GVAR(mousePosition) set [2, 0]; //convert 2d pos to 3d
|
||||||
|
|
||||||
// If cannot draw then exit
|
// If cannot draw then exit
|
||||||
@ -32,6 +32,7 @@ if !(call FUNC(canDraw)) exitWith {
|
|||||||
// Handle drawing
|
// Handle drawing
|
||||||
if (GVAR(drawing_isDrawing)) exitWith {
|
if (GVAR(drawing_isDrawing)) exitWith {
|
||||||
GVAR(drawing_tempLineMarker) set [2, GVAR(mousePosition)];
|
GVAR(drawing_tempLineMarker) set [2, GVAR(mousePosition)];
|
||||||
|
TRACE_1("updating line pos",GVAR(mousePosition));
|
||||||
GVAR(drawing_tempLineMarker) call FUNC(updateLineMarker);
|
GVAR(drawing_tempLineMarker) call FUNC(updateLineMarker);
|
||||||
false
|
false
|
||||||
};
|
};
|
||||||
@ -44,8 +45,6 @@ if (GVAR(mapTool_isDragging)) exitWith {
|
|||||||
GVAR(mapTool_pos) set [0, (GVAR(mapTool_startPos) select 0) + (GVAR(mousePosition) select 0) - (GVAR(mapTool_startDragPos) select 0)];
|
GVAR(mapTool_pos) set [0, (GVAR(mapTool_startPos) select 0) + (GVAR(mousePosition) select 0) - (GVAR(mapTool_startDragPos) select 0)];
|
||||||
GVAR(mapTool_pos) set [1, (GVAR(mapTool_startPos) select 1) + (GVAR(mousePosition) select 1) - (GVAR(mapTool_startDragPos) select 1)];
|
GVAR(mapTool_pos) set [1, (GVAR(mapTool_startPos) select 1) + (GVAR(mousePosition) select 1) - (GVAR(mapTool_startDragPos) select 1)];
|
||||||
|
|
||||||
// Update the size and rotation of the maptool
|
|
||||||
[] call FUNC(updateMapToolMarkers);
|
|
||||||
true
|
true
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -56,8 +55,6 @@ if (GVAR(mapTool_isRotating)) exitWith {
|
|||||||
_angle = (180 + ((GVAR(mousePosition) select 0) - (GVAR(mapTool_startPos) select 0)) atan2 ((GVAR(mousePosition) select 1) - (GVAR(mapTool_startPos) select 1)) mod 360);
|
_angle = (180 + ((GVAR(mousePosition) select 0) - (GVAR(mapTool_startPos) select 0)) atan2 ((GVAR(mousePosition) select 1) - (GVAR(mapTool_startPos) select 1)) mod 360);
|
||||||
GVAR(mapTool_angle) = GVAR(mapTool_startAngle) + _angle - GVAR(mapTool_startDragAngle);
|
GVAR(mapTool_angle) = GVAR(mapTool_startAngle) + _angle - GVAR(mapTool_startDragAngle);
|
||||||
|
|
||||||
// Update the size and rotation of the maptool
|
|
||||||
[] call FUNC(updateMapToolMarkers);
|
|
||||||
true
|
true
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
|
||||||
|
|
||||||
if (visibleMap) then {
|
|
||||||
// Show/Hide draw buttons
|
|
||||||
if ("ACE_MapTools" in items ACE_player) then {
|
|
||||||
{ ((finddisplay 12) displayctrl _x) ctrlShow true; } forEach GVAR(drawing_controls);
|
|
||||||
} else {
|
|
||||||
{ ((finddisplay 12) displayctrl _x) ctrlShow false; } forEach GVAR(drawing_controls);
|
|
||||||
if (GVAR(drawing_isDrawing)) then {
|
|
||||||
call FUNC(cancelDrawing);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
//When Map is Closed:
|
|
||||||
if (GVAR(mapVisableLastFrame) && (!visibleMap)) then {
|
|
||||||
GVAR(mapVisableLastFrame) = false;
|
|
||||||
// Hide GPS
|
|
||||||
[false] call FUNC(openMapGps);
|
|
||||||
// Cancel drawing
|
|
||||||
call FUNC(cancelDrawing);
|
|
||||||
};
|
|
||||||
|
|
||||||
//When Map is Opened:
|
|
||||||
if ((!GVAR(mapVisableLastFrame)) && (visibleMap)) then {
|
|
||||||
//todo: "mapOpened" Event????
|
|
||||||
GVAR(mapVisableLastFrame) = true;
|
|
||||||
// Show and update map tools if required
|
|
||||||
[] call FUNC(updateMapToolMarkers);
|
|
||||||
// Show GPS if required
|
|
||||||
[GVAR(mapGpsShow)] call FUNC(openMapGps);
|
|
||||||
};
|
|
@ -12,7 +12,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_1(_shouldOpenGps);
|
params ["_shouldOpenGps"];
|
||||||
|
|
||||||
private ["_isOpen"];
|
private ["_isOpen"];
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_1(_name);
|
params ["_name"];
|
||||||
|
|
||||||
deleteMarkerLocal _name;
|
deleteMarkerLocal _name;
|
||||||
{
|
{
|
||||||
|
@ -13,7 +13,8 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_4(_name,_startPos,_endPos,_color);
|
params ["_name", "_startPos", "_endPos", "_color"];
|
||||||
|
TRACE_4("params",_name,_startPos,_endPos,_color);
|
||||||
|
|
||||||
private ["_difPos", "_mag"];
|
private ["_difPos", "_mag"];
|
||||||
|
|
||||||
|
@ -16,9 +16,19 @@
|
|||||||
#define CENTER_OFFSET_Y_PERC 0.1606
|
#define CENTER_OFFSET_Y_PERC 0.1606
|
||||||
#define CONSTANT_SCALE 0.2
|
#define CONSTANT_SCALE 0.2
|
||||||
|
|
||||||
PARAMS_1(_theMap);
|
params ["_theMap"];
|
||||||
|
|
||||||
private ["_rotatingTexture", "_textureWidth", "_scale", "_xPos", "_yPos"];
|
private ["_rotatingTexture", "_textureWidth", "_scaleX", "_scaleY", "_xPos", "_yPos"];
|
||||||
|
|
||||||
|
// Show/Hide draw buttons
|
||||||
|
if ([] call FUNC(canDraw)) then {
|
||||||
|
{ ((findDisplay 12) displayCtrl _x) ctrlShow true; } forEach GVAR(drawing_controls);
|
||||||
|
} else {
|
||||||
|
{ ((findDisplay 12) displayCtrl _x) ctrlShow false; } forEach GVAR(drawing_controls);
|
||||||
|
if (GVAR(drawing_isDrawing)) then {
|
||||||
|
call FUNC(cancelDrawing);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
if (!("ACE_MapTools" in items ACE_player)|| {GVAR(mapTool_Shown) == 0}) exitWith {};
|
if (!("ACE_MapTools" in items ACE_player)|| {GVAR(mapTool_Shown) == 0}) exitWith {};
|
||||||
|
|
||||||
@ -33,16 +43,18 @@ if (GVAR(mapTool_Shown) == 1) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Update scale of both parts
|
// Update scale of both parts
|
||||||
_scale = _textureWidth * CONSTANT_SCALE * (call FUNC(calculateMapScale));
|
getResolution params ["_resWidth", "_resHeight", "", "", "_aspectRatio"];
|
||||||
|
_scaleX = 32 * _textureWidth * CONSTANT_SCALE * (call FUNC(calculateMapScale));
|
||||||
|
_scaleY = _scaleX * ((_resWidth / _resHeight) / _aspectRatio); //handle bad aspect ratios
|
||||||
|
|
||||||
// Position of the fixed part
|
// Position of the fixed part
|
||||||
_xPos = GVAR(mapTool_pos) select 0;
|
_xPos = GVAR(mapTool_pos) select 0;
|
||||||
_yPos = (GVAR(mapTool_pos) select 1) + _textureWidth * CENTER_OFFSET_Y_PERC;
|
_yPos = (GVAR(mapTool_pos) select 1) + _textureWidth * CENTER_OFFSET_Y_PERC;
|
||||||
|
|
||||||
_theMap drawIcon [QUOTE(PATHTOF(data\mapToolFixed.paa)), [1,1,1,1], [_xPos,_yPos], (32 * _scale), (32 * _scale), 0, "", 0];
|
_theMap drawIcon [QUOTE(PATHTOF(data\mapToolFixed.paa)), [1,1,1,1], [_xPos,_yPos], _scaleX, _scaleY, 0, "", 0];
|
||||||
|
|
||||||
// Position and rotation of the rotating part
|
// Position and rotation of the rotating part
|
||||||
_xPos = (GVAR(mapTool_pos) select 0) + sin(GVAR(mapTool_angle)) * _textureWidth * CENTER_OFFSET_Y_PERC;
|
_xPos = (GVAR(mapTool_pos) select 0) + sin(GVAR(mapTool_angle)) * _textureWidth * CENTER_OFFSET_Y_PERC;
|
||||||
_yPos = (GVAR(mapTool_pos) select 1) + cos(GVAR(mapTool_angle)) * _textureWidth * CENTER_OFFSET_Y_PERC;
|
_yPos = (GVAR(mapTool_pos) select 1) + cos(GVAR(mapTool_angle)) * _textureWidth * CENTER_OFFSET_Y_PERC;
|
||||||
|
|
||||||
_theMap drawIcon [_rotatingTexture, [1,1,1,1], [_xPos,_yPos], (32 * _scale), (32 * _scale), GVAR(mapTool_angle), "", 0];
|
_theMap drawIcon [_rotatingTexture, [1,1,1,1], [_xPos,_yPos], _scaleX, _scaleY, GVAR(mapTool_angle), "", 0];
|
||||||
|
@ -7,6 +7,7 @@ class ACE_Medical_Actions {
|
|||||||
category = "bandage";
|
category = "bandage";
|
||||||
treatmentLocations[] = {"All"};
|
treatmentLocations[] = {"All"};
|
||||||
allowedSelections[] = {"All"};
|
allowedSelections[] = {"All"};
|
||||||
|
allowSelfTreatment = 1;
|
||||||
requiredMedic = 0;
|
requiredMedic = 0;
|
||||||
treatmentTime = 5;
|
treatmentTime = 5;
|
||||||
treatmentTimeSelfCoef = 1;
|
treatmentTimeSelfCoef = 1;
|
||||||
@ -32,6 +33,7 @@ class ACE_Medical_Actions {
|
|||||||
displayName = CSTRING(Inject_Morphine);
|
displayName = CSTRING(Inject_Morphine);
|
||||||
displayNameProgress = CSTRING(Injecting_Morphine);
|
displayNameProgress = CSTRING(Injecting_Morphine);
|
||||||
allowedSelections[] = {"hand_l", "hand_r", "leg_l", "leg_r"};
|
allowedSelections[] = {"hand_l", "hand_r", "leg_l", "leg_r"};
|
||||||
|
allowSelfTreatment = 1;
|
||||||
category = "medication";
|
category = "medication";
|
||||||
treatmentTime = 2;
|
treatmentTime = 2;
|
||||||
items[] = {"ACE_morphine"};
|
items[] = {"ACE_morphine"};
|
||||||
@ -43,6 +45,7 @@ class ACE_Medical_Actions {
|
|||||||
displayName = CSTRING(Inject_Epinephrine);
|
displayName = CSTRING(Inject_Epinephrine);
|
||||||
displayNameProgress = CSTRING(Injecting_Epinephrine);
|
displayNameProgress = CSTRING(Injecting_Epinephrine);
|
||||||
allowedSelections[] = {"hand_l", "hand_r", "leg_l", "leg_r"};
|
allowedSelections[] = {"hand_l", "hand_r", "leg_l", "leg_r"};
|
||||||
|
allowSelfTreatment = 1;
|
||||||
category = "medication";
|
category = "medication";
|
||||||
requiredMedic = 1;
|
requiredMedic = 1;
|
||||||
treatmentTime = 3;
|
treatmentTime = 3;
|
||||||
@ -55,6 +58,7 @@ class ACE_Medical_Actions {
|
|||||||
displayName = CSTRING(Transfuse_Blood);
|
displayName = CSTRING(Transfuse_Blood);
|
||||||
displayNameProgress = CSTRING(Transfusing_Blood);
|
displayNameProgress = CSTRING(Transfusing_Blood);
|
||||||
allowedSelections[] = {"hand_l", "hand_r", "leg_l", "leg_r"};
|
allowedSelections[] = {"hand_l", "hand_r", "leg_l", "leg_r"};
|
||||||
|
allowSelfTreatment = 0;
|
||||||
category = "advanced";
|
category = "advanced";
|
||||||
requiredMedic = 1;
|
requiredMedic = 1;
|
||||||
treatmentTime = 20;
|
treatmentTime = 20;
|
||||||
@ -93,7 +97,7 @@ class ACE_Medical_Actions {
|
|||||||
displayNameProgress = CSTRING(Actions_Diagnosing);
|
displayNameProgress = CSTRING(Actions_Diagnosing);
|
||||||
category = "examine";
|
category = "examine";
|
||||||
treatmentLocations[] = {"All"};
|
treatmentLocations[] = {"All"};
|
||||||
allowedSelections[] = {"head"};
|
allowedSelections[] = {"head", "body"};
|
||||||
requiredMedic = 0;
|
requiredMedic = 0;
|
||||||
treatmentTime = 1;
|
treatmentTime = 1;
|
||||||
items[] = {};
|
items[] = {};
|
||||||
@ -105,6 +109,29 @@ class ACE_Medical_Actions {
|
|||||||
itemConsumed = 0;
|
itemConsumed = 0;
|
||||||
litter[] = {};
|
litter[] = {};
|
||||||
};
|
};
|
||||||
|
class CPR: Bandage {
|
||||||
|
displayName = CSTRING(Actions_CPR);
|
||||||
|
displayNameProgress = CSTRING(Actions_PerformingCPR);
|
||||||
|
category = "advanced";
|
||||||
|
treatmentLocations[] = {"All"};
|
||||||
|
allowedSelections[] = {"body"};
|
||||||
|
allowSelfTreatment = 0;
|
||||||
|
requiredMedic = 0;
|
||||||
|
treatmentTime = 15;
|
||||||
|
items[] = {};
|
||||||
|
condition = QUOTE(!([(_this select 1)] call ace_common_fnc_isAwake) && GVAR(enableRevive)>0);
|
||||||
|
callbackSuccess = QUOTE(DFUNC(treatmentAdvanced_CPR));
|
||||||
|
callbackFailure = "";
|
||||||
|
callbackProgress = "!([((_this select 0) select 1)] call ace_common_fnc_isAwake)";
|
||||||
|
animationPatient = "";
|
||||||
|
animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback";
|
||||||
|
animationCaller = "AinvPknlMstpSlayWnonDnon_medic";
|
||||||
|
animationCallerProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
|
||||||
|
animationCallerSelf = "";
|
||||||
|
animationCallerSelfProne = "";
|
||||||
|
itemConsumed = 0;
|
||||||
|
litter[] = {};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class Advanced {
|
class Advanced {
|
||||||
@ -115,6 +142,7 @@ class ACE_Medical_Actions {
|
|||||||
// Which locations can this treatment action be used? Available: Field, MedicalFacility, MedicalVehicle, All.
|
// Which locations can this treatment action be used? Available: Field, MedicalFacility, MedicalVehicle, All.
|
||||||
treatmentLocations[] = {"All"};
|
treatmentLocations[] = {"All"};
|
||||||
allowedSelections[] = {"All"};
|
allowedSelections[] = {"All"};
|
||||||
|
allowSelfTreatment = 1;
|
||||||
// What is the level of medical skill required for this treatment action? 0 = all soldiers, 1 = medic, 2 = doctor
|
// What is the level of medical skill required for this treatment action? 0 = all soldiers, 1 = medic, 2 = doctor
|
||||||
requiredMedic = 0;
|
requiredMedic = 0;
|
||||||
// The time it takes for a treatment action to complete. Time is in seconds.
|
// The time it takes for a treatment action to complete. Time is in seconds.
|
||||||
@ -188,6 +216,7 @@ class ACE_Medical_Actions {
|
|||||||
displayName = CSTRING(Actions_Blood4_1000);
|
displayName = CSTRING(Actions_Blood4_1000);
|
||||||
displayNameProgress = CSTRING(Transfusing_Blood);
|
displayNameProgress = CSTRING(Transfusing_Blood);
|
||||||
allowedSelections[] = {"hand_l", "hand_r", "leg_l", "leg_r"};
|
allowedSelections[] = {"hand_l", "hand_r", "leg_l", "leg_r"};
|
||||||
|
allowSelfTreatment = 0;
|
||||||
category = "advanced";
|
category = "advanced";
|
||||||
items[] = {"ACE_bloodIV"};
|
items[] = {"ACE_bloodIV"};
|
||||||
requiredMedic = 1;
|
requiredMedic = 1;
|
||||||
@ -238,6 +267,7 @@ class ACE_Medical_Actions {
|
|||||||
category = "advanced";
|
category = "advanced";
|
||||||
items[] = {"ACE_surgicalKit"};
|
items[] = {"ACE_surgicalKit"};
|
||||||
treatmentLocations[] = {QGVAR(useLocation_SurgicalKit)};
|
treatmentLocations[] = {QGVAR(useLocation_SurgicalKit)};
|
||||||
|
allowSelfTreatment = 0;
|
||||||
requiredMedic = QGVAR(medicSetting_SurgicalKit);
|
requiredMedic = QGVAR(medicSetting_SurgicalKit);
|
||||||
patientStateCondition = QGVAR(useCondition_SurgicalKit);
|
patientStateCondition = QGVAR(useCondition_SurgicalKit);
|
||||||
treatmentTime = "(count ((_this select 1) getVariable ['ACE_Medical_bandagedWounds', []]) * 5)";
|
treatmentTime = "(count ((_this select 1) getVariable ['ACE_Medical_bandagedWounds', []]) * 5)";
|
||||||
@ -253,6 +283,7 @@ class ACE_Medical_Actions {
|
|||||||
category = "advanced";
|
category = "advanced";
|
||||||
items[] = {"ACE_personalAidKit"};
|
items[] = {"ACE_personalAidKit"};
|
||||||
treatmentLocations[] = {QGVAR(useLocation_PAK)};
|
treatmentLocations[] = {QGVAR(useLocation_PAK)};
|
||||||
|
allowSelfTreatment = 0;
|
||||||
requiredMedic = QGVAR(medicSetting_PAK);
|
requiredMedic = QGVAR(medicSetting_PAK);
|
||||||
patientStateCondition = QGVAR(useCondition_PAK);
|
patientStateCondition = QGVAR(useCondition_PAK);
|
||||||
treatmentTime = QUOTE((_this select 1) call FUNC(treatmentAdvanced_fullHealTreatmentTime));
|
treatmentTime = QUOTE((_this select 1) call FUNC(treatmentAdvanced_fullHealTreatmentTime));
|
||||||
@ -297,6 +328,7 @@ class ACE_Medical_Actions {
|
|||||||
displayName = CSTRING(Check_Response);
|
displayName = CSTRING(Check_Response);
|
||||||
callbackSuccess = QUOTE(DFUNC(actionCheckResponse));
|
callbackSuccess = QUOTE(DFUNC(actionCheckResponse));
|
||||||
displayNameProgress = CSTRING(Check_Response_Content);
|
displayNameProgress = CSTRING(Check_Response_Content);
|
||||||
|
allowSelfTreatment = 0;
|
||||||
};
|
};
|
||||||
class RemoveTourniquet: Tourniquet {
|
class RemoveTourniquet: Tourniquet {
|
||||||
displayName = CSTRING(Actions_RemoveTourniquet);
|
displayName = CSTRING(Actions_RemoveTourniquet);
|
||||||
@ -313,6 +345,7 @@ class ACE_Medical_Actions {
|
|||||||
category = "advanced";
|
category = "advanced";
|
||||||
treatmentLocations[] = {"All"};
|
treatmentLocations[] = {"All"};
|
||||||
allowedSelections[] = {"body"};
|
allowedSelections[] = {"body"};
|
||||||
|
allowSelfTreatment = 0;
|
||||||
requiredMedic = 0;
|
requiredMedic = 0;
|
||||||
treatmentTime = 15;
|
treatmentTime = 15;
|
||||||
items[] = {};
|
items[] = {};
|
||||||
@ -334,6 +367,7 @@ class ACE_Medical_Actions {
|
|||||||
displayNameProgress = CSTRING(PlacingInBodyBag);
|
displayNameProgress = CSTRING(PlacingInBodyBag);
|
||||||
category = "advanced";
|
category = "advanced";
|
||||||
treatmentLocations[] = {"All"};
|
treatmentLocations[] = {"All"};
|
||||||
|
allowSelfTreatment = 0;
|
||||||
requiredMedic = 0;
|
requiredMedic = 0;
|
||||||
treatmentTime = 15;
|
treatmentTime = 15;
|
||||||
items[] = {"ACE_bodyBag"};
|
items[] = {"ACE_bodyBag"};
|
||||||
@ -605,6 +639,7 @@ class ACE_Medical_Advanced {
|
|||||||
class vehiclecrash {
|
class vehiclecrash {
|
||||||
thresholds[] = {{0.25, 5}};
|
thresholds[] = {{0.25, 5}};
|
||||||
selectionSpecific = 0;
|
selectionSpecific = 0;
|
||||||
|
lethalDamage = 0.2;
|
||||||
};
|
};
|
||||||
class backblast {
|
class backblast {
|
||||||
thresholds[] = {{0, 2},{0.55, 5}, {1, 6}};
|
thresholds[] = {{0, 2},{0.55, 5}, {1, 6}};
|
||||||
@ -622,6 +657,7 @@ class ACE_Medical_Advanced {
|
|||||||
class falling {
|
class falling {
|
||||||
thresholds[] = {{0.1, 1}};
|
thresholds[] = {{0.1, 1}};
|
||||||
selectionSpecific = 1;
|
selectionSpecific = 1;
|
||||||
|
lethalDamage = 0.4;
|
||||||
};
|
};
|
||||||
class ropeburn {
|
class ropeburn {
|
||||||
thresholds[] = {{0.1, 1}};
|
thresholds[] = {{0.1, 1}};
|
||||||
|
@ -220,7 +220,7 @@ class ACE_Settings {
|
|||||||
description = CSTRING(menuTypeDescription);
|
description = CSTRING(menuTypeDescription);
|
||||||
typeName = "SCALAR";
|
typeName = "SCALAR";
|
||||||
value = 0;
|
value = 0;
|
||||||
values[] = {CSTRING(useSelection)/*, CSTRING(useRadial)*/};
|
values[] = {CSTRING(useSelection), CSTRING(useRadial), "Disabled"};
|
||||||
// isClientSettable = 1;
|
isClientSettable = 1;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -2,12 +2,12 @@
|
|||||||
#define MEDICAL_ACTION_DISTANCE 1.75
|
#define MEDICAL_ACTION_DISTANCE 1.75
|
||||||
|
|
||||||
class CfgVehicles {
|
class CfgVehicles {
|
||||||
|
|
||||||
class Logic;
|
class Logic;
|
||||||
class Module_F: Logic {
|
class Module_F: Logic {
|
||||||
class ArgumentsBaseUnits {
|
class ArgumentsBaseUnits {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class ACE_Module;
|
class ACE_Module;
|
||||||
class ACE_moduleMedicalSettings: ACE_Module {
|
class ACE_moduleMedicalSettings: ACE_Module {
|
||||||
scope = 2;
|
scope = 2;
|
||||||
@ -19,6 +19,7 @@ class CfgVehicles {
|
|||||||
isGlobal = 1;
|
isGlobal = 1;
|
||||||
isTriggerActivated = 0;
|
isTriggerActivated = 0;
|
||||||
author = ECSTRING(common,ACETeam);
|
author = ECSTRING(common,ACETeam);
|
||||||
|
|
||||||
class Arguments {
|
class Arguments {
|
||||||
class level {
|
class level {
|
||||||
displayName = CSTRING(MedicalSettings_level_DisplayName);
|
displayName = CSTRING(MedicalSettings_level_DisplayName);
|
||||||
@ -137,6 +138,7 @@ class CfgVehicles {
|
|||||||
defaultValue = 1;
|
defaultValue = 1;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class ModuleDescription {
|
class ModuleDescription {
|
||||||
description = CSTRING(MedicalSettings_Module_Description);
|
description = CSTRING(MedicalSettings_Module_Description);
|
||||||
sync[] = {};
|
sync[] = {};
|
||||||
@ -154,6 +156,7 @@ class CfgVehicles {
|
|||||||
isTriggerActivated = 0;
|
isTriggerActivated = 0;
|
||||||
isDisposable = 0;
|
isDisposable = 0;
|
||||||
author = ECSTRING(common,ACETeam);
|
author = ECSTRING(common,ACETeam);
|
||||||
|
|
||||||
class Arguments {
|
class Arguments {
|
||||||
class enableFor {
|
class enableFor {
|
||||||
displayName = CSTRING(AdvancedMedicalSettings_enableFor_DisplayName);
|
displayName = CSTRING(AdvancedMedicalSettings_enableFor_DisplayName);
|
||||||
@ -256,13 +259,13 @@ class CfgVehicles {
|
|||||||
defaultValue = 1;
|
defaultValue = 1;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class ModuleDescription {
|
class ModuleDescription {
|
||||||
description = CSTRING(AdvancedMedicalSettings_Module_Description);
|
description = CSTRING(AdvancedMedicalSettings_Module_Description);
|
||||||
sync[] = {};
|
sync[] = {};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class ACE_moduleReviveSettings: ACE_Module {
|
class ACE_moduleReviveSettings: ACE_Module {
|
||||||
scope = 2;
|
scope = 2;
|
||||||
displayName = CSTRING(ReviveSettings_Module_DisplayName);
|
displayName = CSTRING(ReviveSettings_Module_DisplayName);
|
||||||
@ -273,6 +276,7 @@ class CfgVehicles {
|
|||||||
isGlobal = 1;
|
isGlobal = 1;
|
||||||
isTriggerActivated = 0;
|
isTriggerActivated = 0;
|
||||||
author = ECSTRING(common,ACETeam);
|
author = ECSTRING(common,ACETeam);
|
||||||
|
|
||||||
class Arguments {
|
class Arguments {
|
||||||
class enableRevive {
|
class enableRevive {
|
||||||
displayName = CSTRING(ReviveSettings_enableRevive_DisplayName);
|
displayName = CSTRING(ReviveSettings_enableRevive_DisplayName);
|
||||||
@ -298,11 +302,13 @@ class CfgVehicles {
|
|||||||
defaultValue = -1;
|
defaultValue = -1;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class ModuleDescription {
|
class ModuleDescription {
|
||||||
description = CSTRING(ReviveSettings_Module_Description);
|
description = CSTRING(ReviveSettings_Module_Description);
|
||||||
sync[] = {};
|
sync[] = {};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class ACE_moduleAssignMedicRoles: Module_F {
|
class ACE_moduleAssignMedicRoles: Module_F {
|
||||||
scope = 2;
|
scope = 2;
|
||||||
displayName = CSTRING(AssignMedicRoles_Module_DisplayName);
|
displayName = CSTRING(AssignMedicRoles_Module_DisplayName);
|
||||||
@ -314,6 +320,7 @@ class CfgVehicles {
|
|||||||
isTriggerActivated = 0;
|
isTriggerActivated = 0;
|
||||||
isDisposable = 0;
|
isDisposable = 0;
|
||||||
author = ECSTRING(common,ACETeam);
|
author = ECSTRING(common,ACETeam);
|
||||||
|
|
||||||
class Arguments {
|
class Arguments {
|
||||||
class EnableList {
|
class EnableList {
|
||||||
displayName = CSTRING(AssignMedicRoles_EnableList_DisplayName);
|
displayName = CSTRING(AssignMedicRoles_EnableList_DisplayName);
|
||||||
@ -342,6 +349,7 @@ class CfgVehicles {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class ModuleDescription {
|
class ModuleDescription {
|
||||||
description = CSTRING(AssignMedicRoles_Module_Description);
|
description = CSTRING(AssignMedicRoles_Module_Description);
|
||||||
sync[] = {};
|
sync[] = {};
|
||||||
@ -359,6 +367,7 @@ class CfgVehicles {
|
|||||||
isTriggerActivated = 0;
|
isTriggerActivated = 0;
|
||||||
isDisposable = 0;
|
isDisposable = 0;
|
||||||
author = ECSTRING(common,ACETeam);
|
author = ECSTRING(common,ACETeam);
|
||||||
|
|
||||||
class Arguments {
|
class Arguments {
|
||||||
class EnableList {
|
class EnableList {
|
||||||
displayName = CSTRING(AssignMedicVehicle_EnableList_DisplayName);
|
displayName = CSTRING(AssignMedicVehicle_EnableList_DisplayName);
|
||||||
@ -384,11 +393,13 @@ class CfgVehicles {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class ModuleDescription {
|
class ModuleDescription {
|
||||||
description = CSTRING(AssignMedicVehicle_Module_Description);
|
description = CSTRING(AssignMedicVehicle_Module_Description);
|
||||||
sync[] = {};
|
sync[] = {};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class ACE_moduleAssignMedicalFacility: Module_F {
|
class ACE_moduleAssignMedicalFacility: Module_F {
|
||||||
scope = 2;
|
scope = 2;
|
||||||
displayName = CSTRING(AssignMedicalFacility_Module_DisplayName);
|
displayName = CSTRING(AssignMedicalFacility_Module_DisplayName);
|
||||||
@ -400,6 +411,7 @@ class CfgVehicles {
|
|||||||
isTriggerActivated = 0;
|
isTriggerActivated = 0;
|
||||||
isDisposable = 0;
|
isDisposable = 0;
|
||||||
author = ECSTRING(common,ACETeam);
|
author = ECSTRING(common,ACETeam);
|
||||||
|
|
||||||
class Arguments {
|
class Arguments {
|
||||||
class enabled {
|
class enabled {
|
||||||
displayName = CSTRING(AssignMedicalFacility_enabled_DisplayName);
|
displayName = CSTRING(AssignMedicalFacility_enabled_DisplayName);
|
||||||
@ -407,70 +419,52 @@ class CfgVehicles {
|
|||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class ModuleDescription {
|
class ModuleDescription {
|
||||||
description = CSTRING(AssignMedicalFacility_Module_Description);
|
description = CSTRING(AssignMedicalFacility_Module_Description);
|
||||||
sync[] = {};
|
sync[] = {};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
#define ARM_LEG_ARMOR_DEFAULT 2
|
#define ARM_LEG_ARMOR_DEFAULT 3
|
||||||
#define ARM_LEG_ARMOR_BETTER 3
|
#define ARM_LEG_ARMOR_BETTER 5
|
||||||
#define ARM_LEG_ARMOR_CSAT 4
|
#define ARM_LEG_ARMOR_CSAT 4
|
||||||
|
|
||||||
class Man;
|
class Land;
|
||||||
class CAManBase: Man {
|
class Man: Land {
|
||||||
class HitPoints {
|
class HitPoints;
|
||||||
class HitHead;
|
};
|
||||||
class HitBody;
|
|
||||||
// "DEACTIVE" DEFAULT HITPOINTS
|
|
||||||
class HitHands {
|
|
||||||
armor = 999; //armor = 2;
|
|
||||||
explosionShielding = 0; //explosionShielding = 1;
|
|
||||||
material = -1;
|
|
||||||
minimalHit = 0;
|
|
||||||
name = "";
|
|
||||||
passThrough = 1;
|
|
||||||
radius = 0; //radius = 0.06;
|
|
||||||
visual = "injury_hands";
|
|
||||||
};
|
|
||||||
class HitLegs {
|
|
||||||
armor = 999; //armor = 2;
|
|
||||||
explosionShielding = 0; //explosionShielding = 1;
|
|
||||||
material = -1;
|
|
||||||
minimalHit = 0;
|
|
||||||
name = "";
|
|
||||||
passThrough = 1;
|
|
||||||
radius = 0; //radius = 0.08;
|
|
||||||
visual = "injury_legs";
|
|
||||||
};
|
|
||||||
|
|
||||||
|
class CAManBase: Man {
|
||||||
|
class HitPoints: HitPoints { // custom hitpoints. addons might want to adjust these accordingly
|
||||||
class HitLeftArm {
|
class HitLeftArm {
|
||||||
armor = ARM_LEG_ARMOR_DEFAULT; //2;
|
armor = ARM_LEG_ARMOR_DEFAULT;
|
||||||
explosionShielding = 1;
|
|
||||||
material = -1;
|
material = -1;
|
||||||
minimalHit = 0;
|
name = "hand_l"; // @todo hopefully these still include the whole arm + hands
|
||||||
name = "hand_l";
|
|
||||||
passThrough = 1;
|
|
||||||
radius = 0.06;
|
|
||||||
visual = "injury_hands";
|
|
||||||
};
|
|
||||||
class HitRightArm: HitLeftArm {
|
|
||||||
name = "hand_r";
|
|
||||||
};
|
|
||||||
class HitLeftLeg {
|
|
||||||
armor = ARM_LEG_ARMOR_DEFAULT; //2;
|
|
||||||
explosionShielding = 1;
|
|
||||||
material = -1;
|
|
||||||
minimalHit = 0;
|
|
||||||
name = "leg_l";
|
|
||||||
passThrough = 1;
|
passThrough = 1;
|
||||||
radius = 0.08;
|
radius = 0.08;
|
||||||
|
explosionShielding = 1;
|
||||||
|
visual = "injury_hands";
|
||||||
|
minimalHit = 0.01;
|
||||||
|
};
|
||||||
|
class HitRightArm: HitLeftArm {
|
||||||
|
name = "hand_r"; // @todo hopefully these still include the whole arm + hands
|
||||||
|
};
|
||||||
|
class HitLeftLeg {
|
||||||
|
armor = ARM_LEG_ARMOR_DEFAULT;
|
||||||
|
material = -1;
|
||||||
|
name = "leg_l";
|
||||||
|
passThrough = 1;
|
||||||
|
radius = 0.1;
|
||||||
|
explosionShielding = 1;
|
||||||
visual = "injury_legs";
|
visual = "injury_legs";
|
||||||
|
minimalHit = 0.01;
|
||||||
};
|
};
|
||||||
class HitRightLeg: HitLeftLeg {
|
class HitRightLeg: HitLeftLeg {
|
||||||
name = "leg_r";
|
name = "leg_r";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class ACE_SelfActions {
|
class ACE_SelfActions {
|
||||||
#include "ACE_Medical_SelfActions.hpp"
|
#include "ACE_Medical_SelfActions.hpp"
|
||||||
};
|
};
|
||||||
@ -529,23 +523,19 @@ class CfgVehicles {
|
|||||||
|
|
||||||
class B_Soldier_04_f: B_Soldier_base_F {
|
class B_Soldier_04_f: B_Soldier_base_F {
|
||||||
class HitPoints: HitPoints {
|
class HitPoints: HitPoints {
|
||||||
class HitHead: HitHead {};
|
class HitHead;
|
||||||
class HitBody: HitBody {};
|
class HitBody;
|
||||||
class HitHands: HitHands {};
|
class HitHands;
|
||||||
class HitLegs: HitLegs {};
|
class HitLegs;
|
||||||
|
|
||||||
class HitLeftArm: HitLeftArm {
|
class HitLeftArm: HitLeftArm {
|
||||||
armor = ARM_LEG_ARMOR_BETTER;
|
armor = ARM_LEG_ARMOR_BETTER;
|
||||||
};
|
};
|
||||||
|
|
||||||
class HitRightArm: HitRightArm {
|
class HitRightArm: HitRightArm {
|
||||||
armor = ARM_LEG_ARMOR_BETTER;
|
armor = ARM_LEG_ARMOR_BETTER;
|
||||||
};
|
};
|
||||||
|
|
||||||
class HitLeftLeg: HitLeftLeg {
|
class HitLeftLeg: HitLeftLeg {
|
||||||
armor = ARM_LEG_ARMOR_BETTER;
|
armor = ARM_LEG_ARMOR_BETTER;
|
||||||
};
|
};
|
||||||
|
|
||||||
class HitRightLeg: HitRightLeg {
|
class HitRightLeg: HitRightLeg {
|
||||||
armor = ARM_LEG_ARMOR_BETTER;
|
armor = ARM_LEG_ARMOR_BETTER;
|
||||||
};
|
};
|
||||||
@ -554,23 +544,19 @@ class CfgVehicles {
|
|||||||
|
|
||||||
class B_Soldier_05_f: B_Soldier_base_F {
|
class B_Soldier_05_f: B_Soldier_base_F {
|
||||||
class HitPoints: HitPoints {
|
class HitPoints: HitPoints {
|
||||||
class HitHead: HitHead {};
|
class HitHead;
|
||||||
class HitBody: HitBody {};
|
class HitBody;
|
||||||
class HitHands: HitHands {};
|
class HitHands;
|
||||||
class HitLegs: HitLegs {};
|
class HitLegs;
|
||||||
|
|
||||||
class HitLeftArm: HitLeftArm {
|
class HitLeftArm: HitLeftArm {
|
||||||
armor = ARM_LEG_ARMOR_BETTER;
|
armor = ARM_LEG_ARMOR_BETTER;
|
||||||
};
|
};
|
||||||
|
|
||||||
class HitRightArm: HitRightArm {
|
class HitRightArm: HitRightArm {
|
||||||
armor = ARM_LEG_ARMOR_BETTER;
|
armor = ARM_LEG_ARMOR_BETTER;
|
||||||
};
|
};
|
||||||
|
|
||||||
class HitLeftLeg: HitLeftLeg {
|
class HitLeftLeg: HitLeftLeg {
|
||||||
armor = ARM_LEG_ARMOR_BETTER;
|
armor = ARM_LEG_ARMOR_BETTER;
|
||||||
};
|
};
|
||||||
|
|
||||||
class HitRightLeg: HitRightLeg {
|
class HitRightLeg: HitRightLeg {
|
||||||
armor = ARM_LEG_ARMOR_BETTER;
|
armor = ARM_LEG_ARMOR_BETTER;
|
||||||
};
|
};
|
||||||
@ -581,23 +567,19 @@ class CfgVehicles {
|
|||||||
|
|
||||||
class I_Soldier_03_F: I_Soldier_base_F {
|
class I_Soldier_03_F: I_Soldier_base_F {
|
||||||
class HitPoints: HitPoints {
|
class HitPoints: HitPoints {
|
||||||
class HitHead: HitHead {};
|
class HitHead;
|
||||||
class HitBody: HitBody {};
|
class HitBody;
|
||||||
class HitHands: HitHands {};
|
class HitHands;
|
||||||
class HitLegs: HitLegs {};
|
class HitLegs;
|
||||||
|
|
||||||
class HitLeftArm: HitLeftArm {
|
class HitLeftArm: HitLeftArm {
|
||||||
armor = ARM_LEG_ARMOR_BETTER;
|
armor = ARM_LEG_ARMOR_BETTER;
|
||||||
};
|
};
|
||||||
|
|
||||||
class HitRightArm: HitRightArm {
|
class HitRightArm: HitRightArm {
|
||||||
armor = ARM_LEG_ARMOR_BETTER;
|
armor = ARM_LEG_ARMOR_BETTER;
|
||||||
};
|
};
|
||||||
|
|
||||||
class HitLeftLeg: HitLeftLeg {
|
class HitLeftLeg: HitLeftLeg {
|
||||||
armor = ARM_LEG_ARMOR_BETTER;
|
armor = ARM_LEG_ARMOR_BETTER;
|
||||||
};
|
};
|
||||||
|
|
||||||
class HitRightLeg: HitRightLeg {
|
class HitRightLeg: HitRightLeg {
|
||||||
armor = ARM_LEG_ARMOR_BETTER;
|
armor = ARM_LEG_ARMOR_BETTER;
|
||||||
};
|
};
|
||||||
@ -606,23 +588,19 @@ class CfgVehicles {
|
|||||||
|
|
||||||
class I_Soldier_04_F: I_Soldier_base_F {
|
class I_Soldier_04_F: I_Soldier_base_F {
|
||||||
class HitPoints: HitPoints {
|
class HitPoints: HitPoints {
|
||||||
class HitHead: HitHead {};
|
class HitHead;
|
||||||
class HitBody: HitBody {};
|
class HitBody;
|
||||||
class HitHands: HitHands {};
|
class HitHands;
|
||||||
class HitLegs: HitLegs {};
|
class HitLegs;
|
||||||
|
|
||||||
class HitLeftArm: HitLeftArm {
|
class HitLeftArm: HitLeftArm {
|
||||||
armor = ARM_LEG_ARMOR_BETTER;
|
armor = ARM_LEG_ARMOR_BETTER;
|
||||||
};
|
};
|
||||||
|
|
||||||
class HitRightArm: HitRightArm {
|
class HitRightArm: HitRightArm {
|
||||||
armor = ARM_LEG_ARMOR_BETTER;
|
armor = ARM_LEG_ARMOR_BETTER;
|
||||||
};
|
};
|
||||||
|
|
||||||
class HitLeftLeg: HitLeftLeg {
|
class HitLeftLeg: HitLeftLeg {
|
||||||
armor = ARM_LEG_ARMOR_BETTER;
|
armor = ARM_LEG_ARMOR_BETTER;
|
||||||
};
|
};
|
||||||
|
|
||||||
class HitRightLeg: HitRightLeg {
|
class HitRightLeg: HitRightLeg {
|
||||||
armor = ARM_LEG_ARMOR_BETTER;
|
armor = ARM_LEG_ARMOR_BETTER;
|
||||||
};
|
};
|
||||||
@ -631,61 +609,88 @@ class CfgVehicles {
|
|||||||
|
|
||||||
class O_Soldier_base_F: SoldierEB {
|
class O_Soldier_base_F: SoldierEB {
|
||||||
class HitPoints: HitPoints {
|
class HitPoints: HitPoints {
|
||||||
class HitHead: HitHead {};
|
class HitHead;
|
||||||
class HitBody: HitBody {};
|
class HitBody;
|
||||||
class HitHands: HitHands {};
|
class HitHands;
|
||||||
class HitLegs: HitLegs {};
|
class HitLegs;
|
||||||
|
|
||||||
class HitLeftArm: HitLeftArm {
|
class HitLeftArm: HitLeftArm {
|
||||||
armor = ARM_LEG_ARMOR_CSAT;
|
armor = ARM_LEG_ARMOR_CSAT;
|
||||||
passThrough = 0.85;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class HitRightArm: HitRightArm {
|
class HitRightArm: HitRightArm {
|
||||||
armor = ARM_LEG_ARMOR_CSAT;
|
armor = ARM_LEG_ARMOR_CSAT;
|
||||||
passThrough = 0.85;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class HitLeftLeg: HitLeftLeg {
|
class HitLeftLeg: HitLeftLeg {
|
||||||
armor = ARM_LEG_ARMOR_CSAT;
|
armor = ARM_LEG_ARMOR_CSAT;
|
||||||
passThrough = 0.85;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class HitRightLeg: HitRightLeg {
|
class HitRightLeg: HitRightLeg {
|
||||||
armor = ARM_LEG_ARMOR_CSAT;
|
armor = ARM_LEG_ARMOR_CSAT;
|
||||||
passThrough = 0.85;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class O_Soldier_02_F: O_Soldier_base_F {
|
class O_Soldier_02_F: O_Soldier_base_F {
|
||||||
class HitPoints: HitPoints {
|
class HitPoints: HitPoints {
|
||||||
class HitHead: HitHead {};
|
class HitHead;
|
||||||
class HitBody: HitBody {};
|
class HitBody;
|
||||||
class HitHands: HitHands {};
|
class HitHands;
|
||||||
class HitLegs: HitLegs {};
|
class HitLegs;
|
||||||
|
|
||||||
class HitLeftArm: HitLeftArm {
|
class HitLeftArm: HitLeftArm {
|
||||||
armor = ARM_LEG_ARMOR_CSAT;
|
armor = ARM_LEG_ARMOR_CSAT;
|
||||||
passThrough = 0.85;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class HitRightArm: HitRightArm {
|
class HitRightArm: HitRightArm {
|
||||||
armor = ARM_LEG_ARMOR_CSAT;
|
armor = ARM_LEG_ARMOR_CSAT;
|
||||||
passThrough = 0.85;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class HitLeftLeg: HitLeftLeg {
|
class HitLeftLeg: HitLeftLeg {
|
||||||
armor = ARM_LEG_ARMOR_CSAT;
|
armor = ARM_LEG_ARMOR_CSAT;
|
||||||
passThrough = 0.85;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class HitRightLeg: HitRightLeg {
|
class HitRightLeg: HitRightLeg {
|
||||||
armor = ARM_LEG_ARMOR_CSAT;
|
armor = ARM_LEG_ARMOR_CSAT;
|
||||||
passThrough = 0.85;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class O_officer_F: O_Soldier_base_F {
|
||||||
|
class HitPoints: HitPoints {
|
||||||
|
class HitHead;
|
||||||
|
class HitBody;
|
||||||
|
class HitHands;
|
||||||
|
class HitLegs;
|
||||||
|
class HitLeftArm: HitLeftArm {
|
||||||
|
armor = ARM_LEG_ARMOR_CSAT; // @todo is that suppossed to be the case?
|
||||||
|
};
|
||||||
|
class HitRightArm: HitRightArm {
|
||||||
|
armor = ARM_LEG_ARMOR_CSAT;
|
||||||
|
};
|
||||||
|
class HitLeftLeg: HitLeftLeg {
|
||||||
|
armor = ARM_LEG_ARMOR_CSAT;
|
||||||
|
};
|
||||||
|
class HitRightLeg: HitRightLeg {
|
||||||
|
armor = ARM_LEG_ARMOR_CSAT;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class O_Protagonist_VR_F: O_Soldier_base_F {
|
||||||
|
class HitPoints: HitPoints {
|
||||||
|
class HitHead;
|
||||||
|
class HitBody;
|
||||||
|
class HitHands;
|
||||||
|
class HitLegs;
|
||||||
|
class HitLeftArm: HitLeftArm {
|
||||||
|
armor = 2;
|
||||||
|
};
|
||||||
|
class HitRightArm: HitRightArm {
|
||||||
|
armor = 2;
|
||||||
|
};
|
||||||
|
class HitLeftLeg: HitLeftLeg {
|
||||||
|
armor = 2;
|
||||||
|
};
|
||||||
|
class HitRightLeg: HitRightLeg {
|
||||||
|
armor = 2;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
class MapBoard_altis_F;
|
class MapBoard_altis_F;
|
||||||
class ACE_bodyBagObject: MapBoard_altis_F {
|
class ACE_bodyBagObject: MapBoard_altis_F {
|
||||||
XEH_ENABLED;
|
XEH_ENABLED;
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit"];
|
params ["_unit"];
|
||||||
_unit = _this select 0;
|
|
||||||
|
|
||||||
_unit addEventHandler ["HandleDamage", {_this call FUNC(handleDamage)}];
|
_unit addEventHandler ["HandleDamage", {_this call FUNC(handleDamage)}];
|
||||||
|
|
||||||
if (local _unit) then {
|
if (local _unit) then {
|
||||||
[_unit] call FUNC(init);
|
if (!EGVAR(common,settingsInitFinished)) exitWith {
|
||||||
|
EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(init), [_unit]];
|
||||||
|
};
|
||||||
|
[_unit] call FUNC(init);
|
||||||
};
|
};
|
||||||
|
@ -11,10 +11,9 @@ GVAR(heartBeatSounds_Slow) = ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2"];
|
|||||||
["interactMenuClosed", {[objNull, false] call FUNC(displayPatientInformation); }] call EFUNC(common,addEventHandler);
|
["interactMenuClosed", {[objNull, false] call FUNC(displayPatientInformation); }] call EFUNC(common,addEventHandler);
|
||||||
|
|
||||||
["medical_onUnconscious", {
|
["medical_onUnconscious", {
|
||||||
if (local (_this select 0)) then {
|
params ["_unit", "_status"];
|
||||||
private ["_unit"];
|
if (local _unit) then {
|
||||||
_unit = _this select 0;
|
if (_status) then {
|
||||||
if (_this select 1) then {
|
|
||||||
_unit setVariable ["tf_globalVolume", 0.4];
|
_unit setVariable ["tf_globalVolume", 0.4];
|
||||||
_unit setVariable ["tf_voiceVolume", 0, true];
|
_unit setVariable ["tf_voiceVolume", 0, true];
|
||||||
_unit setVariable ["tf_unable_to_use_radio", true, true];
|
_unit setVariable ["tf_unable_to_use_radio", true, true];
|
||||||
@ -35,10 +34,8 @@ GVAR(heartBeatSounds_Slow) = ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2"];
|
|||||||
|
|
||||||
// Initialize all effects
|
// Initialize all effects
|
||||||
_fnc_createEffect = {
|
_fnc_createEffect = {
|
||||||
private ["_type", "_layer", "_default", "_effect"];
|
private "_effect";
|
||||||
_type = _this select 0;
|
params ["_type", "_layer", "_default"];
|
||||||
_layer = _this select 1;
|
|
||||||
_default = _this select 2;
|
|
||||||
|
|
||||||
_effect = ppEffectCreate [_type, _layer];
|
_effect = ppEffectCreate [_type, _layer];
|
||||||
_effect ppEffectForceInNVG true;
|
_effect ppEffectForceInNVG true;
|
||||||
@ -245,30 +242,28 @@ GVAR(lastHeartBeatSound) = ACE_time;
|
|||||||
|
|
||||||
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
}, 0, []] call CBA_fnc_addPerFrameHandler;
|
||||||
|
|
||||||
if (USE_WOUND_EVENT_SYNC) then {
|
|
||||||
// broadcast injuries to JIP clients in a MP session
|
|
||||||
if (isMultiplayer && hasInterface) then {
|
|
||||||
["playerChanged", {
|
|
||||||
EXPLODE_2_PVT(_this,_newPlayer,_oldPlayer);
|
|
||||||
if (alive _newPlayer) then {
|
|
||||||
// We are only pulling the wounds for the units in the player group. Anything else will come when the unit interacts with them.
|
|
||||||
{
|
|
||||||
[_x, _newPlayer] call FUNC(requestWoundSync);
|
|
||||||
}foreach units group _newPlayer;
|
|
||||||
};
|
|
||||||
}] call EFUNC(common,addEventhandler);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
[
|
["SettingsInitialized", {
|
||||||
{(((_this select 0) getvariable [QGVAR(bloodVolume), 100]) < 65)},
|
if (GVAR(level) == 2) exitwith {
|
||||||
{(((_this select 0) getvariable [QGVAR(pain), 0]) - ((_this select 0) getvariable [QGVAR(painSuppress), 0])) > 0.9},
|
[
|
||||||
{(([_this select 0] call FUNC(getBloodLoss)) > 0.25)},
|
{(((_this select 0) getvariable [QGVAR(bloodVolume), 100]) < 65)},
|
||||||
{((_this select 0) getvariable [QGVAR(inReviveState), false])},
|
{(((_this select 0) getvariable [QGVAR(pain), 0]) - ((_this select 0) getvariable [QGVAR(painSuppress), 0])) > 0.9},
|
||||||
{((_this select 0) getvariable [QGVAR(inCardiacArrest), false])},
|
{(([_this select 0] call FUNC(getBloodLoss)) > 0.25)},
|
||||||
{((_this select 0) getvariable ["ACE_isDead", false])},
|
{((_this select 0) getvariable [QGVAR(inReviveState), false])},
|
||||||
{(((_this select 0) getvariable [QGVAR(airwayStatus), 100]) < 80)}
|
{((_this select 0) getvariable [QGVAR(inCardiacArrest), false])},
|
||||||
] call FUNC(addUnconsciousCondition);
|
{((_this select 0) getvariable ["ACE_isDead", false])},
|
||||||
|
{(((_this select 0) getvariable [QGVAR(airwayStatus), 100]) < 80)}
|
||||||
|
] call FUNC(addUnconsciousCondition);
|
||||||
|
};
|
||||||
|
|
||||||
|
[
|
||||||
|
{(((_this select 0) getvariable [QGVAR(bloodVolume), 100]) < 40)},
|
||||||
|
{(((_this select 0) getvariable [QGVAR(pain), 0]) - ((_this select 0) getvariable [QGVAR(painSuppress), 0])) > 0.6},
|
||||||
|
{(([_this select 0] call FUNC(getBloodLoss)) > 0.1)},
|
||||||
|
{((_this select 0) getvariable [QGVAR(inReviveState), false])},
|
||||||
|
{((_this select 0) getvariable ["ACE_isDead", false])}
|
||||||
|
] call FUNC(addUnconsciousCondition);
|
||||||
|
}] call EFUNC(common,addEventHandler);
|
||||||
|
|
||||||
// Prevent all types of interaction while unconscious
|
// Prevent all types of interaction while unconscious
|
||||||
// @todo: probably remove this when CBA keybind hold key works properly
|
// @todo: probably remove this when CBA keybind hold key works properly
|
||||||
|
@ -68,6 +68,7 @@ PREP(selectionNameToNumber);
|
|||||||
PREP(setCardiacArrest);
|
PREP(setCardiacArrest);
|
||||||
PREP(setDead);
|
PREP(setDead);
|
||||||
PREP(setHitPointDamage);
|
PREP(setHitPointDamage);
|
||||||
|
PREP(setStructuralDamage);
|
||||||
PREP(setUnconscious);
|
PREP(setUnconscious);
|
||||||
PREP(treatment);
|
PREP(treatment);
|
||||||
PREP(treatment_failure);
|
PREP(treatment_failure);
|
||||||
@ -83,6 +84,7 @@ PREP(treatmentAdvanced_medication);
|
|||||||
PREP(treatmentAdvanced_medicationLocal);
|
PREP(treatmentAdvanced_medicationLocal);
|
||||||
PREP(treatmentAdvanced_surgicalKit_onProgress);
|
PREP(treatmentAdvanced_surgicalKit_onProgress);
|
||||||
PREP(treatmentBasic_bandage);
|
PREP(treatmentBasic_bandage);
|
||||||
|
PREP(treatmentBasic_bandageLocal);
|
||||||
PREP(treatmentBasic_bloodbag);
|
PREP(treatmentBasic_bloodbag);
|
||||||
PREP(treatmentBasic_bloodbagLocal);
|
PREP(treatmentBasic_bloodbagLocal);
|
||||||
PREP(treatmentBasic_epipen);
|
PREP(treatmentBasic_epipen);
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit"];
|
params ["_unit"];
|
||||||
|
|
||||||
_unit = _this select 0;
|
|
||||||
|
|
||||||
if !(local _unit) exitWith {};
|
|
||||||
|
|
||||||
|
// reset all variables. @todo GROUP respawn?
|
||||||
[_unit] call FUNC(init);
|
[_unit] call FUNC(init);
|
||||||
|
|
||||||
// Reset captive status for respawning unit
|
// Reset captive status for respawning unit
|
||||||
|
@ -7,15 +7,12 @@
|
|||||||
* 1: The patient <OBJECT>
|
* 1: The patient <OBJECT>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* NONE
|
* None
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_caller","_target","_selectionName"];
|
params ["_caller", "_target", "_selectionName"];
|
||||||
_caller = _this select 0;
|
|
||||||
_target = _this select 1;
|
|
||||||
_selectionName = _this select 2;
|
|
||||||
[[_caller, _target, _selectionName], QUOTE(DFUNC(actionCheckBloodPressureLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
[[_caller, _target, _selectionName], QUOTE(DFUNC(actionCheckBloodPressureLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||||
|
@ -7,25 +7,22 @@
|
|||||||
* 1: The patient <OBJECT>
|
* 1: The patient <OBJECT>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* NONE
|
* None
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_caller","_target","_selectionName","_bloodPressure","_bloodPressureHigh","_bloodPressureLow", "_logOutPut", "_output"];
|
private ["_bloodPressure", "_logOutPut", "_output"];
|
||||||
_caller = _this select 0;
|
params ["_caller", "_target", "_selectionName"];
|
||||||
_target = _this select 1;
|
|
||||||
_selectionName = _this select 2;
|
|
||||||
|
|
||||||
_bloodPressure = [_target] call FUNC(getBloodPressure);
|
_bloodPressure = if (!alive _target) then {
|
||||||
if (!alive _target) then {
|
[0,0]
|
||||||
_bloodPressure = [0,0];
|
} else {
|
||||||
|
[_target] call FUNC(getBloodPressure)
|
||||||
};
|
};
|
||||||
|
_bloodPressure params ["_bloodPressureHigh", "_bloodPressureLow"];
|
||||||
_bloodPressureHigh = _bloodPressure select 1;
|
|
||||||
_bloodPressureLow = _bloodPressure select 0;
|
|
||||||
_output = "";
|
_output = "";
|
||||||
_logOutPut = "";
|
_logOutPut = "";
|
||||||
if ([_caller] call FUNC(isMedic)) then {
|
if ([_caller] call FUNC(isMedic)) then {
|
||||||
|
@ -7,15 +7,13 @@
|
|||||||
* 1: The patient <OBJECT>
|
* 1: The patient <OBJECT>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* NONE
|
* None
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_caller","_target","_selectionName"];
|
params ["_caller","_target", "_selectionName"];
|
||||||
_caller = _this select 0;
|
|
||||||
_target = _this select 1;
|
|
||||||
_selectionName = _this select 2;
|
|
||||||
[[_caller, _target, _selectionName], QUOTE(DFUNC(actionCheckPulseLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
[[_caller, _target, _selectionName], QUOTE(DFUNC(actionCheckPulseLocal)), _target] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||||
|
|
||||||
|
@ -7,17 +7,15 @@
|
|||||||
* 1: The patient <OBJECT>
|
* 1: The patient <OBJECT>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* NONE
|
* None
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_caller", "_unit", "_selectionName", "_heartRateOutput", "_heartRate", "_logOutPut"];
|
private ["_heartRateOutput", "_heartRate", "_logOutPut"];
|
||||||
_caller = _this select 0;
|
params ["_caller", "_unit", "_selectionName"];
|
||||||
_unit = _this select 1;
|
|
||||||
_selectionName = _this select 2;
|
|
||||||
|
|
||||||
_heartRate = _unit getvariable [QGVAR(heartRate), 80];
|
_heartRate = _unit getvariable [QGVAR(heartRate), 80];
|
||||||
if (!alive _unit) then {
|
if (!alive _unit) then {
|
||||||
|
@ -7,23 +7,17 @@
|
|||||||
* 1: The patient <OBJECT>
|
* 1: The patient <OBJECT>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* NONE
|
* None
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_caller","_target", "_output"];
|
private ["_output"];
|
||||||
_caller = _this select 0;
|
params ["_caller", "_target"];
|
||||||
_target = _this select 1;
|
|
||||||
|
|
||||||
_output = "";
|
_output = [LSTRING(Check_Response_Unresponsive), LSTRING(Check_Response_Responsive)] select ([_target] call EFUNC(common,isAwake));
|
||||||
if ([_target] call EFUNC(common,isAwake)) then {
|
|
||||||
_output = LSTRING(Check_Response_Responsive);
|
|
||||||
} else {
|
|
||||||
_output = LSTRING(Check_Response_Unresponsive);
|
|
||||||
};
|
|
||||||
|
|
||||||
["displayTextStructured", [_caller], [[_output, [_target] call EFUNC(common,getName)], 2, _caller]] call EFUNC(common,targetEvent);
|
["displayTextStructured", [_caller], [[_output, [_target] call EFUNC(common,getName)], 2, _caller]] call EFUNC(common,targetEvent);
|
||||||
|
|
||||||
|
@ -7,16 +7,15 @@
|
|||||||
* 1: The patient <OBJECT>
|
* 1: The patient <OBJECT>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* NONE
|
* None
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_caller", "_target", "_genericMessages"];
|
private "_genericMessages";
|
||||||
_caller = _this select 0;
|
params ["_caller", "_target"];
|
||||||
_target = _this select 1;
|
|
||||||
|
|
||||||
_genericMessages = [LSTRING(diagnoseMessage)];
|
_genericMessages = [LSTRING(diagnoseMessage)];
|
||||||
|
|
||||||
|
@ -7,20 +7,18 @@
|
|||||||
* 1: The patient <OBJECT>
|
* 1: The patient <OBJECT>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* NONE
|
* None
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_caller", "_target","_vehicle"];
|
private "_vehicle";
|
||||||
_caller = _this select 0;
|
params ["_caller", "_target"];
|
||||||
_target = _this select 1;
|
|
||||||
|
|
||||||
if ([_target] call EFUNC(common,isAwake)) exitwith {
|
if ([_target] call EFUNC(common,isAwake)) exitwith {
|
||||||
// TODO localization
|
["displayTextStructured", [_caller], [[LSTRING(CanNotLoaded), [_target] call EFUNC(common,getName)], 1.5, _caller]] call EFUNC(common,targetEvent);
|
||||||
["displayTextStructured", [_caller], [["This person (%1) is awake and cannot be loaded", [_target] call EFUNC(common,getName)], 1.5, _caller]] call EFUNC(common,targetEvent);
|
|
||||||
};
|
};
|
||||||
if ([_target] call FUNC(isBeingCarried)) then {
|
if ([_target] call FUNC(isBeingCarried)) then {
|
||||||
[_caller, _target] call EFUNC(dragging,dropObject_carry);
|
[_caller, _target] call EFUNC(dragging,dropObject_carry);
|
||||||
|
@ -14,9 +14,8 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
PARAMS_2(_caller,_target);
|
|
||||||
|
|
||||||
private ["_position", "_headPos", "_spinePos", "_dirVect", "_direction", "_bodyBag"];
|
private ["_position", "_headPos", "_spinePos", "_dirVect", "_direction", "_bodyBag"];
|
||||||
|
params ["_caller", "_target"];
|
||||||
|
|
||||||
if (alive _target) then {
|
if (alive _target) then {
|
||||||
[_target, true] call FUNC(setDead);
|
[_target, true] call FUNC(setDead);
|
||||||
|
@ -8,17 +8,15 @@
|
|||||||
* 2: SelectionName <STRING>
|
* 2: SelectionName <STRING>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* NONE
|
* None
|
||||||
*
|
*
|
||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_caller", "_target", "_part", "_selectionName", "_tourniquets", "_output"];
|
private ["_part", "_tourniquets", "_output"];
|
||||||
_caller = _this select 0;
|
params ["_caller", "_target", "_selectionName"];
|
||||||
_target = _this select 1;
|
|
||||||
_selectionName = _this select 2;
|
|
||||||
|
|
||||||
// grab the required data
|
// grab the required data
|
||||||
_part = [_selectionName] call FUNC(selectionNameToNumber);
|
_part = [_selectionName] call FUNC(selectionNameToNumber);
|
||||||
@ -26,7 +24,7 @@ _tourniquets = _target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]];
|
|||||||
|
|
||||||
// Check if there is a tourniquet on this bodypart
|
// Check if there is a tourniquet on this bodypart
|
||||||
if ((_tourniquets select _part) == 0) exitwith {
|
if ((_tourniquets select _part) == 0) exitwith {
|
||||||
_output = "There is no tourniquet on this body part!";
|
_output = LSTRING(noTourniquetOnBodyPart);
|
||||||
["displayTextStructured", [_caller], [_output, 1.5, _caller]] call EFUNC(common,targetEvent);
|
["displayTextStructured", [_caller], [_output, 1.5, _caller]] call EFUNC(common,targetEvent);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -5,23 +5,20 @@
|
|||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: The medic <OBJECT>
|
* 0: The medic <OBJECT>
|
||||||
* 1: The patient <OBJECT>
|
* 1: The patient <OBJECT>
|
||||||
* 2: Drag after unload <BOOL> <OPTIONAL>
|
* 2: Drag after unload <BOOL> (default: false)
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* NONE
|
* None
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_caller", "_target", "_drag"];
|
params ["_caller", "_target", ["_drag", false]];
|
||||||
_caller = _this select 0;
|
|
||||||
_target = _this select 1;
|
|
||||||
_drag = if (count _this > 2) then {_this select 2} else {false};
|
|
||||||
|
|
||||||
// cannot unload a unit not in a vehicle.
|
// cannot unload a unit not in a vehicle.
|
||||||
if (vehicle _target == _target) exitwith {};
|
if (vehicle _target == _target) exitwith {};
|
||||||
if (([_target] call EFUNC(common,isAwake))) exitwith {};
|
if (([_target] call EFUNC(common,isAwake))) exitwith {};
|
||||||
|
|
||||||
["unloadPersonEvent", _target, [_target, vehicle _target]] call EFUNC(common,targetEvent)
|
["unloadPersonEvent", _target, [_target, vehicle _target]] call EFUNC(common,targetEvent)
|
||||||
|
@ -9,18 +9,15 @@
|
|||||||
* 3: callback <CODE>
|
* 3: callback <CODE>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* nil
|
* None
|
||||||
*
|
*
|
||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit", "_value", "_time", "_adjustment", "_callBack"];
|
|
||||||
_unit = [_this, 0, objNull, [objNull]] call BIS_fnc_Param;
|
params [["_unit", objNull, [objNull]], ["_value", 0, [0]], ["_time", 1, [0]], ["_callBack", {}, [{}]]];
|
||||||
_value = [_this, 1, 0, [0]] call BIS_fnc_Param;
|
|
||||||
_time = [_this, 2, 1, [0]] call BIS_fnc_Param;
|
|
||||||
_callBack = [_this, 3, {}, [{}]] call BIS_fnc_Param;
|
|
||||||
|
|
||||||
_adjustment = _unit getvariable [QGVAR(heartRateAdjustments), []];
|
_adjustment = _unit getvariable [QGVAR(heartRateAdjustments), []];
|
||||||
_adjustment pushback [_value, _time, _callBack];
|
_adjustment pushback [_value, _time, _callBack];
|
||||||
|
@ -6,16 +6,14 @@
|
|||||||
* 0: The Unit <OBJECT>
|
* 0: The Unit <OBJECT>
|
||||||
*
|
*
|
||||||
* ReturnValue:
|
* ReturnValue:
|
||||||
* <NIL>
|
* None
|
||||||
*
|
*
|
||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit", "_force"];
|
params ["_unit", ["_force", false]];
|
||||||
_unit = _this select 0;
|
|
||||||
_force = if (count _this > 1) then {_this select 1} else {false};
|
|
||||||
|
|
||||||
if ([_unit] call FUNC(hasMedicalEnabled) || _force) then {
|
if ([_unit] call FUNC(hasMedicalEnabled) || _force) then {
|
||||||
|
|
||||||
@ -27,13 +25,13 @@ if ([_unit] call FUNC(hasMedicalEnabled) || _force) then {
|
|||||||
_unit setvariable [QGVAR(addedToUnitLoop), true, true];
|
_unit setvariable [QGVAR(addedToUnitLoop), true, true];
|
||||||
|
|
||||||
[{
|
[{
|
||||||
private ["_unit", "_interval"];
|
params ["_args", "_idPFH"];
|
||||||
_unit = (_this select 0) select 0;
|
_args params ["_unit", "_interval"];
|
||||||
_interval = ACE_time - ((_this select 0) select 1);
|
_interval = ACE_time - _interval;
|
||||||
(_this select 0) set [1, ACE_time];
|
(_this select 0) set [1, ACE_time];
|
||||||
|
|
||||||
if (!alive _unit || !local _unit) then {
|
if (!alive _unit || !local _unit) then {
|
||||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||||
if (!local _unit) then {
|
if (!local _unit) then {
|
||||||
if (GVAR(level) >= 2) then {
|
if (GVAR(level) >= 2) then {
|
||||||
_unit setvariable [QGVAR(heartRate), _unit getvariable [QGVAR(heartRate), 80], true];
|
_unit setvariable [QGVAR(heartRate), _unit getvariable [QGVAR(heartRate), 80], true];
|
||||||
@ -47,9 +45,12 @@ if ([_unit] call FUNC(hasMedicalEnabled) || _force) then {
|
|||||||
private "_pain";
|
private "_pain";
|
||||||
_pain = _unit getvariable [QGVAR(pain), 0];
|
_pain = _unit getvariable [QGVAR(pain), 0];
|
||||||
if (_pain > (_unit getvariable [QGVAR(painSuppress), 0])) then {
|
if (_pain > (_unit getvariable [QGVAR(painSuppress), 0])) then {
|
||||||
if (_pain > 0.7 && {random(1) > 0.6}) then {
|
// This introduces wierd unconscious behaviour for basic medical and possibly also advanced.
|
||||||
|
// TODO This is disabled as it's considered non critical code.
|
||||||
|
// We will need to decide if we want unconscious triggered on high pain levels or if we can get rid of this entirely.
|
||||||
|
/*if (_pain > 0.7 && {random(1) > 0.6}) then {
|
||||||
[_unit] call FUNC(setUnconscious);
|
[_unit] call FUNC(setUnconscious);
|
||||||
};
|
};*/
|
||||||
|
|
||||||
[_unit, _pain] call FUNC(playInjuredSound);
|
[_unit, _pain] call FUNC(playInjuredSound);
|
||||||
};
|
};
|
||||||
|
@ -9,28 +9,24 @@
|
|||||||
* 3: The arguments for localization <ARRAY>
|
* 3: The arguments for localization <ARRAY>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* nil
|
* None
|
||||||
*
|
*
|
||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit", "_type", "_message", "_arguments", "_lastNumber", "_moment", "_logVarName", "_log","_newLog", "_logs"];
|
private ["_moment", "_logVarName", "_log","_newLog", "_logs"];
|
||||||
_unit = _this select 0;
|
params ["_unit", "_type", "_message", "_arguments"];
|
||||||
_type = _this select 1;
|
|
||||||
_message = _this select 2;
|
|
||||||
_arguments = _this select 3;
|
|
||||||
|
|
||||||
if (!local _unit) exitwith {
|
if (!local _unit) exitwith {
|
||||||
[_this, QUOTE(DFUNC(addToLog)), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
[_this, QFUNC(addToLog), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||||
};
|
};
|
||||||
|
|
||||||
_lastNumber = date select 4;
|
date params ["", "", "", "_minute", "_hour"];
|
||||||
_moment = format["%1:%2",date select 3, _lastNumber];
|
|
||||||
if (_lastNumber < 10) then {
|
_moment = format [ (["%1:%2", "%1:0%2"] select (_minute < 10)), _hour, _minute];
|
||||||
_moment = format["%1:0%2",date select 3, _lastNumber];
|
|
||||||
};
|
|
||||||
_logVarName = format[QGVAR(logFile_%1), _type];
|
_logVarName = format[QGVAR(logFile_%1), _type];
|
||||||
|
|
||||||
_log = _unit getvariable [_logVarName, []];
|
_log = _unit getvariable [_logVarName, []];
|
||||||
@ -41,10 +37,10 @@ if (count _log >= 8) then {
|
|||||||
if (_foreachIndex > 0) then {
|
if (_foreachIndex > 0) then {
|
||||||
_newLog pushback _x;
|
_newLog pushback _x;
|
||||||
};
|
};
|
||||||
}foreach _log;
|
} foreach _log;
|
||||||
_log = _newLog;
|
_log = _newLog;
|
||||||
};
|
};
|
||||||
_log pushback [_message,_moment,_type, _arguments];
|
_log pushback [_message, _moment, _type, _arguments];
|
||||||
|
|
||||||
_unit setvariable [_logVarName, _log, true];
|
_unit setvariable [_logVarName, _log, true];
|
||||||
["medical_onLogEntryAdded", [_unit, _type, _message, _arguments]] call EFUNC(common,localEvent);
|
["medical_onLogEntryAdded", [_unit, _type, _message, _arguments]] call EFUNC(common,localEvent);
|
||||||
|
@ -7,16 +7,15 @@
|
|||||||
* 1: The new item classname <STRING>
|
* 1: The new item classname <STRING>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* nil
|
* None
|
||||||
*
|
*
|
||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit", "_newItem", "_log", "_inList", "_amount"];
|
private ["_log", "_inList", "_amount"];
|
||||||
_unit = _this select 0;
|
params ["_unit", "_newItem"];
|
||||||
_newItem = _this select 1;
|
|
||||||
|
|
||||||
if (!local _unit) exitwith {
|
if (!local _unit) exitwith {
|
||||||
[_this, QUOTE(DFUNC(addToTriageList)), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
[_this, QUOTE(DFUNC(addToTriageList)), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||||
@ -36,7 +35,7 @@ _amount = 1;
|
|||||||
_amount = (_info select 1);
|
_amount = (_info select 1);
|
||||||
_inList = true;
|
_inList = true;
|
||||||
};
|
};
|
||||||
}foreach _log;
|
} foreach _log;
|
||||||
|
|
||||||
if (!_inList) then {
|
if (!_inList) then {
|
||||||
_log pushback [_newItem, 1, ACE_time];
|
_log pushback [_newItem, 1, ACE_time];
|
||||||
|
@ -3,14 +3,13 @@
|
|||||||
* Adds new condition for the unconscious state. Conditions are not actively checked for units unless unit is in unconscious state.
|
* Adds new condition for the unconscious state. Conditions are not actively checked for units unless unit is in unconscious state.
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Code, should return a boolean <CODE>
|
* 0-N: Code, should return a boolean <CODE>
|
||||||
*
|
*
|
||||||
* ReturnValue:
|
* ReturnValue:
|
||||||
* <NIL>
|
* None
|
||||||
*
|
*
|
||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
if (isnil QGVAR(unconsciousConditions)) then {
|
if (isnil QGVAR(unconsciousConditions)) then {
|
||||||
@ -21,5 +20,5 @@ if (typeName _this == typeName []) then {
|
|||||||
if (typeName _x == typeName {}) then {
|
if (typeName _x == typeName {}) then {
|
||||||
GVAR(unconsciousConditions) pushback _x;
|
GVAR(unconsciousConditions) pushback _x;
|
||||||
};
|
};
|
||||||
}foreach _this;
|
} foreach _this;
|
||||||
};
|
};
|
||||||
|
@ -13,8 +13,7 @@
|
|||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
params ["_vehicle", "_player", "_parameters"];
|
||||||
EXPLODE_3_PVT(_this,_vehicle,_player,_parameters);
|
|
||||||
|
|
||||||
private ["_actions", "_unit"];
|
private ["_actions", "_unit"];
|
||||||
_actions = [];
|
_actions = [];
|
||||||
|
@ -18,10 +18,10 @@
|
|||||||
|
|
||||||
private ["_pain"];
|
private ["_pain"];
|
||||||
|
|
||||||
PARAMS_2(_unit,_addedPain);
|
params ["_unit", "_addedPain"];
|
||||||
|
|
||||||
//Only run on local units:
|
//Only run on local units:
|
||||||
if (!local _unit) exitWith {ERROR("unit is not local");};
|
if (!local _unit) exitWith {ERROR("unit is not local");};
|
||||||
|
TRACE_3("ACE_DEBUG: adjustPainLevel Called",_unit, _pain, _addedPain);
|
||||||
|
|
||||||
//Ignore if medical system disabled:
|
//Ignore if medical system disabled:
|
||||||
if (GVAR(level) == 0) exitWith {};
|
if (GVAR(level) == 0) exitWith {};
|
||||||
|
@ -14,9 +14,8 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_target", "_caller", "_accessLevel", "_return"];
|
private ["_accessLevel", "_return"];
|
||||||
_caller = _this select 0;
|
params ["_caller", "_target"];
|
||||||
_target = _this select 1;
|
|
||||||
|
|
||||||
_accessLevel = _target getvariable [QGVAR(allowSharedEquipmentAccess), -1];
|
_accessLevel = _target getvariable [QGVAR(allowSharedEquipmentAccess), -1];
|
||||||
|
|
||||||
@ -28,4 +27,4 @@ if (_accessLevel >= 0) then {
|
|||||||
if (_accessLevel == 2) exitwith { _return = (group _target == group _caller); };
|
if (_accessLevel == 2) exitwith { _return = (group _target == group _caller); };
|
||||||
};
|
};
|
||||||
|
|
||||||
_return;
|
_return;
|
||||||
|
@ -16,36 +16,35 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_caller", "_target", "_selectionName", "_className", "_config", "_medicRequired", "_items", "_locations", "_return", "_condition", "_patientStateCondition", "_allowedSelections"];
|
private ["_config", "_medicRequired", "_items", "_locations", "_return", "_condition", "_patientStateCondition", "_allowedSelections"];
|
||||||
_caller = _this select 0;
|
params ["_caller", "_target", "_selectionName", "_className"];
|
||||||
_target = _this select 1;
|
|
||||||
_selectionName = _this select 2;
|
|
||||||
_className = _this select 3;
|
|
||||||
|
|
||||||
if !(_target isKindOf "CAManBase") exitWith {false};
|
if !(_target isKindOf "CAManBase") exitWith { false };
|
||||||
|
|
||||||
|
|
||||||
|
_config = (ConfigFile >> "ACE_Medical_Actions" >> (["Basic", "Advanced"] select (GVAR(level)>=2)) >> _className);
|
||||||
|
|
||||||
_config = (ConfigFile >> "ACE_Medical_Actions" >> "Basic" >> _className);
|
|
||||||
if (GVAR(level)>=2) then {
|
|
||||||
_config = (ConfigFile >> "ACE_Medical_Actions" >> "Advanced" >> _className);
|
|
||||||
};
|
|
||||||
if !(isClass _config) exitwith {false};
|
if !(isClass _config) exitwith {false};
|
||||||
|
|
||||||
|
// Allow self treatment check
|
||||||
|
if (_caller == _target && {getNumber (_config >> "allowSelfTreatment") == 0}) exitwith {false};
|
||||||
|
|
||||||
_medicRequired = if (isNumber (_config >> "requiredMedic")) then {
|
_medicRequired = if (isNumber (_config >> "requiredMedic")) then {
|
||||||
getNumber (_config >> "requiredMedic");
|
getNumber (_config >> "requiredMedic");
|
||||||
} else {
|
} else {
|
||||||
// Check for required class
|
// Check for required class
|
||||||
if (isText (_config >> "requiredMedic")) exitwith {
|
if (isText (_config >> "requiredMedic")) exitwith {
|
||||||
missionNamespace getvariable [(getText (_config >> "requiredMedic")), 0];
|
missionNamespace getvariable [(getText (_config >> "requiredMedic")), 0]
|
||||||
};
|
};
|
||||||
0;
|
0;
|
||||||
};
|
};
|
||||||
if !([_caller, _medicRequired] call FUNC(isMedic)) exitwith {false};
|
if !([_caller, _medicRequired] call FUNC(isMedic)) exitwith { false };
|
||||||
|
|
||||||
_items = getArray (_config >> "items");
|
_items = getArray (_config >> "items");
|
||||||
if (count _items > 0 && {!([_caller, _target, _items] call FUNC(hasItems))}) exitwith {false};
|
if (count _items > 0 && {!([_caller, _target, _items] call FUNC(hasItems))}) exitwith { false };
|
||||||
|
|
||||||
_allowedSelections = getArray (_config >> "allowedSelections");
|
_allowedSelections = getArray (_config >> "allowedSelections");
|
||||||
if !("All" in _allowedSelections || {(_selectionName in _allowedSelections)}) exitwith {false};
|
if !("All" in _allowedSelections || {(_selectionName in _allowedSelections)}) exitwith { false };
|
||||||
|
|
||||||
_return = true;
|
_return = true;
|
||||||
if (getText (_config >> "condition") != "") then {
|
if (getText (_config >> "condition") != "") then {
|
||||||
@ -61,7 +60,7 @@ if (getText (_config >> "condition") != "") then {
|
|||||||
_return = [_caller, _target, _selectionName, _className] call _condition;
|
_return = [_caller, _target, _selectionName, _className] call _condition;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
if (!_return) exitwith {false};
|
if (!_return) exitwith { false };
|
||||||
|
|
||||||
_patientStateCondition = if (isText(_config >> "patientStateCondition")) then {
|
_patientStateCondition = if (isText(_config >> "patientStateCondition")) then {
|
||||||
missionNamespace getvariable [getText(_config >> "patientStateCondition"), 0]
|
missionNamespace getvariable [getText(_config >> "patientStateCondition"), 0]
|
||||||
@ -71,7 +70,7 @@ _patientStateCondition = if (isText(_config >> "patientStateCondition")) then {
|
|||||||
if (_patientStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitwith {false};
|
if (_patientStateCondition == 1 && {!([_target] call FUNC(isInStableCondition))}) exitwith {false};
|
||||||
|
|
||||||
_locations = getArray (_config >> "treatmentLocations");
|
_locations = getArray (_config >> "treatmentLocations");
|
||||||
if ("All" in _locations) exitwith {true};
|
if ("All" in _locations) exitwith { true };
|
||||||
|
|
||||||
private [ "_medFacility", "_medVeh"];
|
private [ "_medFacility", "_medVeh"];
|
||||||
_medFacility = {([_caller] call FUNC(isInMedicalFacility)) || ([_target] call FUNC(isInMedicalFacility))};
|
_medFacility = {([_caller] call FUNC(isInMedicalFacility)) || ([_target] call FUNC(isInMedicalFacility))};
|
||||||
@ -93,6 +92,6 @@ _medVeh = {([_caller] call FUNC(isInMedicalVehicle)) || ([_target] call FUNC(isI
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}foreach _locations;
|
} foreach _locations;
|
||||||
|
|
||||||
_return;
|
_return;
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
#define MAX_DURATION_CACHE 2
|
#define MAX_DURATION_CACHE 2
|
||||||
|
params ["", "_target", "_selection", "_classname"];
|
||||||
|
|
||||||
// parameters, function, namespace, uid
|
// parameters, function, namespace, uid
|
||||||
[_this, DFUNC(canTreat), _this select 1, format[QGVAR(canTreat_%1_%2), _this select 2, _this select 3], MAX_DURATION_CACHE, "clearConditionCaches"] call EFUNC(common,cachedCall);
|
[_this, DFUNC(canTreat), _target, format [QGVAR(canTreat_%1_%2), _selection, _classname], MAX_DURATION_CACHE, "clearConditionCaches"] call EFUNC(common,cachedCall);
|
||||||
|
@ -7,16 +7,15 @@
|
|||||||
* 1: The caller <OBJECT>
|
* 1: The caller <OBJECT>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* OBJECT Returns the copy of the unit. If no copy could be made, returns the oldBody
|
* Returns the copy of the unit. If no copy could be made, returns the oldBody <OBJECT>
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_oldBody","_newUnit","_class","_group","_position","_side", "_caller", "_name"];
|
private ["_newUnit", "_class", "_group", "_position", "_side", "_name"];
|
||||||
_oldBody = _this select 0;
|
params ["_oldBody", "_caller"];
|
||||||
_caller = _this select 1;
|
|
||||||
|
|
||||||
if (alive _oldBody) exitwith {_oldBody}; // we only want to do this for dead bodies
|
if (alive _oldBody) exitwith {_oldBody}; // we only want to do this for dead bodies
|
||||||
|
|
||||||
@ -79,5 +78,5 @@ _newUnit setvariable ["ACE_isUnconscious", true, true];
|
|||||||
_newUnit setvariable [QGVAR(disableInteraction), true, true];
|
_newUnit setvariable [QGVAR(disableInteraction), true, true];
|
||||||
_oldBody setvariable [QGVAR(disableInteraction), true, true];
|
_oldBody setvariable [QGVAR(disableInteraction), true, true];
|
||||||
|
|
||||||
_newUnit setDamage 0.89;
|
[_newUnit, 0.89] call FUNC(setStructuralDamage);
|
||||||
_newUnit;
|
_newUnit;
|
||||||
|
@ -3,11 +3,16 @@
|
|||||||
* Spawns litter for the treatment action on the ground around the target
|
* Spawns litter for the treatment action on the ground around the target
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: The target <OBJECT>
|
* 0: The Caller <OBJECT>
|
||||||
* 1: The treatment classname <STRING>
|
* 1: The target <OBJECT>
|
||||||
|
* 2: The treatment Selection Name <STRING>
|
||||||
|
* 3: The treatment classname <STRING>
|
||||||
|
* 4: ?
|
||||||
|
* 5: Users of Items <?>
|
||||||
|
* 6: Previous Damage <NUMBER>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
*
|
* None
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
@ -16,13 +21,8 @@
|
|||||||
|
|
||||||
#define MIN_ENTRIES_LITTER_CONFIG 3
|
#define MIN_ENTRIES_LITTER_CONFIG 3
|
||||||
|
|
||||||
private ["_target", "_className", "_config", "_litter", "_createLitter", "_position", "_createdLitter", "_caller", "_selectionName", "_usersOfItems", "_previousDamage"];
|
private ["_config", "_litter", "_createLitter", "_position", "_createdLitter"];
|
||||||
_caller = _this select 0;
|
params ["_caller", "_target", "_selectionName", "_className", "", "_usersOfItems", "_previousDamage"];
|
||||||
_target = _this select 1;
|
|
||||||
_selectionName = _this select 2;
|
|
||||||
_className = _this select 3;
|
|
||||||
_usersOfItems = _this select 5;
|
|
||||||
_previousDamage = _this select 6;
|
|
||||||
|
|
||||||
if !(GVAR(allowLitterCreation)) exitwith {};
|
if !(GVAR(allowLitterCreation)) exitwith {};
|
||||||
if (vehicle _caller != _caller || vehicle _target != _target) exitwith {};
|
if (vehicle _caller != _caller || vehicle _target != _target) exitwith {};
|
||||||
@ -38,25 +38,24 @@ if !(isArray (_config >> "litter")) exitwith {};
|
|||||||
_litter = getArray (_config >> "litter");
|
_litter = getArray (_config >> "litter");
|
||||||
|
|
||||||
_createLitter = {
|
_createLitter = {
|
||||||
private["_position", "_litterClass", "_direction"];
|
private["_position", "_direction"];
|
||||||
|
params ["_unit", "_litterClass"];
|
||||||
// @TODO: handle carriers over water
|
// @TODO: handle carriers over water
|
||||||
// For now, don't spawn litter if we are over water to avoid floating litter
|
// For now, don't spawn litter if we are over water to avoid floating litter
|
||||||
if(surfaceIsWater (getPos (_this select 0))) exitWith { false };
|
if(surfaceIsWater (getPos _unit)) exitWith { false };
|
||||||
|
|
||||||
_position = getPosATL (_this select 0);
|
_position = getPosATL _unit;
|
||||||
_position = [_position select 0, _position select 1, 0];
|
_position params ["_posX", "_posY"];
|
||||||
_litterClass = _this select 1;
|
_position = if (random(1) >= 0.5) then {
|
||||||
if (random(1) >= 0.5) then {
|
[_posX + random 1, _posY + random 1, 0]
|
||||||
_position = [(_position select 0) + random 1, (_position select 1) + random 1, _position select 2];
|
|
||||||
} else {
|
} else {
|
||||||
_position = [(_position select 0) - random 1, (_position select 1) - random 1, _position select 2];
|
[_posX - random 1, _posY - random 1, 0];
|
||||||
};
|
};
|
||||||
_direction = (random 360);
|
_direction = (random 360);
|
||||||
|
|
||||||
// Create the litter, and timeout the event based on the cleanup delay
|
// Create the litter, and timeout the event based on the cleanup delay
|
||||||
// The cleanup delay for events in MP is handled by the server side
|
// The cleanup delay for events in MP is handled by the server side
|
||||||
[QGVAR(createLitter), [_litterClass,_position,_direction], 0] call EFUNC(common,syncedEvent);
|
[QGVAR(createLitter), [_litterClass, _position, _direction], 0] call EFUNC(common,syncedEvent);
|
||||||
|
|
||||||
true
|
true
|
||||||
};
|
};
|
||||||
@ -65,11 +64,10 @@ _createdLitter = [];
|
|||||||
{
|
{
|
||||||
if (typeName _x == "ARRAY") then {
|
if (typeName _x == "ARRAY") then {
|
||||||
if (count _x < MIN_ENTRIES_LITTER_CONFIG) exitwith {};
|
if (count _x < MIN_ENTRIES_LITTER_CONFIG) exitwith {};
|
||||||
private ["_selection", "_litterCondition", "_litterOptions"];
|
|
||||||
_selection = _x select 0;
|
_x params ["_selection", "_litterCondition", "_litterOptions"];
|
||||||
|
|
||||||
if (toLower _selection in [toLower _selectionName, "all"]) then { // in is case sensitve. We can be forgiving here, so lets use toLower.
|
if (toLower _selection in [toLower _selectionName, "all"]) then { // in is case sensitve. We can be forgiving here, so lets use toLower.
|
||||||
_litterCondition = _x select 1;
|
|
||||||
_litterOptions = _x select 2;
|
|
||||||
|
|
||||||
if (isnil _litterCondition) then {
|
if (isnil _litterCondition) then {
|
||||||
_litterCondition = if (_litterCondition != "") then {compile _litterCondition} else {{true}};
|
_litterCondition = if (_litterCondition != "") then {compile _litterCondition} else {{true}};
|
||||||
@ -88,8 +86,8 @@ _createdLitter = [];
|
|||||||
if (typeName _x == "STRING") then {
|
if (typeName _x == "STRING") then {
|
||||||
[_target, _x] call _createLitter;
|
[_target, _x] call _createLitter;
|
||||||
};
|
};
|
||||||
}foreach _litterOptions;
|
} foreach _litterOptions;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}foreach _litter;
|
} foreach _litter;
|
||||||
|
@ -1,19 +1,21 @@
|
|||||||
/**
|
/*
|
||||||
* fn_determineIfFatal.sqf
|
* Author: Glowbal
|
||||||
* @Descr: N/A
|
* Determine If Fatal
|
||||||
* @Author: Glowbal
|
|
||||||
*
|
*
|
||||||
* @Arguments: []
|
* Arguments:
|
||||||
* @Return:
|
* 0: Unit <OBJECT>
|
||||||
* @PublicAPI: false
|
* 1: Part <NUMBER>
|
||||||
|
* 2: with Damage <NUMBER> (default: 0)
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* None
|
||||||
|
*
|
||||||
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_unit","_part","_damageThreshold", "_withDamage", "_damageBodyPart"];
|
private ["_damageThreshold", "_damageBodyPart"];
|
||||||
_unit = _this select 0;
|
params ["_unit", "_part", ["_withDamage", 0]];
|
||||||
_part = _this select 1;
|
|
||||||
_withDamage = if (count _this > 2) then { _this select 2} else {0};
|
|
||||||
|
|
||||||
if (!alive _unit) exitwith {true};
|
if (!alive _unit) exitwith {true};
|
||||||
if (_part < 0 || _part > 5) exitwith {false};
|
if (_part < 0 || _part > 5) exitwith {false};
|
||||||
@ -36,7 +38,7 @@ if (_part == 0) exitwith {
|
|||||||
|
|
||||||
// Check if damage to body part is higher as damage torso
|
// Check if damage to body part is higher as damage torso
|
||||||
if (_part == 1) exitwith {
|
if (_part == 1) exitwith {
|
||||||
(_damageBodyPart >= (_damageThreshold select 1) && {(random(1) > 0.2)});
|
(_damageBodyPart >= (_damageThreshold select 1) && {(random(1) > 0.35)});
|
||||||
};
|
};
|
||||||
// Check if damage to body part is higher as damage limbs
|
// Check if damage to body part is higher as damage limbs
|
||||||
(_damageBodyPart >= (_damageThreshold select 2) && {(random(1) > 0.95)});
|
(_damageBodyPart >= (_damageThreshold select 2) && {(random(1) > 0.95)});
|
||||||
|
@ -4,10 +4,11 @@
|
|||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: The Unit <OBJECT>
|
* 0: The Unit <OBJECT>
|
||||||
* 1: Show <BOOL> <OPTIONAL>
|
* 1: Show <BOOL> (default: true)
|
||||||
|
* 2: Selection <NUMBER> (default: 0)
|
||||||
*
|
*
|
||||||
* ReturnValue:
|
* ReturnValue:
|
||||||
* nil
|
* None
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
@ -17,13 +18,11 @@
|
|||||||
|
|
||||||
// Exit for basic medical
|
// Exit for basic medical
|
||||||
if (GVAR(level) < 2) exitWith {};
|
if (GVAR(level) < 2) exitWith {};
|
||||||
private ["_target", "_show", "_selectionN", "_amountOfGeneric", "_bandagedwounds", "_logCtrl", "_part", "_partText", "_pointDamage", "_severity", "_total", "_totalIvVolume", "_triageStatus", "_type"];
|
private ["_amountOfGeneric", "_bandagedwounds", "_logCtrl", "_part", "_partText", "_pointDamage", "_severity", "_total", "_totalIvVolume", "_triageStatus", "_type"];
|
||||||
_target = _this select 0;
|
params ["_target", ["_show", true], ["_selectionN", 0]];
|
||||||
_show = if (count _this > 1) then {_this select 1} else {true};
|
|
||||||
_selectionN = if (count _this > 2) then {_this select 2} else {0};
|
|
||||||
|
|
||||||
GVAR(currentSelectedSelectionN) = if (typeName _selectionN == "SCALAR") then {_selectionN} else {0};
|
GVAR(currentSelectedSelectionN) = [0, _selectionN] select (IS_SCALAR(_selectionN));
|
||||||
GVAR(displayPatientInformationTarget) = if (_show) then {_target} else {ObjNull};
|
GVAR(displayPatientInformationTarget) = [ObjNull, _target] select _show;
|
||||||
|
|
||||||
if (USE_WOUND_EVENT_SYNC) then {
|
if (USE_WOUND_EVENT_SYNC) then {
|
||||||
[_target, ACE_player] call FUNC(requestWoundSync);
|
[_target, ACE_player] call FUNC(requestWoundSync);
|
||||||
@ -34,22 +33,22 @@ if (_show) then {
|
|||||||
|
|
||||||
[{
|
[{
|
||||||
private ["_target", "_display", "_alphaLevel", "_damaged", "_availableSelections", "_openWounds", "_selectionBloodLoss", "_red", "_green", "_blue", "_alphaLevel", "_allInjuryTexts", "_lbCtrl", "_genericMessages"];
|
private ["_target", "_display", "_alphaLevel", "_damaged", "_availableSelections", "_openWounds", "_selectionBloodLoss", "_red", "_green", "_blue", "_alphaLevel", "_allInjuryTexts", "_lbCtrl", "_genericMessages"];
|
||||||
_target = (_this select 0) select 0;
|
params ["_args", "_idPFH"];
|
||||||
_selectionN = (_this select 0) select 1;
|
_args params ["_target", "_selectionN"];
|
||||||
|
|
||||||
if (GVAR(displayPatientInformationTarget) != _target || GVAR(currentSelectedSelectionN) != _selectionN) exitwith {
|
if (GVAR(displayPatientInformationTarget) != _target || GVAR(currentSelectedSelectionN) != _selectionN) exitwith {
|
||||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||||
};
|
};
|
||||||
if (ACE_player distance _target > MAX_DISTANCE) exitwith {
|
if (ACE_player distance _target > MAX_DISTANCE) exitwith {
|
||||||
("ACE_MedicalRscDisplayInformation" call BIS_fnc_rscLayer) cutText ["","PLAIN"];
|
("ACE_MedicalRscDisplayInformation" call BIS_fnc_rscLayer) cutText ["","PLAIN"];
|
||||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||||
["displayTextStructured", [ACE_player], [[LSTRING(DistanceToFar), [_target] call EFUNC(common,getName)], 1.75, ACE_player]] call EFUNC(common,targetEvent);
|
["displayTextStructured", [ACE_player], [[LSTRING(DistanceToFar), [_target] call EFUNC(common,getName)], 1.75, ACE_player]] call EFUNC(common,targetEvent);
|
||||||
};
|
};
|
||||||
|
|
||||||
disableSerialization;
|
disableSerialization;
|
||||||
_display = uiNamespace getvariable QGVAR(DisplayInformation);
|
_display = uiNamespace getvariable QGVAR(DisplayInformation);
|
||||||
if (isnil "_display") exitwith {
|
if (isnil "_display") exitwith {
|
||||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
_allInjuryTexts = [];
|
_allInjuryTexts = [];
|
||||||
@ -81,7 +80,7 @@ if (_show) then {
|
|||||||
if !(isnil "_value") then {
|
if !(isnil "_value") then {
|
||||||
_totalIvVolume = _totalIvVolume + (_target getvariable [_x, 0]);
|
_totalIvVolume = _totalIvVolume + (_target getvariable [_x, 0]);
|
||||||
};
|
};
|
||||||
}foreach GVAR(IVBags);
|
} foreach GVAR(IVBags);
|
||||||
if (_totalIvVolume >= 1) then {
|
if (_totalIvVolume >= 1) then {
|
||||||
_genericMessages pushback [format[localize LSTRING(receivingIvVolume), floor _totalIvVolume], [1, 1, 1, 1]];
|
_genericMessages pushback [format[localize LSTRING(receivingIvVolume), floor _totalIvVolume], [1, 1, 1, 1]];
|
||||||
};
|
};
|
||||||
@ -92,33 +91,33 @@ if (_show) then {
|
|||||||
_openWounds = _target getvariable [QGVAR(openWounds), []];
|
_openWounds = _target getvariable [QGVAR(openWounds), []];
|
||||||
private "_amountOf";
|
private "_amountOf";
|
||||||
{
|
{
|
||||||
_amountOf = _x select 3;
|
_x params ["", "_x1", "_selectionX", "_amountOf", "_x4"];
|
||||||
// Find how much this bodypart is bleeding
|
// Find how much this bodypart is bleeding
|
||||||
if (_amountOf > 0) then {
|
if (_amountOf > 0) then {
|
||||||
_damaged set[_x select 2, true];
|
_damaged set[_selectionX, true];
|
||||||
_selectionBloodLoss set [(_x select 2), (_selectionBloodLoss select (_x select 2)) + (20 * ((_x select 4) * _amountOf))];
|
_selectionBloodLoss set [_selectionX, (_selectionBloodLoss select _selectionX) + (20 * (_x4 * _amountOf))];
|
||||||
|
|
||||||
if (_selectionN == (_x select 2)) then {
|
if (_selectionN == _selectionX) then {
|
||||||
// Collect the text to be displayed for this injury [ Select injury class type definition - select the classname DisplayName (6th), amount of injuries for this]
|
// Collect the text to be displayed for this injury [ Select injury class type definition - select the classname DisplayName (6th), amount of injuries for this]
|
||||||
if (_amountOf >= 1) then {
|
if (_amountOf >= 1) then {
|
||||||
// TODO localization
|
// TODO localization
|
||||||
_allInjuryTexts pushback [format["%2x %1", (GVAR(AllWoundInjuryTypes) select (_x select 1)) select 6, _amountOf], [1,1,1,1]];
|
_allInjuryTexts pushback [format["%2x %1", (GVAR(AllWoundInjuryTypes) select _x1) select 6, _amountOf], [1,1,1,1]];
|
||||||
} else {
|
} else {
|
||||||
// TODO localization
|
// TODO localization
|
||||||
_allInjuryTexts pushback [format["Partial %1", (GVAR(AllWoundInjuryTypes) select (_x select 1)) select 6], [1,1,1,1]];
|
_allInjuryTexts pushback [format["Partial %1", (GVAR(AllWoundInjuryTypes) select _x1) select 6], [1,1,1,1]];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}foreach _openWounds;
|
} foreach _openWounds;
|
||||||
|
|
||||||
_bandagedwounds = _target getvariable [QGVAR(bandagedWounds), []];
|
_bandagedwounds = _target getvariable [QGVAR(bandagedWounds), []];
|
||||||
{
|
{
|
||||||
_amountOf = _x select 3;
|
_x params ["", "", "_selectionX", "_amountOf", "_x4"];
|
||||||
// Find how much this bodypart is bleeding
|
// Find how much this bodypart is bleeding
|
||||||
if !(_damaged select (_x select 2)) then {
|
if !(_damaged select _selectionX) then {
|
||||||
_selectionBloodLoss set [(_x select 2), (_selectionBloodLoss select (_x select 2)) + (20 * ((_x select 4) * _amountOf))];
|
_selectionBloodLoss set [_selectionX, (_selectionBloodLoss select _selectionX) + (20 * (_x4 * _amountOf))];
|
||||||
};
|
};
|
||||||
if (_selectionN == (_x select 2)) then {
|
if (_selectionN == _selectionX) then {
|
||||||
// Collect the text to be displayed for this injury [ Select injury class type definition - select the classname DisplayName (6th), amount of injuries for this]
|
// Collect the text to be displayed for this injury [ Select injury class type definition - select the classname DisplayName (6th), amount of injuries for this]
|
||||||
if (_amountOf > 0) then {
|
if (_amountOf > 0) then {
|
||||||
if (_amountOf >= 1) then {
|
if (_amountOf >= 1) then {
|
||||||
@ -130,7 +129,7 @@ if (_show) then {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}foreach _bandagedwounds;
|
} foreach _bandagedwounds;
|
||||||
} else {
|
} else {
|
||||||
_damaged = [true, true, true, true, true, true];
|
_damaged = [true, true, true, true, true, true];
|
||||||
{
|
{
|
||||||
@ -160,7 +159,7 @@ if (_show) then {
|
|||||||
|
|
||||||
_availableSelections = [50,51,52,53,54,55];
|
_availableSelections = [50,51,52,53,54,55];
|
||||||
{
|
{
|
||||||
private ["_red", "_green", "_blue"];
|
private ["_red", "_green", "_blue", "_total"];
|
||||||
_total = _x;
|
_total = _x;
|
||||||
|
|
||||||
_red = 1;
|
_red = 1;
|
||||||
@ -177,20 +176,22 @@ if (_show) then {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
(_display displayCtrl (_availableSelections select _foreachIndex)) ctrlSetTextColor [_red, _green, _blue, 1.0];
|
(_display displayCtrl (_availableSelections select _foreachIndex)) ctrlSetTextColor [_red, _green, _blue, 1.0];
|
||||||
}foreach _selectionBloodLoss;
|
} foreach _selectionBloodLoss;
|
||||||
|
|
||||||
_lbCtrl = (_display displayCtrl 200);
|
_lbCtrl = (_display displayCtrl 200);
|
||||||
lbClear _lbCtrl;
|
lbClear _lbCtrl;
|
||||||
{
|
{
|
||||||
_lbCtrl lbAdd (_x select 0);
|
_x params ["_add", "_color"];
|
||||||
_lbCtrl lbSetColor [_foreachIndex, _x select 1];
|
_lbCtrl lbAdd _add;
|
||||||
}foreach _genericMessages;
|
_lbCtrl lbSetColor [_foreachIndex, _color];
|
||||||
|
} foreach _genericMessages;
|
||||||
|
|
||||||
_amountOfGeneric = count _genericMessages;
|
_amountOfGeneric = count _genericMessages;
|
||||||
{
|
{
|
||||||
_lbCtrl lbAdd (_x select 0);
|
_x params ["_add", "_color"];
|
||||||
_lbCtrl lbSetColor [_foreachIndex + _amountOfGeneric, _x select 1];
|
_lbCtrl lbAdd _add;
|
||||||
}foreach _allInjuryTexts;
|
_lbCtrl lbSetColor [_foreachIndex + _amountOfGeneric, _color];
|
||||||
|
} foreach _allInjuryTexts;
|
||||||
if (count _allInjuryTexts == 0) then {
|
if (count _allInjuryTexts == 0) then {
|
||||||
_lbCtrl lbAdd (localize LSTRING(NoInjuriesBodypart));
|
_lbCtrl lbAdd (localize LSTRING(NoInjuriesBodypart));
|
||||||
};
|
};
|
||||||
@ -202,9 +203,7 @@ if (_show) then {
|
|||||||
_logs = _target getvariable [QGVAR(logFile_Activity), []];
|
_logs = _target getvariable [QGVAR(logFile_Activity), []];
|
||||||
{
|
{
|
||||||
// [_message,_moment,_type, _arguments]
|
// [_message,_moment,_type, _arguments]
|
||||||
_message = _x select 0;
|
_x params ["_message", "_moment", "_type", "_arguments"];
|
||||||
_moment = _x select 1;
|
|
||||||
_arguments = _x select 3;
|
|
||||||
if (isLocalized _message) then {
|
if (isLocalized _message) then {
|
||||||
_message = localize _message;
|
_message = localize _message;
|
||||||
};
|
};
|
||||||
@ -213,10 +212,10 @@ if (_show) then {
|
|||||||
if (typeName _x == "STRING" && {isLocalized _x}) then {
|
if (typeName _x == "STRING" && {isLocalized _x}) then {
|
||||||
_arguments set [_foreachIndex, localize _x];
|
_arguments set [_foreachIndex, localize _x];
|
||||||
};
|
};
|
||||||
}foreach _arguments;
|
} foreach _arguments;
|
||||||
_message = format([_message] + _arguments);
|
_message = format([_message] + _arguments);
|
||||||
_logCtrl lbAdd format["%1 %2", _moment, _message];
|
_logCtrl lbAdd format["%1 %2", _moment, _message];
|
||||||
}foreach _logs;
|
} foreach _logs;
|
||||||
|
|
||||||
_triageStatus = [_target] call FUNC(getTriageStatus);
|
_triageStatus = [_target] call FUNC(getTriageStatus);
|
||||||
(_display displayCtrl 303) ctrlSetText (_triageStatus select 0);
|
(_display displayCtrl 303) ctrlSetText (_triageStatus select 0);
|
||||||
|
@ -4,18 +4,18 @@
|
|||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: The unit <OBJECT>
|
* 0: The unit <OBJECT>
|
||||||
|
* 1: Show <BOOL> (default: true)
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* nil
|
* None
|
||||||
*
|
*
|
||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_target", "_show", "_amount", "_item", "_log", "_message", "_triageCardTexts", "_triageStatus"];
|
private ["_amount", "_item", "_log", "_message", "_triageCardTexts", "_triageStatus"];
|
||||||
_target = _this select 0;
|
params ["_target", ["_show", true]];
|
||||||
_show = if (count _this > 1) then {_this select 1} else {true};
|
|
||||||
|
|
||||||
GVAR(TriageCardTarget) = if (_show) then {_target} else {ObjNull};
|
GVAR(TriageCardTarget) = if (_show) then {_target} else {ObjNull};
|
||||||
|
|
||||||
@ -25,15 +25,16 @@ if (_show) then {
|
|||||||
|
|
||||||
[{
|
[{
|
||||||
private ["_target", "_display", "_alphaLevel", "_alphaLevel", "_lbCtrl"];
|
private ["_target", "_display", "_alphaLevel", "_alphaLevel", "_lbCtrl"];
|
||||||
_target = (_this select 0) select 0;
|
params ["_args", "_idPFH"];
|
||||||
|
_args params ["_target"];
|
||||||
if (GVAR(TriageCardTarget) != _target) exitwith {
|
if (GVAR(TriageCardTarget) != _target) exitwith {
|
||||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
disableSerialization;
|
disableSerialization;
|
||||||
_display = uiNamespace getvariable QGVAR(triageCard);
|
_display = uiNamespace getvariable QGVAR(triageCard);
|
||||||
if (isnil "_display") exitwith {
|
if (isnil "_display") exitwith {
|
||||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
[_idPFH] call CBA_fnc_removePerFrameHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
_triageCardTexts = [];
|
_triageCardTexts = [];
|
||||||
@ -44,8 +45,7 @@ if (_show) then {
|
|||||||
|
|
||||||
_log = _target getvariable [QGVAR(triageCard), []];
|
_log = _target getvariable [QGVAR(triageCard), []];
|
||||||
{
|
{
|
||||||
_item = _x select 0;
|
_x params ["_item", "_amount"];
|
||||||
_amount = _x select 1;
|
|
||||||
_message = _item;
|
_message = _item;
|
||||||
if (isClass(configFile >> "CfgWeapons" >> _item)) then {
|
if (isClass(configFile >> "CfgWeapons" >> _item)) then {
|
||||||
_message = getText(configFile >> "CfgWeapons" >> _item >> "DisplayName");
|
_message = getText(configFile >> "CfgWeapons" >> _item >> "DisplayName");
|
||||||
@ -55,18 +55,21 @@ if (_show) then {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
_triageCardTexts pushback format["%1x - %2", _amount, _message];
|
_triageCardTexts pushback format["%1x - %2", _amount, _message];
|
||||||
}foreach _log;
|
} foreach _log;
|
||||||
|
|
||||||
if (count _triageCardTexts == 0) then {
|
if (count _triageCardTexts == 0) then {
|
||||||
_lbCtrl lbAdd (localize LSTRING(TriageCard_NoEntry));
|
_lbCtrl lbAdd (localize LSTRING(TriageCard_NoEntry));
|
||||||
};
|
};
|
||||||
{
|
{
|
||||||
_lbCtrl lbAdd _x;
|
_lbCtrl lbAdd _x;
|
||||||
}foreach _triageCardTexts;
|
} foreach _triageCardTexts;
|
||||||
|
|
||||||
_triageStatus = [_target] call FUNC(getTriageStatus);
|
_triageStatus = [_target] call FUNC(getTriageStatus);
|
||||||
(_display displayCtrl 2000) ctrlSetText (_triageStatus select 0);
|
|
||||||
(_display displayCtrl 2000) ctrlSetBackgroundColor (_triageStatus select 2);
|
_triageStatus params ["_text", "", "_color"];
|
||||||
|
|
||||||
|
(_display displayCtrl 2000) ctrlSetText _text;
|
||||||
|
(_display displayCtrl 2000) ctrlSetBackgroundColor _color;
|
||||||
|
|
||||||
}, 0, [_target]] call CBA_fnc_addPerFrameHandler;
|
}, 0, [_target]] call CBA_fnc_addPerFrameHandler;
|
||||||
|
|
||||||
|
@ -3,18 +3,18 @@
|
|||||||
* Display triage card for a unit
|
* Display triage card for a unit
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: The unit <OBJECT>
|
* 0: Show <BOOL>
|
||||||
*
|
*
|
||||||
* Return Value:
|
* Return Value:
|
||||||
* nil
|
* None
|
||||||
*
|
*
|
||||||
* Public: Yes
|
* Public: Yes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private ["_show", "_ctrl", "_display", "_idc", "_pos"];
|
private ["_ctrl", "_display", "_idc", "_pos"];
|
||||||
_show = _this select 0;
|
params ["_show"];
|
||||||
disableSerialization;
|
disableSerialization;
|
||||||
|
|
||||||
_display = uiNamespace getvariable QGVAR(triageCard);
|
_display = uiNamespace getvariable QGVAR(triageCard);
|
||||||
|
@ -15,10 +15,9 @@
|
|||||||
|
|
||||||
#define BLOODLOSSRATE_BASIC 0.2
|
#define BLOODLOSSRATE_BASIC 0.2
|
||||||
|
|
||||||
private ["_unit", "_totalBloodLoss","_tourniquets","_openWounds", "_cardiacOutput", "_internalWounds"];
|
private ["_totalBloodLoss","_tourniquets","_openWounds", "_cardiacOutput", "_internalWounds"];
|
||||||
// TODO Only use this calculation if medium or higher, otherwise use vanilla calculations (for basic medical).
|
// TODO Only use this calculation if medium or higher, otherwise use vanilla calculations (for basic medical).
|
||||||
|
params ["_unit"];
|
||||||
_unit = _this select 0;
|
|
||||||
_totalBloodLoss = 0;
|
_totalBloodLoss = 0;
|
||||||
|
|
||||||
// Advanced medical bloodloss handling
|
// Advanced medical bloodloss handling
|
||||||
@ -34,16 +33,17 @@ if (GVAR(level) >= 2) then {
|
|||||||
|
|
||||||
// (((BLOODLOSS_SMALL_WOUNDS * (_x select 0))) + ((BLOODLOSS_MEDIUM_WOUNDS * (_x select 1))) + ((BLOODLOSS_LARGE_WOUNDS * (_x select 2))) * (_cardiacOutput / DEFAULT_CARDIAC_OUTPUT));
|
// (((BLOODLOSS_SMALL_WOUNDS * (_x select 0))) + ((BLOODLOSS_MEDIUM_WOUNDS * (_x select 1))) + ((BLOODLOSS_LARGE_WOUNDS * (_x select 2))) * (_cardiacOutput / DEFAULT_CARDIAC_OUTPUT));
|
||||||
};
|
};
|
||||||
}foreach _openWounds;
|
} foreach _openWounds;
|
||||||
|
|
||||||
_internalWounds = _unit getvariable [QGVAR(internalWounds), []];
|
_internalWounds = _unit getvariable [QGVAR(internalWounds), []];
|
||||||
{
|
{
|
||||||
_totalBloodLoss = _totalBloodLoss + ((_x select 4) * (_x select 3));
|
_totalBloodLoss = _totalBloodLoss + ((_x select 4) * (_x select 3));
|
||||||
}foreach _internalWounds;
|
} foreach _internalWounds;
|
||||||
|
|
||||||
// cap the blood loss to be no greater as the current cardiac output
|
// cap the blood loss to be no greater as the current cardiac output
|
||||||
//(_totalBloodLoss min _cardiacOutput);
|
//(_totalBloodLoss min _cardiacOutput);
|
||||||
} else {
|
} else {
|
||||||
_totalBloodLoss = BLOODLOSSRATE_BASIC * (damage _unit);
|
{ _totalBloodLoss = _totalBloodLoss + _x } forEach (_unit getvariable [QGVAR(bodyPartStatus), []]);
|
||||||
|
_totalBloodLoss = (_totalBloodLoss / 6) * BLOODLOSSRATE_BASIC;
|
||||||
};
|
};
|
||||||
_totalBloodLoss * ((_unit getVariable [QGVAR(bleedingCoefficient), GVAR(bleedingCoefficient)]) max 0);
|
_totalBloodLoss * ((_unit getVariable [QGVAR(bleedingCoefficient), GVAR(bleedingCoefficient)]) max 0);
|
||||||
|
@ -6,29 +6,28 @@
|
|||||||
* 0: The Unit <OBJECT>
|
* 0: The Unit <OBJECT>
|
||||||
*
|
*
|
||||||
* ReturnValue:
|
* ReturnValue:
|
||||||
* Blood Pressuret <ARRAY <NUMBER>,<NUMBER>>
|
* 0: BloodPressure Low <NUMBER>
|
||||||
|
* 1: BloodPressure High <NUMBER>
|
||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
/*
|
// Value is taken because with cardic output and resistance at default values, it will put blood pressure High at 120.
|
||||||
Value is taken because with cardic output and resistance at default values, it will put blood pressure High at 120.
|
|
||||||
*/
|
|
||||||
#define MODIFIER_BP_HIGH 0.229
|
#define MODIFIER_BP_HIGH 0.229
|
||||||
|
|
||||||
/*
|
// Value is taken because with cardic output and resistance at default values, it will put blood pressure Low at 80.
|
||||||
Value is taken because with cardic output and resistance at default values, it will put blood pressure Low at 80.
|
|
||||||
*/
|
|
||||||
#define MODIFIER_BP_LOW 0.1524
|
#define MODIFIER_BP_LOW 0.1524
|
||||||
|
|
||||||
private ["_unit", "_bloodPressureLow", "_bloodPressureHigh", "_cardiacOutput", "_resistance"];
|
private ["_bloodPressureLow", "_bloodPressureHigh", "_cardiacOutput", "_resistance"];
|
||||||
_unit = _this select 0;
|
|
||||||
|
params ["_unit"];
|
||||||
|
|
||||||
_cardiacOutput = [_unit] call FUNC(getCardiacOutput);
|
_cardiacOutput = [_unit] call FUNC(getCardiacOutput);
|
||||||
_resistance = _unit getvariable [QGVAR(peripheralResistance), 100];
|
_resistance = _unit getvariable [QGVAR(peripheralResistance), 100];
|
||||||
|
|
||||||
_bloodPressureHigh = (_cardiacOutput * MODIFIER_BP_HIGH) * _resistance;
|
_bloodPressureHigh = (_cardiacOutput * MODIFIER_BP_HIGH) * _resistance;
|
||||||
_bloodPressureLow = (_cardiacOutput * MODIFIER_BP_LOW) * _resistance;
|
_bloodPressureLow = (_cardiacOutput * MODIFIER_BP_LOW) * _resistance;
|
||||||
|
|
||||||
[_bloodPressureLow, _bloodPressureHigh];
|
[_bloodPressureLow max 0, _bloodPressureHigh max 0]
|
||||||
|
@ -28,10 +28,8 @@
|
|||||||
*/
|
*/
|
||||||
#define BLOOD_CHANGE_PER_SECOND 0.0595
|
#define BLOOD_CHANGE_PER_SECOND 0.0595
|
||||||
|
|
||||||
|
private ["_bloodVolume", "_bloodVolumeChange", "_ivVolume"];
|
||||||
|
params ["_unit"];
|
||||||
private ["_unit","_bloodVolume","_bloodVolumeChange", "_ivVolume"];
|
|
||||||
_unit = _this select 0;
|
|
||||||
|
|
||||||
_bloodVolume = _unit getvariable [QGVAR(bloodVolume), 100];
|
_bloodVolume = _unit getvariable [QGVAR(bloodVolume), 100];
|
||||||
_bloodVolumeChange = -([_unit] call FUNC(getBloodLoss));
|
_bloodVolumeChange = -([_unit] call FUNC(getBloodLoss));
|
||||||
@ -43,13 +41,13 @@ if (_bloodVolume < 100.0) then {
|
|||||||
_ivVolume = (_unit getvariable [_x, 0]) + IV_CHANGE_PER_SECOND;
|
_ivVolume = (_unit getvariable [_x, 0]) + IV_CHANGE_PER_SECOND;
|
||||||
_unit setvariable [_x,_ivVolume];
|
_unit setvariable [_x,_ivVolume];
|
||||||
};
|
};
|
||||||
}foreach GVAR(IVBags);
|
} foreach GVAR(IVBags);
|
||||||
} else {
|
} else {
|
||||||
{
|
{
|
||||||
if ((_unit getvariable [_x, 0]) > 0) then {
|
if ((_unit getvariable [_x, 0]) > 0) then {
|
||||||
_unit setvariable [_x, 0]; // lets get rid of exessive IV volume
|
_unit setvariable [_x, 0]; // lets get rid of exessive IV volume
|
||||||
};
|
};
|
||||||
}foreach GVAR(IVBags);
|
} foreach GVAR(IVBags);
|
||||||
};
|
};
|
||||||
|
|
||||||
_bloodVolumeChange;
|
_bloodVolumeChange;
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
// to limit the amount of complex calculations necessary, we take a set modifier to calculate Stroke Volume.
|
// to limit the amount of complex calculations necessary, we take a set modifier to calculate Stroke Volume.
|
||||||
#define MODIFIER_CARDIAC_OUTPUT 19.04761
|
#define MODIFIER_CARDIAC_OUTPUT 19.04761
|
||||||
|
|
||||||
private "_unit";
|
params ["_unit"];
|
||||||
_unit = _this select 0;
|
|
||||||
|
|
||||||
((_unit getvariable [QGVAR(bloodVolume), 100])/MODIFIER_CARDIAC_OUTPUT) + ((_unit getvariable [QGVAR(heartRate), 80])/80-1);
|
((_unit getvariable [QGVAR(bloodVolume), 100])/MODIFIER_CARDIAC_OUTPUT) + ((_unit getvariable [QGVAR(heartRate), 80])/80-1);
|
||||||
|
@ -15,8 +15,9 @@
|
|||||||
|
|
||||||
#define HEART_RATE_MODIFIER 0.02
|
#define HEART_RATE_MODIFIER 0.02
|
||||||
|
|
||||||
private ["_unit", "_heartRate", "_hrIncrease", "_bloodLoss", "_time", "_values", "_adjustment", "_change", "_callBack", "_bloodVolume"];
|
private ["_heartRate", "_hrIncrease", "_bloodLoss", "_time", "_values", "_adjustment", "_change", "_callBack", "_bloodVolume"];
|
||||||
_unit = _this select 0;
|
params ["_unit"];
|
||||||
|
|
||||||
_hrIncrease = 0;
|
_hrIncrease = 0;
|
||||||
if (!(_unit getvariable [QGVAR(inCardiacArrest),false])) then {
|
if (!(_unit getvariable [QGVAR(inCardiacArrest),false])) then {
|
||||||
_heartRate = _unit getvariable [QGVAR(heartRate), 80];
|
_heartRate = _unit getvariable [QGVAR(heartRate), 80];
|
||||||
@ -24,10 +25,8 @@ if (!(_unit getvariable [QGVAR(inCardiacArrest),false])) then {
|
|||||||
|
|
||||||
_adjustment = _unit getvariable [QGVAR(heartRateAdjustments), []];
|
_adjustment = _unit getvariable [QGVAR(heartRateAdjustments), []];
|
||||||
{
|
{
|
||||||
_values = (_x select 0);
|
_x params ["_values", "_time", "_callBack"];
|
||||||
if (abs _values > 0) then {
|
if (abs _values > 0) then {
|
||||||
_time = (_x select 1);
|
|
||||||
_callBack = _x select 2;
|
|
||||||
if (_time <= 0) then {
|
if (_time <= 0) then {
|
||||||
_time = 1;
|
_time = 1;
|
||||||
};
|
};
|
||||||
@ -47,7 +46,7 @@ if (!(_unit getvariable [QGVAR(inCardiacArrest),false])) then {
|
|||||||
[_unit] call _callBack;
|
[_unit] call _callBack;
|
||||||
};
|
};
|
||||||
|
|
||||||
}foreach _adjustment;
|
} foreach _adjustment;
|
||||||
_adjustment = _adjustment - [ObjNull];
|
_adjustment = _adjustment - [ObjNull];
|
||||||
_unit setvariable [QGVAR(heartRateAdjustments), _adjustment];
|
_unit setvariable [QGVAR(heartRateAdjustments), _adjustment];
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user