#include "models.qh"
#ifdef SVQC
-#include <server/defs.qh>
-#include <server/miscfunctions.qh>
-#include <common/net_linked.qh>
-#include "subs.qh"
-#include "triggers.qh"
-
-entityclass(BGMScript);
-classfield(BGMScript) .string bgmscript;
-classfield(BGMScript) .float bgmscriptattack;
-classfield(BGMScript) .float bgmscriptdecay;
-classfield(BGMScript) .float bgmscriptsustain;
-classfield(BGMScript) .float bgmscriptrelease;
-
#include <common/constants.qh>
-#include "../../lib/csqcmodel/sv_model.qh"
-
-.float modelscale;
+#include <common/mapobjects/bgmscript.qh>
+#include <common/mapobjects/subs.qh>
+#include <common/mapobjects/triggers.qh>
+#include <common/net_linked.qh>
+#include <common/stats.qh>
+#include <common/weapons/_all.qh>
+#include <lib/csqcmodel/sv_model.qh>
void g_model_setcolormaptoactivator(entity this, entity actor, entity trigger)
{
if(sf & BIT(2))
{
if(sf & 0x10)
- {
- WriteAngle(MSG_ENTITY, this.angles.x);
- WriteAngle(MSG_ENTITY, this.angles.y);
- WriteAngle(MSG_ENTITY, this.angles.z);
- }
+ WriteAngleVector(MSG_ENTITY, this.angles);
}
if(sf & BIT(3))
if(sf & 0x80)
{
WriteShort(MSG_ENTITY, this.lodmodelindex0);
- WriteShort(MSG_ENTITY, bound(0, this.loddistance1, 65535));
+ WriteShort(MSG_ENTITY, bound(0, this.loddistance1, 32767));
WriteShort(MSG_ENTITY, this.lodmodelindex1);
- WriteShort(MSG_ENTITY, bound(0, this.loddistance2, 65535));
+ WriteShort(MSG_ENTITY, bound(0, this.loddistance2, 32767));
WriteShort(MSG_ENTITY, this.lodmodelindex2);
}
else
WriteVector(MSG_ENTITY, this.movedir);
WriteByte(MSG_ENTITY, floor(this.lip * 255));
}
- WriteShort(MSG_ENTITY, bound(0, this.fade_start, 65535));
- WriteShort(MSG_ENTITY, bound(0, this.fade_end, 65535));
+ WriteShort(MSG_ENTITY, bound(0, this.fade_start, 32767));
+ WriteShort(MSG_ENTITY, bound(0, this.fade_end, 32767));
WriteByte(MSG_ENTITY, floor(this.alpha_max * 256));
WriteByte(MSG_ENTITY, floor(this.alpha_min * 256));
WriteByte(MSG_ENTITY, this.inactive);
if(f & 4)
{
if(f & 0x10)
- {
- this.angles_x = ReadAngle();
- this.angles_y = ReadAngle();
- this.angles_z = ReadAngle();
- }
+ this.angles = ReadAngleVector();
else
this.angles = '0 0 0';
}