Cleanup++:

*Moved GVAR(enabled) into ACE_Settings.hpp
*Replaced BIS_fnc_magnitude with vectorMagnitude
*Renamed Nou_GBU12
*Added G_40mm_HE config data
This commit is contained in:
ulteq 2015-04-26 23:14:54 +02:00
parent 6170ef0d50
commit 1fc044dfa9
6 changed files with 21 additions and 10 deletions

View File

@ -0,0 +1,8 @@
class ACE_Settings {
class GVAR(enabled) {
displayName = "Frag System";
description = "Enables the shrapnel system for explosives";
typeName = "BOOL";
value = 1;
};
};

View File

@ -9,7 +9,7 @@ class CfgAmmo {
// GVAR(skip) = 1;
//};
class Bo_GBU12_LGB;
class Nou_GBU12 : Bo_GBU12_LGB {
class ACE_GBU12 : Bo_GBU12_LGB {
GVAR(classes)[] = {"ACE_frag_large", "ACE_frag_large", "ACE_frag_large_HD", "ACE_frag_large", "ACE_frag_huge", "ACE_frag_huge_HD", "ACE_frag_huge"};
GVAR(metal) = 140000;
GVAR(charge) = 87000;
@ -71,8 +71,11 @@ class CfgAmmo {
class G_40mm_HE: GrenadeBase {
GVAR(skip) = 0;
GVAR(force) = 1;
GVAR(classes)[] = {"ACE_frag_tiny_HD"};
GVAR(metal) = 200;
GVAR(charge) = 45;
GVAR(gurney_c) = 2830;
GVAR(gurney_k) = 3/5;
};
class ACE_G_40mm_HEDP: G_40mm_HE {

View File

@ -22,9 +22,6 @@ GVAR(traceID) = -1;
GVAR(traces) = [];
GVAR(tracesStarted) = false;
// TODO setting
GVAR(enabled) = true;
// * Other Shit */
PREP(addTrack);
PREP(drawTraces);

View File

@ -11,4 +11,5 @@ class CfgPatches {
};
#include "CfgEventhandlers.hpp"
#include "CfgAmmo.hpp"
#include "CfgAmmo.hpp"
#include "ACE_Settings.hpp"

View File

@ -45,8 +45,8 @@ if(_alive || {_caliber >= 2.5} || {(_explosive > 0 && {_idh >= 1})}) then {
_vm = 1;
_velocity = _initialData select 5;
_oldVelocity = _velocity call BIS_fnc_magnitude;
_curVelocity = (velocity _round) call BIS_fnc_magnitude;
_oldVelocity = vectorMagnitude _velocity;
_curVelocity = vectorMagnitude (velocity _round);
if(alive _round) then {
_diff = _velocity vectorDiff (velocity _round);

View File

@ -1,6 +1,8 @@
#include "script_component.hpp"
private ["_gun", "_type", "_round", "_doFragTrack", "_doSpall"];
if !(!isNil QGVAR(enabled) && {GVAR(enabled)}) exitWith {};
if (!GVAR(enabled)) exitWith {};
_gun = _this select 0;
_type = _this select 4;