diff --git a/@ExileServer/addons/a3_dms/scripts/fn_FillCrate.sqf b/@ExileServer/addons/a3_dms/scripts/fn_FillCrate.sqf index 891d268..3b6b57c 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_FillCrate.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_FillCrate.sqf @@ -225,11 +225,11 @@ else }; if !((_crateValues params - [ - ["_weps", [], [[]]], - ["_items", [], [[]]], - ["_backpacks", [], [[]]] - ])) + [ + ["_weps", [], [[]]], + ["_items", [], [[]]], + ["_backpacks", [], [[]]] + ])) exitWith { diag_log format ["DMS ERROR :: Invalid ""_crateValues"" (%1) generated from _lootValues: %2",_crateValues,_lootValues]; diff --git a/@ExileServer/addons/a3_dms/scripts/fn_OnKilled.sqf b/@ExileServer/addons/a3_dms/scripts/fn_OnKilled.sqf index dce38c0..c77dbf3 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_OnKilled.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_OnKilled.sqf @@ -271,7 +271,8 @@ if (isPlayer _killer) then if (DMS_explode_onRoadkill) then { - _boom = createVehicle ["SLAMDirectionalMine_Wire_Ammo", ASLToAGL(getPosWorld _unit), [], 0, "CAN_COLLIDE"]; + _boom = createVehicle ["SLAMDirectionalMine_Wire_Ammo", [0,0,100], [], 0, "CAN_COLLIDE"]; + _boom setPosATL (getPosATL _playerObj); _boom setDamage 1; if (DMS_DEBUG) then { diff --git a/@ExileServer/addons/a3_dms/scripts/fn_PlayerAwardOnAIKill.sqf b/@ExileServer/addons/a3_dms/scripts/fn_PlayerAwardOnAIKill.sqf index b90d0aa..4a8a05f 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_PlayerAwardOnAIKill.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_PlayerAwardOnAIKill.sqf @@ -76,7 +76,7 @@ if ((!isNull _playerObj) && {(_playerUID != "") && {_playerObj isKindOf "Exile_U if (_moneyChange!=0) then { - private ["_msgType", "_msgParams"]; + private ["_msgType", "_msgParams", "_distance", "_attributes", "_distanceBonus"]; // Set client's money // I also make sure that they don't get negative poptabs @@ -164,7 +164,7 @@ if ((!isNull _playerObj) && {(_playerUID != "") && {_playerObj isKindOf "Exile_U _members = units _group; if (!(_group isEqualTo ExileGraveyardGroup) && {(count _members)>1}) then { - _msg = format["%1 killed %2 and received %3 poptabs and %4 respect.",name _playerObj,name _unit,_moneyChange,_repChange]; + _msg = format["%1 killed %2 from %3 meters away and received %4 poptabs and %5 respect.",name _playerObj,name _unit,if !(isNil "_distance") then {_distance} else {floor (_unit distance _playerObj)},_moneyChange,_repChange]; { _msg remoteExecCall ["systemChat", _x]; } forEach _members; diff --git a/@ExileServer/addons/a3_dms/scripts/fn_SelectMagazine.sqf b/@ExileServer/addons/a3_dms/scripts/fn_SelectMagazine.sqf index ba64160..c28f779 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_SelectMagazine.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_SelectMagazine.sqf @@ -14,8 +14,9 @@ private["_result","_ammoArray"]; _result = ""; _ammoArray = getArray (configFile >> "CfgWeapons" >> _this >> "magazines"); -if (count _ammoArray > 0) then { +if (count _ammoArray > 0) then +{ _result = _ammoArray select 0; }; -_result \ No newline at end of file +_result diff --git a/README.md b/README.md index 993b346..970a6ba 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ ___ ___ # Changelog: -#### **BETA CHANGELOG** Last Updated January 6, 2015 (6:30 PM CST-America): +#### **BETA CHANGELOG** Last Updated January 9, 2016 (11:05 AM CST-America): * **NEW CONFIG VALUES:** DMS_MissionTimeoutResetFrequency @@ -150,13 +150,14 @@ ___ * ```_onMonitorStart``` will now run BEFORE success state is checked. As a result, I added a new "completion type" in "fn_MissionSuccessState" so that you can force mission completion via array manipulations. * "fn_OnKilled" now gets AI side and type using "getVariable" instead of having to include them in the "addMPEventHandler". If you are using the function for custom purposes, you will need to edit your usage. * You can now choose whether or not an AI produces different respect or tabs when roadkilled individually. -* You can now allow party members to be notified in chat when a party member kills an AI. +* You can now allow party members to be notified in chat when a party member kills an AI. It includes AI type+side, distance, and the amount of poptabs/respect received. * You can now notify clients when AI have been offloaded to them. * You now have greater control over AI difficulty; you can now manually define "random" presets to include/exclude special difficulty types. * New function: "DMS_fnc_SetGroupBehavior_Separate" - You can pass an array of units and define their behavior without affecting the rest of the group. * "DMS_fnc_SpawnAIVehicle" is overhauled: instead of only spawning a driver and a gunner, the function uses "allTurrets" to completely fill the crew of a vehicle. * "DMS_fnc_SpawnAIVehicle" no longer sets the crew's behavior to "aware". * Optimized "DMS_fnc_TargetsKilled". +* "DMS_explode_onRoadkill" now spawns the mine ON the player that ran the AI over, so damage to the vehicle is guaranteed no matter how fast the vehicle was going.