mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-08 13:14:33 +00:00
filter directional damage display by %obj.healthFromMount
also shift other contents from DamageModel::onCreateGameServer to DamageModel::initServer for consistency
This commit is contained in:
parent
093299bd83
commit
a54695cfcc
2 changed files with 17 additions and 11 deletions
|
|
@ -10,13 +10,6 @@ function DamageModel::onDestroy(%this)
|
|||
function DamageModel::initServer(%this)
|
||||
{
|
||||
%this.queueExec("./scripts/server/player");
|
||||
}
|
||||
|
||||
//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.queueExec("./scripts/server/utility");
|
||||
%this.queueExec("./scripts/server/radiusDamage");
|
||||
%this.queueExec("./scripts/server/projectile");
|
||||
|
|
@ -26,6 +19,13 @@ function DamageModel::onCreateGameServer(%this)
|
|||
%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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,12 +5,18 @@ function PlayerData::damage(%this, %obj, %sourceObject, %position, %damage, %dam
|
|||
|
||||
%rootObj = %obj;
|
||||
if (%obj.healthFromMount)
|
||||
{
|
||||
%rootObj = findRootObject(%obj);
|
||||
|
||||
%this.setDamageDirection(%rootObj, %sourceObject, %position);
|
||||
|
||||
%this.setDamageDirection(%rootObj, %sourceObject, %position);
|
||||
}
|
||||
else
|
||||
{
|
||||
%this.setDamageDirection(%obj, %sourceObject, %position);
|
||||
}
|
||||
|
||||
%damageLoc = "body";
|
||||
if (%damageType !$= "Suicide") {
|
||||
%getDamageLoc = %rootObj.getDamageLocation(%position);
|
||||
%getDamageLoc = %obj.getDamageLocation(%position);
|
||||
%damageLoc = firstWord(%getDamageLoc);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue