Merge pull request #24 from KoffeinFlummi/agmGrenadesPort

Port: AGM Grenades
This commit is contained in:
Nicolás Badano 2015-01-17 15:05:15 -03:00
commit 6bee456aff
33 changed files with 676 additions and 499 deletions

Binary file not shown.

View File

@ -1,4 +0,0 @@
// by commy2
AGM_Flashbang_CC = ppEffectCreate ["ColorCorrections", 4265];
AGM_Flashbang_CC ppEffectForceInNVG true;

View File

@ -1,272 +0,0 @@
class CfgPatches {
class AGM_Grenades {
units[] = {};
weapons[] = {};
requiredVersion = 0.60;
requiredAddons[] = {AGM_Core};
version = "0.95";
versionStr = "0.95";
versionAr[] = {0,95,0};
author[] = {"commy2", "KoffeinFlummi"};
authorUrl = "https://github.com/commy2/";
};
};
class CfgFunctions {
class AGM_Grenades {
class AGM_Grenades {
file = "\AGM_Grenades\functions";
class flashbangEffect;
class nextMode;
class throwGrenade;
};
};
};
class Extended_PostInit_EventHandlers {
class AGM_Grenades {
clientInit = "call compile preprocessFileLineNumbers '\AGM_Grenades\clientInit.sqf'";
};
};
class Extended_FiredBIS_EventHandlers {
class CAManBase {
class AGM_Grenades_ThrowGrenade {
clientFiredBIS = "if (_this select 0 == AGM_player) then {_this call AGM_Grenades_fnc_throwGrenade;};";
};
};
};
class AGM_Core_Default_Keys {
class switchGrenadeMode {
displayName = "$STR_AGM_Grenades_SwitchGrenadeMode";
condition = "[_player] call AGM_Core_fnc_canUseWeapon";
statement = "call AGM_Grenades_fnc_nextMode";
key = 9;//34;
shift = 0;
control = 0;
alt = 0;//1;
};
};
class CfgAmmo {
class FlareCore;
class FlareBase: FlareCore {
intensity = 20000;
flareSize = 12;
};
class F_40mm_White: FlareBase {
intensity = 40000;
flareSize = 12;
};
class F_20mm_White: FlareBase {
intensity = 20000;
flareSize = 12;
};
class F_Signal_Green: FlareBase {
intensity = 20000;
flareSize = 12;
};
class Flare_82mm_AMOS_White: FlareCore {
intensity = 80000;
flareSize = 12;
};
class F_20mm_Red: F_20mm_White {};
class F_20mm_Green: F_20mm_White {};
class F_20mm_Yellow: F_20mm_White {};
class AGM_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 AGM_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 AGM_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 AGM_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 AGM_G_M84: F_20mm_Yellow {
useFlare = 0;
flareSize = 0;
intensity = 0;
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;
fuseDistance = 2.3;
model = "agm_grenades\agm_m84_thrown.p3d";
};
};
class CfgMagazines {
class HandGrenade;
class AGM_HandFlare_Base: HandGrenade {
value = 2;
nameSoundWeapon = "smokeshell";
nameSound = "smokeshell";
mass = 4;
initSpeed = 22;
};
class AGM_HandFlare_White: AGM_HandFlare_Base {
ammo = "AGM_F_Hand_White";
displayname = "$STR_AGM_Grenades_M127A1_White_Name";
descriptionshort = "$STR_AGM_Grenades_M127A1_White_Description";
displayNameShort = "$STR_AGM_Grenades_M127A1_White_NameShort";
model = "\A3\weapons_f\ammo\flare_white";
picture = "\A3\Weapons_F\Data\UI\gear_flare_white_ca.paa";
};
class AGM_HandFlare_Red: AGM_HandFlare_Base {
ammo = "AGM_F_Hand_Red";
displayname = "$STR_AGM_Grenades_M127A1_Red_Name";
descriptionshort = "$STR_AGM_Grenades_M127A1_Red_Description";
displayNameShort = "$STR_AGM_Grenades_M127A1_Red_NameShort";
model = "\A3\weapons_f\ammo\flare_red";
picture = "\A3\Weapons_F\Data\UI\gear_flare_red_ca.paa";
};
class AGM_HandFlare_Green: AGM_HandFlare_Base {
ammo = "AGM_F_Hand_Green";
displayname = "$STR_AGM_Grenades_M127A1_Green_Name";
descriptionshort = "$STR_AGM_Grenades_M127A1_Green_Description";
displayNameShort = "$STR_AGM_Grenades_M127A1_Green_NameShort";
model = "\A3\weapons_f\ammo\flare_green";
picture = "\A3\Weapons_F\Data\UI\gear_flare_green_ca.paa";
};
class AGM_HandFlare_Yellow: AGM_HandFlare_Base {
ammo = "AGM_F_Hand_Yellow";
displayname = "$STR_AGM_Grenades_M127A1_Yellow_Name";
descriptionshort = "$STR_AGM_Grenades_M127A1_Yellow_Description";
displayNameShort = "$STR_AGM_Grenades_M127A1_Yellow_NameShort";
model = "\A3\weapons_f\ammo\flare_yellow";
picture = "\A3\Weapons_F\Data\UI\gear_flare_yellow_ca.paa";
};
class AGM_M84: HandGrenade {
ammo = "AGM_G_M84";
displayname = "$STR_AGM_Grenades_M84_Name";
descriptionshort = "$STR_AGM_Grenades_M84_Description";
displayNameShort = "M84";
model = "agm_grenades\agm_m84.p3d";
picture = "\agm_grenades\UI\agm_m84_x_ca.paa";
};
class 3Rnd_UGL_FlareGreen_F;
class 6Rnd_GreenSignal_F: 3Rnd_UGL_FlareGreen_F {
ammo = "F_40mm_Green";
initSpeed = 120;
};
class 6Rnd_RedSignal_F: 6Rnd_GreenSignal_F {
ammo = "F_40mm_Red";
initSpeed = 120;
};
};
class CfgWeapons {
class GrenadeLauncher;
class Throw: GrenadeLauncher {
muzzles[] += {"AGM_HandFlare_WhiteMuzzle", "AGM_HandFlare_RedMuzzle", "AGM_HandFlare_GreenMuzzle", "AGM_HandFlare_YellowMuzzle", "AGM_M84Muzzle"};
class ThrowMuzzle;
class AGM_HandFlare_WhiteMuzzle: ThrowMuzzle {
magazines[] = {"AGM_HandFlare_White"};
};
class AGM_HandFlare_RedMuzzle: ThrowMuzzle {
magazines[] = {"AGM_HandFlare_Red"};
};
class AGM_HandFlare_GreenMuzzle: ThrowMuzzle {
magazines[] = {"AGM_HandFlare_Green"};
};
class AGM_HandFlare_YellowMuzzle: ThrowMuzzle {
magazines[] = {"AGM_HandFlare_Yellow"};
};
class AGM_M84Muzzle: ThrowMuzzle {
magazines[] = {"AGM_M84"};
};
};
};
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
name = #ITEM; \
count = COUNT; \
};
class CfgVehicles {
class NATO_Box_Base;
class EAST_Box_Base;
class IND_Box_Base;
class Box_NATO_Support_F;
class Box_NATO_Grenades_F: NATO_Box_Base {
class TransportItems {
MACRO_ADDITEM(AGM_HandFlare_White,12)
MACRO_ADDITEM(AGM_HandFlare_Green,12)
MACRO_ADDITEM(AGM_M84,12)
};
};
class Box_East_Grenades_F: EAST_Box_Base {
class TransportItems {
MACRO_ADDITEM(AGM_HandFlare_Yellow,12)
MACRO_ADDITEM(AGM_HandFlare_Red,12)
MACRO_ADDITEM(AGM_M84,12)
};
};
class Box_IND_Grenades_F: IND_Box_Base {
class TransportItems {
MACRO_ADDITEM(AGM_HandFlare_Yellow,12)
MACRO_ADDITEM(AGM_HandFlare_Green,12)
MACRO_ADDITEM(AGM_M84,12)
};
};
class AGM_Box_Misc: Box_NATO_Support_F {
class TransportItems {
MACRO_ADDITEM(AGM_HandFlare_White,12)
MACRO_ADDITEM(AGM_HandFlare_Red,12)
MACRO_ADDITEM(AGM_HandFlare_Green,12)
MACRO_ADDITEM(AGM_HandFlare_Yellow,12)
MACRO_ADDITEM(AGM_M84,12)
};
};
};

