Merge remote-tracking branch 'origin/master' into cba-log-macros

This commit is contained in:
commy2 2016-10-02 12:11:52 +02:00
commit 9942518a53
10 changed files with 49 additions and 75 deletions

View File

@ -2,8 +2,6 @@
// weapon config changes, by commy2
/* documentation:
aiDispersionCoefX = 1.0 Dispersion multiplier for AI units (axis X - left to right).
aiDispersionCoefY = 1.0 Dispersion multiplier for AI units (axis Y - top-down).
aiRateOfFire = 5.0 Delay between shots at given aiRateOfFireDistance.
aiRateOfFireDistance = 500 At shorter distance delay (aiRateOfFire) goes linearly to zero.
*/
@ -15,20 +13,12 @@ class Mode_FullAuto;
class CfgWeapons {
// rifles
class RifleCore;
class Rifle: RifleCore {
aiDispersionCoefX = 6;
aiDispersionCoefY = 6;
};
class Rifle_Base_F: Rifle {};
class Rifle_Short_Base_F: Rifle_Base_F {};
class Rifle_Long_Base_F: Rifle_Base_F {};
class Rifle_Base_F;
class Rifle_Short_Base_F;
class Rifle_Long_Base_F;
// MX
class arifle_MX_Base_F: Rifle_Base_F {
aiDispersionCoefY = 18.0;
aiDispersionCoefX = 12.0;
modes[] += {"ACE_Burst_far"};
class Single: Mode_SemiAuto {
@ -71,8 +61,6 @@ class CfgWeapons {
// MX carbine
class arifle_MXC_F: arifle_MX_Base_F {
aiDispersionCoefY = 18.0;
aiDispersionCoefX = 12.0;
class Single: Single {
minRange = 120; // 2;
@ -144,8 +132,6 @@ class CfgWeapons {
// MX machine gun
class arifle_MX_SW_F: arifle_MX_Base_F {
aiDispersionCoefY = 24.0;
aiDispersionCoefX = 21.0;
// Shit is still broken
//modes[] += {"ACE_Burst_far"};
modes[] = {"Single","manual","close","short","medium","far_optic1","far_optic2","ACE_Burst_far"};
@ -181,8 +167,6 @@ class CfgWeapons {
// Katiba
class arifle_Katiba_Base_F: Rifle_Base_F {
aiDispersionCoefY = 18.0;
aiDispersionCoefX = 12.0;
modes[] += {"ACE_Burst_far"};
class Single: Mode_SemiAuto {
@ -225,8 +209,6 @@ class CfgWeapons {
// Katiba carbine
class arifle_Katiba_C_F: arifle_Katiba_Base_F {
aiDispersionCoefY = 18.0;
aiDispersionCoefX = 12.0;
class Single: Single {
minRange = 120; // 2;
@ -269,8 +251,6 @@ class CfgWeapons {
// F2002
class mk20_base_F: Rifle_Base_F {
aiDispersionCoefY = 18.0;
aiDispersionCoefX = 12.0;
modes[] += {"ACE_Burst_far"};
class Single: Mode_SemiAuto {
@ -317,8 +297,6 @@ class CfgWeapons {
// F2002 carbine
class arifle_Mk20C_F: mk20_base_F {
aiDispersionCoefY = 18.0;
aiDispersionCoefX = 12.0;
class Single: Single {
minRange = 120; // 2;
@ -359,8 +337,6 @@ class CfgWeapons {
// TAR-20
class Tavor_base_F: Rifle_Base_F {
aiDispersionCoefY = 18.0;
aiDispersionCoefX = 12.0;
modes[] += {"ACE_Burst_far"};
class Single: Mode_SemiAuto {
@ -408,8 +384,6 @@ class CfgWeapons {
// TAR-21
class arifle_TRG21_F: Tavor_base_F {
aiDispersionCoefY = 18.0;
aiDispersionCoefX = 12.0;
class Single: Single {
minRange = 120; // 2;
@ -458,8 +432,6 @@ class CfgWeapons {
// SDAR
class SDAR_base_F: Rifle_Base_F {
aiDispersionCoefY = 28.0;
aiDispersionCoefX = 20.0;
class Single: Mode_SemiAuto {
minRange = 10; //2;
@ -472,8 +444,6 @@ class CfgWeapons {
// PD2000
class pdw2000_base_F: Rifle_Short_Base_F {
aiDispersionCoefY = 18.0;
aiDispersionCoefX = 12.0;
class Single: Mode_SemiAuto {
minRange = 100; //2;
@ -486,8 +456,6 @@ class CfgWeapons {
// Vector
class SMG_01_Base: Rifle_Short_Base_F {
aiDispersionCoefY = 18.0;
aiDispersionCoefX = 12.0;
class Single: Mode_SemiAuto {
minRange = 50; //2;
@ -500,8 +468,6 @@ class CfgWeapons {
// Scorpion EVO
class SMG_02_base_F: Rifle_Base_F {
aiDispersionCoefY = 18.0;
aiDispersionCoefX = 12.0;
class Single: Mode_SemiAuto {
minRange = 50; //2;
@ -516,8 +482,6 @@ class CfgWeapons {
// Stoner
class LMG_Mk200_F: Rifle_Long_Base_F {
aiDispersionCoefY = 24.0;
aiDispersionCoefX = 21.0;
modes[] += {"ACE_Burst_far"};
class medium;
@ -545,8 +509,6 @@ class CfgWeapons {
// Negev
class LMG_Zafir_F: Rifle_Long_Base_F {
aiDispersionCoefY = 23.0;
aiDispersionCoefX = 19.0;
modes[] += {"ACE_Burst_far"};
class Single: Mode_SemiAuto {
@ -720,8 +682,6 @@ class CfgWeapons {
// marksmen medium mg
class MMG_01_base_F: Rifle_Long_Base_F {
aiDispersionCoefY = 25.0;
aiDispersionCoefX = 20.0;
modes[] += {"ACE_Burst_far"};
class manual;
@ -746,8 +706,6 @@ class CfgWeapons {
};
class MMG_02_base_F: Rifle_Long_Base_F {
aiDispersionCoefY = 20.0;
aiDispersionCoefX = 15.0;
modes[] += {"ACE_Burst_far"};
class manual;

View File

@ -74,6 +74,8 @@ if (isNil "_loudness") then {
private _initSpeed = getNumber(configFile >> "CfgMagazines" >> _magazine >> "initSpeed");
private _caliber = getNumber (configFile >> "CfgAmmo" >> _ammo >> "ACE_caliber");
_caliber = call {
// If explicilty defined, use ACE_caliber
if ((count configProperties [(configFile >> "CfgAmmo" >> _ammo), "configName _x == 'ACE_caliber'", false]) == 1) exitWith {_caliber};
if (_ammo isKindOf ["ShellBase", (configFile >> "CfgAmmo")]) exitWith { 80 };
if (_ammo isKindOf ["RocketBase", (configFile >> "CfgAmmo")]) exitWith { 200 };
if (_ammo isKindOf ["MissileBase", (configFile >> "CfgAmmo")]) exitWith { 600 };

View File

@ -18,10 +18,10 @@ GVAR(models) = [] call CBA_fnc_createNamespace;
GVAR(models) setVariable [_name, _model];
} forEach [
// higher number means bigger model
["blooddrop_1", QPATHTOF(data\drop_1.p3d)],
["blooddrop_2", QPATHTOF(data\drop_2.p3d)],
["blooddrop_3", QPATHTOF(data\drop_3.p3d)],
["blooddrop_4", QPATHTOF(data\drop_4.p3d)]
["blooddrop_1", QPATHTOF(data\ace_drop_1.p3d)],
["blooddrop_2", QPATHTOF(data\ace_drop_2.p3d)],
["blooddrop_3", QPATHTOF(data\ace_drop_3.p3d)],
["blooddrop_4", QPATHTOF(data\ace_drop_4.p3d)]
];
ADDON = true;

View File

@ -0,0 +1,19 @@
class CfgSkeletons {
class Default {
isDiscrete = 1;
skeletonInherit = "";
skeletonBones[] = {};
};
};
class CfgModels {
class Default {
sectionsInherit = "";
sections[] = {""};
skeletonName = "Default";
};
class ace_drop_1: Default {};
class ace_drop_2: Default {};
class ace_drop_3: Default {};
class ace_drop_4: Default {};
};

View File

@ -49,7 +49,9 @@ if (_activated && local _logic) then {
};
} else {
if (isClass (configFile >> "CfgSounds" >> _x)) then {
_ambianceSounds pushBack ((getArray(configFile >> "CfgSounds" >> _x >> "sound") select 0));
_soundPath = (getArray(configFile >> "CfgSounds" >> _x >> "sound")) param [0, ""];
if ((_soundPath select [0, 1]) == "\") then {_soundPath = _soundPath select [1];};
_ambianceSounds pushBack _soundPath;
} else {
ERROR_1("Ambient Sounds: Sound ""%1"" not found.",_x);
};
@ -65,8 +67,9 @@ if (_activated && local _logic) then {
};
} forEach _ambianceSounds;
TRACE_1("",_ambianceSounds);
[{
private ["_newPos", "_allUnits", "_targetUnit"];
params ["_args", "_pfhHandle"];
_args params ["_logic", "_ambianceSounds", "_minimalDistance", "_maximalDistance", "_minDelayBetweensounds", "_maxDelayBetweenSounds", "_volume", "_followPlayers", "_lastTimePlayed"];
@ -77,39 +80,28 @@ if (_activated && local _logic) then {
if (CBA_missionTime - _lastTimePlayed >= ((_minDelayBetweensounds + random(_maxDelayBetweenSounds)) min _maxDelayBetweenSounds)) then {
// Find all players in session.
_allUnits = if (isMultiplayer) then {playableUnits} else {[ACE_player]};
private _allUnits = if (isMultiplayer) then {playableUnits} else {[ACE_player]};
// Check if there are enough players to even start playing this sound.
if (count _allUnits > 0) then {
// Select a target unit at random.
_targetUnit = _allUnits call BIS_fnc_selectRandom;
// find the position from which we are going to play this sound from.
_newPos = (getPos _targetUnit);
if (!_followPlayers) then {
_newPos = getPos _logic;
};
// Randomize this position.
if (random(1) >= 0.5) then {
if (random(1) >= 0.5) then {
_newPos set [0, (_newPos select 0) + (_minimalDistance + random(_maximalDistance))];
} else {
_newPos set [0, (_newPos select 0) - (_minimalDistance + random(_maximalDistance))];
};
private _newPosASL = if (_followPlayers) then {
// Select a target unit at random.
private _targetUnit = selectRandom _allUnits;
AGLtoASL (_targetUnit getPos [random 360, _minimalDistance + random (_maximalDistance - _minimalDistance)]);
} else {
if (random(1) >= 0.5) then {
_newPos set [1, (_newPos select 1) + (_minimalDistance + random(_maximalDistance))];
} else {
_newPos set [1, (_newPos select 1) - (_minimalDistance + random(_maximalDistance))];
};
AGLtoASL (_logic getPos [random 360, _minimalDistance + random (_maximalDistance - _minimalDistance)]);
};
TRACE_1("",_newPosASL);
// If no unit is to close to this position, we will play the sound.
if ({(_newPos distance _x < (_minimalDistance / 2))}count _allUnits == 0) then {
playSound3D [selectRandom _ambianceSounds, objNull, false, _newPos, _volume, 1, 1000];
if ({(_newPosASL distance _x < (_minimalDistance / 2))}count _allUnits == 0) then {
private _soundFile = selectRandom _ambianceSounds;
TRACE_2("playing file",_soundFile,_newPosASL);
playSound3D [_soundFile, objNull, false, _newPosASL, _volume, 1, 1000];
_args set [8, CBA_missionTime];
} else {
TRACE_1("pos is too close to a player",_newPosASL);
};
};
};

View File

@ -271,4 +271,7 @@ class CfgAmmo {
ace_frag_skip = 0;
ace_frag_force = 1;
};
class rhs_ammo_smaw_SR: RocketBase {
ACE_caliber = 9;
};
};