+ Corrected conversion rate for silver to gold when selling bulk supply
crates.
+ Added sleep within spawn {} for fetching vehicle ID, should reduce db
spam.
+ Switched normal wire to fortrazor_wire and added as builtitems
+ Potential fix for wild spawning helicopters in forests.
+ Player zombies should now be able to break the legs of other players.
+ Purchased vehicles now spawn on the closestHeliHCivil within 200m.
This commit is contained in:
vbawol
2013-02-17 09:14:52 -06:00
parent c6b90e46b0
commit 9ca20ad439
10 changed files with 589 additions and 92 deletions

View File

@@ -19,16 +19,7 @@ _isZombie = _ent isKindOf "zZombie_base";
if (_ent isKindOf "Animal" or _isZombie) then {
_ent setDamage 1;
} else {
// TODO TEST AND Improve
_cnt = count (DAYZ_woundHit select 1);
_index = floor (random _cnt);
_index = (DAYZ_woundHit select 1) select _index;
_wound = (DAYZ_woundHit select 0) select _index;
_damage = 0.1 + random (1.2);
[_item, _wound, _damage, player,"zombie"] call fnc_usec_damageHandler;
["usecBreakLegs",[_unit,player]] call broadcastRpcCallAll;
};

View File

@@ -54,40 +54,35 @@ if (_bulkqty >= 1) then {
// gold = 6 silver
//
if (_part_out == "ItemSilverBar") then {
if (_part_out == "ItemSilverBar" and _qty_out >= 30) then {
if (_qty_out >= 6) then {
// find number of gold
_gold_out = _qty_out / 6;
// find number of gold
_gold_out = _qty_out / 30;
// whole number of gold bars
_gold_qty_out = floor _gold_out;
// whole number of gold bars
_gold_qty_out = floor _gold_out;
_part_out = "ItemGoldBar";
for "_x" from 1 to _gold_qty_out do {
player addMagazine _part_out;
};
// Find remainder
_partial_qty_out = (_gold_out - _gold_qty_out) * 6;
// whole number of gold bars
_silver_qty_out = floor _partial_qty_out;
_part_out = "ItemSilverBar";
for "_x" from 1 to _silver_qty_out do {
player addMagazine _part_out;
};
} else {
for "_x" from 1 to _qty_out do {
player addMagazine _part_out;
};
_part_out = "ItemGoldBar";
for "_x" from 1 to _gold_qty_out do {
player addMagazine _part_out;
};
// Find remainder
_partial_qty_out = (_gold_out - _gold_qty_out) * 30;
// whole number of silver bars
_silver_qty_out = floor _partial_qty_out;
_part_out = "ItemSilverBar";
for "_x" from 1 to _silver_qty_out do {
player addMagazine _part_out;
};
} else {
for "_x" from 1 to _qty_out do {

View File

@@ -33,7 +33,7 @@ class CfgMods
hidePicture = 0;
hideName = 0;
action = "http://www.dayzepoch.com";
version = "0.96";
version = "0.961";
hiveVersion = 0.96; //0.93
};
};

View File

@@ -430,6 +430,7 @@ if (!isDedicated) then {
player_medEpi = compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\publicEH\medEpi.sqf";
player_medTransfuse = compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\publicEH\medTransfuse.sqf";
player_medMorphine = compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\publicEH\medMorphine.sqf";
player_breaklegs = compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\publicEH\medBreakLegs.sqf";
player_medPainkiller = compile preprocessFileLineNumbers "\z\addons\dayz_code\medical\publicEH\medPainkiller.sqf";
world_isDay = {if ((daytime < (24 - dayz_sunRise)) and (daytime > dayz_sunRise)) then {true} else {false}};
player_humanityChange = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_humanityChange.sqf";

View File

@@ -63,6 +63,7 @@ registerBroadcastRpc = {
["usecPainK", { (_this select 1) call player_medPainkiller; } ] call registerBroadcastRpc;
//BIS_Effects_Burn is empty on the server anyway, but this EH is called
["dayzFire", { (_this select 1) spawn BIS_Effects_Burn; } ] call registerBroadcastRpc;
["usecBreakLegs", { (_this select 1) call player_breaklegs; } ] call registerBroadcastRpc;
//server only
if (isServer) then {
@@ -77,7 +78,6 @@ if (!isDedicated) then {
["dayzHideBody", { hideBody (_this select 1); } ] call registerBroadcastRpc;
["dayzHumanity", { (_this select 1) spawn player_humanityChange; } ] call registerBroadcastRpc;
["dayzHitV", { (_this select 1) call fnc_usec_damageVehicle; } ] call registerBroadcastRpc;
["dayzFlies", { (_this select 1) call spawn_flies; } ] call registerBroadcastRpc;
["dayzRoadFlare", { (_this select 1) spawn object_roadFlare; } ] call registerBroadcastRpc;
["norrnRaDrag", { [_this select 1] execVM "\z\addons\dayz_code\medical\publicEH\animDrag.sqf"; } ] call registerBroadcastRpc;

View File

@@ -0,0 +1,26 @@
// medBreakLegs.sqf
private["_array","_unit","_medic","_display","_control","_hitLegs","_hitArms"];
disableserialization;
_array = _this; //_this select 0;
_unit = _array select 0;
_medic = _array select 1;
if (_unit == player) then {
r_fracture_legs = true;
r_fracture_arms = true;
_unit setHit["legs",1];
_unit setHit["hands",1];
//Ensure Control is visible
_display = uiNamespace getVariable 'DAYZ_GUI_display';
_control = _display displayCtrl 1203;
_control ctrlShow true;
_id = true spawn dayz_disableRespawn;
};
_unit setVariable ["hit_legs",1,false];
_unit setVariable ["hit_hands",1,false];
if (isServer) then {
_unit setVariable["medForceUpdate",true];
};

View File

@@ -87,7 +87,7 @@ class RscDisplayMain : RscStandardDisplay
class DAYZ_Version : CA_Version
{
idc = -1;
text = "DayZ Epoch 0.96 (1.7.5.1)";
text = "DayZ Epoch 0.961 (1.7.5.1)";
y = "(SafeZoneH + SafeZoneY) - (1 - 0.95)";
};
class CA_TitleMainMenu;