mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-20 07:02:56 +03:00
Do not send purchased vehicle marker arrow over network
Only the player buying the vehicle needs to see the arrow.
Also fixed CfgMagazines error from:
2c4c75c67c (diff-fcf3df9a25b3d05402ab4e4809673194R6)
@icomrade
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
#define COMBINE_MAG class CombineMag\
|
||||
{\
|
||||
text = $STR_MAG_COMBINE;\
|
||||
script = "spawn player_combineMag;"; // r_action_count = r_action_count + 1;\
|
||||
script = "spawn player_combineMag;";\
|
||||
};
|
||||
|
||||
#include "9x18.hpp" //Makarov
|
||||
|
||||
@@ -146,15 +146,16 @@ if (_enoughMoney) then {
|
||||
_location = [([player] call FNC_GetPos),0,20,1,0,2000,0] call BIS_fnc_findSafePos;
|
||||
};
|
||||
|
||||
_veh = createVehicle ["Sign_arrow_down_large_EP1", _location, [], 0, "CAN_COLLIDE"];
|
||||
_location = ([_veh] call FNC_GetPos);
|
||||
_sign = "Sign_arrow_down_large_EP1" createVehicleLocal _location;
|
||||
_location = [_sign] call FNC_GetPos;
|
||||
|
||||
if (_buyingType in ["trade_any_vehicle_free", "trade_any_bicycle", "trade_any_bicycle_old"]) then {
|
||||
PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,true,"0",_activatingPlayer];
|
||||
PVDZE_veh_Publish2 = [[_dir,_location],_part_out,true,"0",_activatingPlayer];
|
||||
} else {
|
||||
PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,false,_keySelected,_activatingPlayer];
|
||||
PVDZE_veh_Publish2 = [[_dir,_location],_part_out,false,_keySelected,_activatingPlayer];
|
||||
};
|
||||
publicVariableServer "PVDZE_veh_Publish2";
|
||||
[_part_out,_sign] spawn fn_waitForObject;
|
||||
_keySelected;
|
||||
};
|
||||
//systemChat localize "STR_EPOCH_PLAYER_105"; // "Stand still to complete trade". Medic animation loop no longer used.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private ["_veh","_location","_isOk","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_keyColor","_keyNumber","_keySelected","_isKeyOK","_config","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_canAfford","_trade_total","_total_currency","_return_change","_done"];
|
||||
private ["_sign","_location","_isOk","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_keyColor","_keyNumber","_keySelected","_isKeyOK","_config","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_canAfford","_trade_total","_total_currency","_return_change","_done"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
@@ -127,12 +127,12 @@ if (_finished) then {
|
||||
};
|
||||
|
||||
//place vehicle spawn marker (local)
|
||||
_veh = createVehicle ["Sign_arrow_down_large_EP1", _location, [], 0, "CAN_COLLIDE"];
|
||||
_sign = "Sign_arrow_down_large_EP1" createVehicleLocal _location;
|
||||
_location = [_sign] call FNC_GetPos;
|
||||
|
||||
_location = (getPosATL _veh);
|
||||
|
||||
PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,true,dayz_characterID,_activatingPlayer];
|
||||
PVDZE_veh_Publish2 = [[_dir,_location],_part_out,true,dayz_characterID,_activatingPlayer];
|
||||
publicVariableServer "PVDZE_veh_Publish2";
|
||||
[_part_out,_sign] spawn fn_waitForObject;
|
||||
|
||||
format[localize "STR_EPOCH_PLAYER_180",_qty_in,_textPartIn,_textPartOut] call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private ["_veh","_location","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_removed","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_playerNear"];
|
||||
private ["_sign","_location","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_removed","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_playerNear"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
@@ -104,14 +104,12 @@ if (_qty >= _qty_in) then {
|
||||
};
|
||||
|
||||
//place vehicle spawn marker (local)
|
||||
_veh = createVehicle ["Sign_arrow_down_large_EP1", _location, [], 0, "CAN_COLLIDE"];
|
||||
_sign = "Sign_arrow_down_large_EP1" createVehicleLocal _location;
|
||||
_location = [_sign] call FNC_GetPos;
|
||||
|
||||
_location = (getPosATL _veh);
|
||||
|
||||
PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,true,dayz_characterID,_activatingPlayer];
|
||||
PVDZE_veh_Publish2 = [[_dir,_location],_part_out,true,dayz_characterID,_activatingPlayer];
|
||||
publicVariableServer "PVDZE_veh_Publish2";
|
||||
|
||||
player reveal _veh;
|
||||
[_part_out,_sign] spawn fn_waitForObject;
|
||||
|
||||
format[localize "str_epoch_player_180",_qty_in,_textPartIn,_textPartOut] call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private ["_veh","_location","_result","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_canAfford","_trade_total","_total_currency","_return_change","_done"];
|
||||
private ["_sign","_location","_result","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_canAfford","_trade_total","_total_currency","_return_change","_done"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
@@ -132,12 +132,12 @@ if (_finished) then {
|
||||
};
|
||||
|
||||
//place vehicle spawn marker (local)
|
||||
_veh = createVehicle ["Sign_arrow_down_large_EP1", _location, [], 0, "CAN_COLLIDE"];
|
||||
_sign = "Sign_arrow_down_large_EP1" createVehicleLocal _location;
|
||||
_location = [_sign] call FNC_GetPos;
|
||||
|
||||
_location = (getPosATL _veh);
|
||||
|
||||
PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,false,_result select 1,_activatingPlayer];
|
||||
PVDZE_veh_Publish2 = [[_dir,_location],_part_out,false,_result select 1,_activatingPlayer];
|
||||
publicVariableServer "PVDZE_veh_Publish2";
|
||||
[_part_out,_sign] spawn fn_waitForObject;
|
||||
|
||||
format[localize "STR_EPOCH_ACTIONS_11",_qty_in,_textPartIn,_textPartOut] call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private ["_veh","_location","_result","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_removed","_okToSell","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_playerNear"];
|
||||
private ["_sign","_location","_result","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_removed","_okToSell","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_playerNear"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
@@ -110,14 +110,12 @@ if (_qty >= _qty_in) then {
|
||||
};
|
||||
|
||||
//place vehicle spawn marker (local)
|
||||
_veh = createVehicle ["Sign_arrow_down_large_EP1", _location, [], 0, "CAN_COLLIDE"];
|
||||
|
||||
_location = (getPosATL _veh);
|
||||
_sign = "Sign_arrow_down_large_EP1" createVehicleLocal _location;
|
||||
_location = [_sign] call FNC_GetPos;
|
||||
|
||||
PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,false,_result select 1,_activatingPlayer];
|
||||
PVDZE_veh_Publish2 = [[_dir,_location],_part_out,false,_result select 1,_activatingPlayer];
|
||||
publicVariableServer "PVDZE_veh_Publish2";
|
||||
|
||||
player reveal _veh;
|
||||
[_part_out,_sign] spawn fn_waitForObject;
|
||||
|
||||
format["Bought %3 for %1 %2, key added to toolbelt.",_qty_in,_textPartIn,_textPartOut] call dayz_rollingMessages;
|
||||
} else {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private ["_veh","_location","_result","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_keyColor","_damage","_tireDmg","_tires","_okToSell","_temp_keys","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_canAfford","_trade_total","_total_currency","_return_change","_done"];
|
||||
private ["_sign","_location","_result","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_keyColor","_damage","_tireDmg","_tires","_okToSell","_temp_keys","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_canAfford","_trade_total","_total_currency","_return_change","_done"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
@@ -131,12 +131,12 @@ if (_finished) then {
|
||||
};
|
||||
|
||||
//place vehicle spawn marker (local)
|
||||
_veh = createVehicle ["Sign_arrow_down_large_EP1", _location, [], 0, "CAN_COLLIDE"];
|
||||
_sign = "Sign_arrow_down_large_EP1" createVehicleLocal _location;
|
||||
_location = [_sign] call FNC_GetPos;
|
||||
|
||||
_location = (getPosATL _veh);
|
||||
|
||||
PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,false,_result select 1,_activatingPlayer];
|
||||
PVDZE_veh_Publish2 = [[_dir,_location],_part_out,false,_result select 1,_activatingPlayer];
|
||||
publicVariableServer "PVDZE_veh_Publish2";
|
||||
[_part_out,_sign] spawn fn_waitForObject;
|
||||
|
||||
format[localize "STR_EPOCH_ACTIONS_11",_qty_in,_textPartIn,_textPartOut] call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private ["_veh","_location","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_canAfford","_trade_total","_total_currency","_return_change","_done"];
|
||||
private ["_sign","_location","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_canAfford","_trade_total","_total_currency","_return_change","_done"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
@@ -130,12 +130,12 @@ if (_finished) then {
|
||||
};
|
||||
|
||||
//place vehicle spawn marker (local)
|
||||
_veh = createVehicle ["Sign_arrow_down_large_EP1", _location, [], 0, "CAN_COLLIDE"];
|
||||
_sign = "Sign_arrow_down_large_EP1" createVehicleLocal _location;
|
||||
_location = [_sign] call FNC_GetPos;
|
||||
|
||||
_location = (getPosATL _veh);
|
||||
|
||||
PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,true,0,_activatingPlayer];
|
||||
PVDZE_veh_Publish2 = [[_dir,_location],_part_out,true,0,_activatingPlayer];
|
||||
publicVariableServer "PVDZE_veh_Publish2";
|
||||
[_part_out,_sign] spawn fn_waitForObject;
|
||||
};
|
||||
|
||||
} else {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private ["_veh","_location","_result","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_removed","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_playerNear"];
|
||||
private ["_sign","_location","_result","_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_obj","_objectID","_objectUID","_bos","_started","_finished","_animState","_isMedic","_dir","_helipad","_removed","_damage","_tireDmg","_tires","_okToSell","_hitpoints","_needed","_activatingPlayer","_textPartIn","_textPartOut","_traderID","_playerNear"];
|
||||
|
||||
if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_103" call dayz_rollingMessages;};
|
||||
DZE_ActionInProgress = true;
|
||||
@@ -117,12 +117,12 @@ if (_qty >= _qty_in) then {
|
||||
};
|
||||
|
||||
//place vehicle spawn marker (local)
|
||||
_veh = createVehicle ["Sign_arrow_down_large_EP1", _location, [], 0, "CAN_COLLIDE"];
|
||||
_sign = "Sign_arrow_down_large_EP1" createVehicleLocal _location;
|
||||
_location = [_sign] call FNC_GetPos;
|
||||
|
||||
_location = (getPosATL _veh);
|
||||
|
||||
PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,false,_result select 1,_activatingPlayer];
|
||||
PVDZE_veh_Publish2 = [[_dir,_location],_part_out,false,_result select 1,_activatingPlayer];
|
||||
publicVariableServer "PVDZE_veh_Publish2";
|
||||
[_part_out,_sign] spawn fn_waitForObject;
|
||||
|
||||
format["Bought %3 for %1 %2, key added to toolbelt.",_qty_in,_textPartIn,_textPartOut] call dayz_rollingMessages;
|
||||
} else {
|
||||
|
||||
12
SQF/dayz_code/compile/fn_waitForObject.sqf
Normal file
12
SQF/dayz_code/compile/fn_waitForObject.sqf
Normal file
@@ -0,0 +1,12 @@
|
||||
private ["_object","_sign"];
|
||||
|
||||
_object = _this select 0;
|
||||
_sign = _this select 1;
|
||||
|
||||
waitUntil {
|
||||
uiSleep 1;
|
||||
!isNull (nearestObject [player,_object])
|
||||
};
|
||||
|
||||
deleteVehicle _sign;
|
||||
player reveal (nearestObject [player,_object]);
|
||||
@@ -166,6 +166,7 @@ if (!isDedicated) then {
|
||||
epoch_returnChange = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\epoch_returnChange.sqf";
|
||||
fn_gearMenuChecks = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_gearMenuChecks.sqf";
|
||||
fn_pauseMenuChecks = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_pauseMenuChecks.sqf";
|
||||
fn_waitForObject = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_waitForObject.sqf";
|
||||
player_onPause = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_onPause.sqf";
|
||||
player_addDuplicateTool = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_addDuplicateTool.sqf";
|
||||
player_antiWall = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_antiWall.sqf";
|
||||
|
||||
Reference in New Issue
Block a user