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

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