Changeset 12717

Timestamp:
Sep 29, 2012, 12:02:13 AM (12 years ago)
Author:
ben
Message:

Implements SpawnEntityOnDeath property for entities (i.e. rubble). Fixes #1166.
Adds some placeholder rubble entities. They currently reuse foundation actors until proper rubble models are created.

Location:
ps/trunk/binaries/data/mods/public/simulation
Files:
19 added
1 edited

Legend:

Unmodified
Added
Removed
  • ps/trunk/binaries/data/mods/public/simulation/components/Health.js

    r12699 r12717  
    1616        "</element>" +
    1717    "</optional>" +
     18
     19
     20
     21
     22
    1823    "<element name='RegenRate' a:help='Hitpoint regeneration rate per second. Not yet implemented'>" +
    1924        "<ref name='nonNegativeDecimal'/>" +
     
    113118        {
    114119            state.killed = true;
    115            
     120
    116121            PlaySound("death", this.entity);
     122
     123
     124
     125
    117126
    118127            if (this.template.DeathType == "corpse")
     
    135144            var old = this.hitpoints;
    136145            this.hitpoints = 0;
    137            
     146
    138147            Engine.PostMessage(this.entity, MT_HealthChanged, { "from": old, "to": this.hitpoints });
    139148        }
     
    211220};
    212221
     222
     223
     224
     225
     226
     227
     228
     229
     230
     231
     232
     233
     234
     235
     236
     237
     238
     239
     240
     241
     242
     243
    213244Health.prototype.Repair = function(builderEnt, work)
    214245{
Note: See TracChangeset for help on using the changeset viewer.