0.3.6.024

This commit is contained in:
vbawol 2015-12-17 11:24:11 -06:00
parent 01cdb3272d
commit 73346388be
9 changed files with 69 additions and 65 deletions

View File

@ -2,6 +2,8 @@
[Added] Ability to sell Primary weapon from hands and empty backpacks. Thanks to @He-Man
[Changed] Increased max player load 2x to compensate for the new stamina system in 1.54.
[Changed] Increased backpack storage limits to allow carrying long weapons.
[Fixed] cursorTarget function to only use new Epoch method while underwater. Should help with targeting issues on land.
[Fixed] Canceling build mode did not remove the ghost object as it should have.
[Fixed] Updated Epoch armor stats UI system to support new changes since 1.54.
[Fixed] Changes to default Arma weapon configs to allow long (Lynx,etc) weapons to be stored in backpacks.
[Fixed] Unable to sell after attempting to sell a temporary vehicle. Thanks to @He-Man

View File

@ -25,7 +25,7 @@
7 addMagazine !"addMagazineCargo" !="player addMagazine _craftItem;" !="player addMagazine \"jerrycanE_epoch\";" !="player addMagazine \"emptyjar_epoch\";" !="player addMagazine \"jerrycan_epoch\";" !="player addMagazine \"Hatchet_swing\";" !="player addMagazine [(_x select 0),(_x select 1)]" !="player addMagazine _x;" !="if !(player canAdd (_x select 0)) exitWith {};\nplayer addMagazine[_x select 0, _x select 1];"
7 addMagazineCargo !"_dogHolder addMagazineCargo [\"RabbitCarcass_EPOCH\", 1]" !"_dogHolder addMagazineCargo [\"Pelt_EPOCH\", 1]" !"_dogHolder addMagazineCargo [\"Venom_EPOCH\", 1]" !"_dogHolder addMagazineCargo [\"SnakeCarcass_EPOCH\", 1]" !"_dogHolder addMagazineCargo [\"ChickenCarcass_EPOCH\", 1]" !="_acceptHolder addMagazineCargo [_wAmmo, 1] ;"
7 addItem !="player addItem _item;" !="player addItem _craftItem;" !="player addItem _x;" !="_plyr addItemToVest _missionItem;" !="axeVIP addItemToVest _item;" !="_plyr addItemToVest _missionItem;" !="EPOCH_fnc_addItemOverflow"
7 addBackPack !="if (backpack player == "") then {\nplayer addbackpack _x;\n}\nelse {"
7 addBackPack
7 addMissionEventHandler !="addMissionEventHandler ['Draw3D',_var + \"call Epoch_gui3DCooldownEH;\"];" !="addMissionEventHandler ['Draw3D',_var + \"call epoch_gui3dModelPosEH;\"];" !="addMissionEventHandler ['Draw3D',_var + \"call epoch_gui3dWorldPosEH;\"];" !="addMissionEventHandler [\n"ended",\n{\n\nBIS_fnc_missionHandlers_end = _this;"
7 removeMissionEventHandler !="removeMissionEventHandler [\"Draw3D\", _id];"
7 removeAllWeapons !="removeAllWeapons axeGeneral;"

View File

