From 7428f3fd1f2fbdfa9a4ace1169aa2d5ca5b0b228 Mon Sep 17 00:00:00 2001 From: oiad Date: Thu, 17 Aug 2017 23:09:10 +1200 Subject: [PATCH 1/3] AI hit messages and continuity This changes the hit messages to only show AI instead of the AI's names. Changes this: 20:08:37 "P1ayer PID#7(salival) hit by PID#1(Qadeer Hakimi) with vil_G36VA4Eot/B_556x45_Ball from 356 meters in head_hit for 0 damage" To this: 20:08:37 "P1ayer PID#7(salival) hit by AI with vil_G36VA4Eot/B_556x45_Ball from 356 meters in head_hit for 0 damage" Sanity fix for hit and kill for vehicles so they match: Before: 22:44:03 "P1ayer PID#3(salival) hit by AI in Pickup (PK) DZ from 15 meters in head_hit for 0.88666 damage" After: 22:44:03 "P1ayer PID#3(salival) hit by AI with a Pickup (PK) DZ from 15 meters in head_hit for 0.88666 damage" Kill message: 22:44:04 "salival (76561197999617086) salival was killed by AI with a Pickup_PK_INS_DZ from 15m" --- SQF/dayz_code/compile/fn_damageHandler.sqf | 2 +- SQF/dayz_server/init/server_functions.sqf | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SQF/dayz_code/compile/fn_damageHandler.sqf b/SQF/dayz_code/compile/fn_damageHandler.sqf index 79960097a..ff4d2b614 100644 --- a/SQF/dayz_code/compile/fn_damageHandler.sqf +++ b/SQF/dayz_code/compile/fn_damageHandler.sqf @@ -171,7 +171,7 @@ if (_unit == player) then { _sourceDist = round(_unit distance _source); _sourceWeap = switch (true) do { case (_ammo in ["PipeBomb","Mine","MineE"]): { format["with %1",_ammo] }; - case (_isVehicle) : { format ["in %1",getText(configFile >> "CfgVehicles" >> _sourceVehicleType >> "displayName")] }; + case (_isVehicle) : { format ["with a %1",getText(configFile >> "CfgVehicles" >> _sourceVehicleType >> "displayName")] }; case (_ammo in MeleeAmmo) : { format ["with %2%1",_wpst select 0, if (_sourceDist>6) then {"suspicious weapon "} else {""}] }; case (_wpst select 0 == "Throw") : { format ["with %1 thrown", _wpst select 3] }; case (["Horn", currentWeapon _source] call fnc_inString) : {"with suspicious vehicle "+str((getposATL _source) nearEntities [["Air", "LandVehicle", "Ship"],5])}; diff --git a/SQF/dayz_server/init/server_functions.sqf b/SQF/dayz_server/init/server_functions.sqf index ec13e02fd..3ccc0eba6 100644 --- a/SQF/dayz_server/init/server_functions.sqf +++ b/SQF/dayz_server/init/server_functions.sqf @@ -250,7 +250,7 @@ fa_plr2str = { _name = _x getVariable ["bodyName", nil]; if ((isNil "_name" OR {(_name == "")}) AND ({alive _x})) then { _name = name _x; }; if (isNil "_name" OR {(_name == "")}) then { _name = "UID#"+(getPlayerUID _x); }; - _res = format["PID#%1(%2)", owner _x, _name ]; + _res = if (isPlayer _x) then {format["PID#%1(%2)", owner _x, _name]} else {localize "STR_PLAYER_AI"}; }; _res }; @@ -269,4 +269,4 @@ array_reduceSize = { // Precise base building 1.0.5 call compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\kk_functions.sqf"; -#include "mission_check.sqf" \ No newline at end of file +#include "mission_check.sqf" From d04a99aa04df724e80f4bf3eec8c02d1467dc1f3 Mon Sep 17 00:00:00 2001 From: oiad Date: Thu, 17 Aug 2017 23:19:48 +1200 Subject: [PATCH 2/3] Fix vehicles bouncing when upgrading. This helps stop vehicles bouncing when being upgraded. The Vehicle Key Changer script I rewrote uses the epoch vehicle upgrade system to claim/change the vehicle key, we noticed that it was causing the vehicles to bounce, but VKC uses all the position functions from the epoch script so it's not something that VKC has introduced. --- SQF/dayz_server/compile/server_publishVehicle3.sqf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SQF/dayz_server/compile/server_publishVehicle3.sqf b/SQF/dayz_server/compile/server_publishVehicle3.sqf index 9637dea2d..e600b08f2 100644 --- a/SQF/dayz_server/compile/server_publishVehicle3.sqf +++ b/SQF/dayz_server/compile/server_publishVehicle3.sqf @@ -45,7 +45,7 @@ _key call server_hiveWrite; _class = _this select 3; _dir = _this select 4; // _location = _this select 5; - _location = getPosATL _object; + _location = [_object] call fnc_getPos; _donotusekey = _this select 6; _activatingPlayer = _this select 7; @@ -111,6 +111,7 @@ _key call server_hiveWrite; _object setDir _dir; _object setPosATL _location; + _object setVectorUp surfaceNormal _location; //Add weapons _objWpnTypes = _weapons select 0; From 4355824aad6807832e8f3fd0ee92570fb9204b21 Mon Sep 17 00:00:00 2001 From: oiad Date: Thu, 17 Aug 2017 23:25:08 +1200 Subject: [PATCH 3/3] Revert commit --- SQF/dayz_server/compile/server_publishVehicle3.sqf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/SQF/dayz_server/compile/server_publishVehicle3.sqf b/SQF/dayz_server/compile/server_publishVehicle3.sqf index e600b08f2..9637dea2d 100644 --- a/SQF/dayz_server/compile/server_publishVehicle3.sqf +++ b/SQF/dayz_server/compile/server_publishVehicle3.sqf @@ -45,7 +45,7 @@ _key call server_hiveWrite; _class = _this select 3; _dir = _this select 4; // _location = _this select 5; - _location = [_object] call fnc_getPos; + _location = getPosATL _object; _donotusekey = _this select 6; _activatingPlayer = _this select 7; @@ -111,7 +111,6 @@ _key call server_hiveWrite; _object setDir _dir; _object setPosATL _location; - _object setVectorUp surfaceNormal _location; //Add weapons _objWpnTypes = _weapons select 0;