player_build.sqf Enhancements and PV renames

This commit is contained in:
Zac Surplice
2013-10-07 10:56:47 +11:00
parent 340d2d2437
commit d3f7e67647
68 changed files with 301 additions and 347 deletions

View File

@@ -32,9 +32,9 @@ _unitIsPlayer = _unit == player;
if (_isPlayer) then {
if (_damage > 0.1) then {
dayz_canDisconnect = false;
//["dayzDiscoAdd",getPlayerUID player] call callRpcProcedure;
dayzDiscoAdd = getPlayerUID player;
publicVariableServer "dayzDiscoAdd";
//["PVDZE_plr_DiscAdd",getPlayerUID player] call callRpcProcedure;
PVDZE_plr_DiscAdd = getPlayerUID player;
publicVariableServer "PVDZE_plr_DiscAdd";
dayz_damageCounter = time;
@@ -59,9 +59,9 @@ if (_unitIsPlayer) then {
_myKills = 200 - (((player getVariable ["humanKills",0]) / 30) * 100);
//Process Morality Hit
_humanityHit = -(_myKills * _damage);
//["dayzHumanity",[_source,_humanityHit,30]] call broadcastRpcCallAll;
dayzHumanity = [_source,_humanityHit,30];
publicVariable "dayzHumanity";
//["PVDZE_plr_HumanityChange",[_source,_humanityHit,30]] call broadcastRpcCallAll;
PVDZE_plr_HumanityChange = [_source,_humanityHit,30];
publicVariable "PVDZE_plr_HumanityChange";
};
};
};

View File

@@ -16,10 +16,10 @@ if (local _animalbody) then {
while {(count magazines _body >0) and (time - _timer < 300) } do {
sleep 5;
};
//["dayzHideBody",_body] call broadcastRpcCallAll;
dayzHideBody = _body;
//["PVDZE_plr_HideBody",_body] call broadcastRpcCallAll;
PVDZE_plr_HideBody = _body;
hideBody _body; // local player
publicVariable "dayzHideBody"; // remote player
publicVariable "PVDZE_plr_HideBody"; // remote player
sleep 5;
deleteVehicle _body;
true;

View File

@@ -12,10 +12,10 @@ if (local _zombiebody) then {
while {(count magazines _body >0) and (time - _timer < 300) } do {
sleep 5;
};
//["dayzHideBody",_body] call broadcastRpcCallAll;
dayzHideBody = _body;
//["PVDZE_plr_HideBody",_body] call broadcastRpcCallAll;
PVDZE_plr_HideBody = _body;
hideBody _body; // local player
publicVariable "dayzHideBody"; // remote player
publicVariable "PVDZE_plr_HideBody"; // remote player
sleep 5;
deleteVehicle _body;
true;

View File

@@ -12,15 +12,15 @@ if (_selection != "" and local _unit) then {
if (isServer) then {
[_unit,"repair"] call server_updateObject
} else {
dayzUpdateVehicle = [_unit,"repair"];
publicVariableServer "dayzUpdateVehicle";
PVDZE_veh_Update = [_unit,"repair"];
publicVariableServer "PVDZE_veh_Update";
};
} else {
if (isServer) then {
[_unit,"damage"] call server_updateObject
} else {
dayzUpdateVehicle = [_unit,"damage"];
publicVariableServer "dayzUpdateVehicle";
PVDZE_veh_Update = [_unit,"damage"];
publicVariableServer "PVDZE_veh_Update";
};
};
};

View File

@@ -12,9 +12,9 @@ if ((_selection != "") and local _unit) then {
_unit setVariable [_strH,_total,true];
if (_damage >= 1) then {
//["dayzUpdateVehicle",[_unit,"damage"]] call callRpcProcedure;
dayzUpdateVehicle = [_unit,"damage"];
publicVariableServer "dayzUpdateVehicle";
//["PVDZE_veh_Update",[_unit,"damage"]] call callRpcProcedure;
PVDZE_veh_Update = [_unit,"damage"];
publicVariableServer "PVDZE_veh_Update";
};
} else {

View File

@@ -13,9 +13,9 @@ if (r_player_infected) then {
};
//Send Death Notice
//["dayzDeath",[dayz_characterID,0,_body,_playerID,dayz_playerName,_infected]] call callRpcProcedure;
dayzDeath = [dayz_characterID,0,_body,_playerID,dayz_playerName,_infected];
publicVariableServer "dayzDeath";
//["PVDZE_plr_Died",[dayz_characterID,0,_body,_playerID,dayz_playerName,_infected]] call callRpcProcedure;
PVDZE_plr_Died = [dayz_characterID,0,_body,_playerID,dayz_playerName,_infected];
publicVariableServer "PVDZE_plr_Died";
_id = [player,20,true,getPosATL player] spawn player_alertZombies;
@@ -65,9 +65,9 @@ if (count _array > 0) then {
_wait = 0;
};
if (!_canHitFree) then {
//["dayzHumanity",[_source,_humanity,_wait]] call broadcastRpcCallAll;
dayzHumanity = [_source,_humanity,_wait];
publicVariable "dayzHumanity";
//["PVDZE_plr_HumanityChange",[_source,_humanity,_wait]] call broadcastRpcCallAll;
PVDZE_plr_HumanityChange = [_source,_humanity,_wait];
publicVariable "PVDZE_plr_HumanityChange";
};
};
};

