Merge branch 'release'

Conflicts:
	README.md
	addons/finger/stringtable.xml
This commit is contained in:
Glowbal 2015-08-04 22:29:05 +02:00
commit 275b0c4300
12 changed files with 77 additions and 57 deletions

View File

@ -4,10 +4,10 @@
</p> </p>
<p align="center"> <p align="center">
<a href="https://github.com/acemod/ACE3/releases"> <a href="https://github.com/acemod/ACE3/releases">
<img src="https://img.shields.io/badge/Version-3.2.0-blue.svg" <img src="https://img.shields.io/badge/Version-3.2.1-blue.svg"
alt="ACE version"> alt="ACE version">
</a> </a>
<a href="https://github.com/acemod/ACE3/releases/download/v3.2.0/ace3_3.2.0.zip"> <a href="https://github.com/acemod/ACE3/releases/download/v3.2.0/ace3_3.2.1.zip">
<img src="http://img.shields.io/badge/Download-56.5_MB-green.svg" <img src="http://img.shields.io/badge/Download-56.5_MB-green.svg"
alt="ACE download"> alt="ACE download">
</a> </a>

View File

@ -53,7 +53,9 @@ if (!GVAR(simulateForEveryone) && !(local _unit)) then {
if (GVAR(disabledInFullAutoMode) && getNumber(configFile >> "CfgWeapons" >> _weapon >> _mode >> "autoFire") == 1) then { _abort = true; }; if (GVAR(disabledInFullAutoMode) && getNumber(configFile >> "CfgWeapons" >> _weapon >> _mode >> "autoFire") == 1) then { _abort = true; };
if (_abort || !(GVAR(extensionAvailable))) exitWith { if (_abort || !(GVAR(extensionAvailable))) exitWith {
[_bullet, getNumber(configFile >> "CfgAmmo" >> _ammo >> "airFriction")] call EFUNC(winddeflection,updateTrajectoryPFH); if (missionNamespace getVariable [QEGVAR(windDeflection,enabled), false]) then {
EGVAR(windDeflection,trackedBullets) pushBack [_bullet, getNumber(configFile >> "cfgAmmo" >> _ammo >> "airFriction")];
};
}; };
_AmmoCacheEntry = uiNamespace getVariable format[QGVAR(%1), _ammo]; _AmmoCacheEntry = uiNamespace getVariable format[QGVAR(%1), _ammo];

View File

@ -37,6 +37,13 @@
}; };
}] call FUNC(addEventhandler); }] call FUNC(addEventhandler);
["HeadbugFixUsed", {
PARAMS_2(_profileName,_animation);
diag_log text format ["[ACE] Headbug Used: Name: %1, Animation: %2", _profileName, _animation];
}] call FUNC(addEventHandler);
//~~~~~Get Map Data~~~~~ //~~~~~Get Map Data~~~~~
//Find MGRS zone and 100km grid for current map //Find MGRS zone and 100km grid for current map
[] call FUNC(getMGRSdata); [] call FUNC(getMGRSdata);

View File

@ -10,21 +10,33 @@
#include "script_component.hpp" #include "script_component.hpp"
private ["_pos","_dir","_anim"]; private ["_pos","_dir","_anim"];
if (player != vehicle player || {(player getvariable ["ace_isUnconscious", false])}) exitWith {};
titleCut ["", "BLACK"];
_pos = getposATL player;
_dir = getDir player;
_anim = animationState player;
// create invisible headbug fix vehicle
_ACE_HeadbugFix = createVehicle ["ACE_Headbug_Fix", getposATL player, [], 0, "NONE"];
_ACE_HeadbugFix setDir _dir;
player moveInAny _ACE_HeadbugFix;
sleep 1.0;
unassignVehicle player;
player action ["Eject", vehicle player];
sleep 1.0;
deleteVehicle _ACE_HeadbugFix;
player setposATL _pos;
player setDir _dir;
titleCut ["", "PLAIN"];
_anim = animationState ACE_player;
["HeadbugFixUsed", [profileName, _anim]] call FUNC(serverEvent);
["HeadbugFixUsed", [profileName, _anim]] call FUNC(localEvent);
if (ACE_player != vehicle ACE_player || { !([ACE_player, objNull, ["isNotSitting"]] call FUNC(canInteractWith)) } ) exitWith {false};
_pos = getposATL ACE_player;
_dir = getDir ACE_player;
titleCut ["", "BLACK"];
[ACE_Player, "headBugFix"] call FUNC(hideUnit);
// create invisible headbug fix vehicle
_ACE_HeadbugFix = "ACE_Headbug_Fix" createVehicleLocal _pos;
_ACE_HeadbugFix setDir _dir;
ACE_player moveInAny _ACE_HeadbugFix;
sleep 0.1;
unassignVehicle ACE_player;
ACE_player action ["Eject", vehicle ACE_player];
ACE_player setDir _dir;
ACE_player setposATL _pos;
sleep 1.0;
deleteVehicle _ACE_HeadbugFix;
[ACE_Player, "headBugFix"] call FUNC(unhideUnit);
titleCut ["", "PLAIN"];
true

