This commit is the equivalent of a atomic bomb

This commit is contained in:
2026-02-15 08:08:56 -03:00
commit e4ac56b038
6934 changed files with 916278 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
class CfgMagazines
{
class Default;
class CA_Magazine;
class 7Rnd_Perseis_II_mag: CA_Magazine
{
scope = 2;
displayName = "7 Rounds PGM Hecate II";
picture = "\braf\braf_weapons_sniper_rifles\50cal_MSR_HecateII\Data\UI\AMF_PERSEIS_II_MAG_ICO_CA.paa"; /// just some icon
ammo = "B_127x99_Ball";
count = 7; /// 30 rounds is enough
initSpeed = 780; /// standard muzzle speed
tracersEvery = 0; /// disable tracers by default
lastRoundsTracer = 4; /// tracers to track low ammo
descriptionShort = "Used to shoot PGM Hecate II bullets"; /// on mouse-over in Inventory
magazineGroup[] = {"Perseis_II_mag_group"}; /// all magazines in the same group may be used in weapon that has the group defined as compatible
};
class 7Rnd_Perseis_II_mag_Tracer_yellow: 7Rnd_Perseis_II_mag /// a magazine full of tracer rounds
{
picture = "\braf\braf_weapons_sniper_rifles\50cal_MSR_HecateII\Data\UI\AMF_PERSEIS_II_MAG_YELLOW_ICO_CA.paa"; /// just some icon
ammo = "B_127x99_Ball_Tracer_Yellow";
tracersEvery = 1; /// moar tracers
lastRoundsTracer = 7; /// tracers everywhere
displayName = "7 Rounds PGM Hecate II Yellow tracer";
descriptionShort = "Used to shoot PGM Hecate II tracer bullets";
displaynameshort = "Tracers";
magazineGroup[] = {"Perseis_II_mag_group"};
};
class 7Rnd_Perseis_II_mag_Tracer_green: 7Rnd_Perseis_II_mag /// a magazine full of tracer rounds
{
picture = "\braf\braf_weapons_sniper_rifles\50cal_MSR_HecateII\Data\UI\AMF_PERSEIS_II_MAG_GREEN_ICO_CA.paa"; /// just some icon
ammo = "B_127x99_Ball_Tracer_Green";
tracersEvery = 1; /// moar tracers
lastRoundsTracer = 7; /// tracers everywhere
displayName = "7 Rounds PGM Hecate II Green tracer";
descriptionShort = "Used to shoot PGM Hecate II tracer bullets";
displaynameshort = "Tracers";
magazineGroup[] = {"Perseis_II_mag_group"};
};
class 7Rnd_Perseis_II_mag_Tracer_red: 7Rnd_Perseis_II_mag /// a magazine full of tracer rounds
{
picture = "\braf\braf_weapons_sniper_rifles\50cal_MSR_HecateII\Data\UI\AMF_PERSEIS_II_MAG_RED_ICO_CA.paa"; /// just some icon
ammo = "B_127x99_Ball_Tracer_Red";
tracersEvery = 1; /// moar tracers
lastRoundsTracer = 7; /// tracers everywhere
displayName = "7 Rounds PGM Hecate II Red tracer";
descriptionShort = "Used to shoot PGM Hecate II tracer bullets";
displaynameshort = "Tracers";
magazineGroup[] = {"Perseis_II_mag_group"};
};
};

View File

@@ -0,0 +1,82 @@
class StageTI
{
texture = "#(argb,8,8,3)color(1,0,0,0,TI)";
};
ambient[]={1,1,1,1};
diffuse[]={1,1,1,1};
forcedDiffuse[]={0,0,0,0};
emmisive[]={0,0,0,1};
specular[]={0.029,0.029,0.029,1};
specularPower=80w;
PixelShaderID="Super";
VertexShaderID="Super";
class Stage1
{
texture="braf\braf_weapons_sniper_rifles\50cal_MSR_HecateII\Data\Textures\MAT1_nohq.paa";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
class Stage2
{
texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)";
uvSource="tex";
class uvTransform
{
aside[]={10,0,0};
up[]={0,10,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
class Stage3
{
texture="#(argb,8,8,3)color(0,0,0,0,MC)";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
class Stage4
{
texture="braf\braf_weapons_sniper_rifles\50cal_MSR_HecateII\Data\Textures\MAT1_as.paa";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,1};
pos[]={0,0,1};
};
};
class Stage5
{
texture="braf\braf_weapons_sniper_rifles\50cal_MSR_HecateII\Data\Textures\MAT1_smdi.paa";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,1};
pos[]={0,0,1};
};
};
class Stage6
{
texture="#(ai,64,64,1)fresnel(1.3,7)";
uvSource="none";
};
class Stage7
{
texture="a3\data_f\env_land_ca.paa";
uvSource="none";
};

