Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
pp19.c
Go to the documentation of this file.
1 
4 class PP19_Base : RifleBoltFree_Base
5 {
6  void PP19_Base()
7  {
8  }
9 
10  override RecoilBase SpawnRecoilObject()
11  {
12  return new PP19Recoil(this);
13  }
14 
15  //some command is different for this weapon
16  override int GetWeaponSpecificCommand(int weaponAction ,int subCommand)
17  {
18  if ( weaponAction == WeaponActions.CHAMBERING)
19  {
20  switch (subCommand)
21  {
22  case WeaponActionChamberingTypes.CHAMBERING_ONEBULLET_UNIQUE_CLOSED:
23  return WeaponActionChamberingTypes.CHAMBERING_ONEBULLET_OPENED;
24 
25  default:
26  return subCommand;
27  }
28 
29  }
30  return subCommand;
31  }
32 
33  override bool CanEnterIronsights()
34  {
35  ItemOptics optic = GetAttachedOptics();
36  if (optic && PSO1Optic.Cast(optic) || PSO11Optic.Cast(optic) || KazuarOptic.Cast(optic))
37  return true;
38  return super.CanEnterIronsights();
39  }
40 
41  //Debug menu Spawn Ground Special
42  override void OnDebugSpawn()
43  {
44  GameInventory inventory = GetInventory();
45  inventory.CreateInInventory( "PistolSuppressor" );
46  inventory.CreateInInventory( "PP19_Bttstck" );
47  inventory.CreateInInventory( "KobraOptic" );
48  inventory.CreateInInventory( "Battery9V" );
49 
50  SpawnAttachedMagazine("Mag_PP19_64Rnd");
51  }
52 };
PP19_Base
basic PP19 submachine gun
Definition: pp19.c:4
WeaponActions
WeaponActions
actions
Definition: human.c:808
RecoilBase
Definition: recoilbase.c:1
PP19Recoil
Definition: pp19recoil.c:1
KazuarOptic
Definition: optics.c:14
ItemOptics
Definition: itemoptics.c:1
WeaponActionChamberingTypes
WeaponActionChamberingTypes
Definition: human.c:868
GameInventory
script counterpart to engine's class Inventory
Definition: inventory.c:78