Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_FireModeSwitchUserAction.c
Go to the documentation of this file.
1
class
SCR_FireModeSwitchUserAction
:
SCR_InspectionUserAction
2
{
3
//------------------------------------------------------------------------------------------------
4
override
bool
CanBeShownScript(
IEntity
user)
5
{
6
if
(!super.CanBeShownScript(user))
7
return
false
;
8
9
BaseMuzzleComponent
muzzle =
m_WeaponComponent
.GetCurrentMuzzle();
10
// Only show fire mode selection for current muzzle
11
if
(
GetOwner
() != muzzle.GetOwner())
12
return
false
;
13
return
muzzle && muzzle.GetFireModesCount() > 2;
14
}
15
16
//------------------------------------------------------------------------------------------------
17
override
void
PerformAction
(
IEntity
pOwnerEntity,
IEntity
pUserEntity)
18
{
19
if
(!
m_WeaponComponent
)
20
return
;
21
BaseMuzzleComponent
muzzle =
m_WeaponComponent
.GetCurrentMuzzle();
22
if
(!muzzle)
23
return
;
24
25
CharacterControllerComponent charComp = CharacterControllerComponent.Cast(pUserEntity.
FindComponent
(CharacterControllerComponent));
26
charComp.SetSafety(
false
,
false
);
27
charComp.SetFireMode(muzzle.GetNextFireModeIndex());
28
}
29
};
BaseMuzzleComponent
Definition
BaseMuzzleComponent.c:13
IEntity
Definition
IEntity.c:13
IEntity::FindComponent
proto external Managed FindComponent(typename typeName)
SCR_FireModeSwitchUserAction
Definition
SCR_FireModeSwitchUserAction.c:2
SCR_InspectionUserAction
Definition
SCR_InspectionUserAction.c:2
SCR_InspectionUserAction::m_WeaponComponent
BaseWeaponComponent m_WeaponComponent
Definition
SCR_InspectionUserAction.c:3
GetOwner
IEntity GetOwner()
Owner entity of the fuel tank.
Definition
SCR_FuelNode.c:128
PerformAction
@ PerformAction
Definition
EUserActionEvent.c:15
scripts
Game
UserActions
Inspection
SCR_FireModeSwitchUserAction.c
Generated by
1.17.0