Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
m79.c
Go to the documentation of this file.
1
class
M79_Base
extends
RifleSingleShotManual_Base
2
{
3
void
M79_Base
()
4
{
5
}
6
7
override
bool
ShootsExplosiveAmmo
()
8
{
9
return
true
;
10
}
11
12
override
RecoilBase
SpawnRecoilObject
()
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
32
class
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
47
class
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
Class
Super root of all classes in Enforce script.
Definition
enscript.c:11
EntityAI
Definition
inventoryitem.c:2
ItemOptics
Definition
itemoptics.c:2
ItemOptics::IsSightOnly
override bool IsSightOnly()
Definition
m79.c:54
ItemOptics::CanPutAsAttachment
override bool CanPutAsAttachment(EntityAI parent)
Definition
m79.c:49
M79_Base
Definition
m79.c:33
M79_Base::AssembleGun
override void AssembleGun()
Definition
m79.c:35
M79Recoil
Definition
m79recoil.c:2
RecoilBase
Definition
recoilbase.c:2
RifleSingleShotManual_Base
Definition
m79.c:2
RifleSingleShotManual_Base::OnDebugSpawn
override void OnDebugSpawn()
Definition
m79.c:17
RifleSingleShotManual_Base::ShootsExplosiveAmmo
override bool ShootsExplosiveAmmo()
Definition
m79.c:7
RifleSingleShotManual_Base::M79_Base
void M79_Base()
Definition
m79.c:3
RifleSingleShotManual_Base::SpawnRecoilObject
override RecoilBase SpawnRecoilObject()
Definition
m79.c:12
Class::CastTo
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
Games
Dayz
scripts
4_world
entities
firearms
launcher
m79.c
Generated by
1.17.0