Skip to content

Commit

Permalink
Merge pull request #3 from acemod/master
Browse files Browse the repository at this point in the history
update my master fork
  • Loading branch information
Legolasindar committed Apr 15, 2015
2 parents e7a8dde + 98d0c06 commit 3775db2
Show file tree
Hide file tree
Showing 586 changed files with 18,464 additions and 9,415 deletions.
10 changes: 10 additions & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ ACCtomeek <[email protected]>
Adanteh
aeroson
Aggr094 <[email protected]>
Anthariel <[email protected]>
BlackQwar
Brakoviejo
Codingboy
Expand All @@ -47,15 +48,19 @@ GieNkoV <[email protected]>
gpgpgpgp
Grzegorz
Hamburger SV
Harakhti <[email protected]>
havena <[email protected]>
Hawkins
jokoho48
Jonpas <[email protected]>
Kllrt <[email protected]>
Legolasindar "Viper" <[email protected]>
licht-im-Norden87 <[email protected]>
MarcBook
meat <[email protected]>
Michail Nikolaev
nic547 <[email protected]>
nomisum <[email protected]>
oscarmolinadev
pokertour
rakowozz
Expand All @@ -69,3 +74,8 @@ Tourorist <[email protected]>
Valentin Torikian <[email protected]>
zGuba
Aleksey EpMAK Yermakov <[email protected]>
ruPaladin <[email protected]>
BlackPixxel
Asgar Serran <[email protected]>
Kavinsky <[email protected]>
Coren <[email protected]>
Binary file added ace_advanced_ballistics.dll
Binary file not shown.
Binary file added ace_breakLine.dll
Binary file not shown.
Binary file modified ace_fcs.dll
Binary file not shown.
64 changes: 64 additions & 0 deletions addons/advanced_ballistics/ACE_Settings.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
class ACE_Settings {
class GVAR(enabled) {
displayName = "Advanced Ballistics";
description = "Enables advanced ballistics";
typeName = "BOOL";
value = 0;
};
class GVAR(alwaysSimulateForSnipers) {
displayName = "Always Enabled For Snipers";
description = "Always enables advanced ballistics when high power optics are used";
typeName = "BOOL";
value = 1;
};
class GVAR(disabledInFullAutoMode) {
displayName = "Disabled In FullAuto Mode";
description = "Disables the advanced ballistics during full auto fire";
typeName = "BOOL";
value = 0;
};
class GVAR(onlyActiveForLocalPlayers) {
displayName = "Disabled For Non Local Players";
description = "Disables the advanced ballistics for bullets coming from other players (enable this if you encounter frame drops during heavy firefights in multiplayer)";
typeName = "BOOL";
value = 1;
};
/* // TODO: We currently do not have firedEHs on vehicles
class GVAR(vehicleGunnerEnabled) {
displayName = "Enabled For Vehicle Gunners";
description = "Enables advanced ballistics for vehicle gunners";
typeName = "BOOL";
value = 0;
};
*/
class GVAR(ammoTemperatureEnabled) {
displayName = "Enable Ammo Temperature Simulation";
description = "Muzzle velocity varies with ammo temperature";
typeName = "BOOL";
value = 1;
};
class GVAR(barrelLengthInfluenceEnabled) {
displayName = "Enable Barrel Length Simulation";
description = "Muzzle velocity varies with barrel length";
typeName = "BOOL";
value = 1;
};
class GVAR(bulletTraceEnabled) {
displayName = "Enable Bullet Trace Effect";
description = "Enables a bullet trace effect to high caliber bullets (only visible when looking through high power optics)";
typeName = "BOOL";
value = 1;
};
class GVAR(simulationInterval) {
displayName = "Simulation Interval";
description = "Defines the interval between every calculation step";
typeName = "SCALAR";
value = 0.0;
};
class GVAR(simulationRadius) {
displayName = "Simulation Radius";
description = "Defines the radius (in meters) in which advanced ballistics are applied";
typeName = "SCALAR";
value = 3000;
};
};
19 changes: 19 additions & 0 deletions addons/advanced_ballistics/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
};
};