View File

@@ -0,0 +1,82 @@
class StageTI
{
texture = "#(argb,8,8,3)color(1,0,0,0,TI)";
};
ambient[]={1,1,1,1};
diffuse[]={1,1,1,1};
forcedDiffuse[]={0,0,0,0};
emmisive[]={0,0,0,1};
specular[]={0.029,0.029,0.029,1};
specularPower=80w;
PixelShaderID="Super";
VertexShaderID="Super";
class Stage1
{
texture="braf\braf_weapons_sniper_rifles\50cal_MSR_HecateII\Data\Textures\MAT2_nohq.paa";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
class Stage2
{
texture="#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)";
uvSource="tex";
class uvTransform
{
aside[]={10,0,0};
up[]={0,10,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
class Stage3
{
texture="#(argb,8,8,3)color(0,0,0,0,MC)";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,0};
pos[]={0,0,0};
};
};
class Stage4
{
texture="braf\braf_weapons_sniper_rifles\50cal_MSR_HecateII\Data\Textures\MAT2_as.paa";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,1};
pos[]={0,0,1};
};
};
class Stage5
{
texture="braf\braf_weapons_sniper_rifles\50cal_MSR_HecateII\Data\Textures\MAT2_smdi.paa";
uvSource="tex";
class uvTransform
{
aside[]={1,0,0};
up[]={0,1,0};
dir[]={0,0,1};
pos[]={0,0,1};
};
};
class Stage6
{
texture="#(ai,64,64,1)fresnel(1.3,7)";
uvSource="none";
};
class Stage7
{
texture="a3\data_f\env_land_ca.paa";
uvSource="none";
};

View File

@@ -0,0 +1,8 @@
bg_fnc_playweaponsound = compile preprocessFileLineNumbers "\braf\braf_weapons_sniper_rifles\50cal_MSR_HecateII\fn_playweaponsound.sqf";
bg_fnc_onFiredAction = compile preprocessFileLineNumbers "\braf\braf_weapons_sniper_rifles\50cal_MSR_HecateII\fn_onFiredAction.sqf";
bg_wepframe_fired_eh = compile preprocessFileLineNumbers "\braf\braf_weapons_sniper_rifles\50cal_MSR_HecateII\fired.sqf";
bg_fnc_block_reloadaction = compile preprocessFileLineNumbers "\braf\braf_weapons_sniper_rifles\50cal_MSR_HecateII\fn_block_reloadaction.sqf";
[] spawn
{
"bg_wep_playsound" addPublicVariableEventHandler {_this spawn bg_fnc_playweaponsound};
};

View File