View File

@ -2,7 +2,7 @@
<Project name="ACE"> <Project name="ACE">
<Package name="finger"> <Package name="finger">
<Key ID="STR_ACE_finger_indicatorForSelf_name"> <Key ID="STR_ACE_finger_indicatorForSelf_name">
<English>Show finger indicator to self</English> <English>Show pointing indicator to self</English>
<Russian>Отображать пальце-индикатор для показывающего игрока</Russian> <Russian>Отображать пальце-индикатор для показывающего игрока</Russian>
<Polish>Pokaż indykator wskazywania palcem dla siebie</Polish> <Polish>Pokaż indykator wskazywania palcem dla siebie</Polish>
</Key> </Key>
@ -12,12 +12,12 @@
<Polish> Wyświetl indykator kiedy wskazujesz coś palcem. Ta opcja nie wpływa na to, czy inni gracze zobaczą ten indykator czy też nie.</Polish> <Polish> Wyświetl indykator kiedy wskazujesz coś palcem. Ta opcja nie wpływa na to, czy inni gracze zobaczą ten indykator czy też nie.</Polish>
</Key> </Key>
<Key ID="STR_ACE_finger_indicatorColor_name"> <Key ID="STR_ACE_finger_indicatorColor_name">
<English>Finger indicator</English> <English>Pointing indicator</English>
<Russian>Пальце-индикатор</Russian> <Russian>Пальце-индикатор</Russian>
<Polish>Indykator palca</Polish> <Polish>Indykator palca</Polish>
</Key> </Key>
<Key ID="STR_ACE_finger_indicatorColor_description"> <Key ID="STR_ACE_finger_indicatorColor_description">
<English>Color of the finger-pointing indicator circle</English> <English>Color of the pointing indicator circle</English>
<Russian>Цвет индикатора пальце-указания</Russian> <Russian>Цвет индикатора пальце-указания</Russian>
<Polish>Kolor okręgu wyświetlanego przy wskazywaniu palcem</Polish> <Polish>Kolor okręgu wyświetlanego przy wskazywaniu palcem</Polish>
</Key> </Key>
@ -27,19 +27,19 @@
<Polish>Akcja "wskaż palcem"</Polish> <Polish>Akcja "wskaż palcem"</Polish>
</Key> </Key>
<Key ID="STR_ACE_finger_keyComb_description"> <Key ID="STR_ACE_finger_keyComb_description">
<English>Points, and shows a virtual marker of where you are looking to nearby units. Can be held down.</English> <English>Points, and shows a virtual marker of where you are looking to nearby units. Can be held down.</English>
<Polish>Wskazuje a także wyświetla wirtualny marker-okrąg w miejscu, w które patrzysz, dla wszystkich pobliskich jednostek. Może być przytrzymywany.</Polish> <Polish>Wskazuje a także wyświetla wirtualny marker-okrąg w miejscu, w które patrzysz, dla wszystkich pobliskich jednostek. Może być przytrzymywany.</Polish>
</Key> </Key>
<Key ID="STR_ACE_finger_moduleSettings_displayName"> <Key ID="STR_ACE_finger_moduleSettings_displayName">
<English>Finger Settings</English> <English>Pointing Settings</English>
<Polish>Ustawienia wskazywania palcem</Polish> <Polish>Ustawienia wskazywania palcem</Polish>
</Key> </Key>
<Key ID="STR_ACE_finger_enabled_displayName"> <Key ID="STR_ACE_finger_enabled_displayName">
<English>Finger Pointing Enabled</English> <English>Pointing Enabled</English>
<Polish>Aktywuj wskazywanie</Polish> <Polish>Aktywuj wskazywanie</Polish>
</Key> </Key>
<Key ID="STR_ACE_finger_maxRange_displayName"> <Key ID="STR_ACE_finger_maxRange_displayName">
<English>Finger Max Range</English> <English>Pointing Max Range</English>
<Polish>Maks. zasięg wskazywania</Polish> <Polish>Maks. zasięg wskazywania</Polish>
</Key> </Key>
<Key ID="STR_ACE_finger_maxRange_description"> <Key ID="STR_ACE_finger_maxRange_description">

