1
0
forked from 0ad/0ad

Fixes corpse variation not matching living entity, fixes #1007

This was SVN commit r13152.
This commit is contained in:
historic_bruno 2013-02-09 07:10:50 +00:00
parent b1178d30e3
commit cac2d08353

View File

@ -213,8 +213,11 @@ Health.prototype.CreateCorpse = function(leaveResources)
var cmpCorpseOwnership = Engine.QueryInterface(corpse, IID_Ownership);
cmpCorpseOwnership.SetOwner(cmpOwnership.GetOwner());
// Make it fall over
var cmpVisual = Engine.QueryInterface(this.entity, IID_Visual);
var cmpCorpseVisual = Engine.QueryInterface(corpse, IID_Visual);
cmpCorpseVisual.SetActorSeed(cmpVisual.GetActorSeed());
// Make it fall over
cmpCorpseVisual.SelectAnimation("death", true, 1.0, "");
return corpse;