Skip to content

Commit

Permalink
Merge branch 'master' into medical-focus-feature
Browse files Browse the repository at this point in the history
Conflicts:
	addons/medical/functions/fnc_treatmentAdvanced_CPR.sqf
  • Loading branch information
thojkooi committed Feb 20, 2016
2 parents ff86359 + 0021bc0 commit 7d063d4
Show file tree
Hide file tree
Showing 359 changed files with 4,335 additions and 2,632 deletions.
37 changes: 2 additions & 35 deletions CONTRIBUTING.md → .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Before reporting

If you have found an issue with ACE3 please make sure that ACE3 is really the cause of the problem. To do this try to reproduce the issue with using only `@CBA_A3` and `@ace` on a newly created mission.
If you have found an issue with ACE3 please make sure that ACE3 really is the cause of the problem. To do this try to reproduce the issue with using only `@CBA_A3` and `@ace` on a newly created mission.

Indicate if the issue appears on stable or development version. In case it is the development version, please also include the commit SHA-1 hash.

Expand All @@ -14,38 +14,10 @@ Indicate if the issue appears on stable or development version. In case it is th

## Reporting the issue

Head over to the [ACE3 GitHub issue tracker](https://github.com/acemod/ACE3/issues) and press the [New issue](https://github.com/acemod/ACE3/issues/new) button in the top right corner. Add a descriptive title and copy the following issue template in to the text area:

```
ACE3 Version: 3.x.x
(indicate if stable or dev, if dev indicate the commit the version is based on)
**Mods:**
* `@CBA_A3`
* `@ace`
**Placed ACE3 Modules:**
* *Add the list of modules you have placed on the map. Use 'None' if the error occurs without using any modules.*
* You can also press the `Debug to` button in the ACE3 option menu (escape -> ACE3 options -> Debug to) and add a link (pastebin.com) to the results.
**Description:**
* Add a detailed description of the error. This makes it easier for us to fix the issue.*
**Steps to reproduce:**
* *Add the steps needed to reproduce the issue.*
**Where did the issue occur?**
* A possible answer might be "Multiplayer", "Editor" or "Singleplayer"*
**RPT log file:**
* Add a link (pastebin.com) to the client or server RPT file.*
```
Head over to the [ACE3 GitHub issue tracker](https://github.com/acemod/ACE3/issues) and press the [New issue](https://github.com/acemod/ACE3/issues/new) button in the top right corner. Add a descriptive title and complete the issue template.

A video of the issue might be helpful in resolving it faster.

GitHub uses [Markdown](http://daringfireball.net/projects/markdown/syntax) to style the output. If you want to know more about it (e.g. how to [turn text bold](https://help.github.com/articles/markdown-basics/#styling-text), how to denote [code blocks](https://help.github.com/articles/markdown-basics/#inline-formats) or [inline code](https://help.github.com/articles/markdown-basics/#multiple-lines)) have a look at the [GitHub Markdown Documentation](https://help.github.com/articles/github-flavored-markdown).


# Feature Requests

## Background
Expand All @@ -57,8 +29,3 @@ Please refrain from making requests for any planned or existing features from ei
In order to avoid duplicates and keep the issue tracker organized, we have created a common issue for [ACE3 Feature requests](https://github.com/acemod/ACE3/issues/414). Any and all relevant requests should be submitted there, where they will also get discussed and evaluated. Before adding a new one, make sure to check the previous entries from the thread and do a quick search for similar suggestions; please don't reiterate requests for features that had already been accepted for inclusion, or those which were disregarded earlier.

Following their approval, feature requests may be moved by moderators to a separate issue for further discussion.

# Regarding Pull Requests (PRs)
- You want to help but don't know where to start? Check the wiki entry for [setting up the development environment](http://ace3mod.com/wiki/development/setting-up-the-development-environment.html)
- [Make sure to respect the file structure](http://ace3mod.com/wiki/development/modularity-and-pbo-structure.html)
- [Make sure to respect the coding guidelines](http://ace3mod.com/wiki/development/coding-guidelines.html)
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
**Arma 3 Version:** `x.xx`
*(indicate if stable, rc or dev*)

**ACE3 Version:** `3.x.x`
*(indicate if stable or dev, if dev indicate the commit the version is based on)*

**Mods:**
* `@CBA_A3`
* `@ace`
* ...

**Placed Modules:**
* *Add the list of modules you have placed on the map. Use 'None' if the error occurs without using any modules.*

**Description:**
* *Add a detailed description of the error. This makes it easier for us to fix the issue.*

**Steps to reproduce:**
* *Add the steps needed to reproduce the issue.*

**Where did the issue occur?**
* *A possible answer might be "Dedicated Server", "Local Multiplayer", "Editor", or "Singleplayer"*

**RPT log file:**
* *Add a link (pastebin.com) to the client and/or server RPT file. An instruction to find your RPT files can be [found here](https://community.bistudio.com/wiki/Crash_Files#Arma_3)*
10 changes: 10 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
### When merged this pull request will:

1. *Describe what this pull request will do*
2. *Each change in a seperate line*

---
*Delete this line and everything below*

- [Make sure to respect the file structure](http://ace3mod.com/wiki/development/modularity-and-pbo-structure.html)
- [Make sure to respect the coding guidelines](http://ace3mod.com/wiki/development/coding-guidelines.html)
1 change: 1 addition & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Alganthe <alganthe@live.fr>
Anthariel <Contact@storm-simulation.com>
Arkhir <wonsz666@gmail.com >
Asgar Serran <piechottaf@web.de>
BaerMitUmlaut
Bamse <bamsis@gmail.com>
Bla1337
BlackPixxel <blackpixxel96@gmail.com>
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ The mod is **built modularly**, so almost any included PBO can be easily removed
- Magazine repacking
- Realistic weapon overheating mechanic
- Combat deafness (temporary loss of hearing) simulation
- Improved ragdoll physics
- Improved interactions for AARs and ammo bearers
- Adjustable sniper scopes
- No idle animation with lowered weapon
Expand Down
Binary file modified ace_medical.dll
Binary file not shown.
4 changes: 4 additions & 0 deletions addons/advanced_ballistics/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,7 @@ if (!hasInterface) exitWith {};
[] call FUNC(updateTrajectoryPFH);

}] call EFUNC(common,addEventHandler);

#ifdef DEBUG_MODE_FULL
call FUNC(diagnoseWeapons);
#endif
1 change: 1 addition & 0 deletions addons/advanced_ballistics/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ PREP(calculateAtmosphericCorrection);
PREP(calculateBarrelLengthVelocityShift);
PREP(calculateRetardation);
PREP(calculateStabilityFactor);
PREP(diagnoseWeapons);
PREP(displayProtractor);
PREP(handleFired);
PREP(initializeTerrainExtension);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ private ["_muzzleVelocityTableCount", "_barrelLengthTableCount", "_lowerDataInde
"_upperDataIndex", "_lowerBarrelLength", "_upperBarrelLength", "_lowerMuzzleVelocity",
"_upperMuzzleVelocity", "_interpolationRatio"];
params ["_barrelLength", "_muzzleVelocityTable", "_barrelLengthTable", "_muzzleVelocity"];
TRACE_4("params",_barrelLength,_muzzleVelocityTable,_barrelLengthTable,_muzzleVelocity);

// If barrel length is not defined, then there is no point in calculating muzzle velocity
if (_barrelLength == 0) exitWith { 0 };
Expand Down
59 changes: 59 additions & 0 deletions addons/advanced_ballistics/functions/fnc_diagnoseWeapons.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
* Author: esteldunedain
*
* This function diagnoses all primary weapons to find cases in which the initial
* velocity of shots with and without AB significantly mismatch
*
* Arguments:
* None. Parameters inherited from EFUNC(common,firedEH)
*
* Return Value:
* None
*
* Public: No
*/
#define DEBUG_MODE_FULL
#include "script_component.hpp"

private _cfgWeapons = configFile >> "CfgWeapons";
for "_i" from 0 to (count _cfgWeapons)-1 do {
private _weaponConfig = _cfgWeapons select _i;
if (isClass _weaponConfig) then {
private _weapon = configName _weaponConfig;
private _weaponType = getNumber (_weaponConfig >> "Type");
if (_weaponType == 1) then {
// The weapon is a primary weapon

private _weaponInitSpeed = getNumber (_weaponConfig >> "initSpeed");
private _magazines = getArray (_weaponConfig >> "magazines");
{
private _magazine = _x;
private _magazineInitSpeed = getNumber (configFile >> "CfgMagazines" >> _magazine >> "initSpeed");
private _ammo = getText (configFile >> "CfgMagazines" >> _magazine >> "ammo");

// Vanilla initial speed --------------------------
private _vanillaInitialSpeed = _magazineInitSpeed;
if (_weaponInitSpeed > 0) then {
_vanillaInitialSpeed = _weaponInitSpeed;
} else {
if (_weaponInitSpeed < 0) then {
_vanillaInitialSpeed = _vanillaInitialSpeed * (-_weaponInitSpeed);
};
};
// --------------------------------------------------

// AB initial speed --------------------------------
// Get Weapon and Ammo Configurations
private _AmmoCacheEntry = _ammo call FUNC(readAmmoDataFromConfig);
private _WeaponCacheEntry = _weapon call FUNC(readWeaponDataFromConfig);
_AmmoCacheEntry params ["_airFriction", "_caliber", "_bulletLength", "_bulletMass", "_transonicStabilityCoef", "_dragModel", "_ballisticCoefficients", "_velocityBoundaries", "_atmosphereModel", "_ammoTempMuzzleVelocityShifts", "_muzzleVelocityTable", "_barrelLengthTable"];
_WeaponCacheEntry params ["_barrelTwist", "_twistDirection", "_barrelLength"];

private _barrelVelocityShift = [_barrelLength, _muzzleVelocityTable, _barrelLengthTable, _vanillaInitialSpeed] call FUNC(calculateBarrelLengthVelocityShift);
private _abInitialSpeed = _vanillaInitialSpeed + _barrelVelocityShift;
// --------------------------------------------------
diag_log text format ["ABDiagnose,%1,%2,%3,%4,%5,%6,%7",_weapon,_magazine,_ammo,_magazineInitSpeed,_weaponInitSpeed,_vanillaInitialSpeed,_abInitialSpeed];
} forEach _magazines;
};
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
*/
#include "script_component.hpp"

TRACE_1("Reading Ammo Config",_this);
private ["_ammo", "_airFriction", "_caliber", "_bulletLength", "_bulletMass", "_transonicStabilityCoef", "_dragModel", "_ballisticCoefficients", "_velocityBoundaries", "_atmosphereModel", "_ammoTempMuzzleVelocityShifts", "_muzzleVelocityTable", "_barrelLengthTable", "_result"];
_ammoConfig = configFile >> "CfgAmmo" >> _this;

Expand All @@ -49,6 +50,42 @@ _ammoTempMuzzleVelocityShifts = getArray(_ammoConfig >> "ACE_ammoTempMuzzleVeloc
_muzzleVelocityTable = getArray(_ammoConfig >> "ACE_muzzleVelocities");
_barrelLengthTable = getArray(_ammoConfig >> "ACE_barrelLengths");

//Handle subsonic ammo that would have a huge muzzle velocity shift (when ballistic configs not explicitly defined)
private _typicalSpeed = getNumber (_ammoConfig >> "typicalSpeed");
if ((_typicalSpeed > 0) && {_typicalSpeed < 360}) then {
private _inheritedBarrelConfig = (!(_muzzleVelocityTable isEqualTo [])) && {(configProperties [_ammoConfig, "(configName _x) == 'ACE_muzzleVelocities'", false]) isEqualTo []};
private _inheritedTempConfig = (!(_ammoTempMuzzleVelocityShifts isEqualTo [])) && {(configProperties [_ammoConfig, "(configName _x) == 'ACE_ammoTempMuzzleVelocityShifts'", false]) isEqualTo []};
TRACE_3("subsonic",_typicalSpeed,_inheritedBarrelConfig,_inheritedTempConfig);
if (_inheritedBarrelConfig || _inheritedTempConfig) then {
private _parentConfig = inheritsFrom _ammoConfig;
private _parentSpeed = getNumber (_parentConfig >> "typicalSpeed");
ACE_LOGWARNING_4("Subsonic Ammo %1 (%2 m/s) missing `ACE_muzzleVelocities` or `ACE_ammoTempMuzzleVelocityShifts` configs, attempting to use parent %3 (%4m/s)",_this,_typicalSpeed,configName _parentConfig, _parentSpeed);
if (_parentSpeed <= 0) exitWith {//Handle weird or null parent
_muzzleVelocityTable = [];
_ammoTempMuzzleVelocityShifts = [];
};
private _linearMuliplier = _typicalSpeed / _parentSpeed;
if (_inheritedBarrelConfig) then {
if (!((configProperties [_parentConfig, "(configName _x) == 'ACE_muzzleVelocities'", false]) isEqualTo [])) then {
TRACE_2("Parent Has Defined Barrel MV",_linearMuliplier,_muzzleVelocityTable);
{ _muzzleVelocityTable set [_forEachIndex, (_x * _linearMuliplier)]; } forEach _muzzleVelocityTable;
} else {
TRACE_2("Parent DOES NOT Have Defined Barrel MV",_linearMuliplier,_muzzleVelocityTable);
_muzzleVelocityTable = [];
};
};
if (_inheritedTempConfig) then {
if (!((configProperties [_parentConfig, "(configName _x) == 'ACE_ammoTempMuzzleVelocityShifts'", false]) isEqualTo [])) then {
TRACE_2("Parent Has Defined Ammo Temp Shifts",_linearMuliplier,_muzzleVelocityTable);
{ _ammoTempMuzzleVelocityShifts set [_forEachIndex, (_x * _linearMuliplier)]; } forEach _ammoTempMuzzleVelocityShifts;
} else {
TRACE_2("Parent DOES NOT Have Defined Ammo Temp Shifts",_linearMuliplier,_muzzleVelocityTable);
_ammoTempMuzzleVelocityShifts = [];
};
};
};
};

_result = [_airFriction, _caliber, _bulletLength, _bulletMass, _transonicStabilityCoef, _dragModel, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _ammoTempMuzzleVelocityShifts, _muzzleVelocityTable, _barrelLengthTable];

uiNamespace setVariable [format[QGVAR(%1), _this], _result];
Expand Down
Loading

0 comments on commit 7d063d4

Please sign in to comment.