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_LootDeadBodyAction.c
Go to the documentation of this file.
1
class
SCR_LootDeadBodyAction
:
SCR_LootAction
2
{
3
//------------------------------------------------------------------------------------------------
4
override
bool
CanBeShownScript(
IEntity
user)
5
{
6
return
CanBePerformedScript(user);
7
}
8
9
//------------------------------------------------------------------------------------------------
10
override
bool
CanBePerformedScript(
IEntity
user)
11
{
12
ChimeraCharacter
char
=
ChimeraCharacter
.Cast(
GetOwner
());
13
if
(!
char
)
14
return
false
;
15
16
// Disallow looting when alive
17
CharacterControllerComponent contr =
char
.GetCharacterController();
18
if
(!contr)
19
return
false
;
20
21
if
(contr.GetLifeState() ==
ECharacterLifeState
.ALIVE)
22
return
false
;
23
24
// Disallow looting when in vehicle
25
IEntity
userVeh = CompartmentAccessComponent.GetVehicleIn(
char
);
26
if
(userVeh)
27
return
false
;
28
29
return
super.CanBePerformedScript(user);
30
}
31
}
ChimeraCharacter
Definition
ChimeraCharacter.c:13
IEntity
Definition
IEntity.c:13
SCR_LootAction
Definition
SCR_LootAction.c:2
SCR_LootDeadBodyAction
Definition
SCR_LootDeadBodyAction.c:2
GetOwner
IEntity GetOwner()
Owner entity of the fuel tank.
Definition
SCR_FuelNode.c:128
ECharacterLifeState
ECharacterLifeState
Definition
ECharacterLifeState.c:13
scripts
Game
UserActions
SCR_LootDeadBodyAction.c
Generated by
1.17.0