if (GetResource(this, RES_HEALTH))
return;
- IFTARGETED
+ if(this.targetname && this.targetname != "")
return;
if (this.items)
return;
if (GetResource(this, RES_HEALTH))
return;
- IFTARGETED
+ if(this.targetname && this.targetname != "")
return;
if (this.items)
return;
}
// TODO: other soundpacks
- if (this.sounds > 0)
+ if (this.sounds > 0 || q3compat)
{
+ // Doors in Q3 always have sounds (they're hard coded in Q3 engine)
this.noise2 = "plats/medplat1.wav";
this.noise1 = "plats/medplat2.wav";
}
+ if (q3compat)
+ {
+ // CPMA adds these fields for overriding the engine sounds
+ string s = GetField_fullspawndata(this, "sound_start", true);
+ string e = GetField_fullspawndata(this, "sound_end", true);
+
+ if (s)
+ this.noise2 = strzone(s);
+ if (e)
+ this.noise1 = strzone(e);
+ }
+
// sound when door stops moving
if(this.noise1 && this.noise1 != "")
{
}
else if (!this.speed)
{
- this.speed = 100;
+ if (q3compat)
+ this.speed = 400;
+ else
+ this.speed = 100;
}
settouch(this, door_touch);