View File

@ -1,93 +0,0 @@
/*
* Author: KoffeinFlummi
*
* Creates the flashbang effect locally/knocks out AI units.
*
* Arguments:
* 0: The unit (Object)
* 1: The grenade (Object)
*
* Return Value:
* None
*/
_this spawn {
_unit = _this select 0;
_grenade = _this select 1;
if (damage _unit >= 1) exitWith {};
_strength = 1 - ((_unit distance _grenade) min 15) / 15;
if !(isPlayer _unit) exitWith {
_unit disableAI "MOVE";
_unit disableAI "ANIM";
_unit disableAI "AUTOTARGET";
_unit disableAI "TARGET";
_unit disableAI "FSM";
_unit setSkill (skill _unit / 50);
sleep (7 * _strength);
_unit enableAI "MOVE";
_unit enableAI "ANIM";
_unit enableAI "AUTOTARGET";
_unit enableAI "TARGET";
_unit enableAI "FSM";
_unit setSkill (skill _unit * 50);
};
// is there line of sight to the grenade?
_posGrenade = getPosASL _grenade;
_posGrenade set [2, (_posGrenade select 2) + 0.2]; // compensate for grenade glitching into ground
if (lineIntersects [_posGrenade, getPosASL _unit, _grenade, _unit]) then {
_strength = _strength / 10;
};
// beeeeeeeeeeeeeeeeeeeeeeeeeeeeep
if (isClass (configFile >> "CfgPatches" >> "AGM_Hearing") and _strength > 0) then {
[_unit, 0.5 + (_strength / 2)] call AGM_Hearing_fnc_earRinging;
};
// account for people looking away by slightly
// reducing the effect for visual effects.
_posUnit = getPos _unit;
_posGrenade = getPos _grenade;
_angleGrenade = ((_posGrenade select 0) - (_posUnit select 0)) atan2 ((_posGrenade select 1) - (_posUnit select 1));
_angleGrenade = (_angleGrenade + 360) % 360;
_angleView = (eyeDirection player select 0) atan2 (eyeDirection player select 1);
_angleView = (_angleView + 360) % 360;
_angleDiff = 180 - abs (abs (_angleGrenade - _angleView) - 180);
_angleDiff = ((_angleDiff - 45) max 0);
_strength = _strength - _strength * (_angleDiff / 135);
// create flash to illuminate environment
_light = "#lightpoint" createVehicleLocal getPos _grenade;
_light setLightBrightness 200;
_light setLightAmbient [1,1,1];
_light setLightColor [1,1,1];
_light setLightDayLight true;
// blind player
if (_strength > 0.1) then {
AGM_Flashbang_CC ppEffectEnable true;
AGM_Flashbang_CC ppEffectAdjust [1,1,(0.8 + _strength) min 1,[1,1,1,0],[0,0,0,1],[0,0,0,0]];
AGM_Flashbang_CC ppEffectCommit 0.01;
};
sleep 0.1;
deleteVehicle _light;
sleep (7 * _strength);
if (_strength > 0.1) then {
AGM_Flashbang_CC ppEffectAdjust [1,1,0,[1,1,1,0],[0,0,0,1],[0,0,0,0]];
AGM_Flashbang_CC ppEffectCommit (10 * _strength);
sleep (10 * _strength);
AGM_Flashbang_CC ppEffectEnable false;
};
};

