WriteVector(MSG_ENTITY, this.size);
- WriteAngle(MSG_ENTITY, this.mangle_x);
- WriteAngle(MSG_ENTITY, this.mangle_y);
- WriteAngle(MSG_ENTITY, this.mangle_z);
+ WriteAngleVector(MSG_ENTITY, this.mangle);
WriteShort(MSG_ENTITY, this.speed);
WriteShort(MSG_ENTITY, this.height);
this.noise1 = "plats/plat2.wav";
}
- if (this.sounds == 2)
+ if (this.sounds == 2 || q3compat)
{
+ // Plats in Q3 always have sounds (they're hard coded in Q3 engine)
this.noise = "plats/medplat1.wav";
this.noise1 = "plats/medplat2.wav";
}
if (this.sound2)
this.noise1 = this.sound2;
+ 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.noise = strzone(s);
+ if (e)
+ this.noise1 = strzone(e);
+ }
+
if(this.noise && this.noise != "")
{
precache_sound(this.noise);
this.angles = '0 0 0';
this.classname = "plat";
+ this.draggable = drag_undraggable;
if (!InitMovingBrushTrigger(this))
return;
this.effects |= EF_LOWPRECISION;
this.size = ReadVector();
- this.mangle_x = ReadAngle();
- this.mangle_y = ReadAngle();
- this.mangle_z = ReadAngle();
+ this.mangle = ReadAngleVector();
this.speed = ReadShort();
this.height = ReadShort();