37 lines
856 B
Ucode
37 lines
856 B
Ucode
class KFDestroyableStaticMesh_SE extends RODestroyableStaticMeshBase
|
|
placeable;
|
|
|
|
var(Sound) sound DamagedSound; // Ambient sound for damaged mesh
|
|
var(Sound) bool bUseDamagedSound; // use DamagedSound?
|
|
|
|
var protected transient int OriginalHealth;
|
|
|
|
|
|
auto state Working
|
|
{
|
|
function BeginState()
|
|
{
|
|
if ( OriginalHealth == 0 )
|
|
OriginalHealth = Health;
|
|
super.BeginState();
|
|
Health = OriginalHealth; // fix health resetting to default 0 and ignoring value set in editor
|
|
}
|
|
|
|
function EndState()
|
|
{
|
|
super.EndState();
|
|
|
|
if ( bUseDamagedSound ) {
|
|
AmbientSound = DamagedSound;
|
|
}
|
|
}
|
|
}
|
|
|
|
defaultproperties
|
|
{
|
|
TypesCanDamage(0)=Class'KFMod.DamTypeFrag'
|
|
StaticMesh=StaticMesh'IndustrySM2.Doors.fact_metaldoor_04'
|
|
bWorldGeometry=False
|
|
Tag="DestroyableStaticMesh"
|
|
}
|