proper use of copy operator

https://community.bistudio.com/wiki/Operators
This commit is contained in:
vbawol 2017-08-24 09:28:57 -05:00
parent 383d67c28c
commit 5d044b3d9b
4 changed files with 4 additions and 4 deletions

View File

@ -135,7 +135,7 @@ class FSM
condition=/*%FSM<CONDITION""">*/"!(_moveTo isEqualTo _nextPos)"/*%FSM</CONDITION""">*/; condition=/*%FSM<CONDITION""">*/"!(_moveTo isEqualTo _nextPos)"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/"_doMove = true;" \n action=/*%FSM<ACTION""">*/"_doMove = true;" \n
"_decisionMade = true;" \n "_decisionMade = true;" \n
"_moveTo = [] + _nextPos;" \n "_moveTo = +_nextPos;" \n
""/*%FSM</ACTION""">*/; ""/*%FSM</ACTION""">*/;
}; };
/*%FSM</LINK>*/ /*%FSM</LINK>*/

View File

@ -17,7 +17,7 @@ private ["_agent","_aiTables","_arr","_class","_currentStock","_existingStock","
//[[[end]]] //[[[end]]]
params [["_maxTraderLimit",0]]; params [["_maxTraderLimit",0]];
_staticTradersArray = [] + EPOCH_staticNPCTraderPos; _staticTradersArray = +EPOCH_staticNPCTraderPos;
EPOCH_staticNPCTraderPos = nil; EPOCH_staticNPCTraderPos = nil;
_staticTradersArray append getArray(configFile >> "CfgEpoch" >> worldName >> "staticNpcPos"); _staticTradersArray append getArray(configFile >> "CfgEpoch" >> worldName >> "staticNpcPos");
_staticTradersArrCount = count _staticTradersArray; _staticTradersArrCount = count _staticTradersArray;

View File

@ -396,7 +396,7 @@ class FSM
" {" \n " {" \n
" _removed = _events deleteAt (_eventsMarkedForRemoval deleteAt _forEachIndex);" \n " _removed = _events deleteAt (_eventsMarkedForRemoval deleteAt _forEachIndex);" \n
" diag_log format[""DEBUG: removing event: %1"",_removed];" \n " diag_log format[""DEBUG: removing event: %1"",_removed];" \n
" } forEach ([] + _eventsMarkedForRemoval);" \n " } forEach (+_eventsMarkedForRemoval);" \n
"};" \n "};" \n
"" \n "" \n
"// restart script" \n "// restart script" \n

View File

@ -84,7 +84,7 @@ if (_status == 1 && _data isEqualType [] && !(_data isEqualTo [])) then {
_position set [1,(_position select 1) + _offsetY]; _position set [1,(_position select 1) + _offsetY];
_position set [2,(_position select 2) - 1]; _position set [2,(_position select 2) - 1];
_upperPos = [] + _position; _upperPos = +_position;
_upperPos set [2,(_position select 2) + 3]; _upperPos set [2,(_position select 2) + 3];
_intersections = lineIntersectsSurfaces [_upperPos, _position, objNull, objNull, true, 1]; _intersections = lineIntersectsSurfaces [_upperPos, _position, objNull, objNull, true, 1];