Merge remote-tracking branch 'origin/master'

# Conflicts:
#	CHANGE LOG 1.0.6.txt
This commit is contained in:
icomrade
2016-04-27 18:26:07 -04:00
6 changed files with 33 additions and 21 deletions

View File

@@ -19,6 +19,15 @@ class WeaponHolder_ItemCrowbar: WeaponHolderBase
init="[(_this select 0),'cfgWeapons','ItemCrowbar'] execVM '\z\addons\dayz_code\init\object_pickupAction.sqf';";
};
};
class WeaponHolder_ItemSledge : WeaponHolderBase { // Epoch class. Needed for player_dropWeapon
scope = public;
displayName = $STR_EQUIP_NAME_SledgeHammer;
model="\z\addons\dayz_epoch\models\sledge_mag.p3d";
class eventHandlers {
init = "[(_this select 0),'cfgWeapons','ItemSledge'] execVM '\z\addons\dayz_code\init\object_pickupAction.sqf';";
};
};
/*
class WeaponHolder_MeleeBaseBallBat: WeaponHolderBase
{

View File

@@ -2,29 +2,30 @@ class MeleeSledge: MeleeWeapon
{
scope = public;
model="\z\addons\dayz_epoch\models\sledge_weaponized";
picture="\z\addons\dayz_epoch\pictures\equip_sledge_CA.paa"; // todo icon
displayName=$STR_EQUIP_NAME_SledgeHammer;
descriptionShort=$STR_EQUIP_SLEDGE_DESC;
model = "\z\addons\dayz_epoch\models\sledge_weaponized";
picture = "\z\addons\dayz_epoch\pictures\equip_sledge_CA.paa"; // todo icon
displayName = $STR_EQUIP_NAME_SledgeHammer;
descriptionShort = $STR_EQUIP_SLEDGE_DESC;
magazines[]= {"Sledge_Swing"};
magazines[] = {"Sledge_Swing"};
droppeditem= "ItemSledge";
droppeditem = "ItemSledge";
class ItemActions
{
class Toolbelt
{
text=$STR_ACTIONS_2TB;
script="spawn player_addToolbelt;";
use[]=
{
"MeleeSledge"
};
output[]=
{
"ItemSledge"
};
text = $STR_ACTIONS_2TB;
script = "spawn player_addToolbelt;";
use[] = {"MeleeSledge"};
output[] = {"ItemSledge"};
};
class Drop
{
text = $STR_ACTIONS_DROP;
script = "spawn player_dropWeapon; r_action_count = r_action_count + 1;";
use[] = {"Sledge_Swing"};
};
};
class Library

View File

@@ -6,6 +6,7 @@ class ItemSledge: ItemCore // Epoch class
picture="\z\addons\dayz_epoch\pictures\equip_sledge_CA.paa";
displayName=$STR_EQUIP_NAME_SledgeHammer;
descriptionShort=$STR_EQUIP_SLEDGE_DESC;
class ItemActions
{
class ToBack

View File

@@ -160,8 +160,8 @@ dz_fn_switchWeapon =
//Current weapon is primary
if (IS_PRIMARY(_current)) exitWith
{
//if current is rifle and on back is melee
if (!IS_MELEE(_current) && { IS_MELEE(dayz_onBack) }) then
//if current is rifle and on back is melee OR two rifles are allowed
if ((!IS_MELEE(_current) && { IS_MELEE(dayz_onBack) }) or (DZE_TwoPrimaries > 1)) then
{
if (dayz_quickSwitch) then
{

View File

@@ -63,7 +63,7 @@ if (isNil "keyboard_keys") then {
3 call dz_fn_switchWeapon;
_handled = true;
};
_melee = {
_melee = { // Also works for rifle on back if DZE_TwoPrimaries = 2;
4 call dz_fn_switchWeapon;
_handled = true;
};