mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 23:24:41 +00:00
Merge pull request #1737 from Azaezel/alpha41/damageModel-fix_followup
Alpha41/damage model fix followup
This commit is contained in:
commit
30ce3de8f0
2 changed files with 18 additions and 0 deletions
|
|
@ -26,6 +26,13 @@ function DamageModel::onCreateGameServer(%this)
|
||||||
%this.queueExec("./scripts/server/commands");
|
%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
|
//This is called when the server is shut down due to the game/map being exited
|
||||||
function DamageModel::onDestroyGameServer(%this)
|
function DamageModel::onDestroyGameServer(%this)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,18 @@ function PlayerData::damage(%this, %obj, %sourceObject, %position, %damage, %dam
|
||||||
|
|
||||||
%rootObj = %obj;
|
%rootObj = %obj;
|
||||||
if (%obj.healthFromMount)
|
if (%obj.healthFromMount)
|
||||||
|
{
|
||||||
%rootObj = findRootObject(%obj);
|
%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);
|
%this.setDamageDirection(%rootObj, %sourceObject, %position);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue