From 5eededd3e1a9808418cd3ca73797bfe47513bcba Mon Sep 17 00:00:00 2001 From: commy2 Date: Wed, 15 Apr 2015 15:01:07 +0200 Subject: [PATCH] Recoil overhaul initial commmit --- addons/recoil/$PBOPREFIX$ | 1 + addons/recoil/CfgRecoils.hpp | 240 +++++++++++++++++++++++++++++ addons/recoil/config.cpp | 15 ++ addons/recoil/script_component.hpp | 12 ++ 4 files changed, 268 insertions(+) create mode 100644 addons/recoil/$PBOPREFIX$ create mode 100644 addons/recoil/CfgRecoils.hpp create mode 100644 addons/recoil/config.cpp create mode 100644 addons/recoil/script_component.hpp diff --git a/addons/recoil/$PBOPREFIX$ b/addons/recoil/$PBOPREFIX$ new file mode 100644 index 0000000000..1ab9ffa5e1 --- /dev/null +++ b/addons/recoil/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\recoil \ No newline at end of file diff --git a/addons/recoil/CfgRecoils.hpp b/addons/recoil/CfgRecoils.hpp new file mode 100644 index 0000000000..27283e71f1 --- /dev/null +++ b/addons/recoil/CfgRecoils.hpp @@ -0,0 +1,240 @@ + +class CfgRecoils { + class Default { + muzzleOuter[] = {0,"0.4f","0.5f","0.6f"}; + muzzleInner[] = {0,"0.05f","0.2f","0.2f"}; + kickBack[] = {"0.05f",0.1}; + permanent = 0.1; + temporary = 0.01; + }; + + class recoil_default: Default { + muzzleOuter[] = {0.3,1,0.3,0.2}; + muzzleInner[] = {0,0,0.1,0.1}; + kickBack[] = {0.03,0.06}; + permanent = 0.1; + temporary = 0.01; + }; + + class recoil_mk20: recoil_default { + muzzleOuter[] = {0.2,0.6,0.2,0.2}; + kickBack[] = {0.01,0.03}; + temporary = 0.01; + }; + + class recoil_mk20c: recoil_default { + muzzleOuter[] = {0.2,0.8,0.3,0.2}; + kickBack[] = {0.02,0.04}; + temporary = 0.015; + }; + + class recoil_trg20: recoil_default { + muzzleOuter[] = {0.2,1,0.3,0.3}; + kickBack[] = {0.02,0.04}; + temporary = 0.015; + }; + + class recoil_trg21: recoil_default { + muzzleOuter[] = {0.2,0.8,0.3,0.2}; + kickBack[] = {0.01,0.03}; + temporary = 0.01; + }; + + class recoil_mx: recoil_default { + muzzleOuter[] = {0.3,1,0.4,0.3}; + kickBack[] = {0.02,0.04}; + temporary = 0.01; + }; + + class recoil_mxc: recoil_default { + muzzleOuter[] = {0.3,1.2,0.4,0.3}; + kickBack[] = {0.03,0.06}; + temporary = 0.015; + }; + + class recoil_sw: recoil_default { + muzzleOuter[] = {0.3,0.8,0.5,0.2}; + kickBack[] = {0.02,0.04}; + temporary = 0.005; + }; + + class recoil_mxm: recoil_default { + muzzleOuter[] = {0.3,0.8,0.4,0.3}; + kickBack[] = {0.02,0.04}; + temporary = 0.01; + }; + + class recoil_ktb: recoil_default { + muzzleOuter[] = {0.3,1,0.3,0.3}; + kickBack[] = {0.02,0.04}; + temporary = 0.01; + }; + + class recoil_ktbc: recoil_default { + muzzleOuter[] = {0.3,1.2,0.3,0.3}; + kickBack[] = {0.03,0.06}; + temporary = 0.015; + }; + + class recoil_smg_01: recoil_default { + muzzleOuter[] = {0.1,0.8,0.3,0.2}; + kickBack[] = {0.01,0.03}; + temporary = 0.015; + }; + + class recoil_smg_02: recoil_default { + muzzleOuter[] = {0.1,0.6,0.2,0.2}; + kickBack[] = {0.01,0.02}; + temporary = 0.01; + }; + + class recoil_pdw: recoil_default { + muzzleOuter[] = {0.2,1,0.3,0.3}; + kickBack[] = {0.02,0.04}; + temporary = 0.02; + }; + + class recoil_sdar: recoil_default { + muzzleOuter[] = {0.2,1,0.3,0.3}; + kickBack[] = {0.02,0.04}; + temporary = 0.01; + }; + + class recoil_pistol_p07: recoil_default { + muzzleOuter[] = {0.2,1,0.2,0.3}; + kickBack[] = {0.03,0.06}; + temporary = 0.03; + }; + + class recoil_pistol_rook40: recoil_default { + muzzleOuter[] = {0.2,1,0.2,0.3}; + kickBack[] = {0.03,0.06}; + temporary = 0.02; + }; + + class recoil_pistol_acpc2: recoil_default { + muzzleOuter[] = {0.2,1.5,0.2,0.3}; + kickBack[] = {0.04,0.08}; + temporary = 0.04; + }; + + class recoil_pistol_4five: recoil_default { + muzzleOuter[] = {0.2,1.5,0.2,0.3}; + kickBack[] = {0.04,0.08}; + temporary = 0.06; + }; + + class recoil_pistol_zubr: recoil_default { + muzzleOuter[] = {0.2,1.5,0.2,0.3}; + kickBack[] = {0.04,0.08}; + temporary = 0.08; + }; + + class recoil_pistol_signal: recoil_default { + muzzleOuter[] = {0.2,1.5,0.2,0.3}; + kickBack[] = {0.02,0.04}; + temporary = 0.02; + }; + + class recoil_rpg: recoil_default { + muzzleOuter[] = {2,3,1,0.5}; + kickBack[] = {0.08,0.1}; + temporary = 0.1; + }; + + class recoil_nlaw: recoil_default { + muzzleOuter[] = {2,3,1,0.5}; + kickBack[] = {0.06,0.08}; + temporary = 0.08; + }; + + class recoil_titan_long: recoil_default { + muzzleOuter[] = {2,3,1,0.5}; + kickBack[] = {0.1,0.12}; + temporary = 0.15; + }; + + class recoil_titan_short: recoil_default { + muzzleOuter[] = {2,3,1,0.5}; + kickBack[] = {0.1,0.12}; + temporary = 0.12; + }; + + class recoil_mk200: recoil_default { + muzzleOuter[] = {0.4,0.6,0.6,0.2}; + kickBack[] = {0.03,0.06}; + temporary = 0.005; + }; + + class recoil_zafir: recoil_default { + muzzleOuter[] = {0.5,1,0.7,0.3}; + kickBack[] = {0.02,0.08}; + temporary = 0.005; + }; + + class recoil_m320: recoil_default { + muzzleOuter[] = {1,3,0.5,0.6}; + kickBack[] = {0.08,0.1}; + temporary = 0.02; + }; + + class recoil_gm6: recoil_default { + muzzleOuter[] = {1.4,3.5,0.7,0.8}; + kickBack[] = {0.1,0.12}; + temporary = 0.025; + }; + + class recoil_ebr: recoil_default { + muzzleOuter[] = {0.4,1.5,0.6,0.4}; + kickBack[] = {0.04,0.07}; + temporary = 0.01; + }; + + class recoil_dmr_01: recoil_default { + muzzleOuter[] = {0.5,2,0.5,0.5}; + kickBack[] = {0.03,0.08}; + temporary = 0.015; + }; + + class recoil_dmr_02: recoil_default { + muzzleOuter[] = {0.5,2.5,0.6,0.5}; + kickBack[] = {0.06,0.08}; + temporary = 0.01; + }; + + class recoil_dmr_03: recoil_default { + muzzleOuter[] = {0.3,1.5,0.5,0.4}; + kickBack[] = {0.03,0.06}; + temporary = 0.005; + }; + + class recoil_dmr_04: recoil_default { + muzzleOuter[] = {0.4,1.5,0.5,0.4}; + kickBack[] = {0.02,0.04}; + temporary = 0.015; + }; + + class recoil_dmr_05: recoil_default { + muzzleOuter[] = {0.5,2.5,0.8,0.6}; + kickBack[] = {0.08,0.1}; + temporary = 0.01; + }; + + class recoil_dmr_06: recoil_default { + muzzleOuter[] = {0.5,2,0.7,0.5}; + kickBack[] = {0.05,0.1}; + temporary = 0.01; + }; + + class recoil_mmg_01: recoil_default { + muzzleOuter[] = {0.6,1.5,0.8,0.3}; + kickBack[] = {0.02,0.08}; + temporary = 0.005; + }; + + class recoil_mmg_02: recoil_default { + muzzleOuter[] = {0.5,1.5,0.6,0.4}; + kickBack[] = {0.04,0.08}; + temporary = 0.005; + }; +}; diff --git a/addons/recoil/config.cpp b/addons/recoil/config.cpp new file mode 100644 index 0000000000..1e2ce69fae --- /dev/null +++ b/addons/recoil/config.cpp @@ -0,0 +1,15 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common"}; + author[] = {"commy2"}; + authorUrl = ""; + VERSION_CONFIG; + }; +}; + +#include "CfgRecoils.hpp" diff --git a/addons/recoil/script_component.hpp b/addons/recoil/script_component.hpp new file mode 100644 index 0000000000..b5a74ec8dd --- /dev/null +++ b/addons/recoil/script_component.hpp @@ -0,0 +1,12 @@ +#define COMPONENT recoil +#include "\z\ace\addons\main\script_mod.hpp" + +#ifdef DEBUG_ENABLED_RECOIL + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_ENABLED_RECOIL + #define DEBUG_SETTINGS DEBUG_ENABLED_RECOIL +#endif + +#include "\z\ace\addons\main\script_macros.hpp" \ No newline at end of file