mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge remote-tracking branch 'refs/remotes/acemod/master'
This commit is contained in:
commit
59d0e6e788
@ -12,11 +12,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
private "_deleted";
|
private _aceTimeSecond = floor ACE_time;
|
||||||
|
|
||||||
_deleted = 0;
|
|
||||||
|
|
||||||
_aceTimeSecond = floor ACE_time;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
private ["_bulletVelocity", "_bulletPosition", "_bulletSpeed"];
|
private ["_bulletVelocity", "_bulletPosition", "_bulletSpeed"];
|
||||||
|
@ -24,7 +24,7 @@ _hitPointDamages = getAllHitPointsDamage _object;
|
|||||||
|
|
||||||
// get correct format for objects without hitpoints
|
// get correct format for objects without hitpoints
|
||||||
if (_hitPointDamages isEqualTo []) then {
|
if (_hitPointDamages isEqualTo []) then {
|
||||||
_hitPointDamages = [[],[],[]];
|
_hitPointDamages = [[],[],[]];
|
||||||
};
|
};
|
||||||
|
|
||||||
// this prevents physx objects from floating when near other physx objects with allowDamage false
|
// this prevents physx objects from floating when near other physx objects with allowDamage false
|
||||||
|
@ -26,5 +26,5 @@ _selectBinocular = currentWeapon _unit == _binocular;
|
|||||||
_unit addWeapon _binocular;
|
_unit addWeapon _binocular;
|
||||||
|
|
||||||
if (_selectBinocular) then {
|
if (_selectBinocular) then {
|
||||||
_unit selectWeapon _binocular;
|
_unit selectWeapon _binocular;
|
||||||
};
|
};
|
||||||
|
@ -52,10 +52,10 @@ if (_mode == 0) then {
|
|||||||
];
|
];
|
||||||
{
|
{
|
||||||
_found = false;
|
_found = false;
|
||||||
_no = nearestObjects [_x, [typeOf _wire], 3]; //diag_log _no; diag_log ".....";
|
_no = nearestObjects [_x, [typeOf _wire], 3]; //diag_log _no; diag_log ".....";
|
||||||
_no = _no - [_wire]; //diag_log _no;
|
_no = _no - [_wire]; //diag_log _no;
|
||||||
if (count _no > 0) exitWith {
|
if (count _no > 0) exitWith {
|
||||||
_found = true; //diag_log "found";
|
_found = true; //diag_log "found";
|
||||||
};
|
};
|
||||||
} forEach _wireCheckPosAr;
|
} forEach _wireCheckPosAr;
|
||||||
// Double coil found!
|
// Double coil found!
|
||||||
|
@ -23,8 +23,8 @@ private "_inBuilding";
|
|||||||
_inBuilding = [_unit] call FUNC(isObjectOnObject);
|
_inBuilding = [_unit] call FUNC(isObjectOnObject);
|
||||||
|
|
||||||
if !(_unit getVariable ["ACE_isUnconscious", false]) then {
|
if !(_unit getVariable ["ACE_isUnconscious", false]) then {
|
||||||
// play release animation
|
// play release animation
|
||||||
_unit playAction "released";
|
_unit playAction "released";
|
||||||
};
|
};
|
||||||
|
|
||||||
// prevent collision damage
|
// prevent collision damage
|
||||||
|
@ -6,6 +6,6 @@ params ["_ctrl", "_index", "_text"];
|
|||||||
//systemChat str (_text != ARR_SELECT(GVAR(ParsedTextCached),_index,"-1"));
|
//systemChat str (_text != ARR_SELECT(GVAR(ParsedTextCached),_index,"-1"));
|
||||||
|
|
||||||
if (_text != ARR_SELECT(GVAR(ParsedTextCached),_index,"-1")) then {
|
if (_text != ARR_SELECT(GVAR(ParsedTextCached),_index,"-1")) then {
|
||||||
GVAR(ParsedTextCached) set [_index, _text];
|
GVAR(ParsedTextCached) set [_index, _text];
|
||||||
_ctrl ctrlSetStructuredText parseText _text;
|
_ctrl ctrlSetStructuredText parseText _text;
|
||||||
};
|
};
|
||||||
|
@ -22,7 +22,7 @@ params ["_unit", "_team"];
|
|||||||
|
|
||||||
// display message
|
// display message
|
||||||
if (_unit == ACE_player) then {
|
if (_unit == ACE_player) then {
|
||||||
private "_message";
|
private "_message";
|
||||||
|
|
||||||
if (_team == "MAIN") then {
|
if (_team == "MAIN") then {
|
||||||
_message = localize LSTRING(LeftTeam);
|
_message = localize LSTRING(LeftTeam);
|
||||||
|
@ -26,11 +26,11 @@ if (alive _target) then {
|
|||||||
_genericMessages pushBack LSTRING(diagnoseDead);
|
_genericMessages pushBack LSTRING(diagnoseDead);
|
||||||
};
|
};
|
||||||
if (_target getVariable[QGVAR(hasLostBlood), 0] > 0) then {
|
if (_target getVariable[QGVAR(hasLostBlood), 0] > 0) then {
|
||||||
if (_target getVariable[QGVAR(hasLostBlood), 0] > 1) then {
|
if (_target getVariable[QGVAR(hasLostBlood), 0] > 1) then {
|
||||||
_genericMessages pushBack LSTRING(lostBloodALot);
|
_genericMessages pushBack LSTRING(lostBloodALot);
|
||||||
} else {
|
} else {
|
||||||
_genericMessages pushBack LSTRING(lostBlood);
|
_genericMessages pushBack LSTRING(lostBlood);
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
_genericMessages pushBack LSTRING(noBloodloss);
|
_genericMessages pushBack LSTRING(noBloodloss);
|
||||||
};
|
};
|
||||||
|
@ -26,10 +26,10 @@ if !([_unit] call FUNC(canClimb)) exitWith {
|
|||||||
if !(_unit getVariable [QGVAR(isClimbInit), false]) then {
|
if !(_unit getVariable [QGVAR(isClimbInit), false]) then {
|
||||||
_unit addEventHandler ["AnimChanged", {
|
_unit addEventHandler ["AnimChanged", {
|
||||||
if (local (_this select 0) && {_this select 1 == "ACE_Climb"}) then {
|
if (local (_this select 0) && {_this select 1 == "ACE_Climb"}) then {
|
||||||
// abort climb animation
|
// abort climb animation
|
||||||
if !(_this call FUNC(canClimb)) then {
|
if !(_this call FUNC(canClimb)) then {
|
||||||
[_this select 0, "AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation);
|
[_this select 0, "AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ _display = _this select 0;
|
|||||||
_control = _display displayCtrl 1713154;
|
_control = _display displayCtrl 1713154;
|
||||||
|
|
||||||
if (!ctrlShown (_display displayCtrl 154)) exitWith {
|
if (!ctrlShown (_display displayCtrl 154)) exitWith {
|
||||||
_control ctrlShow false;
|
_control ctrlShow false;
|
||||||
};
|
};
|
||||||
|
|
||||||
private ["_sizeX", "_sizeY"];
|
private ["_sizeX", "_sizeY"];
|
||||||
|
@ -170,8 +170,8 @@ class CfgVehicles {
|
|||||||
class GVAR(defaultCarriedObject) : ThingX {
|
class GVAR(defaultCarriedObject) : ThingX {
|
||||||
XEH_ENABLED;
|
XEH_ENABLED;
|
||||||
displayName = QGVAR(dummy_obj);
|
displayName = QGVAR(dummy_obj);
|
||||||
scope = 2;
|
scope = 1;
|
||||||
scopeCurator = 2;
|
scopeCurator = 1;
|
||||||
model = "\A3\Weapons_F\AmmoBoxes\AmmoBox_F.p3d";
|
model = "\A3\Weapons_F\AmmoBoxes\AmmoBox_F.p3d";
|
||||||
EGVAR(cargo,size) = 1;
|
EGVAR(cargo,size) = 1;
|
||||||
class ACE_Actions {
|
class ACE_Actions {
|
||||||
|
@ -25,7 +25,7 @@ _control = (uiNamespace getVariable ["ACE_dlgSoldier", displayNull]) displayCtrl
|
|||||||
if (isNull _control) exitWith {};
|
if (isNull _control) exitWith {};
|
||||||
|
|
||||||
if (_show) then {
|
if (_show) then {
|
||||||
private "_config";
|
private "_config";
|
||||||
_config = configFile >> "RscInGameUI" >> "RscUnitInfoSoldier" >> "WeaponInfoControlsGroupLeft" >> "controls" >> "CA_ModeTexture";
|
_config = configFile >> "RscInGameUI" >> "RscUnitInfoSoldier" >> "WeaponInfoControlsGroupLeft" >> "controls" >> "CA_ModeTexture";
|
||||||
|
|
||||||
_control ctrlSetPosition [getNumber (_config >> "x"), getNumber (_config >> "y"), getNumber (_config >> "w"), getNumber (_config >> "h")];
|
_control ctrlSetPosition [getNumber (_config >> "x"), getNumber (_config >> "y"), getNumber (_config >> "w"), getNumber (_config >> "h")];
|
||||||
|
@ -64,8 +64,8 @@ if (GVAR(camMode) == 0) then {
|
|||||||
_vector = _vector vectorAdd [0,0,_distance*sin(-_tilt)];
|
_vector = _vector vectorAdd [0,0,_distance*sin(-_tilt)];
|
||||||
|
|
||||||
// Update the position of the target camera (used for smooth unit tracking)
|
// Update the position of the target camera (used for smooth unit tracking)
|
||||||
_target camSetPos ((_unit modelToWorldVisual [0,0,0]) vectorAdd [0,0,1.5]);
|
_target camSetPos ((_unit modelToWorldVisual [0,0,0]) vectorAdd [0,0,1.5]);
|
||||||
_target camCommit 0;
|
_target camCommit 0;
|
||||||
|
|
||||||
// Update the relative position of the unit camera
|
// Update the relative position of the unit camera
|
||||||
_camera camSetRelPos _vector;
|
_camera camSetRelPos _vector;
|
||||||
|
@ -36,9 +36,9 @@ _zoom = (call CBA_fnc_getFov) select 1;
|
|||||||
if ((vehicle ACE_player) isKindOf "Air") exitWith {
|
if ((vehicle ACE_player) isKindOf "Air") exitWith {
|
||||||
if (_zoom > VD_ZOOM_NORMAL) then {
|
if (_zoom > VD_ZOOM_NORMAL) then {
|
||||||
// Dynamically set Object View Distance based on player's Zoom Level and View Distance
|
// Dynamically set Object View Distance based on player's Zoom Level and View Distance
|
||||||
setObjectViewDistance ((_zoom / VD_ZOOM_DIVISION_AIR * (viewDistance - GVAR(fovBasedPFHminimalViewDistance))) + GVAR(fovBasedPFHminimalViewDistance));
|
setObjectViewDistance ((_zoom / VD_ZOOM_DIVISION_AIR * (viewDistance - GVAR(fovBasedPFHminimalViewDistance))) + GVAR(fovBasedPFHminimalViewDistance));
|
||||||
} else {
|
} else {
|
||||||
setObjectViewDistance (GVAR(fovBasedPFHminimalViewDistance) + viewDistance / 10);
|
setObjectViewDistance (GVAR(fovBasedPFHminimalViewDistance) + viewDistance / 10);
|
||||||
};
|
};
|
||||||
TRACE_2("FoV Based",getObjectViewDistance select 0,_zoom);
|
TRACE_2("FoV Based",getObjectViewDistance select 0,_zoom);
|
||||||
};
|
};
|
||||||
@ -46,8 +46,8 @@ if ((vehicle ACE_player) isKindOf "Air") exitWith {
|
|||||||
// Land
|
// Land
|
||||||
if (_zoom > VD_ZOOM_NORMAL) then {
|
if (_zoom > VD_ZOOM_NORMAL) then {
|
||||||
// Dynamically set Object View Distance based on player's Zoom Level and View Distance
|
// Dynamically set Object View Distance based on player's Zoom Level and View Distance
|
||||||
setObjectViewDistance ((_zoom / VD_ZOOM_DIVISION * (viewDistance - GVAR(fovBasedPFHminimalViewDistance))) + GVAR(fovBasedPFHminimalViewDistance));
|
setObjectViewDistance ((_zoom / VD_ZOOM_DIVISION * (viewDistance - GVAR(fovBasedPFHminimalViewDistance))) + GVAR(fovBasedPFHminimalViewDistance));
|
||||||
} else {
|
} else {
|
||||||
setObjectViewDistance GVAR(fovBasedPFHminimalViewDistance);
|
setObjectViewDistance GVAR(fovBasedPFHminimalViewDistance);
|
||||||
};
|
};
|
||||||
TRACE_2("FoV Based",getObjectViewDistance select 0,_zoom);
|
TRACE_2("FoV Based",getObjectViewDistance select 0,_zoom);
|
||||||
|
@ -109,6 +109,9 @@ def check_sqf_syntax(filepath):
|
|||||||
print("ERROR: Possible missing curly brace '}}' detected at {0} Line number: {1}".format(filepath,lineNumber))
|
print("ERROR: Possible missing curly brace '}}' detected at {0} Line number: {1}".format(filepath,lineNumber))
|
||||||
bad_count_file += 1
|
bad_count_file += 1
|
||||||
brackets_list.append('}')
|
brackets_list.append('}')
|
||||||
|
elif (c== '\t'):
|
||||||
|
print("ERROR: Tab detected at {0} Line number: {1}".format(filepath,lineNumber))
|
||||||
|
bad_count_file += 1
|
||||||
|
|
||||||
if (checkForSemiColumn):
|
if (checkForSemiColumn):
|
||||||
if (c not in [' ', '\t', '\n', '/']): # keep reading until no white space or comments
|
if (c not in [' ', '\t', '\n', '/']): # keep reading until no white space or comments
|
||||||
|
Loading…
Reference in New Issue
Block a user