View File

@ -12,13 +12,13 @@
* Return value: * Return value:
* Array, [Strongest compatible laser spot ASL pos, owner object] Nil array values if nothing found. * Array, [Strongest compatible laser spot ASL pos, owner object] Nil array values if nothing found.
*/ */
#include "script_component.hpp" #include "script_component.hpp"
private ["_pos", "_seekerWavelengths", "_seekerCode", "_spots", "_buckets", "_excludes", "_bucketIndex", "_finalPos", "_owner", "_obj", "_x", "_method"]; private ["_pos", "_seekerWavelengths", "_seekerCode", "_spots", "_buckets", "_excludes", "_bucketIndex", "_finalPos", "_owner", "_obj", "_x", "_method"];
private ["_emitterWavelength", "_laserCode", "_divergence", "_laser", "_laserPos", "_laserDir", "_res", "_bucketPos", "_bucketList", "_c", "_forEachIndex", "_index"]; private ["_emitterWavelength", "_laserCode", "_divergence", "_laser", "_res", "_bucketPos", "_bucketList", "_c", "_forEachIndex", "_index"];
private ["_testPos", "_finalBuckets", "_largest", "_largestIndex", "_finalBucket", "_owners", "_avgX", "_avgY", "_avgZ", "_count", "_maxOwner", "_maxOwnerIndex", "_finalOwner"]; private ["_testPos", "_finalBuckets", "_largest", "_largestIndex", "_finalBucket", "_owners", "_avgX", "_avgY", "_avgZ", "_count", "_maxOwner", "_maxOwnerIndex", "_finalOwner"];
private["_dir", "_seekerCos", "_seekerFov", "_testDotProduct", "_testPoint", "_testPointVector"]; private["_dir", "_seekerCos", "_seekerFov", "_testDotProduct", "_testPoint", "_testPointVector"];
_pos = _this select 0; _pos = _this select 0;
_dir = vectorNormalized (_this select 1); _dir = vectorNormalized (_this select 1);
@ -62,17 +62,19 @@ _finalOwner = nil;
}; };
}; };
}; };
_laserPos = _laser select 0;
_laserDir = _laser select 1; //Handle Weird Data Return
_res = [_laserPos, _laserDir, _divergence] call FUNC(shootCone); if (_laser params [["_laserPos", [], [[]], 3], ["_laserDir", [], [[]], 3]]) then {
{ _res = [_laserPos, _laserDir, _divergence] call FUNC(shootCone);
_testPoint = _x select 0; {
_testPointVector = vectorNormalized (_testPoint vectorDiff _pos); _testPoint = _x select 0;
_testDotProduct = _dir vectorDotProduct _testPointVector; _testPointVector = vectorNormalized (_testPoint vectorDiff _pos);
if(_testDotProduct > _seekerCos) then { _testDotProduct = _dir vectorDotProduct _testPointVector;
_spots pushBack [_testPoint, _owner]; if(_testDotProduct > _seekerCos) then {
}; _spots pushBack [_testPoint, _owner];
} forEach (_res select 2); };
} forEach (_res select 2);
};
}; };
} forEach (GVAR(laserEmitters) select 1); } forEach (GVAR(laserEmitters) select 1);
@ -119,10 +121,10 @@ if((count _spots) > 0) then {
_largestIndex = _index; _largestIndex = _index;
}; };
} forEach _buckets; } forEach _buckets;
_finalBucket = _finalBuckets select _largestIndex; _finalBucket = _finalBuckets select _largestIndex;
_owners = HASH_CREATE; _owners = HASH_CREATE;
if(count _finalBucket > 0) then { if(count _finalBucket > 0) then {
_avgX = 0; _avgX = 0;
_avgY = 0; _avgY = 0;

View File

@ -5,7 +5,7 @@
#define MAJOR 3 #define MAJOR 3
#define MINOR 2 #define MINOR 2
#define PATCHLVL 0 #define PATCHLVL 1
#define BUILD 0 #define BUILD 0
#define VERSION MAJOR.MINOR.PATCHLVL.BUILD #define VERSION MAJOR.MINOR.PATCHLVL.BUILD

View File

@ -39,14 +39,13 @@ class CfgVehicles {
}; };
}; };
class Module_F; class ACE_ModuleBlueForceTracking: ACE_Module {
class ACE_ModuleBlueForceTracking: Module_F {
author = ECSTRING(common,ACETeam); author = ECSTRING(common,ACETeam);
category = "ACE"; category = "ACE";
displayName = CSTRING(BFT_Module_DisplayName); displayName = CSTRING(BFT_Module_DisplayName);
function = QFUNC(blueForceTrackingModule); function = QFUNC(blueForceTrackingModule);
scope = 2; scope = 2;
isGlobal = 1; isGlobal = 0;
icon = PATHTOF(UI\Icon_Module_BFTracking_ca.paa); icon = PATHTOF(UI\Icon_Module_BFTracking_ca.paa);
class Arguments { class Arguments {
class Enabled { class Enabled {

View File

@ -47,6 +47,7 @@ call FUNC(determineZoom);
["SettingsInitialized", { ["SettingsInitialized", {
// Start Blue Force Tracking if Enabled // Start Blue Force Tracking if Enabled
if (GVAR(BFT_Enabled)) then { if (GVAR(BFT_Enabled)) then {
diag_log text "[ACE] Blue Force Tracking Enabled (client)";
GVAR(BFT_markers) = []; GVAR(BFT_markers) = [];
[FUNC(blueForceTrackingUpdate), GVAR(BFT_Interval), []] call CBA_fnc_addPerFrameHandler; [FUNC(blueForceTrackingUpdate), GVAR(BFT_Interval), []] call CBA_fnc_addPerFrameHandler;
}; };

View File

@ -12,15 +12,12 @@
#include "script_component.hpp" #include "script_component.hpp"
if !(hasInterface) exitWith {}; if (!isServer) exitWith {};
PARAMS_3(_logic,_units,_activated); PARAMS_1(_logic);
if !(_activated) exitWith {};
[_logic, QGVAR(BFT_Enabled), "Enabled"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(BFT_Enabled), "Enabled"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(BFT_Interval), "Interval"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(BFT_Interval), "Interval"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(BFT_HideAiGroups), "HideAiGroups"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(BFT_HideAiGroups), "HideAiGroups"] call EFUNC(common,readSettingFromModule);
diag_log text "[ACE]: Blue Force Tracking Module initialized."; diag_log text "[ACE]: Blue Force Tracking Module initialized. (server)";
TRACE_2("[ACE]: Blue Force Tracking Module initialized.", GVAR(BFT_Interval), GVAR(BFT_HideAiGroups));

View File

@ -112,7 +112,7 @@ if (_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) exitW
}; };
0.89; 0.89;
}; };
0.89; _damageReturn min 0.89;
}; };
if (((_unit getVariable [QGVAR(enableRevive), GVAR(enableRevive)]) > 0) && {_damageReturn >= 0.9} && {_selection in ["", "head", "body"]}) exitWith { if (((_unit getVariable [QGVAR(enableRevive), GVAR(enableRevive)]) > 0) && {_damageReturn >= 0.9} && {_selection in ["", "head", "body"]}) exitWith {

View File

@ -1,8 +1,8 @@
name = "Advanced Combat Environment 3.2.0"; name = "Advanced Combat Environment 3.2.1";
picture = "logo_ace3_ca.paa"; picture = "logo_ace3_ca.paa";
actionName = "GitHub"; actionName = "GitHub";
action = "https://github.com/acemod/ACE3"; action = "https://github.com/acemod/ACE3";
description = "ACE3 - Version 3.2.0"; description = "ACE3 - Version 3.2.1";
logo = "logo_ace3_ca.paa"; logo = "logo_ace3_ca.paa";
logoOver = "logo_ace3_ca.paa"; logoOver = "logo_ace3_ca.paa";
tooltip = "ACE3"; tooltip = "ACE3";