@@ -0,0 +1,103 @@
#define true 1
#define false 0
#define VSoft 0
#define VArmor 1
#define VAir 2
// type scope
#define private 0
#define protected 1
#define public 2
#define CanSeeRadar 1
#define CanSeeEye 2
#define CanSeeOptics 4
#define CanSeeEar 8
#define CanSeeCompass 16
#define CanSeeRadarC CanSeeRadar+CanSeeCompass
#define CanSeeAll 31
#define CanSeePeripheral 32
//lock acquiring
#define manualLA 0
#define automaticLA 1
//lockable target type
#define lockGroundTT 0
#define lockAirGroundTT 1
#define lockAirTT 2
#define lockGround 0
#define lockAirGround 1
#define lockAir 2
//missile lock type
#define fireAndForgetLT 0
#define keepLockedLT 1
#define manualLT 2
#define SPEED_STATIC 1e10
#define LockNo 0
#define LockCadet 1
#define LockYes 2
#define StabilizedInAxesNone 0
#define StabilizedInAxisX 1
#define StabilizedInAxisY 2
#define StabilizedInAxesBoth 3
#define StabilizedInAxesXYZ 4
#define CM_none 0
#define CM_Lock_Visual 1
#define CM_Lock_IR 2
#define CM_Lock_Laser 4
#define CM_Lock_Radar 8
#define CM_Missile 16
#define CMImmunity_GOOD 0.9
#define CMImmunity_MIDDLE 0.65
#define CMImmunity_BAD 0.5
#define mag_xx(a,b) class _xx_##a {magazine = a; count = b;}
#define weap_xx(a,b) class _xx_##a {weapon = a; count = b;}
#define item_xx(a,b) class _xx_##a {name = a; count = b;}
#define bag_xx(a,b) class _xx_##a {backpack = a; count = b;}
#define DEFAULT_SLOT 0
#define MUZZLE_SLOT 101
#define OPTICS_SLOT 201
#define FLASHLIGHT_SLOT 301
#define NVG_SLOT 602
#define GOGGLE_SLOT 603
#define HEADGEAR_SLOT 605
#define UNIFORM_SLOT 801
#define HMD_SLOT 616
#define BINOCULAR_SLOT 617
#define MEDIKIT_SLOT 619
#define RADIO_SLOT 611
#define VEST_SLOT 701
#define BACKPACK_SLOT 901
#define LOAD(weight,capacity) maximumLoad = ##capacity##; \
mass = ##weight##;
#define HeadArmourCoef 2.5
#define BodyArmourCoef 10
#define HandArmourCoef 5
#define LegArmourCoef 5
#define AIAmmoUsageNone 0
#define AIAmmoUsageLight 1
#define AIAmmoUsageMarking 2
#define AIAmmoUsageConcealment 4
#define AIAmmoUsageCountermeasures 8
#define AIAmmoUsageMine 16
#define AIAmmoUsageUnderwater 32
#define AIAmmoUsageOffensiveInf 64
#define AIAmmoUsageOffensiveVeh 128
#define AIAmmoUsageOffensiveAir 256
#define AIAmmoUsageOffensiveArmour 512

View File