View File

@ -1,38 +0,0 @@
/*
* Author: commy2
*
* Select the next throwing mode and display message.
*
* Argument:
* Nothing
*
* Return value:
* Nothing
*/
private ["_mode", "_hint"];
_mode = missionNamespace getVariable ["AGM_Grenades_Mode", 0];
if (_mode == 4) then {
_mode = 0;
} else {
_mode = _mode + 1;
};
// ROLL GRENADE DOESN'T WORK RIGHT NOW
if (_mode == 3) then {
_mode = 4;
};
_hint = [
localize "STR_AGM_Grenades_NormalThrow",
localize "STR_AGM_Grenades_HighThrow",
localize "STR_AGM_Grenades_PreciseThrow",
localize "STR_AGM_Grenades_RollGrenade",
localize "STR_AGM_Grenades_DropGrenade"
] select _mode;
[_hint] call AGM_Core_fnc_displayTextStructured;
AGM_Grenades_Mode = _mode;

View File

@ -1,71 +0,0 @@
/*
* Author: commy2
*
* Adjust the grenades throwing direction and speed to the selected throwing mode.
*
* Argument:
* input from "Fired" eventhandler
*
* Return value:
* Nothing
*/
private ["_unit", "_weapon", "_projectile"];
_unit = _this select 0;
_weapon = _this select 1;
_projectile = _this select 6;
if (_weapon != "Throw") exitWith {};
private "_mode";
_mode = missionNamespace getVariable ["AGM_Grenades_Mode", 0];
if (_mode != 0) then {
private "_velocity";
_velocity = velocity _projectile;
switch (_mode) do {
//high throw
case 1 : {
_velocity = [
0.5 * (_velocity select 0),
0.5 * (_velocity select 1),
[0, 0, 0] distance (_velocity vectorMultiply 0.5)
];
};
//precise throw
case 2 : {
_velocity = (_unit weaponDirection _weapon) vectorMultiply (vectorMagnitude _velocity);
};
//roll grande
case 3 : {
//@todo
};
//drop grenade
case 4 : {
_velocity = [0, 0, 0];
};
};
_projectile setVelocity _velocity;
};
if (typeOf _projectile == "AGM_G_M84") then {
_this spawn {
_projectile = _this select 6;
sleep getNumber (configFile >> "CfgAmmo" >> typeOf _projectile >> "fuseDistance");
if (alive _projectile) then {
playSound3D ["A3\Sounds_F\weapons\Explosion\explosion_mine_1.wss", _projectile, false, getPosASL _projectile, 5, 1.2, 400];
_affected = _projectile nearEntities ["CAManBase", 50];
{
[[_x, _projectile], "AGM_Grenades_fnc_flashbangEffect", _x] call AGM_Core_fnc_execRemoteFnc;
} forEach _affected;
};
};
};

Binary file not shown.

View File

@ -0,0 +1 @@
z\ace\addons\grenades

View File

@ -0,0 +1,89 @@
class CfgAmmo {
class FlareCore;
class FlareBase: FlareCore {
intensity = 20000;
flareSize = 12;
};
class F_40mm_White: FlareBase {
intensity = 40000;
flareSize = 12;
};
class F_20mm_White: FlareBase {
intensity = 20000;
flareSize = 12;
};
class F_Signal_Green: FlareBase {
intensity = 20000;
flareSize = 12;
};
class Flare_82mm_AMOS_White: FlareCore {
intensity = 80000;
flareSize = 12;
};
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 {
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;
};
class ACE_G_M84: F_20mm_Yellow {
useFlare = 0;
flareSize = 0;
intensity = 0;
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;
fuseDistance = 2.3;
model = PATHTOF(models\ACE_m84_thrown.p3d);
};
};

View File

@ -0,0 +1,19 @@
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
clientInit = QUOTE( call COMPILE_FILE(XEH_postInitClient) );
};
};
class Extended_FiredBIS_EventHandlers {
class CAManBase {
class ADDON {
clientFiredBIS = QUOTE( _this call FUNC(throwGrenade) );
};
};
};

View File