@ -205,11 +205,11 @@ if (isText(_config)) then {
if !(surfaceIsWater _pos2) then {
_pos2 = ATLtoASL _pos2;
};
if (EPOCH_space) then {
if (EPOCH_doRotate) then {
_vel2 = (velocity player);
_dir2 = [vectorDir player, EPOCH_buildDirection] call BIS_fnc_returnVector;
_up2 = (vectorUp player);
EPOCH_space = false;
EPOCH_doRotate = false;
EP_velocityTransformation = [_pos2,_vel2,_dir2,_up2];
} else {
EP_velocityTransformation = [];

View File

@ -141,10 +141,10 @@ if (_class != "") then {
EPOCH_target attachTo[player];
};
if (EPOCH_space) then {
if (EPOCH_doRotate) then {
_dir2 = [vectorDir player, EPOCH_buildDirection] call BIS_fnc_returnVector;
_up2 = (vectorUp player);
EPOCH_space = false;
EPOCH_doRotate = false;
EPOCH_target setVectorDirAndUp [_dir2,_up2];
};

View File

@ -25,6 +25,10 @@
(OBJECT or objNull)
*/
params [["_distance",10], ["_lod1", "VIEW"], ["_lod2","FIRE"], ["_sort",true]];
_ins = lineIntersectsSurfaces [AGLToASL positionCameraToWorld [0,0,0],AGLToASL positionCameraToWorld [0,0,_distance],player,objNull,_sort,1,_lod1,_lod2];
if (_ins isEqualTo []) exitWith { objNull };
(_ins select 0 param [3,objNull])
if (EPOCH_playerIsSwimming) then {
_ins = lineIntersectsSurfaces [AGLToASL positionCameraToWorld [0,0,0],AGLToASL positionCameraToWorld [0,0,_distance],player,objNull,_sort,1,_lod1,_lod2];
if (_ins isEqualTo []) exitWith { objNull };
(_ins select 0 param [3,objNull])
} else {
cursorTarget
}

View File

@ -1,7 +1,7 @@
/*
Author: Aaron Clark - EpochMod.com
Author: Aaron Clark - EpochMod.com - @vbawol
Contributors:
Contributors: @Skaronator @raymix @Fank
Description:
Key Down EH functions
@ -36,7 +36,7 @@ _handled = false;
if !(alive player) exitWith{ false };
EPOCH_space = false;
EPOCH_doRotate = false;
if (_dikCode in [0x02,0x03,0x04,0x58,0x57,0x44,0x43,0x42,0x41,0x40,0x3F,0x3E,0x3D,0x3C,0x3B,0x0B,0x0A,0x09,0x08,0x07,0x06,0x05,0x0E]) then {
_handled = true;
@ -57,18 +57,15 @@ if (_ctrl && _dikCode == EPOCH_keysVolumeDown) then {
// ESC default to cancel
if (_dikCode == 0x01) then {
if !(isNull EPOCH_Target) then {
if !(_vehicle isKindOf "ThingX") then {
if !(EPOCH_Target isKindOf "ThingX") then {
deleteVehicle EPOCH_Target;
} else {
EPOCH_Target = objNull;
};
_dt = ["<t size = '0.8' shadow = '0' color = '#99ffffff'>Build Canceled</t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
};
if !(EPOCH_arr_interactedObjs isEqualTo[]) then {
EPOCH_arr_interactedObjs remoteExec["EPOCH_server_save_vehicles", 2];
EPOCH_arr_interactedObjs = [];
};
@ -190,8 +187,8 @@ if (vehicle player == player) then {
case EPOCH_keysBuildMovBak: { EPOCH_Y_OFFSET = (EPOCH_Y_OFFSET - 0.1) max 2; _handled = true };
case EPOCH_keysBuildMovL: { EPOCH_X_OFFSET = (EPOCH_X_OFFSET + 0.1) min 5; _handled = true };
case EPOCH_keysBuildMovR: { EPOCH_X_OFFSET = (EPOCH_X_OFFSET - 0.1) max - 5; _handled = true };
case EPOCH_keysBuildRotL: { EPOCH_buildDirection = (EPOCH_buildDirection + 1) min 360; EPOCH_space = true; _handled = true };
case EPOCH_keysBuildRotR: { EPOCH_buildDirection = (EPOCH_buildDirection - 1) max 0; EPOCH_space = true; _handled = true };
case EPOCH_keysBuildRotL: { EPOCH_buildDirection = (EPOCH_buildDirection + 1) min 360; EPOCH_doRotate = true; _handled = true };
case EPOCH_keysBuildRotR: { EPOCH_buildDirection = (EPOCH_buildDirection - 1) max 0; EPOCH_doRotate = true; _handled = true };
//case EPOCH_keysBuildIt: { cursorTarget call EPOCH_fnc_SelectTarget; _handled = true };
};
};
@ -273,7 +270,7 @@ if (vehicle player == player) then {
if (_dikCode in(actionKeys "Gear")) then {
if !(isNull EPOCH_Target) then {
if !(_vehicle isKindOf "ThingX") then {
if !(EPOCH_Target isKindOf "ThingX") then {
deleteVehicle EPOCH_Target;
} else {
EPOCH_Target = objNull;

View File

@ -47,37 +47,33 @@ if (!isNull _this) then {
if (_item in items player) then {
player removeItem _item;
_arrayIn pushBack _item;
}
else {
} else {
if (_item == primaryweapon player) then {
player removeweapon _item;
_arrayIn pushBack _item;
};
};
};
}
else {
} else {
if ([_item, "CfgVehicles"] call EPOCH_fnc_isAny) then {
if (_item == backpack player) then {
removeBackpack player;
_arrayIn pushBack _item;
}
else {
_vehicles = _this nearEntities[[_item], 30];
if (!(_vehicles isEqualTo[])) then {
_vehicle = _vehicles select 0;
if (!isNull _vehicle) then {
if (local _vehicle) then {
_vehSlot = _vehicle getVariable["VEHICLE_SLOT", "ABORT"];
if (_vehSlot != "ABORT") then {
_arrayIn pushBack _item;
// will be removed server side
} else {
_vehicles = _this nearEntities[[_item], 30];
if (!(_vehicles isEqualTo[])) then {
_vehicle = _vehicles select 0;
if (!isNull _vehicle) then {
if (local _vehicle) then {
_vehSlot = _vehicle getVariable["VEHICLE_SLOT", "ABORT"];
if (_vehSlot != "ABORT") then {
_arrayIn pushBack _item;
// will be removed server side
};
};
};
};
};
};
}
else {
} else {
if (_item in magazines player) then {
player removeMagazine _item;
_arrayIn pushBack _item;
@ -175,33 +171,11 @@ if (!isNull _this) then {
_x call EPOCH_fnc_addItemOverflow;
};
} else {
//
if (_x isKindOf "Bag_Base") then {
// add to players back
if (backpack player == "") then {
player addbackpack _x;
} else {
// add to the ground
_wH = objNull;
_nearByHolder = nearestObjects [position player,["groundWeaponHolder"],3];
if (_nearByHolder isEqualTo []) then {
_wHPos = player modelToWorld [0,1,0];
if (surfaceIsWater _wHPos) then {
_wHPos = ASLToATL _wHPos;
};
_wH = createVehicle ["groundWeaponHolder",_wHPos, [], 0, "CAN_COLLIDE"];
} else {
_wH = _nearByHolder select 0;
};
_wh addBackpackCargoGlobal [_x,1];
};
if ([_x, "CfgMagazines"] call EPOCH_fnc_isAny) then {
_errorMsg = _errorMsg + format["%1, ", getText(configfile >> "CfgMagazines" >> (_x) >> "displayName")];
_x call EPOCH_fnc_addItemOverflow;
} else {
if ([_x, "CfgMagazines"] call EPOCH_fnc_isAny) then {
_errorMsg = _errorMsg + format["%1, ", getText(configfile >> "CfgMagazines" >> (_x) >> "displayName")];
_x call EPOCH_fnc_addItemOverflow;
} else {
_errorMsg = _errorMsg + format["%1, ", getText(configfile >> "CfgVehicles" >> (_x) >> "displayName")];
};
_errorMsg = _errorMsg + format["%1, ", getText(configfile >> "CfgVehicles" >> (_x) >> "displayName")];
};
};
} forEach(_this select 1);

View File

@ -149,7 +149,7 @@ if (_slot != -1) then {
_helipad pushBack _smoke;
};
// water check
// water check
if (_item isKindOf "Ship") then {
{
if (surfaceIsWater (getposATL _x)) then {
@ -226,7 +226,7 @@ if (_slot != -1) then {
_vehObj = [_item,_position,random 360,true,_vehslot,_lockOwner,"NONE",false] call EPOCH_fnc_spawn_vehicle;
_final_location = getPosATL _vehObj;
_group = group _plyr;
_wp = _group addWaypoint [_final_location, 0];
deleteWaypoint [_group, 0];
@ -242,6 +242,33 @@ if (_slot != -1) then {
};
};
} else {
if (_item isKindOf "Bag_Base") then {
// add to players back
/*
if (backpack _plyr == "") then {
_plyr addBackpackGlobal _item;
diag_log "backpack added to players back";
} else {
*/
//diag_log "backpack added to players feet";
// add to the ground
_wH = objNull;
_nearByHolder = nearestObjects [position _plyr,["groundWeaponHolder"],3];
if (_nearByHolder isEqualTo []) then {
_wHPos = _plyr modelToWorld [0,1,0];
if (surfaceIsWater _wHPos) then {
_wHPos = ASLToATL _wHPos;
};
_wH = createVehicle ["groundWeaponHolder",_wHPos, [], 0, "CAN_COLLIDE"];
} else {
_wH = _nearByHolder select 0;
};
//diag_log "backpack added to container";
_wh addBackpackCargoGlobal [_item,1];
//};
};
_returnOut pushBack _item;
_itemQtys set[_qtyIndex, (_currQty - _itemQty)];