return gettaginfo(gettaginfo_relative_ent, tag);
}
-.float scale2;
-
-bool modeleffect_SendEntity(entity this, entity to, int sf)
-{
- float f;
- WriteHeader(MSG_ENTITY, ENT_CLIENT_MODELEFFECT);
-
- f = 0;
- if(self.velocity != '0 0 0')
- f |= 1;
- if(self.angles != '0 0 0')
- f |= 2;
- if(self.avelocity != '0 0 0')
- f |= 4;
-
- WriteByte(MSG_ENTITY, f);
- WriteShort(MSG_ENTITY, self.modelindex);
- WriteByte(MSG_ENTITY, self.skin);
- WriteByte(MSG_ENTITY, self.frame);
- WriteCoord(MSG_ENTITY, self.origin.x);
- WriteCoord(MSG_ENTITY, self.origin.y);
- WriteCoord(MSG_ENTITY, self.origin.z);
- if(f & 1)
- {
- WriteCoord(MSG_ENTITY, self.velocity.x);
- WriteCoord(MSG_ENTITY, self.velocity.y);
- WriteCoord(MSG_ENTITY, self.velocity.z);
- }
- if(f & 2)
- {
- WriteCoord(MSG_ENTITY, self.angles.x);
- WriteCoord(MSG_ENTITY, self.angles.y);
- WriteCoord(MSG_ENTITY, self.angles.z);
- }
- if(f & 4)
- {
- WriteCoord(MSG_ENTITY, self.avelocity.x);
- WriteCoord(MSG_ENTITY, self.avelocity.y);
- WriteCoord(MSG_ENTITY, self.avelocity.z);
- }
- WriteShort(MSG_ENTITY, self.scale * 256.0);
- WriteShort(MSG_ENTITY, self.scale2 * 256.0);
- WriteByte(MSG_ENTITY, self.teleport_time * 100.0);
- WriteByte(MSG_ENTITY, self.fade_time * 100.0);
- WriteByte(MSG_ENTITY, self.alpha * 255.0);
-
- return true;
-}
-
-void modeleffect_spawn(string m, float s, float f, vector o, vector v, vector ang, vector angv, float s0, float s2, float a, float t1, float t2)
-{
- entity e = new(modeleffect);
- _setmodel(e, m);
- e.frame = f;
- setorigin(e, o);
- e.velocity = v;
- e.angles = ang;
- e.avelocity = angv;
- e.alpha = a;
- e.teleport_time = t1;
- e.fade_time = t2;
- e.skin = s;
- if(s0 >= 0)
- e.scale = s0 / max6(-e.mins.x, -e.mins.y, -e.mins.z, e.maxs.x, e.maxs.y, e.maxs.z);
- else
- e.scale = -s0;
- if(s2 >= 0)
- e.scale2 = s2 / max6(-e.mins.x, -e.mins.y, -e.mins.z, e.maxs.x, e.maxs.y, e.maxs.z);
- else
- e.scale2 = -s2;
- float sz = max(e.scale, e.scale2);
- setsize(e, e.mins * sz, e.maxs * sz);
- Net_LinkEntity(e, false, 0.1, modeleffect_SendEntity);
-}
-
-void shockwave_spawn(string m, vector org, float sz, float t1, float t2)
-{
- return modeleffect_spawn(m, 0, 0, org, '0 0 0', '0 0 0', '0 0 0', 0, sz, 1, t1, t2);
-}
-
.string aiment_classname;
.float aiment_deadflag;
void SetMovetypeFollow(entity ent, entity e)