Epoch Survival 0.4 b626

increased anti-teleport range
added experimental vehicle immunity if locked inside an owned base (with
jammer)
Players now start with only 30% Hunger and Thirst instead of 100%.
This commit is contained in:
vbawol 2016-10-26 15:59:38 -05:00
parent c5bbe34d04
commit 14058cb832
38 changed files with 66 additions and 24 deletions

View File

@ -4,6 +4,7 @@
[Changed] Wardrobe mirror now works in single player.
[Changed] Jetski and Electric Motorcycle motorcycle in-vehicle HUD now works in singleplayer.
[Changed] Updated Tanoa trader city layout and added ATM's. Thanks to @morgoth0 (aka Grahame on EpochMod.com Forum)
[Changed] Players now start with only 30% Hunger and Thirst instead of 100%.
[Fixed] Increased mass of "Hotwire Kit" (ItemHotwire) magazine item from 2 to 50 to address balance issues. Thanks to PR from @Ignatz-HeMan
[Fixed] Disposal of Snakes and other animals when inside a protection zone.
[Fixed] Shark bite attack and effect can now target all players correctly.

View File

@ -40,7 +40,7 @@ class CfgEpochClient
niteLight[] = {1,1.88,22};
ryanZombiesEnabled = True;
antagonistSpawnIndex[] = {{"Epoch_Cloak_F",1},{"GreatWhite_F",2},{"Epoch_Sapper_F",2},{"Epoch_SapperB_F",1},{"I_UAV_01_F",2},{"PHANTOM",1},{"B_Heli_Transport_01_F",1},{"EPOCH_RyanZombie_1",12}};
customVarsDefaults[] = {{"Temp",98.6,{106.7,95,102,105,96,95}},{"Hunger",5000,{5000,0,5001,5001,1250,0}},{"Thirst",2500,{2500,0,2501,2501,625,0}},{"AliveTime",0,{-2,0}},{"Energy",0,{2500,0}},{"Wet",0,{100,0,35,55,-1,-1}},{"Soiled",0,{100,0,35,55,-1,-1}},{"Immunity",0,{100,0}},{"Toxicity",0,{100,0,35,55,-1,-1}},{"Stamina",100,{"EPOCH_playerStaminaMax",0}},{"Crypto",0,{250000,0}},{"HitPoints",{0,0,0,0},{1,0,0.5,1,-1,-1}},{"BloodP",100,{190,0,120,140,70,50}},{"SpawnArray",{},{}},{"Karma",0,{50000,-50000}},{"Alcohol",0,{100,0,35,55,-1,-1}},{"Radiation",0,{100,0,35,55,-1,-1}},{"Nuisance",0,{100,0}},{"MissionArray",{},{}}};
customVarsDefaults[] = {{"Temp",98.6,{106.7,95,102,105,96,95}},{"Hunger",1500,{5000,0,5001,5001,1250,0}},{"Thirst",750,{2500,0,2501,2501,625,0}},{"AliveTime",0,{-2,0}},{"Energy",0,{2500,0}},{"Wet",0,{100,0,35,55,-1,-1}},{"Soiled",0,{100,0,35,55,-1,-1}},{"Immunity",0,{100,0}},{"Toxicity",0,{100,0,35,55,-1,-1}},{"Stamina",100,{"EPOCH_playerStaminaMax",0}},{"Crypto",0,{250000,0}},{"HitPoints",{0,0,0,0},{1,0,0.5,1,-1,-1}},{"BloodP",100,{190,0,120,140,70,50}},{"SpawnArray",{},{}},{"Karma",0,{50000,-50000}},{"Alcohol",0,{100,0,35,55,-1,-1}},{"Radiation",0,{100,0,35,55,-1,-1}},{"Nuisance",0,{100,0}},{"MissionArray",{},{}}};
hudConfigs[] = {{{"BloodP","","",{"getPlayerDamage",">=",0.7}},"topRight","x\addons\a3_epoch_code\Data\UI\bleeding_ca.paa",{"forceUpdate"}},{{"Oxygen","getPlayerOxygenRemaining","",{},{1,0,2,2,1,0.55}},"topRight","x\addons\a3_epoch_code\Data\UI\oxygen_ca.paa"},{"Hunger","topRight","x\addons\a3_epoch_code\Data\UI\hunger_ca.paa",{"forceBloodRise"}},{"Thirst","topRight","x\addons\a3_epoch_code\Data\UI\thirst_ca.paa",{"forceBloodRise"}},{"Temp","topRight",{"x\addons\a3_epoch_code\Data\UI\hot_ca.paa","x\addons\a3_epoch_code\Data\UI\cold_ca.paa"},{"forceFatigue"}},{"Toxicity","topRight","x\addons\a3_epoch_code\Data\UI\hazzard_ca.paa"},{"Wet","topRight","x\addons\a3_epoch_code\Data\UI\wet_ca.paa"},{"Alcohol","topRight","x\addons\a3_epoch_code\Data\UI\drunk_ca.paa"},{"Soiled","topRight","x\addons\a3_epoch_code\Data\UI\soiled_ca.paa"},{"Radiation","topRight","x\addons\a3_epoch_code\Data\UI\rads_ca.paa"},{{"HitPoints","getPlayerHitPointDamage","HitLegs"},"topRight","x\addons\a3_epoch_code\Data\UI\broken_ca.paa"}};
group_upgrade_lvl[] = {4,"1000",6,"1500",8,"2000",10,"2500",12,"3000",14,"3500",16,"4000",32,"8000",64,"16000"};
displayAddEventHandler[] = {"keyDown","keyUp"};

