string W_Sound(string w_snd)
{
- #define extensions(X) X(wav) X(ogg)
- #define tryext(ext) { if (fexists(strcat("sound/", output = strcat("weapons/", w_snd, "." #ext)))) break; }
- string output;
- do
- {
- extensions(tryext);
-#undef tryext
-#undef extensions
- output = strcat("weapons/", w_snd);
- }
- while (0);
-
+ string output = strcat("weapons/", w_snd);
#ifdef SVQC
MUTATOR_CALLHOOK(WeaponSound, w_snd, output);
return weapon_sound_output;
#ifndef MENUQC
-REGISTER_NET_TEMP(wframe, bool isNew)
+REGISTER_NET_TEMP(wframe)
#ifdef CSQC
+NET_HANDLE(wframe, bool isNew)
{
vector a;
a.x = ReadCoord();
setanim(viewmodel, a, restartanim == false, restartanim, restartanim);
viewmodel.state = ReadByte();
viewmodel.alpha = ReadByte() / 255;
+ return true;
}
#endif
}
#endif
-REGISTER_NET_TEMP(wglow, bool isNew)
+REGISTER_NET_TEMP(wglow)
#ifdef CSQC
+NET_HANDLE(wglow, bool isNew)
{
vector g = '0 0 0';
g.x = ReadCoord();
g.y = ReadCoord();
g.z = ReadCoord();
viewmodel.glowmod = g;
+ return true;
}
#endif