View File

@@ -7,7 +7,7 @@ if (!(isNull _backpack) and local _backpack) then {
_magazinescnt = count (_magazines select 0);
if((_magazinescnt > 0) or (_weaponscnt > 0)) then {
// hide backpack from everyone else
dayzHideObject = _backpack;
publicVariable "dayzHideObject";
PVDZE_obj_Hide = _backpack;
publicVariable "PVDZE_obj_Hide";
};
};

View File

@@ -53,15 +53,15 @@ if (_ammo isKindOf "SmokeShell") then {
//hint str(_ammo);
_projectile = nearestObject [_unit, "RoadFlare"];
_id = [_projectile,0] spawn object_roadFlare;
dayzRoadFlare = [_projectile,0];
publicVariable "dayzRoadFlare";
PVDZE_obj_RoadFlare = [_projectile,0];
publicVariable "PVDZE_obj_RoadFlare";
_id = _this spawn player_throwObject;
};
if (_ammo isKindOf "ChemLight") then {
_projectile = nearestObject [_unit, "ChemLight"];
_id = [_projectile,1] spawn object_roadFlare;
dayzRoadFlare = [_projectile,1];
publicVariable "dayzRoadFlare";
PVDZE_obj_RoadFlare = [_projectile,1];
publicVariable "PVDZE_obj_RoadFlare";
_id = _this spawn player_throwObject;
};
};

View File

@@ -1,9 +1,9 @@
private ["_objects"];
_objects = nearestObjects [getPosATL player, dayz_updateObjects, 10];
{
//["dayzUpdateVehicle",[_x,"gear"]] call callRpcProcedure;
dayzUpdateVehicle = [_x,"gear"];
publicVariableServer "dayzUpdateVehicle";
//["PVDZE_veh_Update",[_x,"gear"]] call callRpcProcedure;
PVDZE_veh_Update = [_x,"gear"];
publicVariableServer "PVDZE_veh_Update";
} foreach _objects;

View File

@@ -78,7 +78,7 @@ player setVariable["friendlies",_friendlies,true];
player setVariable["tagList",_tagList,true];
//code for this on the server is missing
//["dayzPlayerMorph",[_charID,player,_playerUID,[_zombieKills,_headShots,_humanKills,_banditKills],_humanity]] call callRpcProcedure;
//["PVDZE_plr_Morph",[_charID,player,_playerUID,[_zombieKills,_headShots,_humanKills,_banditKills],_humanity]] call callRpcProcedure;
call dayz_resetSelfActions;

View File