@@ -0,0 +1,250 @@
#include "CfgMagazines.hpp"
#include "basicdefines_A3.hpp"
class CfgPatches
{
class AMF_PERSEIS_II_POLY
{
units[] = {};
weapons[] =
{
"AMF_Perseis_II_02_F"};
requiredVersion = 0.1;
requiredAddons[] =
{
"A3_Weapons_F",
"cba_main",
"A3_Anims_F"};
};
};
class Extended_PreInit_EventHandlers
{
bg_wepframework_init = "call ('\braf\braf_weapons_sniper_rifles\50cal_MSR_HecateII\XEH_INIT.sqf' call SLX_XEH_COMPILE)";
};
class Extended_FiredBIS_Eventhandlers
{
class CAManBase
{
bg_wepframe_fired = "_this call bg_wepframe_fired_eh";
};
};
class CfgSounds
{
class AMF_Perseis_II_BOLT_SOUND
{
name = "AMF_Perseis_II_BOLT_SOUND";
Sound[] = {"\braf\braf_weapons_sniper_rifles\50cal_MSR_HecateII\data\sounds\AMF_Perseis_II_Rechamber.wss", 1, 1, 15};
titles[] = {};
};
};
class Mode_SemiAuto;
class CowsSlot;
class CfgWeapons
{
class Rifle_Base_F;
class Rifle_Long_Base_F : Rifle_Base_F
{
class WeaponSlotsInfo;
};
class AMF_Perseis_II_02_F : Rifle_Long_Base_F
{
ACE_barrelTwist = 381;
ACE_barrelLength = 700;
author = "Armada, Krogar & AMF Team";
scope = 2;
_generalMacro = "AMF_Perseis_II_02_F";
model = "\braf\braf_weapons_sniper_rifles\50cal_MSR_HecateII\AMF_Perseis_II_02_F.p3d";
displayName = "PGM Hecate II (Polymere)";
picture = "\braf\braf_weapons_sniper_rifles\50cal_MSR_HecateII\Data\UI\AMF_PERSEIS_II_ICO.paa";
deployedPivot = "bipod"; /// what point should be used to be on surface while unfolded
hasBipod = true; /// bipod obviously has a bipod
//soundBipodDown[] = {"A3\Sounds_F_Mark\arsenal\sfx\bipods\Bipod_BLU_down", db - 3, 1, 20}; /// what sound should be played during unfolding
//soundBipodUp[] = {"A3\Sounds_F_Mark\arsenal\sfx\bipods\Bipod_BLU_up", db - 3, 1, 20}; /// what sound should be played during folding
magazines[] =
{
"7Rnd_Perseis_II_mag",
"7Rnd_Perseis_II_mag_Tracer_yellow",
"7Rnd_Perseis_II_mag_Tracer_green",
"7Rnd_Perseis_II_mag_Tracer_red"};
cursor = "srifle";
class Library
{
libTextDesc = "AMF PGM Hecate II Poly";
};
inertia = 1.2;
dexterity = 1.0;
reloadAction = "GestureReloadLRR";
recoil = "recoil_m320";
maxZeroing = 2400;
initSpeed = 780;
descriptionShort = "AMF PGM Hecate II Polymere";
class WeaponSlotsInfo : WeaponSlotsInfo
{
mass = 320;
class CowsSlot : CowsSlot
{
};
};
class ItemInfo
{
priority = 1;
};
class bg_weaponparameters
{
class onFired_Action
{
HandAction = "AMF_Perseis_II_Gesture_Rechamber";
Actiondelay = 0.02;
Sound = "AMF_Perseis_II_BOLT_SOUND";
Sound_Location = "RightHandMiddle1";
hasOptic = 0;
};
};
handAnim[] = {"OFP2_ManSkeleton", "\braf\braf_weapons_anim\animations\50cal_PGM_HecateII\Hecate_II_Anim_static.rtm"};
opticsPPEffects[] = {};
opticsFlare = 1;
opticsDisablePeripherialVision = 1;
class GunParticles
{
class FirstEffect
{
effectName = "SniperCloud";
positionName = "Usti hlavne";
directionName = "Konec hlavne";
};
};
distanceZoomMin = 500;
distanceZoomMax = 500;
bullet1[] = {"A3\sounds_f\weapons\shells\7_62\metal_762_01", 0.891251, 1, 25};
bullet2[] = {"A3\sounds_f\weapons\shells\7_62\metal_762_02", 0.891251, 1, 25};
bullet3[] = {"A3\sounds_f\weapons\shells\7_62\metal_762_03", 0.891251, 1, 25};
bullet4[] = {"A3\sounds_f\weapons\shells\7_62\metal_762_04", 0.891251, 1, 25};
bullet5[] = {"A3\sounds_f\weapons\shells\7_62\dirt_762_01", 0.794328, 1, 25};
bullet6[] = {"A3\sounds_f\weapons\shells\7_62\dirt_762_02", 0.794328, 1, 25};
bullet7[] = {"A3\sounds_f\weapons\shells\7_62\dirt_762_03", 0.794328, 1, 25};
bullet8[] = {"A3\sounds_f\weapons\shells\7_62\dirt_762_04", 0.794328, 1, 25};
bullet9[] = {"A3\sounds_f\weapons\shells\7_62\grass_762_01", 0.707946, 1, 25};
bullet10[] = {"A3\sounds_f\weapons\shells\7_62\grass_762_02", 0.707946, 1, 25};
bullet11[] = {"A3\sounds_f\weapons\shells\7_62\grass_762_03", 0.707946, 1, 25};
bullet12[] = {"A3\sounds_f\weapons\shells\7_62\grass_762_04", 0.707946, 1, 25};
soundBullet[] = {"bullet1", 0.083, "bullet2", 0.083, "bullet3", 0.083, "bullet4", 0.083, "bullet5", 0.083, "bullet6", 0.083, "bullet7", 0.083, "bullet8", 0.083, "bullet9", 0.083, "bullet10", 0.083, "bullet11", 0.083, "bullet12", 0.083};
modes[] = {"Single", "single_close_optics1", "single_medium_optics1", "single_far_optics1"};
drySound[] = {"A3\Sounds_F\arsenal\weapons\LongRangeRifles\M320\M320_dry", 0.501187, 1, 20};
reloadMagazineSound[] = {"A3\Sounds_F\arsenal\weapons\LongRangeRifles\M320\M320_reload", 1.0, 1, 10};
soundBipodDeploy[] = {"A3\Sounds_F_Mark\arsenal\sfx\bipods\Bipod_generic_deploy", 0.707946, 1, 20};
soundBipodFold[] = {"A3\Sounds_F_Mark\arsenal\sfx\bipods\Bipod_generic_fold", 0.707946, 1, 20};
class Single : Mode_SemiAuto
{
sounds[] = {"StandardSound"};
class BaseSoundModeType
{
closure1[] = {"\braf\braf_weapons_sniper_rifles\50cal_MSR_HecateII\Data\sounds\AMF_Perseis_II.wss", 1.0, 1, 30};
closure2[] = {"\braf\braf_weapons_sniper_rifles\50cal_MSR_HecateII\Data\sounds\AMF_Perseis_II.wss", 1.0, 1, 30};
soundClosure[] = {"closure1", 0.5, "closure2", 0.5};
};
class StandardSound : BaseSoundModeType
{
begin1[] = {"\braf\braf_weapons_sniper_rifles\50cal_MSR_HecateII\Data\sounds\AMF_Perseis_II.wss", 3.0118723, 1, 2200};
begin2[] = {"\braf\braf_weapons_sniper_rifles\50cal_MSR_HecateII\Data\sounds\AMF_Perseis_II.wss", 3.0118723, 1, 2200};
begin3[] = {"\braf\braf_weapons_sniper_rifles\50cal_MSR_HecateII\Data\sounds\AMF_Perseis_II.wss", 3.0118723, 1, 2200};
soundBegin[] = {"begin1", 0.33, "begin2", 0.33, "begin2", 0.34};
class SoundTails
{
class TailInterior
{
sound[] = {"A3\Sounds_F_Mark\arsenal\weapons\LongRangeRifles\DMR_02_MAR10\DMR_02_tail_interior", 2.2387211, 1, 2200};
frequency = 1;
volume = "interior";
};
class TailTrees
{
sound[] = {"A3\Sounds_F_Mark\arsenal\weapons\LongRangeRifles\DMR_02_MAR10\DMR_02_tail_trees", 2.2387211, 1, 2200};
frequency = 1;
volume = "(1-interior/1.4)*trees";
};
class TailForest
{
sound[] = {"A3\Sounds_F_Mark\arsenal\weapons\LongRangeRifles\DMR_02_MAR10\DMR_02_tail_forest", 2.2387211, 1, 2200};
frequency = 1;
volume = "(1-interior/1.4)*forest";
};
class TailMeadows
{
sound[] = {"A3\Sounds_F_Mark\arsenal\weapons\LongRangeRifles\DMR_02_MAR10\DMR_02_tail_meadows", 2.2387211, 1, 2200};
frequency = 1;
volume = "(1-interior/1.4)*(meadows/2 max sea/2)";
};
class TailHouses
{
sound[] = {"A3\Sounds_F_Mark\arsenal\weapons\LongRangeRifles\DMR_02_MAR10\DMR_02_tail_houses", 2.2387211, 1, 2200};
frequency = 1;
volume = "(1-interior/1.4)*houses";
};
};
};
reloadTime = 2;
dispersion = 0.00011;
recoil = "recoil_single_dmr";
recoilProne = "recoil_single_prone_dmr";
minRange = 2;
minRangeProbab = 0.3;
midRange = 350;
midRangeProbab = 0.7;
maxRange = 500;
maxRangeProbab = 0.05;
};
class single_close_optics1 : Single
{
requiredOpticType = 1;
showToPlayer = 0;
minRange = 2;
minRangeProbab = 0.05;
midRange = 300;
midRangeProbab = 0.8;
maxRange = 500;
maxRangeProbab = 0.01;
aiRateOfFire = 2;
aiRateOfFireDistance = 300;
};
class single_medium_optics1 : single_close_optics1
{
minRange = 300;
minRangeProbab = 0.05;
midRange = 500;
midRangeProbab = 0.7;
maxRange = 700;
maxRangeProbab = 0.05;
aiRateOfFire = 2;
aiRateOfFireDistance = 500;
};
class single_far_optics1 : single_medium_optics1
{
requiredOpticType = 2;
minRange = 300;
minRangeProbab = 0.05;
midRange = 700;
midRangeProbab = 0.5;
maxRange = 1000;
maxRangeProbab = 0.05;
aiRateOfFire = 4;
aiRateOfFireDistance = 600;
};
aiDispersionCoefY = 3;
aiDispersionCoefX = 2;
};
};

