snap code optimization, vault points added

This commit is contained in:
raymix
2014-07-12 20:23:42 +01:00
parent 07b3f14c1b
commit 2355d6b18e
3 changed files with 29 additions and 6 deletions

View File

@@ -26,9 +26,9 @@ fnc_snapActionCleanup = {
_s1 = _this select 0;
_s2 = _this select 1;
_s3 = _this select 2;
player removeAction s_player_toggleSnap;
player removeAction s_player_toggleSnapSelect;
{player removeAction _x;} count s_player_toggleSnapSelectPoint;
player removeAction s_player_toggleSnap; s_player_toggleSnap = -1;
player removeAction s_player_toggleSnapSelect; s_player_toggleSnapSelect = -1;
if (count s_player_toggleSnapSelectPoint != 0) then {{player removeAction _x;} count s_player_toggleSnapSelectPoint; s_player_toggleSnapSelectPoint=[]; snapActions = -1;};
if (_s1 > 0) then {
s_player_toggleSnap = player addaction [format[("<t color=""#ffffff"">" + ("Snap: %1") +"</t>"),snapActionState],"\z\addons\dayz_code\actions\snap_build.sqf",[snapActionState,_object,_classname,_objectHelper],6,false,true];
};
@@ -58,7 +58,7 @@ fnc_initSnapPoints = {
fnc_initSnapPointsNearby = {
_pos = getPosATL _object;
_findWhitelisted = []; _pointsNearby = [];
_findWhitelisted = nearestObjects [_pos,_whitelist,15]-[_object];
_findWhitelisted = nearestObjects [_pos,_whitelist,10]-[_object];
snapGizmosNearby = [];
{
_nearbyObject = _x;
@@ -223,8 +223,8 @@ fnc_initSnapTutorial = {
[
_bldTxtFinal, //structured text
[0.73 * safezoneW + safezoneX], //number - x
[0.65 * safezoneH + safezoneY], //number - y
0.73 * safezoneW + safezoneX, //number - x
0.65 * safezoneH + safezoneY, //number - y
30, //number - duration
1, // number - fade in time
0, // number - delta y