-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rx_SniperSpawnPoint.uc
75 lines (63 loc) · 1.45 KB
/
Rx_SniperSpawnPoint.uc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
class Rx_SniperSpawnPoint extends NavigationPoint;
var byte Team;
var StaticMeshComponent TriggerMesh;
replication
{
if (bNetDirty && Role == ROLE_Authority)
Team;
}
simulated event PostBeginPlay()
{
super.PostBeginPlay();
if (WorldInfo.NetMode != NM_DedicatedServer)
{
ForceNetRelevant();
Timer();
SetTimer(2.5, false);
}
if (WorldInfo.NetMode != NM_Client)
SetTimer(0.1f, true, 'CheckTouch');
}
function CheckTouch()
{
local Rx_Pawn P;
ForEach CollidingActors(class'Rx_Pawn', P, 1050)
{
if (P.GetTeamNum() != ScriptGetTeamNum())
{
Rx_Controller(P.Controller).CTextMessage("Stay out of enemy spawn", 'Red');
P.Suicide();
}
}
}
simulated function Timer()
{
SetHidden(GetALocalPlayerController().GetTeamNum() == ScriptGetTeamNum());
}
simulated event byte ScriptGetTeamNum()
{
return Team;
}
DefaultProperties
{
bStatic=false
bNoDelete=false
RemoteRole=ROLE_AutonomousProxy
Begin Object Class=StaticMeshComponent Name=TMesh
StaticMesh=StaticMesh'RenX_AssetBase.Mesh.SM_Sphere_Rad100'
HiddenGame=false
AlwaysLoadOnClient = True
AlwaysLoadOnServer = True
Scale=10
Materials[0]=MaterialInstanceConstant'SM_Content.Materials.M_Holo_INST'
CollideActors=false
BlockActors=False
BlockZeroExtent=False
BlockNonZeroExtent=False
BlockRigidBody=False
End Object
TriggerMesh=TMesh
CollisionComponent=TMesh
Components.Add(TMesh)
bCollideActors=false
}