@ -0,0 +1,60 @@
class CfgMagazines {
class HandGrenade;
class ACE_HandFlare_Base: HandGrenade {
value = 2;
nameSoundWeapon = "smokeshell";
nameSound = "smokeshell";
mass = 4;
initSpeed = 22;
};
class ACE_HandFlare_White: ACE_HandFlare_Base {
ammo = "ACE_F_Hand_White";
displayname = "$STR_ACE_Grenades_M127A1_White_Name";
descriptionshort = "$STR_ACE_Grenades_M127A1_White_Description";
displayNameShort = "$STR_ACE_Grenades_M127A1_White_NameShort";
model = "\A3\weapons_f\ammo\flare_white";
picture = "\A3\Weapons_F\Data\UI\gear_flare_white_ca.paa";
};
class ACE_HandFlare_Red: ACE_HandFlare_Base {
ammo = "ACE_F_Hand_Red";
displayname = "$STR_ACE_Grenades_M127A1_Red_Name";
descriptionshort = "$STR_ACE_Grenades_M127A1_Red_Description";
displayNameShort = "$STR_ACE_Grenades_M127A1_Red_NameShort";
model = "\A3\weapons_f\ammo\flare_red";
picture = "\A3\Weapons_F\Data\UI\gear_flare_red_ca.paa";
};
class ACE_HandFlare_Green: ACE_HandFlare_Base {
ammo = "ACE_F_Hand_Green";
displayname = "$STR_ACE_Grenades_M127A1_Green_Name";
descriptionshort = "$STR_ACE_Grenades_M127A1_Green_Description";
displayNameShort = "$STR_ACE_Grenades_M127A1_Green_NameShort";
model = "\A3\weapons_f\ammo\flare_green";
picture = "\A3\Weapons_F\Data\UI\gear_flare_green_ca.paa";
};
class ACE_HandFlare_Yellow: ACE_HandFlare_Base {
ammo = "ACE_F_Hand_Yellow";
displayname = "$STR_ACE_Grenades_M127A1_Yellow_Name";
descriptionshort = "$STR_ACE_Grenades_M127A1_Yellow_Description";
displayNameShort = "$STR_ACE_Grenades_M127A1_Yellow_NameShort";
model = "\A3\weapons_f\ammo\flare_yellow";
picture = "\A3\Weapons_F\Data\UI\gear_flare_yellow_ca.paa";
};
class ACE_M84: HandGrenade {
ammo = "ACE_G_M84";
displayname = "$STR_ACE_Grenades_M84_Name";
descriptionshort = "$STR_ACE_Grenades_M84_Description";
displayNameShort = "M84";
model = PATHTOF(models\ACE_m84.p3d);
picture = PATHTOF(UI\ACE_m84_x_ca.paa);
};
class 3Rnd_UGL_FlareGreen_F;
class 6Rnd_GreenSignal_F: 3Rnd_UGL_FlareGreen_F {
ammo = "F_40mm_Green";
initSpeed = 120;
};
class 6Rnd_RedSignal_F: 6Rnd_GreenSignal_F {
ammo = "F_40mm_Red";
initSpeed = 120;
};
};

View File

@ -0,0 +1,45 @@
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
name = #ITEM; \
count = COUNT; \
};
class CfgVehicles {
class NATO_Box_Base;
class EAST_Box_Base;
class IND_Box_Base;
class Box_NATO_Support_F;
class Box_NATO_Grenades_F: NATO_Box_Base {
class TransportItems {
MACRO_ADDITEM(ACE_HandFlare_White,12)
MACRO_ADDITEM(ACE_HandFlare_Green,12)
MACRO_ADDITEM(ACE_M84,12)
};
};
class Box_East_Grenades_F: EAST_Box_Base {
class TransportItems {
MACRO_ADDITEM(ACE_HandFlare_Yellow,12)
MACRO_ADDITEM(ACE_HandFlare_Red,12)
MACRO_ADDITEM(ACE_M84,12)
};
};
class Box_IND_Grenades_F: IND_Box_Base {
class TransportItems {
MACRO_ADDITEM(ACE_HandFlare_Yellow,12)
MACRO_ADDITEM(ACE_HandFlare_Green,12)
MACRO_ADDITEM(ACE_M84,12)
};
};
class ACE_Box_Misc: Box_NATO_Support_F {
class TransportItems {
MACRO_ADDITEM(ACE_HandFlare_White,12)
MACRO_ADDITEM(ACE_HandFlare_Red,12)
MACRO_ADDITEM(ACE_HandFlare_Green,12)
MACRO_ADDITEM(ACE_HandFlare_Yellow,12)
MACRO_ADDITEM(ACE_M84,12)
};
};
};

View File

@ -0,0 +1,23 @@
class CfgWeapons {
class GrenadeLauncher;
class Throw: GrenadeLauncher {
muzzles[] += {"ACE_HandFlare_WhiteMuzzle", "ACE_HandFlare_RedMuzzle", "ACE_HandFlare_GreenMuzzle", "ACE_HandFlare_YellowMuzzle", "ACE_M84Muzzle"};
class ThrowMuzzle;
class ACE_HandFlare_WhiteMuzzle: ThrowMuzzle {
magazines[] = {"ACE_HandFlare_White"};
};
class ACE_HandFlare_RedMuzzle: ThrowMuzzle {
magazines[] = {"ACE_HandFlare_Red"};
};
class ACE_HandFlare_GreenMuzzle: ThrowMuzzle {
magazines[] = {"ACE_HandFlare_Green"};
};
class ACE_HandFlare_YellowMuzzle: ThrowMuzzle {
magazines[] = {"ACE_HandFlare_Yellow"};
};
class ACE_M84Muzzle: ThrowMuzzle {
magazines[] = {"ACE_M84"};
};
};
};

View File

