Skip to content

Commit

Permalink
Merge pull request #8 from acemod/master
Browse files Browse the repository at this point in the history
update my master fork
  • Loading branch information
Legolasindar committed May 17, 2015
2 parents 43c5afa + 9e8283e commit 18c3035
Show file tree
Hide file tree
Showing 829 changed files with 87,729 additions and 4,249 deletions.
6 changes: 5 additions & 1 deletion AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Anthariel <Contact@storm-simulation.com>
BlackQwar
Brakoviejo
Brisse <brisse@outlook.com>
BullHorn <bullhorn7@gmail.com>
Clon1998 <ps.patti1998@gmail.com>
Codingboy
Crusty
Expand Down Expand Up @@ -73,6 +74,7 @@ Raspu86
Riccardo Petricca <petriccarcc@gmail.com>
Robert Boklahánics <bokirobi@gmail.com>
ramius86 <pasini86@hotmail.com>
SilentSpike <SilentSpike100@gmail.com>
simon84 <badguy360th@gmail.com>
Sniperwolf572 <tenga6@gmail.com>
Tachi <zaveruha007@gmail.com>
Expand All @@ -93,5 +95,7 @@ VyMajoris(W-Cephei)<vycanismajoriscsa@gmail.com>
Bla1337
nikolauska <nikolauska1@gmail.com>
adam3adam <br.ada@seznam.cz>
Professor <lukas.trneny@wo.cz>
Professor <lukas.trneny@wo.cz>
Winter <simon@agius-muscat.net>
Dharma Bellamkonda <dharma.bellamkonda@gmail.com>
legman <juicemelon@msn.com>
Binary file modified ace_advanced_ballistics.dll
Binary file not shown.
Binary file modified ace_break_line.dll
Binary file not shown.
Binary file modified ace_clipboard.dll
Binary file not shown.
Binary file modified ace_fcs.dll
Binary file not shown.
43 changes: 23 additions & 20 deletions addons/advanced_ballistics/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class CfgVehicles {
class ACE_Module;
class GVAR(ModuleSettings): ACE_Module {
scope = 2;
displayName = "Advanced Ballistics";
displayName = "$STR_ACE_AdvancedBallistics_DisplayName";
icon = QUOTE(PATHTOF(UI\Icon_Module_Wind_ca.paa));
category = "ACE";
function = QUOTE(DFUNC(initModuleSettings));
Expand All @@ -12,26 +12,26 @@ class CfgVehicles {
author = "Ruthberg";
class Arguments {
class enabled {
displayName = "Advanced Ballistics";
description = "Enables advanced ballistics";
displayName = "$STR_ACE_AdvancedBallistics_enabled_DisplayName";
description = "$STR_ACE_AdvancedBallistics_enabled_Description";
typeName = "BOOL";
defaultValue = 0;
};
class alwaysSimulateForSnipers {
displayName = "Always Enabled For Snipers";
description = "Always enables advanced ballistics when high power optics are used";
displayName = "$STR_ACE_AdvancedBallistics_alwaysSimulateForSnipers_DisplayName";
description = "$STR_ACE_AdvancedBallistics_alwaysSimulateForSnipers_Description";
typeName = "BOOL";
defaultValue = 1;
};
class disabledInFullAutoMode {
displayName = "Disabled In FullAuto Mode";
description = "Disables the advanced ballistics during full auto fire";
displayName = "$STR_ACE_AdvancedBallistics_disabledInFullAutoMod_DisplayName";
description = "$STR_ACE_AdvancedBallistics_disabledInFullAutoMod_Description";
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)";
displayName = "$STR_ACE_AdvancedBallistics_onlyActiveForLocalPlayers_DisplayName";
description = "$STR_ACE_AdvancedBallistics_onlyActiveForLocalPlayers_Description";
typeName = "BOOL";
defaultValue = 1;
};
Expand All @@ -44,35 +44,38 @@ class CfgVehicles {
};
*/
class ammoTemperatureEnabled {
displayName = "Enable Ammo Temperature Simulation";
description = "Muzzle velocity varies with ammo temperature";
displayName = "$STR_ACE_AdvancedBallistics_ammoTemperatureEnabled_DisplayName";
description = "$STR_ACE_AdvancedBallistics_ammoTemperatureEnabled_Description";
typeName = "BOOL";
defaultValue = 1;
};
class barrelLengthInfluenceEnabled {
displayName = "Enable Barrel Length Simulation";
description = "Muzzle velocity varies with barrel length";
displayName = "$STR_ACE_AdvancedBallistics_barrelLengthInfluenceEnabled_DisplayName";
description = "$STR_ACE_AdvancedBallistics_barrelLengthInfluenceEnabled_Description";
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)";
displayName = "$STR_ACE_AdvancedBallistics_bulletTraceEnabled_DisplayName";
description = "$STR_ACE_AdvancedBallistics_bulletTraceEnabled_Description";
typeName = "BOOL";
defaultValue = 1;
};
class simulationInterval {
displayName = "Simulation Interval";
description = "Defines the interval between every calculation step";
displayName = "$STR_ACE_AdvancedBallistics_simulationInterval_DisplayName";
description = "$STR_ACE_AdvancedBallistics_simulationInterval_Description";
typeName = "NUMBER";
defaultValue = 0.0;
};
class simulationRadius {
displayName = "Simulation Radius";
description = "Defines the radius around the player (in meters) at which advanced ballistics are applied to projectiles";
displayName = "$STR_ACE_AdvancedBallistics_simulationRadius_DisplayName";
description = "$STR_ACE_AdvancedBallistics_simulationRadius_Description";
typeName = "NUMBER";
defaultValue = 3000;
};
};
class ModuleDescription {
description = "$STR_ACE_AdvancedBallistics_Description";
};
};
};
};
4 changes: 2 additions & 2 deletions addons/advanced_ballistics/functions/fnc_handleFired.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ if (GVAR(barrelLengthInfluenceEnabled)) then {
};

