From e36751add20e27293e938a079b18f2c12f3bac07 Mon Sep 17 00:00:00 2001 From: eraser1 Date: Thu, 30 Jun 2016 02:29:11 -0500 Subject: [PATCH] player respect will now be saved --- @ExileServer/addons/a3_dms/config.cpp | 2 +- @ExileServer/addons/a3_dms/scripts/fn_OnKilled.sqf | 6 +++--- .../addons/a3_dms/scripts/fn_PlayerAwardOnAIKill.sqf | 3 +++ README.md | 4 ++++ 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/@ExileServer/addons/a3_dms/config.cpp b/@ExileServer/addons/a3_dms/config.cpp index 3843666..300ce57 100644 --- a/@ExileServer/addons/a3_dms/config.cpp +++ b/@ExileServer/addons/a3_dms/config.cpp @@ -4,7 +4,7 @@ class CfgPatches { units[] = {}; weapons[] = {}; - a3_DMS_version = "June 29, 2016 (2)"; + a3_DMS_version = "June 30, 2016"; requiredVersion = 1.36; requiredAddons[] = {"exile_client","exile_server_config"}; }; diff --git a/@ExileServer/addons/a3_dms/scripts/fn_OnKilled.sqf b/@ExileServer/addons/a3_dms/scripts/fn_OnKilled.sqf index 0ad65ac..ccad7db 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_OnKilled.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_OnKilled.sqf @@ -331,11 +331,11 @@ if (isPlayer _killer) then }; }; - + private _shareInfoDistance = _unit getVariable ["DMS_ai_share_info_distance",DMS_ai_share_info_distance]; { - if ((alive _x) && {!(isPlayer _x) && {(_x distance2D _unit) <= (_unit getVariable ["DMS_ai_share_info_distance",DMS_ai_share_info_distance])}}) then + if ((_x distance2D _unit) <= _shareInfoDistance) then { - _x reveal [_killer, _revealAmount max (_x knowsAbout _playerObj)]; + _x reveal [_killer, _revealAmount]; }; } forEach _grpUnits; }; diff --git a/@ExileServer/addons/a3_dms/scripts/fn_PlayerAwardOnAIKill.sqf b/@ExileServer/addons/a3_dms/scripts/fn_PlayerAwardOnAIKill.sqf index 03ac5d2..61f91da 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_PlayerAwardOnAIKill.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_PlayerAwardOnAIKill.sqf @@ -114,6 +114,9 @@ if ((!isNull _playerObj) && {(_playerUID != "") && {_playerObj isKindOf "Exile_U [_playerObj, "showFragRequest", [_attributes]] call ExileServer_system_network_send_to; }; + // Update respect in database + format["setAccountScore:%1:%2", _playerRespect, _playerUID] call ExileServer_system_database_query_fireAndForget; + // Send updated respect value to client ExileClientPlayerScore = _playerRespect; (owner _playerObj) publicVariableClient "ExileClientPlayerScore"; diff --git a/README.md b/README.md index eb62332..9e13eca 100644 --- a/README.md +++ b/README.md @@ -150,6 +150,10 @@ ___ # Changelog: ### Main Branch +#### June 30, 2016 (2:30 AM CST-America): +* DMS will now update player respect in the database when a player kills an AI (and respect is awarded to the player). +* Optimizations related to "DMS_ai_share_info" (also, using a suppressor against AI might be better ;) ) + #### June 29, 2016 (6:00 PM CST-America): * Fixed a few issues (script errors, missions not broadcasting, group kill notifications not broadcasting).