Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
LocalChatChannel.c
Go to the documentation of this file.
1
class
LocalChatChannel
:
BaseChatChannel
2
{
3
[
Attribute
(
"100"
,
"Distance to proximity comunication"
,
UIWidgets
.EditBox)]
4
private
float
m_fMaxDistance;
5
6
//------------------------------------------------------------------------------------------------
7
override
bool
IsDelivering(BaseChatComponent sender, BaseChatComponent receiver)
8
{
9
if
(!sender || !receiver)
10
return
false
;
11
SCR_PlayerController
senderPC =
SCR_PlayerController
.Cast(sender.GetOwner());
12
SCR_PlayerController
receiverPC =
SCR_PlayerController
.Cast(receiver.GetOwner());
13
if
(!receiverPC || !senderPC)
14
return
false
;
15
16
vector
d1;
17
vector
d2;
18
if
(!(receiverPC && receiverPC.GetControlledEntity()))
19
return
false
;
20
d2 = receiverPC.GetControlledEntity().GetOrigin();
21
d1 = senderPC.GetControlledEntity().GetOrigin();
22
23
24
25
26
if
(
vector
.Distance(d1, d2) < m_fMaxDistance)
27
return
true
;
28
//Faction receiver
29
return
false
;
30
}
31
32
33
//------------------------------------------------------------------------------------------------
34
override
bool
IsAvailable(BaseChatComponent sender)
35
{
36
SCR_PlayerController
senderPC =
SCR_PlayerController
.Cast(sender.GetOwner());
37
38
return
senderPC && senderPC.GetControlledEntity();
39
}
40
41
};
BaseChatChannel
Definition
BaseChatChannel.c:13
LocalChatChannel
Definition
LocalChatChannel.c:2
SCR_PlayerController
Definition
SCR_PlayerController.c:31
UIWidgets
Definition
attributes.c:40
vector
Definition
vector.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
GameCode
Network
LocalChatChannel.c
Generated by
1.17.0