mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
0.942
+ fixes to count weapons on selling menu + now close menu when purchasing/selling items + Vaults can now be placed in buildings, maybe buggy still. + updated 10oz gold bar texture with correct new one. + Disable simulation for all zombies on server https://github.com/R4Z0R49/DayZMod/pull/359 + Possible (semi-)infinite loop in zombie_agent.fsm https://github.com/R4Z0R49/DayZMod/pull/380
This commit is contained in:
63
MPMissions/Debug Stuff/Make_lootPos.sqf
Normal file
63
MPMissions/Debug Stuff/Make_lootPos.sqf
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
=====================================================================================================================
|
||||
Get Loot Pos - by VBAWOL
|
||||
Version: 1.0
|
||||
Date: 10.19.2012
|
||||
|
||||
Parameter: nul = [] execVM "Make_lootPos.sqf";
|
||||
=====================================================================================================================
|
||||
*/
|
||||
private ["_target","_type","_pos","_ppos","_veh","_worldPos"];
|
||||
|
||||
|
||||
|
||||
if (count _this > 2) then
|
||||
{
|
||||
_doSave = (_this select 3) select 0;
|
||||
|
||||
if (_doSave == "save") then {
|
||||
|
||||
_target = nearestObject [player, "HouseBase"];
|
||||
|
||||
if (_target isKindOf "All") then {
|
||||
|
||||
if (!(isNil ("_target"))) then {
|
||||
|
||||
_type = typeOf _target;
|
||||
_pos = getPosATL _target;
|
||||
|
||||
_ppos = _target worldToModel (getPosATL player);
|
||||
|
||||
_worldPos = _target modelToWorld _ppos;
|
||||
|
||||
diag_log text format ["%1 : %2", _type,_ppos];
|
||||
_veh = createVehicle ["Sign_arrow_down_EP1", _worldPos, [], 0, "CAN_COLLIDE"];
|
||||
_veh setPos _worldPos;
|
||||
|
||||
} else {
|
||||
diag_log text format ["Target nil: %1", _target];
|
||||
};
|
||||
|
||||
} else {
|
||||
diag_log text format ["Failed to get target: %1", _target];
|
||||
};
|
||||
|
||||
|
||||
} else {
|
||||
diag_log text format ["Save not passed: %1", _doSave];
|
||||
};
|
||||
|
||||
} else {
|
||||
|
||||
s_aveact = -1;
|
||||
_sleep = 1;
|
||||
sleep 60;
|
||||
|
||||
While {true} do {
|
||||
if (s_aveact < 0) then {
|
||||
s_aveact = player addAction ["Save to arma2.rpt", "Make_lootPos.sqf", ["save"], 99, false, true, "",""];
|
||||
};
|
||||
sleep _sleep;
|
||||
};
|
||||
|
||||
};
|
||||
@@ -97,7 +97,7 @@ diag_log format["DEBUG Buy: %1", dayzTraderMenuResult];
|
||||
_count = {_x == _name} count magazines player;
|
||||
};
|
||||
if(_stype == "CfgWeapons") then {
|
||||
_count = {_x == _name} count items player;
|
||||
_count = {_x == _name} count weapons player;
|
||||
};
|
||||
|
||||
if (_count > 0) then {
|
||||
|
||||
@@ -133,6 +133,10 @@ if (_bulkqty >= 1) then {
|
||||
|
||||
// [player,"repair",0,false] call dayz_zombieSpeak;
|
||||
cutText [format[("Traded %1 %2 for %3 %4"),(_qty_in*_qty),_textPartIn,(_qty_out*_qty),_textPartOut], "PLAIN DOWN"];
|
||||
|
||||
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
|
||||
s_player_parts_crtl = -1;
|
||||
|
||||
} else {
|
||||
cutText [format[("Insufficient Stock %1"),_textPartOut] , "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
@@ -10,10 +10,12 @@ _offset_z = 0;
|
||||
_offset_z_attach = 0.5;
|
||||
|
||||
_location = player modeltoworld [_offset_x,_offset_y,_offset_z];
|
||||
|
||||
// Allow placement anywhere.
|
||||
// _building = nearestObject [(vehicle player), "HouseBase"];
|
||||
//_isOk = [(vehicle player),_building] call fnc_isInsideBuilding;
|
||||
|
||||
|
||||
_isOk = true;
|
||||
|
||||
|
||||
//diag_log ("Pitch Tent: " + str(_isok) );
|
||||
|
||||
@@ -25,7 +27,57 @@ if (!_hastentitem) exitWith {cutText [format[(localize "str_player_31"),_text,"p
|
||||
// blocked
|
||||
// Allow on concrete since we dont force to ground.
|
||||
// if (["concrete",dayz_surfaceType] call fnc_inString) then { _isOk = true; diag_log ("surface concrete"); };
|
||||
if (isOnRoad _playerPos) then { _isOk = true; diag_log ("surface is road"); };
|
||||
|
||||
|
||||
|
||||
//diag_log ("Pitch Tent: " + str(_isok) );
|
||||
|
||||
// Start Preview loop
|
||||
_tmpvault = createVehicle ["VaultStorageLocked", _location, [], 0, "NONE"];
|
||||
_tmpvault setdir _dir;
|
||||
_tmpvault attachTo [player,[_offset_x,_offset_y,_offset_z_attach]];
|
||||
|
||||
_cancel = false;
|
||||
_counter = 0;
|
||||
|
||||
|
||||
while {_isOk} do {
|
||||
|
||||
if(_counter == 0) then {
|
||||
cutText ["Planning consruction stand still 5 seconds to build.", "PLAIN DOWN"];
|
||||
sleep 5;
|
||||
_location1 = getPosATL player;
|
||||
sleep 5;
|
||||
_location2 = getPosATL player;
|
||||
|
||||
if(_location1 distance _location2 < 0.1) exitWith {
|
||||
|
||||
cutText ["Started consruction move within 5 seconds to cancel.", "PLAIN DOWN"];
|
||||
_location3 = getPosATL player;
|
||||
sleep 5;
|
||||
_location4 = getPosATL player;
|
||||
|
||||
if(_location3 distance _location4 > 0.1) exitWith {
|
||||
_isOk = false;
|
||||
_cancel = true;
|
||||
};
|
||||
|
||||
_isOk = false;
|
||||
};
|
||||
};
|
||||
if(_counter >= 1) exitWith {
|
||||
_isOk = false;
|
||||
_cancel = true;
|
||||
};
|
||||
_counter = _counter + 1;
|
||||
};
|
||||
|
||||
detach _tmpvault;
|
||||
deleteVehicle _tmpvault;
|
||||
|
||||
// Make sure vault is not placed on road.
|
||||
if (isOnRoad (getPosATL player)) then { _isOk = true; diag_log ("surface is road"); };
|
||||
// Make sure vault is not placed in trader citys
|
||||
if(!placevault) then { _isOk = true; diag_log ("is trader city"); };
|
||||
|
||||
//Block Tents in pounds
|
||||
@@ -40,53 +92,6 @@ _objectsPond = nearestObjects [_playerPos, [], 10];
|
||||
};
|
||||
} forEach _objectsPond;
|
||||
|
||||
//diag_log ("Pitch Tent: " + str(_isok) );
|
||||
|
||||
|
||||
|
||||
// Start Preview loop
|
||||
_tmpvault = createVehicle ["VaultStorageLocked", _location, [], 0, "NONE"];
|
||||
_tmpvault setdir _dir;
|
||||
_tmpvault attachTo [player,[_offset_x,_offset_y,_offset_z_attach]];
|
||||
|
||||
_cancel = false;
|
||||
_counter = 0;
|
||||
|
||||
while {_isOk} do {
|
||||
|
||||
if(_counter == 0) then {
|
||||
|
||||
cutText ["Planning consruction stand still 5 seconds to build.", "PLAIN DOWN"];
|
||||
|
||||
|
||||
sleep 5;
|
||||
_location1 = player modeltoworld [_offset_x,_offset_y,_offset_z];
|
||||
|
||||
if(_location distance _location1 < 0.1) exitWith {
|
||||
_isOk = false;
|
||||
_location = _location1;
|
||||
};
|
||||
};
|
||||
if(_counter == 1) then {
|
||||
cutText ["Started consruction stand still 5 seconds to build.", "PLAIN DOWN"];
|
||||
|
||||
sleep 5;
|
||||
_location2 = player modeltoworld [_offset_x,_offset_y,_offset_z];
|
||||
|
||||
if(_location1 distance _location2 < 0.1) exitWith {
|
||||
_isOk = false;
|
||||
_location = _location2;
|
||||
};
|
||||
};
|
||||
if(_counter >= 2) exitWith {
|
||||
_isOk = false;
|
||||
_cancel = true;
|
||||
};
|
||||
_counter = _counter + 1;
|
||||
};
|
||||
|
||||
detach _tmpvault;
|
||||
deleteVehicle _tmpvault;
|
||||
|
||||
if(!_cancel) then {
|
||||
if (!_isOk) then {
|
||||
@@ -101,11 +106,23 @@ if(!_cancel) then {
|
||||
|
||||
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
|
||||
|
||||
_building = nearestObject [(vehicle player), "HouseBase"];
|
||||
_isBuilding = [(vehicle player),_building] call fnc_isInsideBuilding;
|
||||
|
||||
if(_isBuilding) then {
|
||||
|
||||
_ppos = _building worldToModel (getPosATL player);
|
||||
_ppos set [2,1.5];
|
||||
|
||||
_location = _building modelToWorld _ppos;
|
||||
} else {
|
||||
_location = player modelToWorld [_offset_x,_offset_y,_offset_z];
|
||||
};
|
||||
|
||||
sleep 5;
|
||||
//place tent (local)
|
||||
_tent = createVehicle ["VaultStorageLocked", _location, [], 0, "CAN_COLLIDE"];
|
||||
_tent setdir _dir;
|
||||
_location = getPosATL _tent;
|
||||
_tent setpos _location;
|
||||
player reveal _tent;
|
||||
|
||||
@@ -116,6 +133,7 @@ if(!_cancel) then {
|
||||
["dayzPublishObj",[dayz_playerUID,_tent,[_dir,_location],"VaultStorageLocked"]] call callRpcProcedure;
|
||||
|
||||
cutText ["You have setup your vault", "PLAIN DOWN"];
|
||||
|
||||
} else {
|
||||
cutText ["You cannot place a Vault here. The area must be flat, and free of other objects", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
@@ -23,12 +23,26 @@ if(_ownerID == dayz_playerUID) then {
|
||||
[player,"tentpack",0,false] call dayz_zombieSpeak;
|
||||
sleep 3;
|
||||
|
||||
_building = nearestObject [(vehicle player), "HouseBase"];
|
||||
_isBuilding = [(vehicle player),_building] call fnc_isInsideBuilding;
|
||||
|
||||
if(_isBuilding) then {
|
||||
|
||||
_ppos = _building worldToModel _pos;
|
||||
_ppos set [1,1.5];
|
||||
|
||||
_location = _building modelToWorld _ppos;
|
||||
};
|
||||
|
||||
//place tent (local)
|
||||
_bag = createVehicle ["WeaponHolder_ItemVault",_pos,[], 0, "CAN_COLLIDE"];
|
||||
_bag setdir _dir;
|
||||
_bag setpos _pos;
|
||||
player reveal _bag;
|
||||
|
||||
_holder = "WeaponHolder" createVehicle _pos;
|
||||
|
||||
|
||||
// _holder = "WeaponHolder" createVehicle _pos;
|
||||
|
||||
_weapons = getWeaponCargo _obj;
|
||||
_magazines = getMagazineCargo _obj;
|
||||
|
||||
@@ -27,6 +27,9 @@ if (_doLoiter) then {
|
||||
//diag_log ("Spawned: " + str([_type, _position, [], _radius, _method]));
|
||||
_agent = createAgent [_type, _position, [], _radius, _method];
|
||||
|
||||
dayzSpawnZed = [_agent];
|
||||
publicVariableServer "dayzSpawnZed";
|
||||
|
||||
if (_doLoiter) then {
|
||||
_agent setPosATL _position;
|
||||
//_agent setVariable ["doLoiter",true,true];
|
||||
|
||||
@@ -33,7 +33,7 @@ class CfgMods
|
||||
hidePicture = 0;
|
||||
hideName = 0;
|
||||
action = "http://www.dayzepoch.com";
|
||||
version = "0.941";
|
||||
version = "0.942";
|
||||
hiveVersion = 0.96; //0.93
|
||||
};
|
||||
};
|
||||
|
||||
@@ -87,7 +87,7 @@ class RscDisplayMain : RscStandardDisplay
|
||||
class DAYZ_Version : CA_Version
|
||||
{
|
||||
idc = -1;
|
||||
text = "DayZ Epoch 0.941 (1.7.5.1)";
|
||||
text = "DayZ Epoch 0.942 (1.7.5.1)";
|
||||
y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)";
|
||||
};
|
||||
class CA_TitleMainMenu;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*%FSM<COMPILE "D:\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, DayZ Zombie Agent">*/
|
||||
/*%FSM<COMPILE "C:\Program Files (x86)\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, DayZ Zombie Agent">*/
|
||||
/*%FSM<HEAD>*/
|
||||
/*
|
||||
item0[] = {"init",0,250,-300.000000,-250.000000,-200.000000,-200.000000,0.000000,"init"};
|
||||
@@ -14,7 +14,7 @@ item9[] = {"true",8,218,-300.000000,-175.000000,-200.000000,-125.000000,0.000000
|
||||
item10[] = {"Begin",2,250,-300.000000,-100.000000,-200.000000,-50.000000,0.000000,"Begin"};
|
||||
item11[] = {"",7,210,-254.000046,-29.000004,-245.999954,-20.999996,0.000000,""};
|
||||
item12[] = {"",7,210,-204.000046,146.000000,-195.999954,154.000000,0.000000,""};
|
||||
item13[] = {"Has_Target",4,4314,-150.000000,225.000000,-50.000000,275.000000,1.000000,"Has" \n "Target"};
|
||||
item13[] = {"Has_Target",4,218,-150.000000,225.000000,-50.000000,275.000000,1.000000,"Has" \n "Target"};
|
||||
item14[] = {"Chase",2,250,-150.000000,300.000000,-50.000000,350.000000,0.000000,"Chase"};
|
||||
item15[] = {"",7,210,-29.000006,146.000000,-20.999996,154.000000,0.000000,""};
|
||||
item16[] = {"",7,210,-29.000006,196.000000,-20.999996,204.000000,0.000000,""};
|
||||
@@ -35,7 +35,7 @@ item30[] = {"finished",4,218,-425.000000,525.000000,-325.000000,575.000000,1.000
|
||||
item31[] = {"",7,210,-479.000000,546.000000,-471.000000,554.000000,0.000000,""};
|
||||
item32[] = {"",7,210,-29.000002,546.000000,-20.999998,554.000000,0.000000,""};
|
||||
item33[] = {"",7,210,-304.000000,146.000000,-296.000000,154.000000,0.000000,""};
|
||||
item34[] = {"someone_here",4,218,-75.000000,-50.000000,25.000000,0.000000,0.000000,"someone" \n "here"};
|
||||
item34[] = {"someone_here",4,218,-200.000000,-50.000000,-100.000000,0.000000,0.000000,"someone" \n "here"};
|
||||
item35[] = {"too_long",4,218,-425.000000,600.000000,-325.000000,650.000000,0.000000,"too long"};
|
||||
item36[] = {"",7,210,-229.000000,621.000000,-221.000000,629.000000,0.000000,""};
|
||||
item37[] = {"",7,210,-479.000000,621.000000,-471.000000,629.000000,0.000000,""};
|
||||
@@ -44,6 +44,7 @@ item39[] = {"No_target",4,218,-525.000000,250.000000,-425.000000,300.000000,0.00
|
||||
item40[] = {"",7,210,-104.000000,471.000000,-95.999992,479.000000,0.000000,""};
|
||||
item41[] = {"player_check",4,218,-425.000000,0.000000,-325.000000,50.000000,0.000000,"player" \n "check"};
|
||||
item42[] = {"is_Dedicated",4,218,-125.000000,-250.000000,-25.000000,-200.000000,5.000000,"is" \n "Dedicated"};
|
||||
item43[] = {"Not_Alive",4,4314,-75.000000,-50.000000,25.000000,0.000000,0.000000,"Not" \n "Alive"};
|
||||
link0[] = {0,9};
|
||||
link1[] = {0,42};
|
||||
link2[] = {2,23};
|
||||
@@ -78,28 +79,30 @@ link30[] = {23,25};
|
||||
link31[] = {24,23};
|
||||
link32[] = {25,26};
|
||||
link33[] = {25,34};
|
||||
link34[] = {26,1};
|
||||
link35[] = {27,20};
|
||||
link36[] = {27,40};
|
||||
link37[] = {28,29};
|
||||
link38[] = {29,30};
|
||||
link39[] = {29,32};
|
||||
link40[] = {29,36};
|
||||
link41[] = {30,31};
|
||||
link42[] = {31,21};
|
||||
link43[] = {32,8};
|
||||
link44[] = {33,5};
|
||||
link45[] = {34,5};
|
||||
link46[] = {35,37};
|
||||
link47[] = {36,35};
|
||||
link48[] = {37,31};
|
||||
link49[] = {38,39};
|
||||
link50[] = {39,22};
|
||||
link51[] = {40,28};
|
||||
link52[] = {41,5};
|
||||
link53[] = {42,1};
|
||||
globals[] = {25.000000,1,0,0,0,640,480,1,101,6316128,1,-671.713867,363.212036,788.169373,-84.187515,713,601,1};
|
||||
window[] = {2,-1,-1,-1,-1,843,132,1340,132,3,730};
|
||||
link34[] = {25,43};
|
||||
link35[] = {26,1};
|
||||
link36[] = {27,20};
|
||||
link37[] = {27,40};
|
||||
link38[] = {28,29};
|
||||
link39[] = {29,30};
|
||||
link40[] = {29,32};
|
||||
link41[] = {29,36};
|
||||
link42[] = {30,31};
|
||||
link43[] = {31,21};
|
||||
link44[] = {32,8};
|
||||
link45[] = {33,5};
|
||||
link46[] = {34,5};
|
||||
link47[] = {35,37};
|
||||
link48[] = {36,35};
|
||||
link49[] = {37,31};
|
||||
link50[] = {38,39};
|
||||
link51[] = {39,22};
|
||||
link52[] = {40,28};
|
||||
link53[] = {41,5};
|
||||
link54[] = {42,1};
|
||||
link55[] = {43,25};
|
||||
globals[] = {25.000000,1,0,0,0,640,480,1,102,6316128,1,-650.021484,334.182983,700.299500,-373.567780,944,1030,1};
|
||||
window[] = {2,-1,-1,-32000,-32000,841,130,1338,130,3,962};
|
||||
*//*%FSM</HEAD>*/
|
||||
class FSM
|
||||
{
|
||||
@@ -434,7 +437,17 @@ class FSM
|
||||
priority = 0.000000;
|
||||
to="Loiter";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"_isSomeone"/*%FSM</CONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"_isSomeone && _isAlive"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
/*%FSM<LINK "Not_Alive">*/
|
||||
class Not_Alive
|
||||
{
|
||||
priority = 0.000000;
|
||||
to="Cleanup_";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"_isSomeone && !_isAlive && (time - _waitStart) > 60"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4
dayz_server/compile/server_handleZedSpawn.sqf
Normal file
4
dayz_server/compile/server_handleZedSpawn.sqf
Normal file
@@ -0,0 +1,4 @@
|
||||
private["_zed"];
|
||||
_zed = _this select 0;
|
||||
|
||||
_zed enableSimulation false;
|
||||
@@ -18,6 +18,7 @@ registerServerRpc = {
|
||||
//["dayzPlayerMorph", { (_this select 1) call server_playerMorph; } ] call registerServerRpc;
|
||||
["dayzLoginRecord", { (_this select 1) call dayz_recordLogin; } ] call registerServerRpc;
|
||||
["dayzCharDisco", { (_this select 1) call server_characterSync; } ] call registerServerRpc;
|
||||
["dayzSpawnZed", { (_this select 1) call server_handleZedSpawn; } ] call registerServerRpc;
|
||||
// DayZ Epoch Custom
|
||||
["dayzPublishVeh", { (_this select 1) spawn server_publishVeh; } ] call registerServerRpc;
|
||||
["dayzTradeObject", { (_this select 1) spawn server_tradeObj; } ] call registerServerRpc;
|
||||
|
||||
@@ -21,6 +21,8 @@ server_playerSync = compile preprocessFileLineNumbers "\z\addons\dayz_server\c
|
||||
zombie_findOwner = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\zombie_findOwner.sqf";
|
||||
server_updateNearbyObjects = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_updateNearbyObjects.sqf";
|
||||
server_spawnCrashSite = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_spawnCrashSite.sqf";
|
||||
server_handleZedSpawn = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_handleZedSpawn.sqf";
|
||||
|
||||
fnc_plyrHit = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\fnc_plyrHit.sqf";
|
||||
server_deaths = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerDeaths.sqf";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user