if (GVAR(ammoTemperatureEnabled)) then {
_temperature = GET_TEMPERATURE_AT_HEIGHT((getPosASL _unit) select 2);
_temperature = ((getPosASL _unit) select 2) call EFUNC(weather,calculateTemperatureAtHeight);
_muzzleVelocityShift = [_AmmoCacheEntry select 9, _temperature] call FUNC(calculateAmmoTemperatureVelocityShift);
if (_muzzleVelocityShift != 0) then {
_bulletVelocity = _bulletVelocity vectorAdd ((vectorNormalized _bulletVelocity) vectorMultiply (_muzzleVelocityShift));
Expand Down Expand Up @@ -105,7 +105,7 @@ _barrelTwist = _WeaponCacheEntry select 0;
_stabilityFactor = 1.5;

if (_caliber > 0 && _bulletLength > 0 && _bulletMass > 0 && _barrelTwist > 0) then {
_temperature = GET_TEMPERATURE_AT_HEIGHT((getPosASL _unit) select 2);
_temperature = ((getPosASL _unit) select 2) call EFUNC(weather,calculateTemperatureAtHeight);
_barometricPressure = ((getPosASL _bullet) select 2) call EFUNC(weather,calculateBarometricPressure);
_stabilityFactor = [_caliber, _bulletLength, _bulletMass, _barrelTwist, _muzzleVelocity, _temperature, _barometricPressure] call FUNC(calculateStabilityFactor);
};
Expand Down
1 change: 0 additions & 1 deletion addons/advanced_ballistics/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@
#define SPECIFIC_GAS_CONSTANT_DRY_AIR 287.058
#define STD_AIR_DENSITY_ICAO 1.22498
#define STD_AIR_DENSITY_ASM 1.20885
#define GET_TEMPERATURE_AT_HEIGHT(h) (EGVAR(weather,currentTemperature) - 0.0065 * (h))

#define EXTENSION_REQUIRED_VERSION "1.0"
80 changes: 80 additions & 0 deletions addons/advanced_ballistics/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,85 @@
<Czech>Zobrazit úhloměr</Czech>
<Portuguese>Mostrar Transferidor</Portuguese>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_DisplayName">
<English>Advanced Ballistics</English>
<Polish>Zaawansowana balistyka</Polish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_enabled_DisplayName">
<English>Advanced Ballistics</English>
<Polish>Zaawansowana balistyka</Polish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_enabled_Description">
<English>Enables advanced ballistics</English>
<Polish>Aktywuje zaawansowaną balistykę</Polish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_alwaysSimulateForSnipers_DisplayName">
<English>Always Enabled For Snipers</English>
<Polish>Zawsze akt. dla snajp.</Polish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_alwaysSimulateForSnipers_Description">
<English>Always enables advanced ballistics when high power optics are used</English>
<Polish>Aktywuje zaawansowaną balistykę zawsze, kiedy używana jest optyka</Polish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_disabledInFullAutoMod_DisplayName">
<English>Disabled In FullAuto Mode</English>
<Polish>Wył. podczas ognia auto.</Polish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_disabledInFullAutoMod_Description">
<English>Disables the advanced ballistics during full auto fire</English>
<Polish>Dezaktywuje zaawansowaną balistykę podczas ognia automatycznego</Polish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_onlyActiveForLocalPlayers_DisplayName">
<English>Disabled For Non Local Players</English>
<Polish>Wyłącz dla nielok. graczy</Polish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_onlyActiveForLocalPlayers_Description">
<English>Disables the advanced ballistics for bullets coming from other players (enable this if you encounter frame drops during heavy firefights in multiplayer)</English>
<Polish>Dezaktywuje zaawansowaną balistykę dla pocisków pochodzących od innych graczy(aktywuj tą opcję jeżeli odczuwasz spadki FPS podczas sporych strzelanin w MP)</Polish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_ammoTemperatureEnabled_DisplayName">
<English>Enable Ammo Temperature Simulation</English>
<Polish>Symulacja temp. amunicji</Polish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_ammoTemperatureEnabled_Description">
<English>Muzzle velocity varies with ammo temperature</English>
<Polish>Prędkość wylotowa pocisku jest zależna od temperatury amunicji</Polish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_barrelLengthInfluenceEnabled_DisplayName">
<English>Enable Barrel Length Simulation</English>
<Polish>Symulacja długości lufy</Polish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_barrelLengthInfluenceEnabled_Description">
<English>Muzzle velocity varies with barrel length</English>
<Polish>Prędkość wylotowa pocisku jest zależna od długości lufy</Polish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_bulletTraceEnabled_DisplayName">
<English>Enable Bullet Trace Effect</English>
<Polish>Efekt smugi pocisku</Polish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_bulletTraceEnabled_Description">
<English>Enables a bullet trace effect to high caliber bullets (only visible when looking through high power optics)</English>
<Polish>Aktywuje efekt smugi pocisku dla pocisków wysokokalibrowych (widoczne tylko podczas patrzenia przez optykę)</Polish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_simulationInterval_DisplayName">
<English>Simulation Interval</English>
<Polish>Interwał symulacji</Polish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_simulationInterval_Description">
<English>Defines the interval between every calculation step</English>
<Polish>Określa interwał pomiędzy każdym krokiem kalkulacji</Polish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_simulationRadius_DisplayName">
<English>Simulation Radius</English>
<Polish>Zasięg symulacji</Polish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_simulationRadius_Description">
<English>Defines the radius around the player (in meters) at which advanced ballistics are applied to projectiles</English>
<Polish>Określa obszar naokoło gracza (w metrach), na którym zaawansowana balistyka jest aplikowana dla pocisków</Polish>
</Key>
<Key ID="STR_ACE_AdvancedBallistics_Description">
<English></English>
<Polish>Moduł ten pozwala aktywować zaawansowaną balistykę biorącą przy obliczeniach trajektorii lotu pocisku pod uwagę takie rzeczy jak temperatura powietrza, ciśnienie atmosferyczne, wilgotność powietrza, siły Coriolisa i Eotvosa, grawitację a także broń z jakiej wykonywany jest strzał oraz rodzaj amunicji. Wszystko to sprowadza się na bardzo dokładne odwzorowanie balistyki.</Polish>
</Key>
</Package>
</Project>
34 changes: 2 additions & 32 deletions addons/atragmx/functions/fnc_parse_input.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ if (GVAR(currentUnit) == 1) then {
private ["_boreHeight", "_bulletMass", "_bulletDiameter", "_airFriction", "_rifleTwist", "_muzzleVelocity", "_zeroRange"];
_boreHeight = parseNumber(ctrlText 120000);
_bulletMass = parseNumber(ctrlText 120010);
_bulletDiameter = parseNumber(ctrlText 120020);
_bulletDiameter = parseNumber(ctrlText 120020) * 10;
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
_airFriction = 0.1 max parseNumber(ctrlText 120030) min 2;
} else {
Expand All @@ -71,7 +71,7 @@ _zeroRange = parseNumber (ctrlText 120060);
if (GVAR(currentUnit) != 2) then {
_boreHeight = _boreHeight * 2.54;
_bulletMass = _bulletMass * 0.06479891;
_bulletDiameter = _bulletDiameter * 10 * 2.54;
_bulletDiameter = _bulletDiameter * 2.54;
_rifleTwist = _rifleTwist * 2.54;
_muzzleVelocity = _muzzleVelocity / 3.2808399;
};
Expand All @@ -95,36 +95,6 @@ if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) t
GVAR(workingMemory) set [1, _muzzleVelocity];
GVAR(workingMemory) set [2, _zeroRange];

private ["_elevationCur", "_windageCur", "_clickSize", "_clickNumber", "_clickInterval"];
_elevationCur = GVAR(workingMemory) select 10;
_windageCur = GVAR(workingMemory) select 11;

switch (GVAR(currentScopeUnit)) do {
case 0: {
_elevationCur = _elevationCur * 3.38;
_windageCur = _windageCur * 3.38;
};
case 2: {
_elevationCur = _elevationCur / 1.047;
_windageCur = _windageCur / 1.047;
};
case 3: {
switch (GVAR(workingMemory) select 7) do {
case 0: { _clickSize = 1; };
case 1: { _clickSize = 1 / 1.047; };
case 2: { _clickSize = 3.38; };
};
_clickNumber = GVAR(workingMemory) select 8;
_clickInterval = _clickSize / _clickNumber;

_elevationCur = Round(_elevationCur / _clickInterval);
_windageCur = Round(_windageCur / _clickInterval);
};
};

GVAR(workingMemory) set [10, _elevationCur];
GVAR(workingMemory) set [11, _windageCur];

[] call FUNC(update_gun);
[] call FUNC(update_gun_ammo_data);
[] call FUNC(update_atmosphere);
Expand Down
2 changes: 1 addition & 1 deletion addons/atragmx/functions/fnc_update_gun_ammo_data.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if (GVAR(currentUnit) != 2) then {
if (GVAR(currentUnit) != 2) then {
ctrlSetText [120020, Str(Round((GVAR(workingMemory) select 13) / 10 / 2.54 * 1000) / 1000)];
} else {
ctrlSetText [120020, Str(Round((GVAR(workingMemory) select 13) * 1000) / 1000)];
ctrlSetText [120020, Str(Round((GVAR(workingMemory) select 13) / 10 * 1000) / 1000)];
};
if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then {
ctrlSetText [120030, Str(Round((GVAR(workingMemory) select 15) * 1000) / 1000)];
Expand Down
5 changes: 4 additions & 1 deletion addons/atragmx/initKeybinds.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
{
// Conditions: canInteract
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
if (GVAR(active)) exitWith {false};
if (GVAR(active)) exitWith {
closeDialog 0;
false
};
// Statement
[] call FUNC(create_dialog);
false
Expand Down
2 changes: 1 addition & 1 deletion addons/ballistics/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class CfgVehicles {
class ACE_Box_Ammo: NATO_Box_Base {
scope = 2;
accuracy = 1000;
displayName = "[ACE] Ammo Supply Crate";
displayName = "$STR_ACE_AmmoSupplyCrate_DisplayName";
model = "\A3\weapons_F\AmmoBoxes\AmmoBox_F";
author = "$STR_ACE_Common_ACETeam";
class TransportMagazines {
Expand Down
6 changes: 5 additions & 1 deletion addons/ballistics/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1592,5 +1592,9 @@
<Portuguese>Calibre: 12.7x99mm (AMAX)&lt;br/&gt;Cartuchos: 5</Portuguese>
<Hungarian>Kaliber: 12,7x99mm (AMAX)&lt;br /&gt;Lövedékek: 5</Hungarian>
</Key>
<Key ID="STR_ACE_AmmoSupplyCrate_DisplayName">
<English>[ACE] Ammo Supply Crate</English>
<Polish>[ACE] Skrzynka z amunicją</Polish>
</Key>
</Package>
</Project>
</Project>
6 changes: 3 additions & 3 deletions addons/captives/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class CfgVehicles {
class GVAR(ModuleSurrender): Module_F {
author = "$STR_ACE_Common_ACETeam";
category = "ACE";
displayName = "Make Unit Surrender";
displayName = "$STR_ACE_Captives_ModuleSurrender_DisplayName"; //Make Unit Surrender
function = QUOTE(DFUNC(moduleSurrender));
scope = 2; //show in editor
scopeCurator = 2; //show in zeus
Expand All @@ -172,8 +172,8 @@ class CfgVehicles {
functionPriority = 0;
class Arguments {};
class ModuleDescription: ModuleDescription {
description = "Sync a unit to make them surrender.<br/>Source: ace_captives";
description = "$STR_ACE_Captives_ModuleSurrender_Description"; //Sync a unit to make them surrender.<br/>Source: ace_captives
sync[] = {"AnyAI"};
};
};
};
};
8 changes: 8 additions & 0 deletions addons/captives/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -193,5 +193,13 @@
<Hungarian>Semmi sincs az egér alatt</Hungarian>
<Italian>Nessuna selezione</Italian>
</Key>
<Key ID="STR_ACE_Captives_ModuleSurrender_DisplayName">
<English>Make Unit Surrender</English>
<Polish>Poddaj się!</Polish>
</Key>
<Key ID="STR_ACE_Captives_ModuleSurrender_Description">
<English>Sync a unit to make them surrender.&lt;br /&gt;Source: ace_captives</English>
<Polish>Zsynchronizuj z jednostką aby sprawić by się poddała&lt;br /&gt;Źródło: ace_captives</Polish>
</Key>
</Package>
</Project>
Loading

0 comments on commit 18c3035

Please sign in to comment.