@@ -45,8 +45,8 @@ sleep 3;
if(!isNull _obj) then {
// force vault save just before locking
dayzUpdateVehicle = [_obj,"gear"];
publicVariableServer "dayzUpdateVehicle";
PVDZE_veh_Update = [_obj,"gear"];
publicVariableServer "PVDZE_veh_Update";
//place tent (local)
_holder = createVehicle [_lockedClass,_pos,[], 0, "CAN_COLLIDE"];

View File

@@ -57,10 +57,10 @@ if(!isNull _obj and alive _obj) then {
_backpacks = getBackpackCargo _obj;
deleteVehicle _obj;
dayzDeleteObj = [_objectID,_objectUID];
publicVariableServer "dayzDeleteObj";
PVDZE_obj_Delete = [_objectID,_objectUID];
publicVariableServer "PVDZE_obj_Delete";
if (isServer) then {
dayzDeleteObj call server_deleteObj;
PVDZE_obj_Delete call server_deleteObj;
};
//Add weapons

View File

@@ -60,8 +60,8 @@ if(!isNull _obj and alive _obj) then {
_backpacks = getBackpackCargo _obj;
// Remove from database
dayzDeleteObj = [_objectID,_objectUID];
publicVariableServer "dayzDeleteObj";
PVDZE_obj_Delete = [_objectID,_objectUID];
publicVariableServer "PVDZE_obj_Delete";
// Set down vault "take" item
_bag = createVehicle [_packedClass,_pos,[], 0, "CAN_COLLIDE"];

View File

@@ -64,7 +64,7 @@ if (_vehicle != player) then {
//diag_log ("Hitpoints " +str(_wound) +str(_total));
//["dayzHitV",[_vehicle, _wound,_total, _unit,"zombie"]] call broadcastRpcCallAll;
//["PVDZE_plr_HitV",[_vehicle, _wound,_total, _unit,"zombie"]] call broadcastRpcCallAll;
if (_dam >= 1) then {
if (r_player_blood < (r_player_bloodTotal * 0.8)) then {
_cnt = count (DAYZ_woundHit select 1);
@@ -80,8 +80,8 @@ if (_vehicle != player) then {
_damage = 0.1 + random (1.2);
//diag_log ("START DAM: Player Hit on " + _wound + " for " + str(_damage));
[player, _wound, _damage, _unit,"zombie"] call fnc_usec_damageHandler;
//dayzHit = [player,_wound, _damage, _unit,"zombie"];
//publicVariable "dayzHit";
//PVDZE_plr_Hit = [player,_wound, _damage, _unit,"zombie"];
//publicVariable "PVDZE_plr_Hit";
[_unit,"hit",2,false] call dayz_zombieSpeak;
};
};
@@ -116,8 +116,8 @@ if (_vehicle != player) then {
//diag_log ("START DAM: Player Hit on " + _wound + " for " + str(_damage));
[player, _wound, _damage, _unit,"zombie"] call fnc_usec_damageHandler;
//dayzHit = [player,_wound, _damage, _unit,"zombie"];
//publicVariable "dayzHit";
//PVDZE_plr_Hit = [player,_wound, _damage, _unit,"zombie"];
//publicVariable "PVDZE_plr_Hit";
[_unit,"hit",2,false] call dayz_zombieSpeak;
} else {
//diag_log ("NO LOS: Player Hit on " + str(_unit) + " for " + str(_vehicle));
@@ -127,8 +127,8 @@ if (_vehicle != player) then {
_damage = 0.1 + random (1.2);
diag_log ("START DAM: Player Hit on " + _wound + " for " + str(_damage));
[player, _wound, _damage, _unit,"zombie"] call fnc_usec_damageHandler;
//dayzHit = [player,_wound, _damage, _unit,"zombie"];
//publicVariable "dayzHit";
//PVDZE_plr_Hit = [player,_wound, _damage, _unit,"zombie"];
//publicVariable "PVDZE_plr_Hit";
[_unit,"hit",2,false] call dayz_zombieSpeak;
};
*/

View File

@@ -23,12 +23,12 @@ if (_dam < 1 ) then {
_unit setVariable [_strH,_total,true];
if ( !_needUpdate ) then {
_unit setVariable ["needUpdate",true,true];
//["dayzUpdateVehicle",[_unit,"damage"]] call callRpcProcedure;
//["PVDZE_veh_Update",[_unit,"damage"]] call callRpcProcedure;
if (isServer) then {
[_unit, "damage"] call server_updateObject;
} else {
dayzUpdateVehicle = [_unit,"damage"];
publicVariableServer "dayzUpdateVehicle";
PVDZE_veh_Update = [_unit,"damage"];
publicVariableServer "PVDZE_veh_Update";
};
};
};

View File

@@ -9,12 +9,12 @@ _hitPoints = _unit call vehicle_getHitpoints;
_unit setVariable [_selection, 1, true];
} forEach _hitPoints;
//["dayzUpdateVehicle",[_unit, "damage"]] call callRpcProcedure;
//["PVDZE_veh_Update",[_unit, "damage"]] call callRpcProcedure;
if (isServer) then {
[_unit, "killed"] call server_updateObject;
} else {
dayzUpdateVehicle = [_unit, "killed"];
publicVariableServer "dayzUpdateVehicle";
PVDZE_veh_Update = [_unit, "killed"];
publicVariableServer "PVDZE_veh_Update";
};
_unit removeAllEventHandlers "HandleDamage";

View File

@@ -31,8 +31,8 @@ if (_doLoiter) then {
};
//diag_log ("Spawned: " + str([_type, _position, [], _radius, _method]));
_agent = createAgent [_type, _position, [], _radius, _method];
dayzSpawnZed = [_agent];
publicVariableServer "dayzSpawnZed";
PVDZE_zed_Spawn = [_agent];
publicVariableServer "PVDZE_zed_Spawn";
if (_doLoiter) then {
_agent setDir round(random 180);