13 REPLICATE(cvar_cl_casings,
bool,
"cl_casings");
14 REPLICATE(cvar_r_drawviewmodel,
int,
"r_drawviewmodel");
19 vector org = casingowner.(weaponentity).spawnorigin;
20 org = casingowner.origin + casingowner.view_ofs + org.x *
v_forward - org.y *
v_right + org.z *
v_up;
23 if (!(
CS_CVAR(it).cvar_cl_casings))
25 if (it == casingowner && !(
CS_CVAR(it).cvar_r_drawviewmodel))
29 if (!sound_allowed(
MSG_ONE, it))
50 void Casing_Delete(
entity this)
55 void Casing_Draw(
entity this)
82 Sound SND_BRASS_RANDOM() {
88 Sound SND_CASINGS_RANDOM() {
111 s = SND_CASINGS_RANDOM();
114 s = SND_BRASS_RANDOM();
126 void Casing_Damage(
entity this,
float thisdmg,
int hittype,
vector org,
vector thisforce)
136 int _state = ReadByte();
137 vector org = ReadVector();
140 ang_x = ReadByte() * 360 / 256;
141 ang_y = ReadByte() * 360 / 256;
142 ang_z = ReadByte() * 360 / 256;
145 Casing casing = ListNewChildRubble(CasingsNGibs,
new(casing));
146 casing.silent = (_state & 0x80);
147 casing.state = (_state & 0x7F);
150 casing.velocity = vel;
154 casing.draw = Casing_Draw;
156 casing.velocity = casing.velocity + 2 *
prandomvec();
157 casing.avelocity =
'0 250 0' + 100 *
prandomvec();
159 casing.bouncefactor = 0.25;
160 settouch(casing, Casing_Touch);
161 casing.move_time =
time;
162 casing.event_damage = Casing_Damage;
165 switch (casing.state)
169 casing.cnt =
time + autocvar_cl_casings_shell_time;
172 setmodel(casing, MDL_CASING_BULLET);
173 casing.cnt =
time + autocvar_cl_casings_bronze_time;
177 setsize(casing,
'0 0 -1',
'0 0 -1');
179 LimitedChildrenRubble(CasingsNGibs,
"casing", autocvar_cl_casings_maxcount, Casing_Delete,
NULL);
const float ALPHA_MIN_VISIBLE
float compressShortVector(vector vec)
float trace_dphitq3surfaceflags
#define REGISTRY_GET(id, i)
#define FOREACH_CLIENT(cond, body)
REPLICATE(cvar_cl_casings, bool, "cl_casings")
#define NET_HANDLE(id, param)
string W_Sound(string w_snd)
#define UNSET_ONGROUND(s)
#define setmodel(this, m)
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
void Movetype_Physics_MatchTicrate(entity this, float tr, bool sloppy)
float Q3SURFACEFLAG_NOIMPACT
vector decompressShortVector(int data)
vector(float skel, float bonenum) _skel_get_boneabs_hidden
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt()
const float SOLID_TRIGGER
#define REGISTER_NET_TEMP(id)
#define sound(e, c, s, v, a)
#define SOUND(name, path)
IntrusiveList g_drawables
void set_movetype(entity this, int mt)