class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE( call COMPILE_FILE(XEH_postInit) );
};
};

class Extended_FiredBIS_EventHandlers {
class CAManBase {
class ADDON {
firedBIS = QUOTE(_this call FUNC(handleFired));
};
};
};
78 changes: 78 additions & 0 deletions addons/advanced_ballistics/CfgVehicles.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
class CfgVehicles {
class ACE_Module;
class GVAR(ModuleSettings): ACE_Module {
scope = 2;
displayName = "Advanced Ballistics";
icon = QUOTE(PATHTOF(UI\Icon_Module_Wind_ca.paa));
category = "ACE";
function = QUOTE(DFUNC(initModuleSettings));
functionPriority = 1;
isGlobal = 1;
isTriggerActivated = 0;
author = "Ruthberg";
class Arguments {
class enabled {
displayName = "Advanced Ballistics";
description = "Enables advanced ballistics";
typeName = "BOOL";
defaultValue = 0;
};
class alwaysSimulateForSnipers {
displayName = "Always Enabled For Snipers";
description = "Always enables advanced ballistics when high power optics are used";
typeName = "BOOL";
defaultValue = 1;
};
class disabledInFullAutoMode {
displayName = "Disabled In FullAuto Mode";
description = "Disables the advanced ballistics during full auto fire";
typeName = "BOOL";
defaultValue = 0;
};
class onlyActiveForLocalPlayers {
displayName = "Disabled For Non Local Players";
description = "Disables the advanced ballistics for bullets coming from other players (enable this if you encounter frame drops during heavy firefights in multiplayer)";
typeName = "BOOL";
defaultValue = 1;
};
/* // TODO: We currently do not have firedEHs on vehicles
class vehicleGunnerEnabled {
displayName = "Enabled For Vehicle Gunners";
description = "Enables advanced ballistics for vehicle gunners";
typeName = "BOOL";
defaultValue = 0;
};
*/
class ammoTemperatureEnabled {
displayName = "Enable Ammo Temperature Simulation";
description = "Muzzle velocity varies with ammo temperature";
typeName = "BOOL";
defaultValue = 1;
};
class barrelLengthInfluenceEnabled {
displayName = "Enable Barrel Length Simulation";
description = "Muzzle velocity varies with barrel length";
typeName = "BOOL";
defaultValue = 1;
};
class bulletTraceEnabled {
displayName = "Enable Bullet Trace Effect";
description = "Enables a bullet trace effect to high caliber bullets (only visible when looking through high power optics)";
typeName = "BOOL";
defaultValue = 1;
};
class simulationInterval {
displayName = "Simulation Interval";
description = "Defines the interval between every calculation step";
typeName = "NUMBER";
defaultValue = 0.0;
};
class simulationRadius {
displayName = "Simulation Radius";
description = "Defines the radius (in meters) in which advanced ballistics are applied";
typeName = "NUMBER";
defaultValue = 3000;
};
};
};
};
10 changes: 10 additions & 0 deletions addons/advanced_ballistics/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
ace_advanced_ballistics
===============

The Advanced Ballistics module introduces advanced external- and internal ballistics to the game.

## Maintainers

The people responsible for merging changes to this component or answering potential questions.

