Update some WeaponHolder to WeaponHolderBase

This commit is contained in:
ebaydayz
2016-03-31 11:35:33 -04:00
parent c54a52a103
commit 6de88c7b07
47 changed files with 621 additions and 876 deletions

View File

@@ -1,33 +1,28 @@
/*
Created exclusively for ArmA2:OA - DayZMod.
Please request permission to use/alter/distribute from project leader (R4Z0R49) && the author (facoptere@gmail.com)
*/
_REMOVED_LIB = ["addAction", "addEventhandler", "addMagazine", "addMagazineCargo", "addWeapon","addWeaponCargo", "addWPCur", "animate", "callVar", "clearMagazineCargo", "clearWeaponCargo", "createDiaryRecord","createMarkerLocal", "createSimpleTask", "createTaskSet", "debugLog", "deleteWP", "enablesimulation", "endMission","execfsm", "fadeMusic", "fadeSound", "failMission", "globalChat", "globalRadio", "groupChat", "groupRadio","hideObject", "hint", "hintC", "kbAddTopic", "kbreact", "kbRemoveTopic", "kbtell", "land", "move", "moveIn","playAction", "playActionnow", "playmovenow", "playMusic", "playsound", "removeAction","removeAllWeapons", "setCaptive", "setCurrentTask", "setCurrentTaskArrays", "setDate", "setDir", "setGroupID","setMarkerPosLocal", "setObjectTexture", "setSimpleTaskDescription", "setTaskState", "setWPdesc", "setWPtype","showCommandingMenu", "sideChat", "sideRadio", "skiptime", "spawn", "switchAction", "switchCamera", "taskHint","titleCut", "Hangender"];
_TRACED_LIB = ["execVM", "JIPexec", "JIPrequest", "say", "playmove", "switchmove", "titleText"];
// (c) facoptere@gmail.com, licensed to DayZMod for the community
#include "REsec.hpp"
waitUntil{!isNil "BIS_MPF_InitDone"};
private["_ofn","_nfn","_REMOVED_LIB","_TRACED_LIB"];
private["_ofn","_nfn"];
{
_ofn=format["r%1code",_x];
_nfn=format["r%1code%2",_x,round(random(100000))];
if(_x=="execVM")then{
call compile format["%1=%2;%2={if((count _this>=3)&&{(!((_this select 2)IN%3))})then{diag_log(""WARNING RE %2 with illegal args:""+str(_this));}else{_this call %1}};",_nfn,_ofn,["ca\Modules\Functions\init.sqf"]];
call compile format["%1=%2;%2={if((count _this>=3)AND{(!((_this select 2)IN%3))})then{diag_log(""WARNING RE %2 with illegal args:""+str(_this));}else{_this call %1}};",_nfn,_ofn,Stringify(WHITELISTED_EXECVM)];
}else{
#ifdef RESEC_VERBOSE
call compile format ["%1=%2;%2={diag_log(""RE %2 args:""+str(_this));_this call %1};",_nfn,_ofn];
#endif
};
}count _TRACED_LIB;
}foreach TRACED_LIB;
{
_ofn=format["r%1code",_x];
call compile format["%1={diag_log(""WARNING illegal RE %1 with args:""+str(_this));};",_ofn];
}count _REMOVED_LIB;
}foreach REMOVED_LIB;
#ifndef SKIP_REMOTEEXECUTIONSERVER
[]spawn{
while {(1 == 1)} do {
while{(1 == 1)}do{
private["_nfn"];
waitUntil{BIS_PathMPscriptCommandsCustom=="\ca\Modules\MP\data\scriptCommandsCustom\"};
_nfn="BIS_MPF_remoteExecutionServer"+str(round(random(100000)));
@@ -45,8 +40,8 @@ private["_ofn","_nfn","_REMOVED_LIB","_TRACED_LIB"];
};
if(typeName _co==""STRING"")then{
{
if(!((_x>=65&&_x<=90)||(_x>=97&&_x<=122))) exitWith {diag_log(""WARNING possible code injection args:""+str(_this)); _this=[];};
}count (toArray _co);
if(!((_x>=65&&_x<=90)OR(_x>=97&&_x<=122))) exitWith {diag_log(""WARNING possible code injection args:""+str(_this)); _this=[];};
}forEach toArray _co;
};
};
_this call "+_nfn+"};"
@@ -58,4 +53,4 @@ private["_ofn","_nfn","_REMOVED_LIB","_TRACED_LIB"];
uiSleep 1;
};
};
#endif
#endif