Merge pull request #1737 from Azaezel/alpha41/damageModel-fix_followup
Some checks are pending
Linux Build / Ubuntu Latest GCC (push) Waiting to run
MacOSX Build / MacOSX Latest Clang (push) Waiting to run
Windows Build / Windows Latest MSVC (push) Waiting to run

Alpha41/damage model fix followup
This commit is contained in:
Brian Roberts 2026-05-13 12:09:27 -05:00 committed by GitHub
commit 30ce3de8f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 0 deletions

View file

@ -26,6 +26,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,7 +5,18 @@ function PlayerData::damage(%this, %obj, %sourceObject, %position, %damage, %dam
%rootObj = %obj;
if (%obj.healthFromMount)
{
%rootObj = findRootObject(%obj);
%this.setDamageDirection(%rootObj, %sourceObject, %position);
}
else
{
%this.setDamageDirection(%obj, %sourceObject, %position);
}
%damageLoc = "body";
if (%damageType !$= "Suicide") {
%getDamageLoc = %obj.getDamageLocation(%position);
%this.setDamageDirection(%rootObj, %sourceObject, %position);