-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathFPSPlayer.tscript
More file actions
52 lines (40 loc) · 1.54 KB
/
Copy pathFPSPlayer.tscript
File metadata and controls
52 lines (40 loc) · 1.54 KB
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
// 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 FPSPlayer::onCreate( %this )
{
}
function FPSPlayer::onDestroy( %this )
{
}
function FPSPlayer::initServer(%this)
{
%this.queueExec("./scripts/server/player",true);
%this.queueExec("./scripts/server/aiPlayer");
}
function FPSPlayer::onCreateGameServer(%this)
{
%this.registerDatablock("./datablocks/player");
%this.registerDatablock("./datablocks/aiPlayer");
%this.registerDatablock("./datablocks/particles");
}
function FPSPlayer::onDestroyGameServer(%this)
{
}
function FPSPlayer::initClient(%this)
{
//keybind scripts
%this.queueExec("./scripts/client/defaultkeybinds");
}
function FPSPlayer::onCreateClientConnection(%this)
{
}
function FPSPlayer::onDestroyClientConnection(%this)
{
}