- [Ruthberg] (http://github.com/Ulteq)
63 changes: 63 additions & 0 deletions addons/advanced_ballistics/RscTitles.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
class RscTitles
{
class RscTurretDial
{
idd=-1;
onLoad="with uiNameSpace do { RscTurretDial = _this select 0 };";
movingEnable=0;
duration=5;
fadeIn="false";
fadeOut="false";
class controls
{
class RscTurretDial
{
idc=132949;
type=0;
style=128;
font="TahomaB";
colorBackground[]={0,0,0,0.8};
colorText[]={1,1,1,1};
x="SafeZoneX + 0.0025";
y="SafeZoneY + 0.0025";
w=0.10;
h=0.05;
sizeEx=0.03;
text="";
};
};
};

class RscProtractor
{
idd=-1;
onLoad="with uiNameSpace do { RscProtractor = _this select 0 };";
movingEnable=0;
duration=60;
fadeIn="false";
fadeOut="false";
class controls
{
class RscProtractorBase
{
idc=132950;
type=0;
style=48;
font="TahomaB";
colorBackground[]={0,0,0,0};
colorText[]={1,1,1,1};
x="SafeZoneX + 0.001";
y="SafeZoneY + 0.001";
w=0.2;
h=0.2*4/3;
size=0.034;
sizeEx=0.027;
text="";
};
class RscProtractorMarker : RscProtractorBase
{
idc=132951;
};
};
};
};
Binary file not shown.
Binary file added addons/advanced_ballistics/UI/protractor.paa
Binary file not shown.
Binary file not shown.
45 changes: 45 additions & 0 deletions addons/advanced_ballistics/XEH_postInit.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#include "script_component.hpp"

#include "initKeybinds.sqf"

GVAR(currentbulletID) = -1;

GVAR(bulletDatabase) = [];
GVAR(bulletDatabaseStartTime) = [];
GVAR(bulletDatabaseSpeed) = [];
GVAR(bulletDatabaseFrames) = [];
GVAR(bulletDatabaseLastFrame) = [];
GVAR(bulletDatabaseHDeflect) = [];
GVAR(bulletDatabaseSpinDrift) = [];
GVAR(bulletDatabaseOccupiedIndices) = [];
GVAR(bulletDatabaseFreeIndices) = [];

GVAR(WindInfo) = false;
GVAR(WindInfoStart) = time;

GVAR(Protractor) = false;
GVAR(ProtractorStart) = time;

// Those are only used in the pure sqf version (extension free PFH)
GVAR(SimulationPrecision) = 2;
GVAR(WindEnabled) = true;
GVAR(SpinDriftEnabled) = true;
GVAR(CoriolisEnabled) = true;
GVAR(EoetvoesEnabled) = true;
GVAR(AdvancedAirDragEnabled) = true;
GVAR(TransonicRegionEnabled) = true;
GVAR(AtmosphericDensitySimulationEnabled) = true;

GVAR(currentGrid) = 0;
GVAR(INIT_MESSAGE_ENABLED) = false;

GVAR(extensionAvailable) = "ace_advanced_ballistics" callExtension "version" == "1.0";
if (!GVAR(extensionAvailable)) exitWith {
if ("ace_advanced_ballistics" callExtension "version" == "") then {
diag_log text "[ACE] ERROR: ace_advanced_ballistics.dll is missing";
} else {
diag_log text "[ACE] ERROR: ace_advanced_ballistics.dll is incompatible";
};
};

[] call FUNC(initializeTerrainExtension);
18 changes: 18 additions & 0 deletions addons/advanced_ballistics/XEH_preInit.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include "script_component.hpp"

ADDON = false;

PREP(calculateAirDensity);
PREP(calculateAmmoTemperatureVelocityShift);
PREP(calculateAtmosphericCorrection);
PREP(calculateBarrelLengthVelocityShift);
PREP(calculateRetardation);
PREP(calculateRoughnessLength);
PREP(calculateStabilityFactor);
PREP(calculateWindSpeed);
PREP(displayProtractor);
PREP(handleFired);
PREP(initializeTerrainExtension);
PREP(initModuleSettings);

ADDON = true;
18 changes: 18 additions & 0 deletions addons/advanced_ballistics/config.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include "script_component.hpp"

class CfgPatches {
class ADDON {
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_ballistics", "ace_weather", "ace_modules"};
author[] = {"Ruthberg"};
authorUrl = "https://github.com/ulteq";
VERSION_CONFIG;
};
};

#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"
#include "RscTitles.hpp"
#include "ACE_Settings.hpp"
Loading

0 comments on commit 3775db2

Please sign in to comment.