mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-06-03 03:26:39 +00:00
initServer callback is run the once
onCreateGameServer callback is run every mission load
for queueexec("filename",true); to work, that has to be from the same callback pool being executed.
given resources use the initServer, pool, shifted the damagemodel baseline there as well.
may want to revisit this one as time allows for quicker prototyping turnaround
50 lines
1.5 KiB
Text
50 lines
1.5 KiB
Text
function DamageModel::onCreate(%this)
|
|
{
|
|
}
|
|
|
|
function DamageModel::onDestroy(%this)
|
|
{
|
|
}
|
|
|
|
//This is called when the server is initially set up by the game application
|
|
function DamageModel::initServer(%this)
|
|
{
|
|
%this.queueExec("./scripts/server/utility");
|
|
%this.queueExec("./scripts/server/radiusDamage");
|
|
%this.queueExec("./scripts/server/projectile");
|
|
%this.queueExec("./scripts/server/weapon");
|
|
%this.queueExec("./scripts/server/shapeBase");
|
|
%this.queueExec("./scripts/server/vehicle");
|
|
%this.queueExec("./scripts/server/player");
|
|
%this.queueExec("./scripts/server/commands");
|
|
}
|
|
|
|
//This is called when the server is created for an actual game/map to be played
|
|
function DamageModel::onCreateGameServer(%this)
|
|
{
|
|
%this.registerDatablock("./scripts/managedData/managedParticleData");
|
|
%this.registerDatablock("./scripts/managedData/managedParticleEmitterData");
|
|
}
|
|
|
|
//This is called when the server is shut down due to the game/map being exited
|
|
function DamageModel::onDestroyGameServer(%this)
|
|
{
|
|
}
|
|
|
|
//This is called when the client is initially set up by the game application
|
|
function DamageModel::initClient(%this)
|
|
{
|
|
%this.queueExec("./guis/damageGuiOverlay.gui");
|
|
%this.queueExec("./scripts/client/playGui");
|
|
%this.queueExec("./scripts/client/client");
|
|
}
|
|
|
|
//This is called when a client connects to a server
|
|
function DamageModel::onCreateClientConnection(%this)
|
|
{
|
|
}
|
|
|
|
//This is called when a client disconnects from a server
|
|
function DamageModel::onDestroyClientConnection(%this)
|
|
{
|
|
}
|