@ -0,0 +1,13 @@
// by commy2
#include "script_component.hpp"
GVAR(flashbangPPEffectCC) = ppEffectCreate ["ColorCorrections", 4265];
GVAR(flashbangPPEffectCC) ppEffectForceInNVG true;
["ACE3",
localize "STR_ACE_Grenades_SwitchGrenadeMode",
{_this call FUNC(nextMode)},
[9, [false, false, false]], //8 key
false,
"keydown"] call cba_fnc_registerKeybind;

View File

@ -0,0 +1,9 @@
#include "script_component.hpp"
PREP(flashbangEffectStages);
PREP(flashbangExplosionEH);
PREP(flashbangThrownFuze);
PREP(nextMode);
PREP(throwGrenade);
["flashbangExplosion", { _this call DFUNC(flashbangExplosionEH) }] call EFUNC(common,addEventHandler);

View File

@ -0,0 +1,19 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
author[] = {"commy2", "KoffeinFlummi"};
authorUrl = "https://github.com/commy2/";
VERSION_CONFIG;
};
};
#include "CfgEventHandlers.hpp"
#include "CfgAmmo.hpp"
#include "CfgWeapons.hpp"
#include "CfgMagazines.hpp"
#include "CfgVehicles.hpp"

View File

@ -0,0 +1,57 @@
/*
* Author: KoffeinFlummi, Pabst Mirror
*
* Handles the different stages of the flash bang effect recovery
*
* Arguments:
* ARRAY[
* 0-ARRAY - PARAMS:
* 0: NUMBER - Stage, controls a case statement
* 1: NUMBER - Time To Wait Until
* 2: VARIES - Stage's Variable
* 1-NUMBER perFrame handle
* Return Value:
* None
*/
#include "script_component.hpp"
private ["_stage", "_waitUntilTime"];
_stage = (_this select 0) select 0;
_waitUntilTime = (_this select 0) select 1;
if (_waitUntilTime > time) exitWith {};
//remove frameEH
[(_this select 1)] call cba_fnc_removePerFrameHandler;
switch (_stage) do {
case(EFFECT_STAGE_RESETAI): {
private "_unit";
_unit = (_this select 0) select 2;
_unit enableAI "MOVE";
_unit enableAI "ANIM";
_unit enableAI "AUTOTARGET";
_unit enableAI "TARGET";
_unit enableAI "FSM";
_unit setSkill (skill _unit * 50);
};
case(EFFECT_STAGE_DELETELIGHT): {
private "_light";
_light = (_this select 0) select 2;
deleteVehicle _light;
};
case(EFFECT_STAGE_PARTIALRECOVERY): {
private "_strength";
_strength = (_this select 0) select 2;
GVAR(flashbangPPEffectCC) ppEffectAdjust [1,1,0,[1,1,1,0],[0,0,0,1],[0,0,0,0]];
GVAR(flashbangPPEffectCC) ppEffectCommit (10 * _strength);
};
case(EFFECT_STAGE_FULLRECOVERY): {
GVAR(flashbangPPEffectCC) ppEffectEnable false;
};
default {
TRACE_1("EffectStage Bad Stage", _stage);
};
};

View File

@ -0,0 +1,85 @@
/*
* Author: KoffeinFlummi
*
* Creates the flashbang effect and knock out AI units.
*
* Arguments:
* 0: The grenade (Object)
*
* Return Value:
* None
*/
#include "script_component.hpp"
private ["_grenade", "_affected", "_strength", "_posGrenade", "_posUnit", "_angleGrenade", "_angleView", "_angleDiff", "_light"];
_grenade = _this select 0;
_affected = _grenade nearEntities ["CAManBase", 50];
{
if ((local _x) && {alive _x}) then {
_strength = 1 - ((_x distance _grenade) min 15) / 15;
if (_x != ACE_player) then {
//must be AI
_x disableAI "MOVE";
_x disableAI "ANIM";
_x disableAI "AUTOTARGET";
_x disableAI "TARGET";
_x disableAI "FSM";
_x setSkill ((skill _x) / 50);
[FUNC(flashbangEffectStages), 0, [EFFECT_STAGE_RESETAI, (time + (7 * _strength)), _x]] call CBA_fnc_addPerFrameHandler;
} else {
//Do effects for player
// is there line of sight to the grenade?
_posGrenade = getPosASL _grenade;
_posGrenade set [2, (_posGrenade select 2) + 0.2]; // compensate for grenade glitching into ground
if (lineIntersects [_posGrenade, getPosASL _x, _grenade, _x]) then {
_strength = _strength / 10;
};
// beeeeeeeeeeeeeeeeeeeeeeeeeeeeep
if (isClass (configFile >> "CfgPatches" >> "ACE_Hearing") and _strength > 0) then {
[_x, 0.5 + (_strength / 2)] call EFUNC(hearing,earRinging);
};
// account for people looking away by slightly
// reducing the effect for visual effects.
_posUnit = getPos _x;
_posGrenade = getPos _grenade;
_angleGrenade = ((_posGrenade select 0) - (_posUnit select 0)) atan2 ((_posGrenade select 1) - (_posUnit select 1));
_angleGrenade = (_angleGrenade + 360) % 360;
_angleView = (eyeDirection player select 0) atan2 (eyeDirection player select 1);
_angleView = (_angleView + 360) % 360;
_angleDiff = 180 - abs (abs (_angleGrenade - _angleView) - 180);
_angleDiff = ((_angleDiff - 45) max 0);
_strength = _strength - _strength * (_angleDiff / 135);
// create flash to illuminate environment
_light = "#lightpoint" createVehicleLocal getPos _grenade;
_light setLightBrightness 200;
_light setLightAmbient [1,1,1];
_light setLightColor [1,1,1];
_light setLightDayLight true;
[FUNC(flashbangEffectStages), 0, [EFFECT_STAGE_DELETELIGHT, (time + (0.1)), _light]] call CBA_fnc_addPerFrameHandler;
// blind player
if (_strength > 0.1) then {
GVAR(flashbangPPEffectCC) ppEffectEnable true;
GVAR(flashbangPPEffectCC) ppEffectAdjust [1,1,(0.8 + _strength) min 1,[1,1,1,0],[0,0,0,1],[0,0,0,0]];
GVAR(flashbangPPEffectCC) ppEffectCommit 0.01;
[FUNC(flashbangEffectStages), 0, [EFFECT_STAGE_PARTIALRECOVERY, (time + (7 * _strength)), _strength]] call CBA_fnc_addPerFrameHandler;
[FUNC(flashbangEffectStages), 0, [ EFFECT_STAGE_FULLRECOVERY, (time + (17 * _strength))]] call CBA_fnc_addPerFrameHandler;
};
};
};
} forEach _affected;

