18 this.
colormap = (actor.team - 1) * 0x11;
29 g_model_setcolormaptoactivator(
this, actor, trigger);
30 this.SendFlags |= (
BIT(3) |
BIT(0));
50 g_clientmodel_setcolormaptoactivator(
this, actor, trigger);
53 void g_model_dropbyspawnflags(
entity this)
72 void g_clientmodel_dropbyspawnflags(
entity this)
76 g_model_dropbyspawnflags(
this);
81 bool g_clientmodel_genericsendentity(
entity this,
entity to,
int sf)
86 if(this.
mins !=
'0 0 0' || this.
maxs !=
'0 0 0')
93 WriteHeader(MSG_ENTITY, ENT_CLIENT_WALL);
105 WriteVector(MSG_ENTITY, this.
origin);
111 WriteAngleVector(MSG_ENTITY, this.
angles);
130 WriteVector(MSG_ENTITY, this.
mins);
131 WriteVector(MSG_ENTITY, this.
maxs);
134 if(this.bgmscript !=
"")
140 WriteVector(MSG_ENTITY, this.
movedir);
155 #define G_MODEL_INIT(ent,sol) \ 156 if(ent.geomtype && autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")) set_movetype(ent, MOVETYPE_PHYSICS); \ 157 if(!ent.scale) ent.scale = ent.modelscale; \ 158 SetBrushEntityModel(ent,true); \ 159 ent.use = g_model_setcolormaptoactivator; \ 160 InitializeEntity(ent, g_model_dropbyspawnflags, INITPRIO_DROPTOFLOOR); \ 161 if(!ent.solid) ent.solid = (sol); \ 162 else if(ent.solid < 0) ent.solid = SOLID_NOT; 164 #define G_CLIENTMODEL_INIT(ent,sol) \ 165 if(ent.geomtype && autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")) set_movetype(ent, MOVETYPE_PHYSICS); \ 166 if(!ent.scale) ent.scale = ent.modelscale; \ 167 SetBrushEntityModel(ent,true); \ 168 ent.use = g_clientmodel_use; \ 169 InitializeEntity(ent, g_clientmodel_dropbyspawnflags, INITPRIO_DROPTOFLOOR); \ 170 if(!ent.solid) ent.solid = (sol); \ 171 else if(ent.solid < 0) ent.solid = SOLID_NOT; \ 172 if(!ent.bgmscriptsustain) ent.bgmscriptsustain = 1; \ 173 else if(ent.bgmscriptsustain < 0) ent.bgmscriptsustain = 0; \ 174 Net_LinkEntity(ent, true, 0, g_clientmodel_genericsendentity); \ 175 ent.default_solid = sol; 195 void Ent_Wall_PreDraw(
entity this)
197 float alph = this.
alpha;
220 float player_dist =
vlen(player_dist_math);
235 void Ent_Wall_Draw(
entity this)
240 if(this.bgmscriptangular)
244 this.(fld) = this.saved;
264 else if(f > this.loddistance1)
273 this.saved = this.(fld);
281 this.
alpha = 1 - this.
lip * (1 - f);
282 this.(fld) = this.(fld) + this.
movedir * f;
293 void Ent_Wall_Remove(
entity this)
306 if(this.bgmscriptangular)
310 this.(fld) = this.saved;
320 this.
skin = ReadByte();
325 this.
origin = ReadVector();
332 this.
angles = ReadAngleVector();
342 this.loddistance1 = ReadShort();
344 this.loddistance2 = ReadShort();
350 this.loddistance1 = 0;
351 this.loddistance2 = 0;
353 this.
solid = ReadByte();
354 this.
scale = ReadShort() / 256.0;
357 this.
mins = ReadVector();
358 this.
maxs = ReadVector();
362 setsize(
this, this.
mins, this.
maxs);
368 this.bgmscriptangular = 1;
372 strcpy(this.bgmscript, s);
373 this.bgmscriptangular = 0;
375 if(this.bgmscript !=
"")
377 this.bgmscriptattack = ReadByte() / 64.0;
378 this.bgmscriptdecay = ReadByte() / 64.0;
379 this.bgmscriptsustain = ReadByte() / 255.0;
380 this.bgmscriptrelease = ReadByte() / 64.0;
382 this.
lip = ReadByte() / 255.0;
397 this.saved = this.(fld);
399 this.entremove = Ent_Wall_Remove;
400 this.draw = Ent_Wall_Draw;
void InterpolateOrigin_Note(entity this)
const float ALPHA_MIN_VISIBLE
void InterpolateOrigin_Undo(entity this)
snap origin to iorigin2 (actual origin)
float checkpvs(vector viewpos, entity viewee)
#define NET_HANDLE(id, param)
int autocvar_cl_modeldetailreduction
spawnfunc(info_player_attacker)
#define BIT(n)
Only ever assign into the first 24 bits in QC (so max is BIT(23)).
const float MOVE_NOMONSTERS
float fade_vertical_offset
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
void BGMScript_InitEntity(entity e)
vector(float skel, float bonenum) _skel_get_boneabs_hidden
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt()
float doBGMScript(entity e)
void InterpolateOrigin_Do(entity this)
set origin based on iorigin1 (old pos), iorigin2 (desired pos), and time
IntrusiveList g_drawables