View File

@@ -0,0 +1,43 @@
private ["_unit","_weapon","_param","_mode"];
_unit = _this select 0;
_weapon = _this select 1;
_mode = _this select 3;
_param = (configFile >> "CfgWeapons" >> _weapon >> "bg_weaponparameters");
if (isClass _param) then
{
if (isClass (_param >> "onFired_Action")) then
{
private ["_HandAction","_Actiondelay","_Sound","_Sound_Location","_hasOptic","_reloadDelay","_weaponConfig","_speed"];
_HandAction = (_param >> "onFired_Action" >> "HandAction") call BIS_fnc_getCfgData;
_Actiondelay = (_param >> "onFired_Action" >> "Actiondelay") call BIS_fnc_getCfgData;
_Sound = (_param >> "onFired_Action" >> "Sound") call BIS_fnc_getCfgData;
_Sound_Location = (_param >> "onFired_Action" >> "Sound_Location") call BIS_fnc_getCfgData;
_hasOptic = (_param >> "onFired_Action" >> "hasOptic") call BIS_fnc_getCfgData;
if (_mode == _weapon) then
{
_weaponConfig = (configFile >> "CfgWeapons" >> _weapon);
_speed = getnumber (_weaponConfig >> "reloadTime");
_reloadDelay = _speed + 0.15;
}
else
{
_weaponConfig = (configFile >> "CfgWeapons" >> _weapon >> _mode);
_speed = getnumber (_weaponConfig >> "reloadTime");
_reloadDelay = _speed + 0.15;
};
[_unit,_weapon,_HandAction,_Actiondelay,_Sound,_Sound_Location,_hasOptic,_reloadDelay] spawn bg_fnc_onFiredAction;
};
if (isClass (_param >> "onEmpty")) then
{
if (_unit ammo _weapon == 0) then
{
_Sound = (_param >> "onEmpty" >> "Sound") call BIS_fnc_getCfgData;
_Sound_Location = (_param >> "onEmpty" >> "Sound_Location") call BIS_fnc_getCfgData;
[_unit,_Sound,_Sound_Location] spawn bg_fnc_playweaponsound;
};
};
};

