0.69 + 1.7.5.M1D15

This commit is contained in:
vbawol
2013-01-18 12:25:49 -06:00
parent 662d62d781
commit 4cab61bf63
81 changed files with 1061 additions and 532 deletions

View File

@@ -0,0 +1,21 @@
/*
[_objectID,_objectUID] call server_deleteObj;
*/
private["_id","_uid","_key"];
_id = _this select 0;
_uid = _this select 1;
if (isServer) then {
//remove from database
if (parseNumber _id > 0) then {
//Send request
_key = format["CHILD:304:%1:",_id];
_key call server_hiveWrite;
diag_log format["DELETE: Deleted by ID: %1",_id];
} else {
//Send request
_key = format["CHILD:310:%1:",_uid];
_key call server_hiveWrite;
diag_log format["DELETE: Deleted by UID: %1",_uid];
};
};

View File

@@ -1,11 +1,32 @@
private ["_qty","_item","_meat","_loop","_timer"];
private["_item","_qty","_type","_meat","_loop"];
_item = _this select 0;
_qty = _this select 1;
_type = typeOf _item;
_meat = 0;
_loop = true;
if (local _item) then {
for "_x" from 1 to _qty do {
_item addMagazine "FoodSteakRaw";
diag_log ("Item Type: " +str(_item));
switch (_type) do {
case "Cow": {
_item addMagazine "FoodSteakRaw";
};
case "Goat": {
_item addMagazine "FoodSteakRaw";
};
case "Sheep": {
_item addMagazine "FoodSteakRaw";
};
case "WildBoar": {
_item addMagazine "FoodboarRaw";
};
case "hen": {
_item addMagazine "FoodSteakRaw";
};
case "Rabbit": {
_item addMagazine "FoodSteakRaw";
};
};
};
sleep 2;
_timer = time;
@@ -15,9 +36,11 @@ if (local _item) then {
if ((time - _timer) > 300) then {_loop = false};
sleep 1;
};
dayzHideBody = _item;
publicVariable "dayzHideBody";
hideBody _item;
["dayzHideBody",_item] call broadcastRpcCallAll;
sleep 10;
deleteVehicle _item;
} else {
_ehLoc = "client";
if (isServer) then { _ehLoc = "server"; };
diag_log format["gutObject EH on %1 item not local ! Type: %2",_ehLoc,str(_item)];
};

View File

@@ -0,0 +1,24 @@
private["_item","_qty","_type","_meat","_loop"];
_item = _this select 0;
_qty = _this select 1;
_type = typeOf _item;
_meat = 0;
_loop = true;
if (local _item) then {
_item addMagazine "ItemZombieParts";
sleep 2;
_timer = time;
while {_loop} do {
_meat = count magazines _item;
if (_meat == 0) then {_loop = false};
if ((time - _timer) > 300) then {_loop = false};
sleep 1;
};
["dayzHideBody",_item] call broadcastRpcCallAll;
sleep 10;
deleteVehicle _item;
} else {
_ehLoc = "client";
if (isServer) then { _ehLoc = "server"; };
diag_log format["gutObject EH on %1 item not local ! Type: %2",_ehLoc,str(_item)];
};

View File

@@ -12,8 +12,6 @@ if (count _this > 2) then {
dayz_players = dayz_players - [_this select 2];
};
//waitUntil{allowConnection};
//Variables
_inventory = [];
_backpack = [];
@@ -45,7 +43,7 @@ diag_log ("LOGIN ATTEMPT: " + str(_playerID) + " " + _playerName);
_doLoop = 0;
while {_doLoop < 5} do {
_key = format["CHILD:101:%1:%2:%3:",_playerID,dayZ_instance,_playerName];
_primary = [_key,false,dayZ_hivePipeAuth] call server_hiveReadWrite;
_primary = _key call server_hiveReadWrite;
if (count _primary > 0) then {
if ((_primary select 0) != "ERROR") then {
_doLoop = 9;

View File

@@ -34,7 +34,7 @@ _state = [];
_doLoop = 0;
while {_doLoop < 5} do {
_key = format["CHILD:102:%1:",_characterID];
_primary = [_key,false,dayZ_hivePipeAuth] call server_hiveReadWrite;
_primary = _key call server_hiveReadWrite;
if (count _primary > 0) then {
if ((_primary select 0) != "ERROR") then {
_doLoop = 9;
@@ -116,9 +116,7 @@ if (count _medical > 0) then {
//Add Wounds
{
_playerObj setVariable[_x,true,true];
[_playerObj,_x,_hit] spawn fnc_usec_damageBleed;
usecBleed = [_playerObj,_x,0];
publicVariable "usecBleed";
["usecBleed",[_playerObj,_x,_hit]] call broadcastRpcCallAll;
} forEach (_medical select 8);
//Add fractures

View File

@@ -4,10 +4,13 @@ private["_character","_magazines","_force","_characterID","_charPos","_isInVehic
//waituntil {(typeName(_this) == "ARRAY");sleep 0.01;}; //seems to cause often infinite waits (but not for first n players)
if ( typeName(_this) == "OBJECT" ) then {
//this only happens when we don't follow the correct parameter format...
//(like supplying just the player object instead of the array in player_eat.sqf)
//i've fixed this in player_eat so i can comment this part out
/*if ( typeName(_this) == "OBJECT" ) then {
_this = [_this,[],true];
//diag_log ("DW_DEBUG: #manual fix _this: " + str(_this));
};
};*/
//correct
//"UPDATE: [B 1-1-B:1 (THE BEAST) REMOTE,[],true]"

View File

@@ -1,7 +1,5 @@
private["_position","_num","_config","_itemType","_itemChance","_weights","_index","_iArray","_crashModel","_lootTable","_guaranteedLoot","_randomizedLoot","_frequency","_variance","_spawnChance","_spawnMarker","_spawnRadius","_spawnFire","_permanentFire","_crashName"];
waitUntil{!isNil "BIS_fnc_selectRandom"};
//_crashModel = _this select 0;
//_lootTable = _this select 1;
_guaranteedLoot = _this select 0;
@@ -78,9 +76,7 @@ while {true} do {
_crash setVariable ["ObjectID",1,true];
if (_spawnFire) then {
dayzFire = [_crash,2,time,false,_fadeFire];
publicVariable "dayzFire";
nul=dayzFire spawn BIS_Effects_Burn;
["dayzFire",[_crash,2,time,false,_fadeFire]] call broadcastRpcCallAll;
_crash setvariable ["fadeFire",_fadeFire,true];
};
@@ -92,8 +88,6 @@ while {true} do {
_weights = dayz_CBLChances select _index;
_cntWeights = count _weights;
waituntil {!isnil "fnc_buildWeightedArray"};
for "_x" from 1 to _num do {
//create loot
_index = floor(random _cntWeights);