mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Remove ace_recoil (#271)
This commit is contained in:
parent
a5ff34e1d8
commit
99a90bf539
@ -1 +0,0 @@
|
||||
z\ace\addons\recoil
|
@ -1,43 +0,0 @@
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit) );
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_FiredBis_EventHandlers {
|
||||
class CAManBase {
|
||||
class ADDON {
|
||||
clientFiredBis = QUOTE(if (_this select 0 == ACE_player) then {_this call FUNC(camShake); _this call FUNC(burstDispersion);};);
|
||||
};
|
||||
};
|
||||
class Tank {
|
||||
class ADDON {
|
||||
clientFiredBis = QUOTE(if (_this select 0 == vehicle ACE_player) then {_this call FUNC(camShake);};);
|
||||
};
|
||||
};
|
||||
class Car {
|
||||
class ADDON {
|
||||
clientFiredBis = QUOTE(if (_this select 0 == vehicle ACE_player) then {_this call FUNC(camShake);};);
|
||||
};
|
||||
};
|
||||
class Helicopter {
|
||||
class ADDON {
|
||||
clientFiredBis = QUOTE(if (_this select 0 == vehicle ACE_player) then {_this call FUNC(camShake);};);
|
||||
};
|
||||
};
|
||||
class Plane {
|
||||
class ADDON {
|
||||
clientFiredBis = QUOTE(if (_this select 0 == vehicle ACE_player) then {_this call FUNC(camShake);};);
|
||||
};
|
||||
};
|
||||
class Ship_F {
|
||||
class ADDON {
|
||||
clientFiredBis = QUOTE(if (_this select 0 == vehicle ACE_player) then {_this call FUNC(camShake);};);
|
||||
};
|
||||
};
|
||||
class StaticWeapon {
|
||||
class ADDON {
|
||||
clientFiredBis = QUOTE(if (_this select 0 == vehicle ACE_player) then {_this call FUNC(camShake);};);
|
||||
};
|
||||
};
|
||||
};
|
@ -1,12 +0,0 @@
|
||||
ace_recoil
|
||||
==========
|
||||
|
||||
Overhauls the vanilla recoil, reducing muzzle climb while increasing kickback.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [KoffeinFlummi](https://github.com/KoffeinFlummi)
|
||||
- [commy2](https://github.com/commy2)
|
@ -1,8 +0,0 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
ADDON = false;
|
||||
|
||||
PREP(burstDispersion);
|
||||
PREP(camShake);
|
||||
|
||||
ADDON = true;
|
@ -1,310 +0,0 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common"};
|
||||
author[] = {"KoffeinFlummi", "TaoSensai", "commy2"};
|
||||
authorUrl = "https://github.com/Taosenai/tmr";
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
|
||||
// DOC: http://forums.bistudio.com/showthread.php?94464-explaining-the-cfgRecoils-array
|
||||
class CfgRecoils {
|
||||
#define KICKBACK 0.07
|
||||
#define KICKBACKPRONE 0.05
|
||||
|
||||
#define MUZZLECLIMB 0.01
|
||||
#define MUZZLERECOVERY -0.004
|
||||
|
||||
// BASE RECOILS
|
||||
pistolBase[] = {0,0.8*KICKBACK,0.9*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.9*MUZZLERECOVERY, 0.3,0,0};
|
||||
subMachineGunBase[] = {0,0.5*KICKBACK,0.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
assaultRifleBase[] = {0,1*KICKBACK,1*MUZZLECLIMB, 0.12,0,0, 0.15,0,1*MUZZLERECOVERY, 0.3,0,0};
|
||||
machinegunBase[] = {0,1*KICKBACK,1*MUZZLECLIMB, 0.12,0,0, 0.15,0,1*MUZZLERECOVERY, 0.3,0,0};
|
||||
launcherBase[] = {0,0,0};
|
||||
|
||||
// PISTOLS
|
||||
recoil_pistol_light[] = {0,0.8*KICKBACK,0.9*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.9*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_pistol_heavy[] = {0,1.1*KICKBACK,1.4*MUZZLECLIMB, 0.12,0,0, 0.15,0,1.4*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_prone_pistol_light[] = {0,0.8*KICKBACKPRONE,0.9*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.9*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_prone_pistol_heavy[] = {0,1.1*KICKBACKPRONE,1.4*MUZZLECLIMB, 0.12,0,0, 0.15,0,1.4*MUZZLERECOVERY, 0.3,0,0};
|
||||
|
||||
// SUBMACHINE GUNS
|
||||
recoil_single_smg_01[] = {0,0.5*KICKBACK,0.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_burst_smg_01[] = {0,0.5*KICKBACK,0.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_auto_smg_01[] = {0,0.5*KICKBACK,0.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_single_prone_smg_01[] = {0,0.5*KICKBACKPRONE,0.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_burst_prone_smg_01[] = {0,0.5*KICKBACKPRONE,0.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_auto_prone_smg_01[] = {0,0.5*KICKBACKPRONE,0.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
|
||||
recoil_single_smg_02[] = {0,0.5*KICKBACK,0.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_burst_smg_02[] = {0,0.5*KICKBACK,0.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_auto_smg_02[] = {0,0.5*KICKBACK,0.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_single_prone_smg_02[] = {0,0.5*KICKBACKPRONE,0.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_burst_prone_smg_02[] = {0,0.5*KICKBACKPRONE,0.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_auto_prone_smg_02[] = {0,0.5*KICKBACKPRONE,0.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
|
||||
recoil_single_pdw[] = {0,0.5*KICKBACK,0.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_burst_pdw[] = {0,0.5*KICKBACK,0.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_auto_pdw[] = {0,0.5*KICKBACK,0.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_single_prone_pdw[] = {0,0.5*KICKBACKPRONE,0.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_burst_prone_pdw[] = {0,0.5*KICKBACKPRONE,0.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_auto_prone_pdw[] = {0,0.5*KICKBACKPRONE,0.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
|
||||
// ASSAULT RIFLES
|
||||
recoil_single_mx[] = {0,1*KICKBACK,1*MUZZLECLIMB, 0.12,0,0, 0.15,0,1*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_auto_mx[] = {0,1*KICKBACK,1*MUZZLECLIMB, 0.12,0,0, 0.15,0,1*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_single_prone_mx[] = {0,1*KICKBACKPRONE,1*MUZZLECLIMB, 0.12,0,0, 0.15,0,1*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_auto_prone_mx[] = {0,1*KICKBACKPRONE,1*MUZZLECLIMB, 0.12,0,0, 0.15,0,1*MUZZLERECOVERY, 0.3,0,0};
|
||||
|
||||
recoil_single_ktb[] = {0,1*KICKBACK,1*MUZZLECLIMB, 0.12,0,0, 0.15,0,1*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_auto_ktb[] = {0,1*KICKBACK,1*MUZZLECLIMB, 0.12,0,0, 0.15,0,1*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_single_prone_ktb[] = {0,1*KICKBACKPRONE,1*MUZZLECLIMB, 0.12,0,0, 0.15,0,1*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_auto_prone_ktb[] = {0,1*KICKBACKPRONE,1*MUZZLECLIMB, 0.12,0,0, 0.15,0,1*MUZZLERECOVERY, 0.3,0,0};
|
||||
|
||||
recoil_single_mk20[] = {0,0.8*KICKBACK,0.8*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.8*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_auto_mk20[] = {0,0.8*KICKBACK,0.8*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.8*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_single_prone_mk20[] = {0,0.8*KICKBACKPRONE,0.8*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.8*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_auto_prone_mk20[] = {0,0.8*KICKBACKPRONE,0.8*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.8*MUZZLERECOVERY, 0.3,0,0};
|
||||
|
||||
recoil_single_trg[] = {0,0.8*KICKBACK,0.8*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.8*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_auto_trg[] = {0,0.8*KICKBACK,0.8*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.8*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_single_prone_trg[] = {0,0.8*KICKBACKPRONE,0.8*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.8*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_auto_prone_trg[] = {0,0.8*KICKBACKPRONE,0.8*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.8*MUZZLERECOVERY, 0.3,0,0};
|
||||
|
||||
recoil_single_sdar[] = {0,0.8*KICKBACK,0.8*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.8*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_auto_sdar[] = {0,0.8*KICKBACK,0.8*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.8*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_single_prone_sdar[] = {0,0.8*KICKBACKPRONE,0.8*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.8*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_auto_prone_sdar[] = {0,0.8*KICKBACKPRONE,0.8*MUZZLECLIMB, 0.12,0,0, 0.15,0,0.8*MUZZLERECOVERY, 0.3,0,0};
|
||||
|
||||
// MACHINE GUNS
|
||||
recoil_single_mk200[] = {0,1*KICKBACK,1*MUZZLECLIMB, 0.12,0,0, 0.15,0,1*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_auto_mk200[] = {0,1*KICKBACK,1*MUZZLECLIMB, 0.12,0,0, 0.15,0,1*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_single_prone_mk200[] = {0,1*KICKBACKPRONE,1*MUZZLECLIMB, 0.12,0,0, 0.15,0,1*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_auto_prone_mk200[] = {0,1*KICKBACKPRONE,1*MUZZLECLIMB, 0.12,0,0, 0.15,0,1*MUZZLERECOVERY, 0.3,0,0};
|
||||
|
||||
recoil_single_zafir[] = {0,1.5*KICKBACK,1.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,1.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_auto_zafir[] = {0,1.5*KICKBACK,1.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,1.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_single_prone_zafir[] = {0,1.5*KICKBACKPRONE,1.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,1.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_auto_prone_zafir[] = {0,1.5*KICKBACKPRONE,1.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,1.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
|
||||
// PRECISION RIFLES
|
||||
recoil_single_dmr[] = {0,1.5*KICKBACK,1.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,1.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_auto_dmr[] = {0,1.5*KICKBACK,1.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,1.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_single_prone_dmr[] = {0,1.5*KICKBACKPRONE,1.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,1.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_auto_prone_dmr[] = {0,1.5*KICKBACKPRONE,1.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,1.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
|
||||
recoil_single_ebr[] = {0,1.5*KICKBACK,1.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,1.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_auto_ebr[] = {0,1.5*KICKBACK,1.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,1.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_single_prone_ebr[] = {0,1.5*KICKBACKPRONE,1.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,1.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_auto_prone_ebr[] = {0,1.5*KICKBACKPRONE,1.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,1.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
|
||||
recoil_single_gm6[] = {0,2.5*KICKBACK,2.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,2.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
recoil_single_prone_gm6[] = {0,2.5*KICKBACKPRONE,2.5*MUZZLECLIMB, 0.12,0,0, 0.15,0,2.5*MUZZLERECOVERY, 0.3,0,0};
|
||||
|
||||
// LAUNCHERS
|
||||
recoil_single_law[] = {0,0,0};
|
||||
recoil_single_nlaw[] = {0,0,0};
|
||||
recoil_single_titan[] = {0,0,0};
|
||||
};
|
||||
|
||||
class CfgCameraShake {
|
||||
// Seems to be ignored by Arma
|
||||
defaultCaliberCoefWeaponFire = 0;
|
||||
};
|
||||
|
||||
// Completely disable BI's camshake on fire.
|
||||
class CfgMovesBasic {
|
||||
class Default {
|
||||
camShakeFire = 0;
|
||||
};
|
||||
};
|
||||
class CfgMovesMaleSdr : CfgMovesBasic {
|
||||
class States {
|
||||
class AmovPercMstpSlowWrflDnon;
|
||||
class AmovPknlMstpSlowWrflDnon : AmovPercMstpSlowWrflDnon {
|
||||
camShakeFire = 0;
|
||||
};
|
||||
class AmovPercMstpSrasWrflDnon;
|
||||
class AmovPpneMstpSrasWrflDnon : AmovPercMstpSrasWrflDnon {
|
||||
camShakeFire = 0;
|
||||
};
|
||||
class AmovPknlMstpSrasWlnrDnon : Default {
|
||||
camShakeFire = 0;
|
||||
};
|
||||
class AmovPknlMrunSlowWrflDf;
|
||||
class AmovPknlMtacSlowWrflDf : AmovPknlMrunSlowWrflDf {
|
||||
camShakeFire = 0;
|
||||
};
|
||||
class AmovPknlMrunSlowWrflDfl;
|
||||
class AmovPknlMtacSlowWrflDfl : AmovPknlMrunSlowWrflDfl {
|
||||
camShakeFire = 0;
|
||||
};
|
||||
class AmovPknlMrunSlowWrflDl;
|
||||
class AmovPknlMtacSlowWrflDl : AmovPknlMrunSlowWrflDl {
|
||||
camShakeFire = 0;
|
||||
};
|
||||
class AmovPknlMrunSlowWrflDbl;
|
||||
class AmovPknlMtacSlowWrflDbl : AmovPknlMrunSlowWrflDbl {
|
||||
camShakeFire = 0;
|
||||
};
|
||||
class AmovPknlMrunSlowWrflDb;
|
||||
class AmovPknlMtacSlowWrflDb : AmovPknlMrunSlowWrflDb {
|
||||
camShakeFire = 0;
|
||||
};
|
||||
class AmovPknlMrunSlowWrflDbr;
|
||||
class AmovPknlMtacSlowWrflDbr : AmovPknlMrunSlowWrflDbr {
|
||||
camShakeFire = 0;
|
||||
};
|
||||
class AmovPknlMrunSlowWrflDr;
|
||||
class AmovPknlMtacSlowWrflDr : AmovPknlMrunSlowWrflDr {
|
||||
camShakeFire = 0;
|
||||
};
|
||||
class AmovPknlMrunSlowWrflDfr;
|
||||
class AmovPknlMtacSlowWrflDfr : AmovPknlMrunSlowWrflDfr {
|
||||
camShakeFire = 0;
|
||||
};
|
||||
class AmovPknlMstpSrasWrflDnon;
|
||||
class AmovPknlMwlkSrasWrflDf : AmovPknlMstpSrasWrflDnon {
|
||||
camShakeFire = 0;
|
||||
};
|
||||
class AmovPknlMrunSrasWrflDf;
|
||||
class AmovPknlMtacSrasWrflDf : AmovPknlMrunSrasWrflDf {
|
||||
camShakeFire = 0;
|
||||
};
|
||||
class AmovPknlMwlkSrasWpstDf;
|
||||
class AmovPknlMtacSrasWpstDf : AmovPknlMwlkSrasWpstDf {
|
||||
camShakeFire = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// Ammo
|
||||
class CfgAmmo {
|
||||
class MissileCore;
|
||||
class MissileBase: MissileCore {
|
||||
GVAR(shakeMultiplier) = 2;
|
||||
};
|
||||
|
||||
class BombCore;
|
||||
class LaserBombCore: BombCore {
|
||||
GVAR(shakeMultiplier) = 2;
|
||||
};
|
||||
class Bo_Mk82: BombCore {
|
||||
GVAR(shakeMultiplier) = 2;
|
||||
};
|
||||
|
||||
class RocketCore;
|
||||
class ArtilleryRocketCore: RocketCore {
|
||||
GVAR(shakeMultiplier) = 1.4;
|
||||
};
|
||||
class RocketBase: RocketCore {
|
||||
GVAR(shakeMultiplier) = 1.4;
|
||||
};
|
||||
|
||||
class BulletCore;
|
||||
class BulletBase: BulletCore {
|
||||
GVAR(shakeMultiplier) = 1;
|
||||
};
|
||||
|
||||
class ShotgunCore;
|
||||
class ShotgunBase: ShotgunCore {
|
||||
GVAR(shakeMultiplier) = 1.1;
|
||||
};
|
||||
|
||||
class ShellCore;
|
||||
class ShellBase: ShellCore {
|
||||
GVAR(shakeMultiplier) = 3;
|
||||
};
|
||||
|
||||
class SubmunitionCore;
|
||||
class SubmunitionBase: SubmunitionCore {
|
||||
GVAR(shakeMultiplier) = 3;
|
||||
};
|
||||
|
||||
class ShotDeployCore;
|
||||
class ShotDeployBase: ShotDeployCore {
|
||||
GVAR(shakeMultiplier) = 3;
|
||||
};
|
||||
};
|
||||
|
||||
// Weapons
|
||||
// 1. Set the recoil profiles for all fire modes.
|
||||
// 2. Set the shake multiplier. This determines the camshake for the weapon.
|
||||
// Ex: GVAR(shakeMultiplier) = 1; (disabled currently)
|
||||
|
||||
class CfgWeapons {
|
||||
class CannonCore;
|
||||
class autocannon_Base_F: CannonCore {
|
||||
GVAR(shakeMultiplier) = 0;
|
||||
};
|
||||
class autocannon_35mm: CannonCore {
|
||||
GVAR(shakeMultiplier) = 0;
|
||||
};
|
||||
class cannon_120mm: CannonCore {
|
||||
GVAR(shakeMultiplier) = 0;
|
||||
};
|
||||
class mortar_155mm_AMOS: CannonCore {
|
||||
GVAR(shakeMultiplier) = 0;
|
||||
};
|
||||
class mortar_82mm: CannonCore {
|
||||
GVAR(shakeMultiplier) = 0;
|
||||
};
|
||||
|
||||
// No camshake for gatlings
|
||||
class gatling_20mm: CannonCore {
|
||||
GVAR(shakeMultiplier) = 0;
|
||||
};
|
||||
class gatling_25mm: CannonCore {
|
||||
GVAR(shakeMultiplier) = 0;
|
||||
};
|
||||
class gatling_30mm: CannonCore {
|
||||
GVAR(shakeMultiplier) = 0;
|
||||
};
|
||||
|
||||
class MGunCore;
|
||||
class MGun: MGunCore {
|
||||
GVAR(shakeMultiplier) = 0;
|
||||
};
|
||||
// No camshake for smoke launchers
|
||||
class SmokeLauncher: MGun {
|
||||
GVAR(shakeMultiplier) = 0;
|
||||
};
|
||||
|
||||
// No camshake for coax machine guns
|
||||
class LMG_RCWS;
|
||||
class LMG_M200: LMG_RCWS {
|
||||
GVAR(shakeMultiplier) = 0;
|
||||
};
|
||||
class LMG_coax: LMG_RCWS {
|
||||
GVAR(shakeMultiplier) = 0;
|
||||
};
|
||||
class LMG_Minigun: LMG_RCWS {
|
||||
GVAR(shakeMultiplier) = 0;
|
||||
};
|
||||
};
|
||||
|
||||
// Vehicles
|
||||
class CfgVehicles {
|
||||
class LandVehicle;
|
||||
class Tank: LandVehicle {
|
||||
GVAR(enableCamshake) = 1;
|
||||
};
|
||||
class Car: LandVehicle {
|
||||
GVAR(enableCamshake) = 1;
|
||||
};
|
||||
class StaticWeapon: LandVehicle {
|
||||
GVAR(enableCamshake) = 1;
|
||||
};
|
||||
|
||||
class Allvehicles;
|
||||
class Air: Allvehicles {
|
||||
GVAR(enableCamshake) = 1;
|
||||
};
|
||||
};
|
@ -1,62 +0,0 @@
|
||||
// TMR: Small Arms - Recoil initialization and functions
|
||||
// (C) 2013 Ryan Schultz. See LICENSE.
|
||||
// Edited for compatability in ACE by KoffeinFlummi
|
||||
// Edited by commy2
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_weapon", "_projectile"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_weapon = _this select 1;
|
||||
_projectile = _this select 6;
|
||||
|
||||
if (_weapon in ["Throw", "Put"]) exitWith {};
|
||||
|
||||
private ["_lastFired", "_burst"];
|
||||
|
||||
_lastFired = _unit getVariable [QUOTE(GVAR(lastFired)), -1];
|
||||
_burst = _unit getVariable [QUOTE(GVAR(burst)), 0];
|
||||
|
||||
if (time - _lastFired < 0.45) then {
|
||||
private "_startDisperse";
|
||||
_burst = _burst + 1;
|
||||
_unit setVariable [QUOTE(GVAR(burst)), _burst, false];
|
||||
|
||||
_startDisperse = [1, 3] select (cameraView == "GUNNER");
|
||||
|
||||
if (_burst > _startDisperse) then {
|
||||
// Reset burst size for calcs
|
||||
_burst = _burst - _startDisperse;
|
||||
|
||||
// Increase dispersion cap if player is not using sights
|
||||
_sightsBurst = [30, 0] select (cameraView == "GUNNER");
|
||||
|
||||
// Increase initial dispersion and cap if player is moving
|
||||
if (speed _unit > 0.5) then {
|
||||
_sightsBurst = 25;
|
||||
_burst = _burst + 15;
|
||||
};
|
||||
|
||||
// Maximum possible dispersion (without _sightsBurst mod)
|
||||
_maxBurst = 50;
|
||||
|
||||
if (_unit getVariable [QUOTE(EGVAR(resting,weaponRested)), false]) then {_maxBurst = 25};
|
||||
if (_unit getVariable [QUOTE(EGVAR(resting,bipodDeployed)), false]) then {_maxBurst = 18};
|
||||
|
||||
// Cap the dispersion
|
||||
_burst = (_burst min _maxBurst) + _sightsBurst;
|
||||
|
||||
// Add random variance
|
||||
_elevAngle = (_burst / 300) - random (_burst / 300) * 2;
|
||||
_travAngle = (_burst / 260) - random (_burst / 260) * 2;
|
||||
|
||||
[_projectile, _travAngle, _elevAngle] call EFUNC(common,changeProjectileDirection);
|
||||
};
|
||||
} else {
|
||||
|
||||
// Long enough delay, reset burst
|
||||
_unit setVariable [QUOTE(GVAR(burst)), 0, false];
|
||||
};
|
||||
|
||||
_unit setVariable [QUOTE(GVAR(lastFired)), time, false];
|
@ -1,61 +0,0 @@
|
||||
// TMR: Small Arms - Recoil initialization and functions
|
||||
// (C) 2013 Ryan Schultz. See LICENSE.
|
||||
// Edited for compatability in ACE by KoffeinFlummi
|
||||
// Edited by commy2
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define BASE_POWER 0.40
|
||||
#define BASE_TIME 0.19
|
||||
#define BASE_FREQ 13
|
||||
#define RECOIL_COEF 40
|
||||
|
||||
private ["_unit", "_weapon", "_muzzle", "_ammo"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_weapon = _this select 1;
|
||||
_muzzle = _this select 2;
|
||||
_ammo = _this select 4;
|
||||
|
||||
if (_weapon in [handgunWeapon _unit, "Throw", "Put"]) exitWith {};
|
||||
|
||||
private ["_powerMod", "_timeMod", "_freqMod", "_powerCoef"];
|
||||
|
||||
_powerMod = ([0, -0.1, -0.1, 0, -0.2] select (["STAND", "CROUCH", "PRONE", "UNDEFINED", ""] find stance _unit)) + ([0, -1, 0, -1] select (["INTERNAL", "EXTERNAL", "GUNNER", "GROUP"] find cameraView));
|
||||
_timeMod = 0;
|
||||
_freqMod = 0;
|
||||
|
||||
_powerCoef = 0;
|
||||
if (_unit != vehicle _unit) then {
|
||||
_powerCoef = getNumber (configFile >> "CfgWeapons" >> _weapon >> QUOTE(GVAR(shakeMultiplier)));
|
||||
_powerCoef = _powerCoef * getNumber (configFile >> "CfgAmmo" >> _ammo >> QUOTE(GVAR(shakeMultiplier)));
|
||||
} else {
|
||||
private ["_type", "_config", "_recoil"];
|
||||
|
||||
_type = ["recoil", "recoilProne"] select (stance _unit == "PRONE");
|
||||
|
||||
_config = configFile >> "CfgWeapons" >> _weapon;
|
||||
_recoil = if (_muzzle == _weapon) then {
|
||||
getText (_config >> _type)
|
||||
} else {
|
||||
getText (_config >> _muzzle >> _type)
|
||||
};
|
||||
|
||||
_recoil = getArray (configFile >> "CfgRecoils" >> _recoil);
|
||||
if (count _recoil < 2) exitWith {};
|
||||
|
||||
_powerCoef = _recoil select 1;
|
||||
_powerCoef = (call compile format ["%1", _powerCoef]) * RECOIL_COEF;
|
||||
};
|
||||
|
||||
if (_unit getVariable [QUOTE(EGVAR(resting,weaponRested)), false]) then {_powerMod = _powerMod - 0.07};
|
||||
if (_unit getVariable [QUOTE(EGVAR(resting,bipodDeployed)), false]) then {_powerMod = _powerMod - 0.11};
|
||||
|
||||
private "_camshake";
|
||||
_camshake = [
|
||||
_powerCoef * (BASE_POWER + _powerMod) max 0,
|
||||
BASE_TIME + _timeMod max 0,
|
||||
BASE_FREQ + _freqMod max 0
|
||||
];
|
||||
|
||||
addCamShake _camshake;
|
@ -1,12 +0,0 @@
|
||||
#define COMPONENT recoil
|
||||
#include "\z\ace\Addons\main\script_mod.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_RECOIL
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_SETTINGS_RECOIL
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_RECOIL
|
||||
#endif
|
||||
|
||||
#include "\z\ace\Addons\main\script_macros.hpp"
|
@ -1,12 +0,0 @@
|
||||
#define COMPONENT recoil
|
||||
#include "\z\ace\Addons\main\script_mod.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_RECOIL
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_SETTINGS_RECOIL
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_RECOIL
|
||||
#endif
|
||||
|
||||
#include "\z\ace\Addons\main\script_macros.hpp"
|
Loading…
Reference in New Issue
Block a user