View File

@ -94,7 +94,7 @@
],
[
"Hunger",
5000,
1500,
[
5000,
0,
@ -106,7 +106,7 @@
],
[
"Thirst",
2500,
750,
[
2500,
0,

View File

@ -1 +1 @@
build=621;
build=626;

View File

@ -1 +1 @@
build=621;
build=625;

View File

@ -12,7 +12,9 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_vehicles.sqf
*/
private ["_removeweapons","_removemagazinesturret","_availableColorsConfig","_location","_class","_dmg","_actualHitpoints","_hitpoints","_textures","_color","_colors","_textureSelectionIndex","_selections","_count","_objTypes","_objQty","_wMags","_wMagsArray","_attachments","_magazineSizeMax","_magazineName","_magazineSize","_qty","_objType","_marker","_found","_vehicle","_allHitpoints","_cfgEpochVehicles","_worldspace","_damage","_arr","_arrNum","_vehicleSlotIndex","_vehHiveKey","_response","_diag","_dataFormat","_dataFormatCount","_allVehicles","_serverSettingsConfig"];
//[[[cog import generate_private_arrays ]]]
private ["_actualHitpoints","_allHitpoints","_allVehicles","_allowDamage","_arr","_arrNum","_attachments","_availableColorsConfig","_cfgEpochVehicles","_class","_color","_colors","_config","_count","_damage","_dataFormat","_dataFormatCount","_diag","_dmg","_found","_hitpoints","_immuneIfStartInBase","_jammerOwner","_jammerRange","_jammers","_location","_lockedOwner","_magazineName","_magazineSize","_magazineSizeMax","_mags","_marker","_nearestJammer","_objQty","_objType","_objTypes","_qty","_removemagazinesturret","_removeweapons","_response","_selections","_serverSettingsConfig","_simulationHandler","_textureSelectionIndex","_textures","_vehHiveKey","_vehLockHiveKey","_vehicle","_vehicleDamages","_vehicleSlotIndex","_wMags","_wMagsArray","_worldspace"];
//[[[end]]]
params [["_maxVehicleLimit",0]];
_diag = diag_tickTime;
@ -22,7 +24,11 @@ EPOCH_VehicleSlots = [];
_allVehicles = [];
_vehicleDamages = [];
_config = 'CfgEpochClient' call EPOCH_returnConfig;
_jammerRange = getNumber(_config >> "buildingJammerRange");
_serverSettingsConfig = configFile >> "CfgEpochServer";
_immuneIfStartInBase = [_serverSettingsConfig, "immuneIfStartInBase", true] call EPOCH_fnc_returnConfigEntry;
_simulationHandler = [_serverSettingsConfig, "simulationHandlerOld", false] call EPOCH_fnc_returnConfigEntry;
_removeweapons = [_serverSettingsConfig, "removevehweapons", []] call EPOCH_fnc_returnConfigEntry;
_removemagazinesturret = [_serverSettingsConfig, "removevehmagazinesturret", []] call EPOCH_fnc_returnConfigEntry;
@ -111,7 +117,7 @@ for "_i" from 1 to _maxVehicleLimit do {
clearMagazineCargoGlobal _vehicle;
clearBackpackCargoGlobal _vehicle;
clearItemCargoGlobal _vehicle;
if !(_removeweapons isequalto []) then {
{
_vehicle removeWeaponGlobal _x;
@ -220,7 +226,34 @@ for "_i" from 1 to _maxVehicleLimit do {
} forEach _actualHitpoints;
};
};
_vehicle allowDamage true;
// allow damage
_allowDamage = true;
if (_immuneIfStartInBase) then {
_jammers = nearestObjects[_vehicle, ["PlotPole_EPOCH"], _jammerRange];
if!(_jammers isEqualTo [])then {
// get jammer owner
_nearestJammer = _jammers select 0;
_jammerOwner = _nearestJammer getVariable["BUILD_OWNER", "-2"];
// get vehicle lock owner
_lockedOwner = "-1";
_vehLockHiveKey = format["%1:%2", (call EPOCH_fn_InstanceID), str(_i)];
(["VehicleLock", _vehLockHiveKey] call EPOCH_fnc_server_hiveGETRANGE) params [["_status", 0 ],["_payload", [] ]];
if (_status isEqualTo 1) then {
_lockedOwner = _payload param [0,"-1"];
};
// if match keep vehicle immune till first unlock
if (_jammerOwner isEqualTo _lockedOwner) then {
_vehicle setVariable ["EPOCH_disallowedDamage", true];
_allowDamage = false;
};
};
};
if (_allowDamage) then {
_vehicle allowDamage true;
};
// vehicle simulation handler
if (_simulationHandler) then{
_vehicle enableSimulationGlobal false;

View File

@ -12,8 +12,15 @@
Github:
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_lockVehicle.sqf
*/
private ["_lockOwner","_lockedOwner","_response","_playerUID","_playerGroup","_vehSlot","_vehLockHiveKey","_isLocked","_driver","_crew","_logic"];
params ["_vehicle","_value","_player",["_token","",[""]]];
//[[[cog import generate_private_arrays ]]]
private ["_crew","_driver","_isLocked","_lockOwner","_lockedOwner","_logic","_playerGroup","_playerUID","_response","_vehLockHiveKey","_vehSlot"];
//[[[end]]]
params [
["_vehicle",objNull,[objNull]],
["_value",true,[true]],
["_player",objNull,[objNull]],
["_token","",[""]]
];
if (isNull _vehicle) exitWith {};
if !([_player,_token] call EPOCH_server_getPToken) exitWith {};
@ -69,17 +76,18 @@ if (_logic) then {
if (_value) then {
["VehicleLock", _vehLockHiveKey, EPOCH_vehicleLockTime, [_lockOwner]] call EPOCH_fnc_server_hiveSETEX;
};
} else {
// re-allow damage (server-side) on first unlock
if (_vehicle getVariable ["EPOCH_disallowedDamage", false]) then {
_vehicle allowDamage true;
_vehicle setVariable ["EPOCH_disallowedDamage", nil];
};
};
// lock/unlock
if (local _vehicle) then {
_vehicle lock _value;
} else {
if (_value) then {
// send to player
[_vehicle, true] remoteExec ['EPOCH_client_lockVehicle',_vehicle];
} else {
// send to player
[_vehicle, false] remoteExec ['EPOCH_client_lockVehicle',_vehicle];
};
[_vehicle, _value] remoteExec ['EPOCH_client_lockVehicle',_vehicle];
};
};

View File

@ -870,7 +870,7 @@ _skn_code_antihack = compileFinal ("
_distance = _lastPos distance _curPos;
if ((_curTime-_lastTime)>1 || _distance>10) then {
if (((_distance/(_curTime-_lastTime)) > 10) && _notNearbySpawn && (player == vehicle player)) then {
if (((_distance/(_curTime-_lastTime)) > 16) && _notNearbySpawn && (player == vehicle player)) then {
if (isNil '"+_skn_antiTeleportPVC+"') then {
[format['[TEST] TP from %1 to %2, %3 meters, now at %4', _lastPos, _curPos, round _distance, getPosATL player],1] call "+_sknBanANDSleep+";
vehicle player setPosATL _lastPos;

View File

@ -1 +1 @@
build=621;
build=625;

View File

@ -1 +1 @@
build=621;
build=625;

View File

@ -215,9 +215,9 @@ class Tanoa : Default
// W [-14.4316,0.112793,-10.3098]
// template city { "Transport_C_EPOCH", { -0.286865,8.17383,-10.3098 }, "", "north" },
{ "Transport_E_EPOCH", { 13.5127,0.410156,-10.3098 }, "", { 2015.21,10659.6,0 } },
{ "Transport_W_EPOCH", { -14.4316,0.112793,-10.3098 }, "", { 2015.21,10659.6,0 } },
{ "Transport_C_EPOCH", { -0.286865,8.17383,-10.3098 }, "", { 5027.48,5210.25,0 } },
{ "Transport_W_EPOCH", { -14.4316,0.112793,-10.3098 }, "", { 11779.6,13056.5,0 } }
{ "Transport_E_EPOCH", { 13.5127,0.410156,-10.3098 }, "", { 11779.6,13056.5,0 } }
};
propsPos[] = {
// Western Trader Camp

View File

@ -1 +1 @@
621
626