View File

@@ -0,0 +1,28 @@
disableSerialization;
if (_this) then
{
if (isNil {uiNamespace getVariable "bg_reloadblock"}) then
{
_blockReload = ([] call BIS_fnc_displayMission) displayAddEventHandler
[
"KeyDown",
{
_reloadKeys = actionKeys "ReloadMagazine";
if ((_this select 1) in _reloadKeys) then {true};
}
];
uiNamespace setVariable ["bg_reloadblock", _blockReload];
};
}
else
{
if !(isNil {uiNamespace getVariable "bg_reloadblock"}) then
{
([] call BIS_fnc_displayMission) displayRemoveEventHandler ['KeyDown', (uiNamespace getVariable "bg_reloadblock")];
uiNamespace setVariable ["bg_reloadblock", nil];
bg_reloadblock = nil;
};
};

View File

@@ -0,0 +1,59 @@
private ["_unit","_weapon","_param","_HandAction","_Actiondelay","_Sound","_Sound_Location","_hasOptic","_acc","_reloadDelay"];
_unit = _this select 0;
_weapon = _this select 1;
_HandAction = _this select 2;
_Actiondelay = _this select 3;
_Sound = _this select 4;
_Sound_Location = _this select 5;
_hasOptic = (_this select 6 == 1);
_acc = _unit weaponAccessories _weapon;
_reloadDelay = _this select 7;
if (_acc select 2 != "") then
{
_hasOptic = true;
};
if (!local _unit && _hasOptic) exitwith {};
if (_unit ammo _weapon !=0) then
{
if (!isDedicated && _hasOptic && player == _unit) then
{
if (cameraview == "GUNNER") then
{
true call bg_fnc_block_reloadaction;
};
while {cameraview == "GUNNER"} do
{
_unit setWeaponReloadingTime [_unit,_weapon,1];
sleep 0.001;
};
sleep _Actiondelay;
[_unit,_Sound,_Sound_Location] spawn bg_fnc_playweaponsound;
bg_wep_playsound = [_unit,_Sound,_Sound_Location];
publicVariable "bg_wep_playsound";
_unit playAction _HandAction;
true call bg_fnc_block_reloadaction;
sleep _reloadDelay;
false call bg_fnc_block_reloadaction;
}
else
{
sleep _Actiondelay;
[_unit,_Sound,_Sound_Location] spawn bg_fnc_playweaponsound;
if (local _unit) then
{
_unit playAction _HandAction;
if (_unit == player) then
{
true call bg_fnc_block_reloadaction;
sleep _reloadDelay;
false call bg_fnc_block_reloadaction;
};
};
};
};

