filter directional damage display by %obj.healthFromMount

also shift other contents from DamageModel::onCreateGameServer to DamageModel::initServer for consistency
This commit is contained in:
AzaezelX 2026-05-13 11:48:36 -05:00
parent 093299bd83
commit a54695cfcc
2 changed files with 17 additions and 11 deletions

View file

@ -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)
{

View file

@ -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);
}