View File

@ -0,0 +1,18 @@
//Waits for the grenade fuze to trigger and 'explode'
#include "script_component.hpp"
_projectile = (_this select 0) select 0;
_waitUntilTime = (_this select 0) select 1;
if (_waitUntilTime > time) exitWith {};
//remove frameEH
[(_this select 1)] call cba_fnc_removePerFrameHandler;
if (alive _projectile) then {
playSound3D ["A3\Sounds_F\weapons\Explosion\explosion_mine_1.wss", _projectile, false, getPosASL _projectile, 5, 1.2, 400];
_affected = _projectile nearEntities ["CAManBase", 50];
["flashbangExplosion", _affected, [_projectile]] call EFUNC(common,targetEvent);
};

View File

@ -0,0 +1,44 @@
/*
* Author: commy2
*
* Select the next throwing mode and display message.
*
* Argument:
* Nothing
*
* Return value:
* Nothing
*/
#include "script_component.hpp"
private ["_mode", "_hint"];
if (!([ACE_player] call EFUNC(common,canUseWeapon))) exitWith {false};
_mode = missionNamespace getVariable [QGVAR(currentThrowMode), 0];
if (_mode == 4) then {
_mode = 0;
} else {
_mode = _mode + 1;
};
// ROLL GRENADE DOESN'T WORK RIGHT NOW
if (_mode == 3) then {
_mode = 4;
};
_hint = [
localize "STR_ACE_Grenades_NormalThrow",
localize "STR_ACE_Grenades_HighThrow",
localize "STR_ACE_Grenades_PreciseThrow",
localize "STR_ACE_Grenades_RollGrenade",
localize "STR_ACE_Grenades_DropGrenade"
] select _mode;
[_hint] call EFUNC(common,displayTextStructured);
GVAR(currentThrowMode) = _mode;
true

View File

@ -0,0 +1,61 @@
/*
* Author: commy2
*
* Adjust the grenades throwing direction and speed to the selected throwing mode.
*
* Argument:
* input from "Fired" eventhandler
*
* Return value:
* Nothing
*/
#include "script_component.hpp"
private ["_unit", "_weapon", "_projectile", "_mode", "_fuzeTime"];
_unit = _this select 0;
_weapon = _this select 1;
_projectile = _this select 6;
if (_unit != ACE_player) exitWith {};
if (_weapon != "Throw") exitWith {};
_mode = missionNamespace getVariable [QGVAR(currentThrowMode), 0];
if (_mode != 0) then {
private "_velocity";
_velocity = velocity _projectile;
switch (_mode) do {
//high throw
case 1 : {
_velocity = [
0.5 * (_velocity select 0),
0.5 * (_velocity select 1),
[0, 0, 0] distance (_velocity vectorMultiply 0.5)
];
};
//precise throw
case 2 : {
_velocity = (_unit weaponDirection _weapon) vectorMultiply (vectorMagnitude _velocity);
};
//roll grande
case 3 : {
//@todo
};
//drop grenade
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), 0, [_projectile, (time + _fuzeTime)]] call CBA_fnc_addPerFrameHandler;
};

View File

@ -0,0 +1 @@
#include "\z\ace\addons\grenades\script_component.hpp"

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,19 @@
#define COMPONENT grenades
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
#ifdef DEBUG_ENABLED_GRENADES
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_GRENADES
#define DEBUG_SETTINGS DEBUG_SETTINGS_GRENADES
#endif
#include "\z\ace\addons\main\script_macros.hpp"
#define EFFECT_STAGE_RESETAI 0
#define EFFECT_STAGE_DELETELIGHT 1
#define EFFECT_STAGE_PARTIALRECOVERY 2
#define EFFECT_STAGE_FULLRECOVERY 3

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Edited with tabler - 2014-09-11 -->
<Project name="AGM">
<Project name="ACE">
<Package name="Grenades">
<Key ID="STR_AGM_Grenades_SwitchGrenadeMode">
<Key ID="STR_ACE_Grenades_SwitchGrenadeMode">
<English>Switch Grenade Mode</English>
<German>Granaten-Modus wechseln</German>
<Spanish>Cambiar modo de granada</Spanish>
@ -14,7 +14,7 @@
<Italian>Cambia tipo di granata</Italian>
<Portuguese>Alternar Modo de Granada</Portuguese>
</Key>
<Key ID="STR_AGM_Grenades_NormalThrow">
<Key ID="STR_ACE_Grenades_NormalThrow">
<English>Normal Throw</English>
<German>Normaler Wurf</German>
<Spanish>Lanzamiento normal</Spanish>
@ -26,7 +26,7 @@
<Italian>Lancio normale</Italian>
<Portuguese>Arremesso Normal</Portuguese>
</Key>
<Key ID="STR_AGM_Grenades_HighThrow">
<Key ID="STR_ACE_Grenades_HighThrow">
<English>High Throw</English>
<German>Hoher Wurf</German>
<Spanish>Lanzamiento alto</Spanish>
@ -38,7 +38,7 @@
<Italian>Lancio verso l'alto</Italian>
<Portuguese>Arremesso Alto</Portuguese>
</Key>
<Key ID="STR_AGM_Grenades_PreciseThrow">
<Key ID="STR_ACE_Grenades_PreciseThrow">
<English>Precise Throw</English>
<German>Präziser Wurf</German>
<Spanish>Lanzamiento preciso</Spanish>
@ -50,7 +50,7 @@
<Italian>Lancio preciso</Italian>
<Portuguese>Arremesso Preciso</Portuguese>
</Key>
<Key ID="STR_AGM_Grenades_RollGrenade">
<Key ID="STR_ACE_Grenades_RollGrenade">
<English>Roll Grenade</English>
<German>Granate rollen</German>
<Spanish>Rodar granada</Spanish>
@ -62,7 +62,7 @@
<Italian>Fai rotolare la granata</Italian>
<Portuguese>Rolar Granada</Portuguese>
</Key>
<Key ID="STR_AGM_Grenades_DropGrenade">
<Key ID="STR_ACE_Grenades_DropGrenade">
<English>Drop Grenade</English>
<German>Granate fallenlassen</German>
<Spanish>Soltar granada</Spanish>
@ -74,7 +74,7 @@
<Italian>Lascia la granata</Italian>
<Portuguese>Largar Granada</Portuguese>
</Key>
<Key ID="STR_AGM_Grenades_M84_Name">
<Key ID="STR_ACE_Grenades_M84_Name">
<English>M84 Stun Grenade</English>
<German>M84 Blendgranate</German>
<Spanish>Granada aturdidora M84</Spanish>
@ -86,7 +86,7 @@
<Italian>Granata Stordente M84</Italian>
<Portuguese>M84 granada de atordoamento</Portuguese>
</Key>
<Key ID="STR_AGM_Grenades_M84_Description">
<Key ID="STR_ACE_Grenades_M84_Description">
<English>Also known as flashbang. Causes immediate flash blindness, deafness, tinnitus, and inner ear disturbance.</English>
<German>Verursacht temporäre Blind- und Taubheit.</German>
<Spanish>Produce de manera inmediata ceguera, sordera, tinitus y afecta el oído interior.</Spanish>
@ -98,7 +98,7 @@
<Italian>Anche conosciuta come flashbang. Causa accecamento immediato, sensazioni di sposatezza, mancanza d'equilibrio e disturbi al timpano.</Italian>
<Portuguese>Um tipo de granada não-letal destinado a confundir, desorientar e distrair uma potencial ameaça.</Portuguese>
</Key>
<Key ID="STR_AGM_Grenades_M127A1_White_Name">
<Key ID="STR_ACE_Grenades_M127A1_White_Name">
<English>M127A1 Hand Held Signal (White)</English>
<German>M127A1 Leuchtmittel (Weiß)</German>
<Czech> M127A1 Světlice (Bílá)</Czech>
@ -110,7 +110,7 @@
<Spanish>Bengala M127A1 (Blanca)</Spanish>
<French>M127A1 Feux à main (Blanc)</French>
</Key>
<Key ID="STR_AGM_Grenades_M127A1_Red_Name">
<Key ID="STR_ACE_Grenades_M127A1_Red_Name">
<English>M127A1 Hand Held Signal (Red)</English>
<German>M127A1 Leuchtmittel (Rot)</German>
<Czech>M127A1 Světlice (Červená)</Czech>
@ -122,7 +122,7 @@
<Spanish>Bengala M127A1 (Roja)</Spanish>
<French>M127A1 Feux à main (Rouge)</French>
</Key>
<Key ID="STR_AGM_Grenades_M127A1_Green_Name">
<Key ID="STR_ACE_Grenades_M127A1_Green_Name">
<English>M127A1 Hand Held Signal (Green)</English>
<German>M127A1 Leuchtmittel (Grün)</German>
<Czech>M127A1 Světlice (Zelená)</Czech>
@ -134,7 +134,7 @@
<Spanish>Bengala M127A1 (Verde)</Spanish>
<French>M127A1 Feux à main (Vert)</French>
</Key>
<Key ID="STR_AGM_Grenades_M127A1_Yellow_Name">
<Key ID="STR_ACE_Grenades_M127A1_Yellow_Name">
<English>M127A1 Hand Held Signal (Yellow)</English>
<German>M127A1 Leuchtmittel (Gelb)</German>
<Czech>M127A1 Světlice (Žlutá)</Czech>
@ -146,7 +146,7 @@
<Spanish>Bengala M127A1 (Amarilla)</Spanish>
<French>M127A1 Feux à main (Jaune)</French>
</Key>
<Key ID="STR_AGM_Grenades_M127A1_White_Description">
<Key ID="STR_ACE_Grenades_M127A1_White_Description">
<English>White Hand Flare</English>
<German>Weiße Leuchtkugel, wird wie eine Granate geworfen.</German>
<Czech>Světlice (Bílá)</Czech>
@ -158,7 +158,7 @@
<Spanish>Bengala (Blanca)</Spanish>
<French>Feux à main (Blanc)</French>
</Key>
<Key ID="STR_AGM_Grenades_M127A1_Red_Description">
<Key ID="STR_ACE_Grenades_M127A1_Red_Description">
<English>Red Hand Flare</English>
<German>Rote Leuchtkugel, wird wie eine Granate geworfen.</German>
<Czech>Světlice (Červená)</Czech>
@ -170,7 +170,7 @@
<Spanish>Bengala (Roja)</Spanish>
<French>Feux à main (Rouge)</French>
</Key>
<Key ID="STR_AGM_Grenades_M127A1_Green_Description">
<Key ID="STR_ACE_Grenades_M127A1_Green_Description">
<English>Green Hand Flare</English>
<German>Grüne Leuchtkugel, wird wie eine Granate geworfen.</German>
<Czech>Světlice (Zelená)</Czech>
@ -182,7 +182,7 @@
<Spanish>Bengala (Verde)</Spanish>
<French>Feux à main (Vert)</French>
</Key>
<Key ID="STR_AGM_Grenades_M127A1_Yellow_Description">
<Key ID="STR_ACE_Grenades_M127A1_Yellow_Description">
<English>Yellow Hand Flare</English>
<German>Gelbe Leuchtkugel, wird wie eine Granate geworfen.</German>
<Czech>Světlice Žlutá</Czech>
@ -194,7 +194,7 @@
<Spanish>Bengala (Amarilla)</Spanish>
<French>Feux à main (Jaune)</French>
</Key>
<Key ID="STR_AGM_Grenades_M127A1_White_NameShort">
<Key ID="STR_ACE_Grenades_M127A1_White_NameShort">
<English>M127A1 (White)</English>
<German>M127A1 (Weiß)</German>
<Czech>M127A1 (Bílá)</Czech>
@ -206,7 +206,7 @@
<Russian>M127A1 (Белый)</Russian>
<Spanish>M127A1 (Blanca)</Spanish>
</Key>
<Key ID="STR_AGM_Grenades_M127A1_Red_NameShort">
<Key ID="STR_ACE_Grenades_M127A1_Red_NameShort">
<English>M127A1 (Red)</English>
<German>M127A1 (Rot)</German>
<Czech>M127A1 (Červená)</Czech>
@ -218,7 +218,7 @@
<Russian>M127A1 (Красный)</Russian>
<Spanish>M127A1 (Roja)</Spanish>
</Key>
<Key ID="STR_AGM_Grenades_M127A1_Green_NameShort">
<Key ID="STR_ACE_Grenades_M127A1_Green_NameShort">
<English>M127A1 (Green)</English>
<German>M127A1 (Grün)</German>
<Czech>M127A1 (Zelená)</Czech>
@ -230,7 +230,7 @@
<Russian>M127A1 (Зелёный)</Russian>
<Spanish>M127A1 (Verde)</Spanish>
</Key>
<Key ID="STR_AGM_Grenades_M127A1_Yellow_NameShort">
<Key ID="STR_ACE_Grenades_M127A1_Yellow_NameShort">
<English>M127A1 (Yellow)</English>
<German>M127A1 (Gelb)</German>
<Czech>M127A1 (Žlutá)</Czech>

