-
Notifications
You must be signed in to change notification settings - Fork 3
/
FPSEquipment.tscript
67 lines (54 loc) · 2.22 KB
/
FPSEquipment.tscript
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
// The general flow of a gane - server's creation, loading and hosting clients, and then destruction is as follows:
// First, a client will always create a server in the event that they want to host a single player
// game. Torque3D treats even single player connections as a soft multiplayer game, with some stuff
// in the networking short-circuited to sidestep around lag and packet transmission times.
// initServer() is called, loading the default server scripts.
// After that, if this is a dedicated server session, initDedicated() is called, otherwise initClient is called
// to prep a playable client session.
// When a local game is started - a listen server - via calling StartGame() a server is created and then the client is
// connected to it via createAndConnectToLocalServer().
function FPSEquipment::onCreate( %this )
{
exec("./scripts/shared/animationTools");
}
function FPSEquipment::onDestroy( %this )
{
}
function FPSEquipment::initServer(%this)
{
%this.queueExec("./scripts/server/commands");
%this.queueExec("./scripts/server/weapon");
%this.queueExec("./scripts/server/health");
%this.queueExec("./scripts/server/loadout");
%this.queueExec("./scripts/server/turret");
%this.queueExec("./scripts/server/proximityMine");
}
function FPSEquipment::onCreateGameServer(%this)
{
%this.registerDatablock("./datablocks/health");
%this.registerDatablock("./scripts/managedData/managedDecalData");
%this.registerDatablock("./datablocks/weapon");
%this.registerDatablock("./datablocks/weapons/grenadefx");
%this.registerDatablock("./datablocks/weapons/Lurker");
%this.registerDatablock("./datablocks/weapons/ProxMine");
%this.registerDatablock("./datablocks/weapons/Ryder");
%this.registerDatablock("./datablocks/weapons/Turret");
}
function FPSEquipment::onDestroyGameServer(%this)
{
}
function FPSEquipment::initClient(%this)
{
//keybind scripts
%this.queueExec("./scripts/client/defaultkeybinds");
%prefPath = getPrefpath();
if(isScriptFile(%prefPath @ "/keybinds"))
exec(%prefPath @ "/keybinds");
%this.queueExec("./scripts/client/commands");
}
function FPSEquipment::onCreateClientConnection(%this)
{
}
function FPSEquipment::onDestroyClientConnection(%this)
{
}