Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
m79.c
Go to the documentation of this file.
2{
3 void M79_Base ()
4 {
5 }
6
7 override bool ShootsExplosiveAmmo()
8 {
9 return true;
10 }
11
13 {
14 return new M79Recoil(this);
15 }
16
17 override void OnDebugSpawn()
18 {
19 SpawnAmmo("Ammo_40mm_Explosive",SAMF_DEFAULT);
20
21 EntityAI entity;
22 if ( Class.CastTo(entity, this) )
23 {
24 entity.SpawnEntityOnGroundPos("Ammo_40mm_Explosive", entity.GetPosition());
25 entity.SpawnEntityOnGroundPos("Ammo_40mm_Explosive", entity.GetPosition());
26 entity.SpawnEntityOnGroundPos("Ammo_40mm_Explosive", entity.GetPosition());
27 }
28 }
29
30};
31
32class M79 extends M79_Base
33{
34
35 override void AssembleGun()
36 {
37 super.AssembleGun();
38
39 if ( !FindAttachmentBySlotName("weaponOpticsAug") )
40 {
41 GetInventory().CreateAttachment("M79DummyOptics");
42 }
43 }
44
45};
46
47class M79DummyOptics extends ItemOptics
48{
49 override bool CanPutAsAttachment( EntityAI parent )
50 {
51 return true;
52 }
53
54 override bool IsSightOnly()
55 {
56 return true;
57 }
58};
59
Super root of all classes in Enforce script.
Definition enscript.c:11
override bool IsSightOnly()
Definition m79.c:54
override bool CanPutAsAttachment(EntityAI parent)
Definition m79.c:49
Definition m79.c:33
override void AssembleGun()
Definition m79.c:35
override void OnDebugSpawn()
Definition m79.c:17
override bool ShootsExplosiveAmmo()
Definition m79.c:7
override RecoilBase SpawnRecoilObject()
Definition m79.c:12
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.