fixed a weird error in master

This commit is contained in:
Bjanski 2016-04-13 17:07:43 +02:00
parent 14a31cb0fe
commit c08f744167
16 changed files with 298 additions and 0 deletions

View File

@ -0,0 +1,29 @@
/*
CfgFunctions.cpp
Copyright 2016 Jan Babor
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
class ExAd
{
tag = "ExAd";
#include "Core\CfgFunctions.cpp"
//#include "VirtualGarage\CfgFunctions.cpp"
//#include "AdminEvents\CfgFunctions.cpp"
//#include "Hacking\CfgFunctions.cpp"
//#include "Grinding\CfgFunctions.cpp"
//#include "HaloParachute\CfgFunctions.cpp"
};

View File

@ -0,0 +1,20 @@
/*
CfgHints.cpp
Copyright 2016 Jan Babor
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
//#include "VirtualGarage\CfgHints.cpp"

View File

@ -0,0 +1,20 @@
/*
CfgNetworkMessages.cpp
Copyright 2016 Jan Babor
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#include "Core\CfgNetworkMessages.cpp"

View File

@ -0,0 +1,33 @@
/*
CfgFunctions.cpp
Copyright 2016 Jan Babor
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
class System
{
file = "ExAdClient\Core\Functions\System";
class serverDispatch {};
class incomingRequest {};
class initOverlay {};
class changeable {file = "ExAdClient\Core\postInit.sqf"; postInit = 1;};
};
class Utilities
{
file = "ExAdClient\Core\Functions\Utils";
class advancedHint {};
class call {};
class getNearByLocalVeh {};
};

View File

@ -0,0 +1,27 @@
/*
CfgNetworkMessages.cpp
Copyright 2016 Jan Babor
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
class AdvancedHint
{
parameters[] = {"STRING","ARRAY"};
};
class Call
{
parameters[] = {"CODE"};
};

View File

@ -0,0 +1,22 @@
/*
fn_debugHandler.sqf
Copyright 2016 Jan Babor
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
params ["_fnc","_exception"];
if(ExAd_Debug)then{
diag_log format["ExAd Debugger: Error in %1 - '%2'",_fnc, _exception]
}

View File

@ -0,0 +1 @@
/** * fn_incomingRequest.sqf * Modified by Jan Babor 2016 * * Originally * ExileClient_system_network_dispatchIncomingMessage * * Exile Mod * www.exilemod.com * © 2015 Exile Mod Team * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. */ private["_payload","_messageName","_messageParameters","_allowedParameters","_message","_exception"]; _payload = _this; try { if (isNil "_payload") then { throw "Message payload is not defined!"; }; if (typeName _payload != "ARRAY") then { throw "Message payload is not a array!"; }; if (count _payload != 2) then { throw format ["Wrong envelope field count! Payload: %1", _payload]; }; _messageName = _payload select 0; _messageParameters = _payload select 1; if !(isClass (missionConfigFile >> "CfgNetworkMessages" >> _messageName)) then { throw format ["Forbidden message name! Payload: %1", _payload]; }; _allowedParameters = getArray(missionConfigFile >> "CfgNetworkMessages" >> _messageName >> "parameters"); if (count _messageParameters != count _allowedParameters) then { throw format ["Parameter count mismatch! Payload: %1", _payload]; }; { if (_x != typeName (_messageParameters select _forEachIndex)) then { throw format ["Parameter type mismatch! Payload: %1", _payload]; }; } forEach _allowedParameters; diag_log format["Dispatching message '%1'...", _messageName]; call compile format["_messageParameters call ExAd_fnc_%1;",_messageName]; } catch { ["incomingRequest",_exception] call ExAd_fnc_debugHandler; }; true

View File

