Open ComfyPillow opened 8 years ago
String comparison ignores case unless using arrays with in / find
alt syntax
_heliType in (["I_Heli_Transport_02_F", "I_Heli_Transport_01_F"] apply {toLower _x})
I've created a issue for the Mi-6T and A on their github. http://dev.cup-arma3.org/T1399
I'v eupdated the Slingloading script to the newest version from upstream. Seems like a lot of things have been updated and changed.
I'm currently taking a look at the script and look for potential places for improvement.
So far, I've found the following code block(s), which I'd like to refactor:
ASL_Add_Player_Actions = {
player addAction ["Extend Cargo Ropes", {
[] call ASL_Extend_Ropes_Action;
}, nil, 0, false, true, "", "call ASL_Extend_Ropes_Action_Check"];
player addAction ["Shorten Cargo Ropes", {
[] call ASL_Shorten_Ropes_Action;
}, nil, 0, false, true, "", "call ASL_Shorten_Ropes_Action_Check"];
player addAction ["Release Cargo", {
[] call ASL_Release_Cargo_Action;
}, nil, 0, false, true, "", "call ASL_Release_Cargo_Action_Check"];
player addAction ["Retract Cargo Ropes", {
[] call ASL_Retract_Ropes_Action;
}, nil, 0, false, true, "", "call ASL_Retract_Ropes_Action_Check"];
player addAction ["Deploy Cargo Ropes", {
[] call ASL_Deploy_Ropes_Action;
}, nil, 0, false, true, "", "call ASL_Deploy_Ropes_Action_Check"];
player addAction ["Put Away Cargo Ropes", {
[] call ASL_Put_Away_Ropes_Action;
}, nil, 0, false, true, "", "call ASL_Put_Away_Ropes_Action_Check"];
player addAction ["Attach To Cargo Ropes", {
[] call ASL_Attach_Ropes_Action;
}, nil, 0, false, true, "", "call ASL_Attach_Ropes_Action_Check"];
player addAction ["Drop Cargo Ropes", {
[] call ASL_Drop_Ropes_Action;
}, nil, 0, false, true, "", "call ASL_Drop_Ropes_Action_Check"];
player addAction ["Pickup Cargo Ropes", {
[] call ASL_Pickup_Ropes_Action;
}, nil, 0, false, true, "", "call ASL_Pickup_Ropes_Action_Check"];
player addEventHandler ["Respawn", {
player setVariable ["ASL_Actions_Loaded",false];
}];
};
if(!isDedicated) then {
[] spawn {
while {true} do {
if(!isNull player && isPlayer player) then {
if!( player getVariable ["ASL_Actions_Loaded",false] ) then {
[] call ASL_Add_Player_Actions;
player setVariable ["ASL_Actions_Loaded",true];
};
};
missionNamespace setVariable ["ASL_Nearby_Vehicles", (call ASL_Find_Nearby_Vehicles)];
sleep 2;
};
};
};
That while{true} loop needs to go. There's no reason to have this. I also want to replace the AddActions with ACE Actions. these are JIP Safe and also work when you are using Zeus to remote-control an AI. Should also improve the performance a tiny bit, since you don't have 9 AddAction considiton checks being called on every frame for each player, and since we can remove the infinite while block, this should also help a little.
Uses ACE Interactions now, and removed that terrible while loop.
ASL_Find_Nearby_Vehicles now only gets called when opening the ACE Menu, instead of every 2 seconds for the whole game.
And the 9 Check functions now only get called once when opening the ACE Menu, as opposed to every frame.
Affected Script: comfy-downtime/src/FP_ComfyDowntime.VR/scripts/fn_advancedSlingLoadingInit.sqf
The Advanced Slingloading Script offers slingloading for every helicopter to slingload and every vehicle to be slingloaded.
However it can benefit from a few things.
The Current solution is to wiggle the helicopter left and right so the ropes fall trough the floor thanks to Arma's realistic simulation of physics.