DayZ 1.24
Loading...
Searching...
No Matches
PP19.c
Go to the documentation of this file.
1
4class PP19_Base : RifleBoltFree_Base
5{
6 void PP19_Base()
7 {
8 }
9
11 {
12 return new PP19Recoil(this);
13 }
14
15 //some command is different for this weapon
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};
script counterpart to engine's class Inventory
Definition Inventory.c:79
basic PP19 submachine gun
Definition PP19.c:5
override void OnDebugSpawn()
Definition PP19.c:42
override RecoilBase SpawnRecoilObject()
Definition PP19.c:10
override bool CanEnterIronsights()
Definition PP19.c:33
void PP19_Base()
Definition PP19.c:6
override int GetWeaponSpecificCommand(int weaponAction, int subCommand)
Definition PP19.c:16
WeaponActionChamberingTypes
Definition human.c:856
WeaponActions
actions
Definition human.c:796