From c54c42f2651811bc6eff21292320930c76170dd8 Mon Sep 17 00:00:00 2001
From: = <eric@hellouser.net>
Date: Thu, 4 Apr 2013 20:27:41 -0500
Subject: [PATCH] Added ownership component to rubble entities so that player
colors will show up in the rubble actors
---
binaries/data/mods/public/simulation/components/Health.js | 4 ++++
binaries/data/mods/public/simulation/templates/template_rubble.xml | 3 ++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/binaries/data/mods/public/simulation/components/Health.js b/binaries/data/mods/public/simulation/components/Health.js
index 2adbe02..6b5950f 100644
a
|
b
|
Health.prototype.CreateDeathSpawnedEntity = function()
|
242 | 242 | cmpSpawnedPosition.SetYRotation(rot.y); |
243 | 243 | cmpSpawnedPosition.SetXZRotation(rot.x, rot.z); |
244 | 244 | |
| 245 | var cmpOwnership = Engine.QueryInterface(this.entity, IID_Ownership); |
| 246 | var cmpSpawnedOwnership = Engine.QueryInterface(spawnedEntity, IID_Ownership); |
| 247 | cmpSpawnedOwnership.SetOwner(cmpOwnership.GetOwner()); |
| 248 | |
245 | 249 | return spawnedEntity; |
246 | 250 | }; |
247 | 251 | |
diff --git a/binaries/data/mods/public/simulation/templates/template_rubble.xml b/binaries/data/mods/public/simulation/templates/template_rubble.xml
index 6df121d..a7b4a9f 100644
a
|
b
|
|
1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | 2 | <Entity> |
| 3 | <Ownership/> |
3 | 4 | <Decay> |
4 | 5 | <DelayTime>15.0</DelayTime> |
5 | 6 | <SinkRate>0.2</SinkRate> |
… |
… |
|
21 | 22 | <SilhouetteDisplay>false</SilhouetteDisplay> |
22 | 23 | <SilhouetteOccluder>false</SilhouetteOccluder> |
23 | 24 | </VisualActor> |
24 | | </Entity> |
25 | | No newline at end of file |
| 25 | </Entity> |