View File

@@ -0,0 +1,24 @@
private ["_unit","_arg","_sound","_Sound_Location"];
if (typename (_this select 1) == "array") then
{
_arg = _this select 1;
_unit = _arg select 0;
_sound = _arg select 1;
_Sound_Location = _arg select 2;
}
else
{
_unit = _this select 0;
_sound = _this select 1;
_Sound_Location = _this select 2;
};
if (isnil "_sound" || _sound == "") exitwith {}; // No sound set, don't play anything.
if (isNil "_unit") exitwith {false}; //Rarely happens that _unit stops existing
_rhand = _unit selectionPosition _Sound_Location;
_posStart = _unit modeltoworld _rhand;
_obj = "#particlesource" createVehicleLocal _posStart;
_obj attachto [_unit,_rhand];
_obj say3d _sound;
sleep 10;
deleteVehicle _obj;

View File

@@ -0,0 +1,291 @@
class CfgSkeletons
{
class Default
{
isDiscrete = 1;
skeletonInherit = "";
skeletonBones[] = {};
};
class AMF_Perseis_II_skeleton_poly : Default
{
isDiscrete=0;
skeletonInherit="";
skeletonBones[]=
{
"magazine", "",
"muzzleflash", "",
"bolt", "",
"ForeSight", "",
"BackSight", "",
"trigger", "",
"bipod_leg_L", "",
"bipod_leg_R", "",
"zasleh", ""
};
};
};
class CfgModels
{
class Default
{
sectionsInherit="";
sections[]={};
skeletonName="";
};
class AMF_Perseis_II_02_F: Default
{
sections[] = {"zasleh","Camo","bipod_leg_L","bipod_leg_R"};
skeletonName="AMF_Perseis_II_skeleton_poly";
class Animations
{
class trigger_rotation
{
type = "rotation";
source = "reload";
sourceAddress = "clamp";
selection = "trigger";
axis = "trigger_axis";
minValue = 0;
maxValue = 1;
angle0 = "0";
angle1 = "rad -15";
};
class bolt_fire_begin1
{
type= rotation;
source="reload";
sourceAddress= clamp;
selection="bolt";
axis="bolt_axis";
minValue = 0.55;
maxValue = 0.6;
angle0= (rad 0);
angle1= (rad -60);
animPeriod = 0.0;
initPhase = 3.0;
// memory = true;
};
class bolt_fire_begin2
{
type="translation";
source="reload";
selection="bolt";
axis="bolt_axis";//*probably*
// sourceAddress = clamp;// (default)
minValue = 0.65;//rad 0.0
maxValue = 0.75;//rad 17.188734
offset0 = 0.0;
offset1 = 1.2;
animPeriod = 0.0;
initPhase = 0.0;
// memory = true;//(default assumed)
};
class bolt_fire_end1
{
type="translation";
source="reload";
selection="bolt";
axis="bolt_axis";//*probably*
// sourceAddress = clamp;// (default)
minValue = 0.8;//rad 28.64789
maxValue = 0.9;//rad 57.29578
offset0 = 0.0;
offset1 = -1.2;
animPeriod = 1.0;
initPhase = 0.0;
// memory = true;//(default assumed)
};
class bolt_fire_end2
{
type= rotation;
source="reload";
sourceAddress= clamp;
selection="bolt";
axis="bolt_axis";
minValue = 0.95;
maxValue = 1.0;
angle0= (rad 0);
angle1= (rad 60);
animPeriod = 1.0;
initPhase = 0.0;
// memory = true;
};
class bolt_reload_begin1
{
type= rotation;
source="reloadMagazine";
sourceAddress= clamp;
selection="bolt";
axis="bolt_axis";
minValue = 0.04;
maxValue = 0.08;
angle0= (rad 0);
angle1= (rad -60);
animPeriod = 0.0;
initPhase = 0.0;
// memory = true;
};
class bolt_reload_begin2
{
selection = "bolt";
axis = "bolt_axis";
type="translation";
source="reloadMagazine";
// sourceAddress = clamp;// (default)
minValue = 0.1;//rad 0.0
maxValue = 0.14;//rad 17.188734
offset0 = 0.0;
offset1 = 1.2;
animPeriod = 0.0;
initPhase = 0.0;
// memory = true;//(default assumed)
};
class bolt_reload_end1
{
selection = "bolt";
axis = "bolt_axis";
type="translation";
source="reloadMagazine";
// sourceAddress = clamp;// (default)
minValue = 0.8;//rad 28.64789
maxValue = 0.84;//rad 57.29578
offset0 = 0.0;
offset1 = -1.2;
animPeriod = 0.0;
initPhase = 0.0;
// memory = true;//(default assumed)
};
class bolt_reload_end2
{
type= rotation;
source="reloadMagazine";
sourceAddress= clamp;
selection="bolt";
axis="bolt_axis";
minValue = 0.86;
maxValue = 0.9;
angle0= (rad 0);
angle1= (rad 60);
animPeriod = 0.0;
initPhase = 0.0;
// memory = true;
};
class magazine_hide
{
type="hide";
source="reloadMagazine";
selection="magazine";
minValue=0.000000;
maxValue=1.00000;
hideValue=0.31;
unhideValue = 0.550;
};
class no_magazine
{
type="hide";
source="hasMagazine";
selection="magazine";
minValue=0.000000;
maxValue=1.00000;
hideValue=0.5;
unhideValue = -1.0;
};
class magazine_reload_move_1
{
type = "translation";
source = "reloadMagazine";
selection = "magazine";
axis = "magazine_axis";
minValue = 0.27;
maxValue = 0.31;
offset0 = 0.0;
offset1 = 1.0;
};
class magazine_reload_move_2: magazine_reload_move_1
{
minValue = 0.52;
maxValue = 0.58;
offset0 = 0.0;
offset1 = -1.0;
};
class BackSight_optic
{
type="rotation";
source="hasOptics";
selection="BackSight";
axis="BackSight_axis";
memory=1;
minValue=0.0000000;
maxValue=1.0000000;
angle0=0.000000;
angle1=(rad 90);
};
class ForeSight_optic: BackSight_optic
{
selection="ForeSight";
axis="ForeSight_axis";
angle1=(rad 90);
};
class muzzleflash_hide
{
type="hide";
source="hasSuppressor";
selection="zasleh";
minValue = 0.0;
maxvalue = 0.25;
hideValue = 0.01;
};
class muzzleFlashROT
{
type="rotationX";
source="ammoRandom";
selection="zasleh";
axis="muzzleflash_axis";//*probably*
sourceAddress = loop;
minValue = 0.0;//rad 0.0
maxValue = 4.0;//rad 229.18312
angle0 = 0.0;//rad 0.0;
angle1 = 1.2443461;//rad 14.0;
memory = true;//(default assumed)
};
class MuzzleFlashROT1
{
type="rotation";
source="ammoRandom";
selection="zasleh";
axis="muzzleflash_axis";//*probably*
sourceAddress = loop;
minValue = 0.0;//rad 0.0
maxValue = 1.0;//rad 57.29578
angle0 = 0.0;//rad 0.0;
angle1 = 1.05235988;//rad 3.0;
memory = true;//(default assumed)
};
class leg_L_move
{
type = rotation;
source = bipod;
sourceAddress = clamp;
selection = "bipod_leg_L";
axis = "bipod_leg_L_axis";
minValue = 0;
maxValue = 1;
angle0 = (rad 0);
angle1 = (rad -90);
};
class leg_R_move
{
type = rotation;
source = bipod;
sourceAddress = clamp;
selection = "bipod_leg_R";
axis = "bipod_leg_R_axis";
minValue = 0;
maxValue = 1;
angle0 = (rad 0);
angle1 = (rad -90);
};
};
};
};