@ -0,0 +1,21 @@
/*
fn_serverDispatch.sqf
Copyright 2016 Jan Babor
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
_this remoteExec ["ExAdServer_fnc_clientRequest",2];
true

View File

@ -0,0 +1 @@
/** * fn_advancedHint.sqf * Modified by Jan Babor 2016 * * Originally * ExileClient_system_network_dispatchIncomingMessage * * Exile Mod * www.exilemod.com * © 2015 Exile Mod Team * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. */ private ["_payload","_messageName","_messageParameters","_allowedParameters","_message","_exception"]; _payload = _this; try { if(isNil "_payload")then{ throw "Message payload is not defined!" }; if (typeName _payload != "ARRAY") then { throw "Message payload is not a array!"; }; if (count _payload != 2) then { throw format ["Wrong envelope field count! Payload: %1", _payload]; }; _messageName = _payload select 0; _messageParameters = _payload select 1; if !(isClass (missionConfigFile >> "CfgHints" >> "ExAd" >> _messageName)) then { throw format ["Forbidden Hint Class! Payload: %1", _payload]; }; _allowedParameters = getArray(missionConfigFile >> "CfgHints" >> "ExAd" >> _messageName >> "parameters"); if (count _messageParameters != count _allowedParameters) then { throw format ["Parameter count mismatch! Payload: %1", _payload]; }; { if (_x != typeName (_messageParameters select _forEachIndex)) then { throw format ["Parameter type mismatch! Payload: %1", _payload]; }; } forEach _allowedParameters; missionNamespace setVariable [_messageName,_messageParameters]; [["ExAd",_messageName]] call BIS_fnc_advHint; } catch { ["advancedHint",_exception] call ExAd_fnc_debugHandler; }; true

View File

@ -0,0 +1 @@
/* fn_call.sqf Copyright 2016 Jan Babor Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ params ["_code"]; call _code; true

View File

@ -0,0 +1 @@
/* fn_getNearByLocalVeh.sqf Copyright 2016 Jan Babor Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ private ["_obj","_cat","_nearDist","_list"]; _obj = [_this,0,objNull] call BIS_fnc_param; _cat = [_this,1,["Car"],[[]]] call BIS_fnc_param; _nearDist = [_this,2,100,[0]] call BIS_fnc_param; _list = []; { if(local _x)then{ _list pushBack _x } }forEach nearestObjects [_obj,_cat,_nearDist]; _list

View File

@ -0,0 +1,19 @@
/*
customize.sqf
Copyright 2016 Jan Babor
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
ExAd_Debug = true; //True/False If you want the ExAd code to generate debug logs.

View File

@ -0,0 +1,20 @@
/*
postInit.sqf
Copyright 2016 Jan Babor
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
execVM "ExAdClient\Core\customize.sqf";

View File

@ -0,0 +1,25 @@
/*
ExAd.cpp
Copyright 2016 Jan Babor
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
//#include "Core\ExAd.cpp"
//#include "VirtualGarage\ExAd.cpp"
//#include "AdminEvents\ExAd.cpp"
//#include "Hacking\ExAd.cpp"
//#include "Grinding\ExAd.cpp"
//#include "HaloParachute\ExAd.cpp"

View File

@ -0,0 +1,20 @@
/*
RscTitles.cpp
Copyright 2016 Jan Babor
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
//#include "HUD\RscTitles.cpp"

View File

@ -0,0 +1,38 @@
#include "ExAdClient\ExAd.cpp"
class CfgFunctions
{
#include "ExAdClient\CfgFunctions.cpp"
};
class RscTitles
{
#include "ExAdClient\RscTitles.cpp"
};
class CfgHints
{
#include "ExAdClient\CfgHints.cpp"
};
class CfgNetworkMessages
{
#include "ExAdClient\CfgNetworkMessages.cpp"
};
class CfgRemoteExec
{
class Functions
{
mode = 1;
jip = 0;
class ExileServer_system_network_dispatchIncomingMessage { allowedTargets=2; };
class ExAd_fnc_clientRequest { allowedTargets=2; };
};
class Commands
{
mode=0;
jip=0;
};
};