mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' of https://github.com/acemod/ACE3 into medical-adjustments
This commit is contained in:
commit
0436209dae
@ -28,66 +28,66 @@ class CfgAmmo {
|
||||
};
|
||||
|
||||
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 F_20mm_Red;
|
||||
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 F_20mm_Green;
|
||||
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 F_20mm_Yellow;
|
||||
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;
|
||||
};
|
||||
|
||||
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);
|
||||
dangerRadiusHit = -1;
|
||||
suppressionRadiusHit = 20;
|
||||
typicalSpeed = 22;
|
||||
cost = 40;
|
||||
deflecting = 15;
|
||||
explosionTime = 2.3;
|
||||
timeToLive = 6;
|
||||
fuseDistance = 2.3;
|
||||
grenadeFireSound[] = {};
|
||||
grenadeBurningSound[] = {};
|
||||
aiAmmoUsageFlags = "0";
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
class CfgMagazines {
|
||||
class HandGrenade;
|
||||
class ACE_HandFlare_Base: HandGrenade {
|
||||
@ -8,55 +9,60 @@ class CfgMagazines {
|
||||
mass = 4;
|
||||
initSpeed = 22;
|
||||
};
|
||||
|
||||
class ACE_HandFlare_White: ACE_HandFlare_Base {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
scope = 2;
|
||||
ammo = "ACE_F_Hand_White";
|
||||
displayname = CSTRING(M127A1_White_Name);
|
||||
descriptionshort = CSTRING(M127A1_White_Description);
|
||||
displayNameShort = CSTRING(M127A1_White_NameShort);
|
||||
model = "\A3\weapons_f\ammo\flare_white";
|
||||
picture = "\A3\Weapons_F\Data\UI\gear_flare_white_ca.paa";
|
||||
ammo = "ACE_G_Handflare_White";
|
||||
};
|
||||
|
||||
class ACE_HandFlare_Red: ACE_HandFlare_Base {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
scope = 2;
|
||||
ammo = "ACE_F_Hand_Red";
|
||||
displayname = CSTRING(M127A1_Red_Name);
|
||||
descriptionshort = CSTRING(M127A1_Red_Description);
|
||||
displayNameShort = CSTRING(M127A1_Red_NameShort);
|
||||
model = "\A3\weapons_f\ammo\flare_red";
|
||||
picture = "\A3\Weapons_F\Data\UI\gear_flare_red_ca.paa";
|
||||
ammo = "ACE_G_Handflare_Red";
|
||||
};
|
||||
|
||||
class ACE_HandFlare_Green: ACE_HandFlare_Base {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
scope = 2;
|
||||
ammo = "ACE_F_Hand_Green";
|
||||
displayname = CSTRING(M127A1_Green_Name);
|
||||
descriptionshort = CSTRING(M127A1_Green_Description);
|
||||
displayNameShort = CSTRING(M127A1_Green_NameShort);
|
||||
model = "\A3\weapons_f\ammo\flare_green";
|
||||
picture = "\A3\Weapons_F\Data\UI\gear_flare_green_ca.paa";
|
||||
ammo = "ACE_G_Handflare_Green";
|
||||
};
|
||||
|
||||
class ACE_HandFlare_Yellow: ACE_HandFlare_Base {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
scope = 2;
|
||||
ammo = "ACE_F_Hand_Yellow";
|
||||
displayname = CSTRING(M127A1_Yellow_Name);
|
||||
descriptionshort = CSTRING(M127A1_Yellow_Description);
|
||||
displayNameShort = CSTRING(M127A1_Yellow_NameShort);
|
||||
model = "\A3\weapons_f\ammo\flare_yellow";
|
||||
picture = "\A3\Weapons_F\Data\UI\gear_flare_yellow_ca.paa";
|
||||
ammo = "ACE_G_Handflare_Yellow";
|
||||
};
|
||||
|
||||
class ACE_M84: HandGrenade {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
ammo = "ACE_G_M84";
|
||||
displayname = CSTRING(M84_Name);
|
||||
descriptionshort = CSTRING(M84_Description);
|
||||
displayNameShort = "M84";
|
||||
mass = 4;
|
||||
model = PATHTOF(models\ACE_m84.p3d);
|
||||
picture = PATHTOF(UI\ACE_m84_x_ca.paa);
|
||||
ammo = "ACE_G_M84";
|
||||
mass = 4;
|
||||
};
|
||||
|
||||
class 3Rnd_UGL_FlareGreen_F;
|
||||
@ -65,6 +71,7 @@ class CfgMagazines {
|
||||
ammo = "F_40mm_Green";
|
||||
initSpeed = 120;
|
||||
};
|
||||
|
||||
class 6Rnd_RedSignal_F: 6Rnd_GreenSignal_F {
|
||||
author = ECSTRING(common,ACETeam);
|
||||
ammo = "F_40mm_Red";
|
||||
|
@ -2,3 +2,7 @@
|
||||
class ACE_M84FlashbangEffect {
|
||||
// empty
|
||||
};
|
||||
|
||||
class ACE_HandFlareEffect {
|
||||
// empty
|
||||
};
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
ADDON = false;
|
||||
|
||||
PREP(flare);
|
||||
PREP(flashbangExplosionEH);
|
||||
PREP(flashbangThrownFuze);
|
||||
PREP(nextMode);
|
||||
|
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"
|
||||
|
||||
private ["_mode", "_fuzeTime"];
|
||||
params ["_unit", "_weapon", "", "", "", "", "_projectile"];
|
||||
params ["_unit", "_weapon", "", "", "_ammo", "", "_projectile"];
|
||||
|
||||
if (_unit != ACE_player) 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];
|
||||
|
||||
if (_mode != 0) then {
|
||||
private "_velocity";
|
||||
|
||||
_velocity = velocity _projectile;
|
||||
|
||||
switch (_mode) do {
|
||||
//high throw
|
||||
case 1 : {
|
||||
case 1 : {
|
||||
_velocity = [
|
||||
0.5 * (_velocity select 0),
|
||||
0.5 * (_velocity select 1),
|
||||
@ -44,24 +72,18 @@ if (_mode != 0) then {
|
||||
];
|
||||
};
|
||||
//precise throw
|
||||
case 2 : {
|
||||
case 2 : {
|
||||
_velocity = (_unit weaponDirection _weapon) vectorMultiply (vectorMagnitude _velocity);
|
||||
};
|
||||
//roll grande
|
||||
case 3 : {
|
||||
case 3 : {
|
||||
//@todo
|
||||
};
|
||||
//drop grenade
|
||||
case 4 : {
|
||||
case 4 : {
|
||||
_velocity = [0, 0, 0];
|
||||
};
|
||||
};
|
||||
|
||||
_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);
|
||||
};
|
||||
|
@ -98,4 +98,14 @@ call FUNC(determineZoom);
|
||||
}] 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"
|
||||
|
||||
((_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);
|
||||
|
@ -1,6 +1,9 @@
|
||||
// Enable visual head movement while free-looking
|
||||
#define MACRO_ANIMATION \
|
||||
head = "headDefault";
|
||||
head = "headDefault"; \
|
||||
aimingBody = "aimingNo"; \
|
||||
forceAim = 1; \
|
||||
static = 1;
|
||||
|
||||
class CfgMovesBasic;
|
||||
class CfgMovesMaleSdr: CfgMovesBasic {
|
||||
|
@ -16,7 +16,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_configFile", "_sitDirection", "_sitPosition", "_sitRotation", "_sitDirectionVisual"];
|
||||
private ["_actionID", "_configFile", "_sitDirection", "_sitPosition", "_sitRotation", "_sitDirectionVisual"];
|
||||
|
||||
params ["_seat", "_player"];
|
||||
|
||||
@ -26,6 +26,26 @@ GVAR(seat) = _seat;
|
||||
// Overwrite weird position, because Arma decides to set it differently based on current animation/stance...
|
||||
_player switchMove "amovpknlmstpsraswrfldnon";
|
||||
|
||||
// add scrollwheel action to release object
|
||||
_actionID = _player getVariable [QGVAR(StandUpActionID), -1];
|
||||
|
||||
if (_actionID != -1) then {
|
||||
_player removeAction _actionID;
|
||||
};
|
||||
|
||||
_actionID = _player addAction [
|
||||
format ["<t color='#FFFF00'>%1</t>", localize LSTRING(Stand)],
|
||||
QUOTE((_this select 0) call FUNC(stand)),
|
||||
nil,
|
||||
20,
|
||||
false,
|
||||
true,
|
||||
"GetOut",
|
||||
QUOTE(_this call FUNC(canStand))
|
||||
];
|
||||
|
||||
_player setVariable [QGVAR(StandUpActionID), _actionID];
|
||||
|
||||
// Read config
|
||||
_configFile = configFile >> "CfgVehicles" >> typeOf _seat;
|
||||
_sitDirection = (getDir _seat) + getNumber (_configFile >> QGVAR(sitDirection));
|
||||
|
@ -17,8 +17,19 @@
|
||||
|
||||
params ["_player"];
|
||||
|
||||
// remove scroll wheel action
|
||||
_player removeAction (_player getVariable [QGVAR(StandUpActionID), -1]);
|
||||
|
||||
// Restore animation
|
||||
[_player, "", 2] call EFUNC(common,doAnimation);
|
||||
private "_animation";
|
||||
_animation = switch (currentWeapon _player) do {
|
||||
case "": {"amovpercmstpsnonwnondnon"};
|
||||
case (primaryWeapon _player): {"amovpercmstpslowwrfldnon"};
|
||||
case (handgunWeapon _player): {"amovpercmstpslowwpstdnon"};
|
||||
default {"amovpercmstpsnonwnondnon"};
|
||||
};
|
||||
|
||||
[_player, _animation, 2] call EFUNC(common,doAnimation);
|
||||
|
||||
// Set variables to nil
|
||||
_player setVariable [QGVAR(isSitting), nil];
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_actions";
|
||||
|
||||
params ["_objects", "_images", "_names", "_controller", "_currentSlideshow"];
|
||||
|
||||
_actions = [];
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_currentSlide";
|
||||
|
||||
params ["_objects", "_images", "_varString", "_duration"];
|
||||
|
||||
// Get current slide number of this slideshow
|
||||
|
@ -19,8 +19,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_currentSlideshow", "_actionsObject", "_actionsClass", "_mainAction", "_slidesAction", "_varString"];
|
||||
|
||||
private ["_currentSlideshow", "_slidesAction", "_varString"];
|
||||
params ["_objects", "_controllers", "_images", "_names", "_duration"];
|
||||
|
||||
// Verify data
|
||||
|
@ -17,9 +17,8 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_list", "_trimWhitespace", "_checkNil"];
|
||||
|
||||
private ["_splittedList", "_listTrimmedWhitespace", "_nilCheckPassedList"];
|
||||
params ["_list", "_trimWhitespace", "_checkNil"];
|
||||
|
||||
// Split using comma delimiter
|
||||
_splittedList = [_list, ","] call BIS_fnc_splitString;
|
||||
|
@ -18,7 +18,6 @@
|
||||
if (!hasInterface && !isDedicated) exitWith {};
|
||||
|
||||
private ["_objects", "_controllers", "_images", "_names", "_duration"];
|
||||
|
||||
params [["_logic", objNull, [objNull]], "_units", "_activated"];
|
||||
|
||||
if !(_activated) exitWith {};
|
||||
|
Loading…
Reference in New Issue
Block a user