View File

@ -0,0 +1,92 @@
ambient[] = {1.0,1.0,1.0,1.0};
diffuse[] = {1.0,1.0,1.0,1.0};
forcedDiffuse[] = {0.0,0.0,0.0,0.0};
emmisive[] = {0.0,0.0,0.0,1.0};
specular[] = {0.1,0.1,0.1,1.0};
specularPower = 95;
PixelShaderID = "Super";
VertexShaderID = "Super";
class Stage1
{
texture = "z\ace\addons\grenades\textures\ace_m84_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[] = {0,9,0};
up[] = {4.5,0,0};
dir[] = {0,0,0};
pos[] = {0,0,0};
};
};
class Stage3
{
texture = "#(argb,8,8,3)color(0.5,0.5,0.5,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 = "#(argb,8,8,3)color(1,1,1,1,AS)";
uvSource = "tex";
class uvTransform
{
aside[] = {1,0,0};
up[] = {0,1,0};
dir[] = {0,0,0};
pos[] = {0,0,0};
};
};
class Stage5
{
texture = "z\ace\addons\grenades\textures\ace_m84_smdi.paa";
uvSource = "tex";
class uvTransform
{
aside[] = {1,0,0};
up[] = {0,1,0};
dir[] = {0,0,0};
pos[] = {0,0,0};
};
};
class Stage6
{
texture = "#(ai,16,2,2)fresnel(10.4,8.3)";
uvSource = "tex";
class uvTransform
{
aside[] = {1,0,0};
up[] = {0,1,0};
dir[] = {0,0,1};
pos[] = {0,0,0};
};
};
class Stage7
{
texture = "a3\data_f\env_land_co.paa";
uvSource = "tex";
class uvTransform
{
aside[] = {1,0,0};
up[] = {0,1,0};
dir[] = {0,0,0};
pos[] = {0,0,0};
};
};