X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fall.qc;h=177d12c2d36d54e221be9ef5aec6145c09e2f5ea;hp=b408ee15737e44c105fec28e2d16366086d3c096;hb=43eba8ca70f00458db385630f86009f6d7fa849a;hpb=93e8a6ec12037127f59cd421d920faf0ec93a413 diff --git a/qcsrc/common/weapons/all.qc b/qcsrc/common/weapons/all.qc index b408ee157..177d12c2d 100644 --- a/qcsrc/common/weapons/all.qc +++ b/qcsrc/common/weapons/all.qc @@ -277,18 +277,7 @@ string GetAmmoPicture(.int ammotype) 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; @@ -582,8 +571,9 @@ void CL_WeaponEntity_SetModel(entity this, string name) #ifndef MENUQC -REGISTER_NET_TEMP(wframe, bool isNew) +REGISTER_NET_TEMP(wframe) #ifdef CSQC +NET_HANDLE(wframe, bool isNew) { vector a; a.x = ReadCoord(); @@ -593,6 +583,7 @@ REGISTER_NET_TEMP(wframe, bool isNew) setanim(viewmodel, a, restartanim == false, restartanim, restartanim); viewmodel.state = ReadByte(); viewmodel.alpha = ReadByte() / 255; + return true; } #endif @@ -612,14 +603,16 @@ void wframe_send(entity actor, entity weaponentity, vector a, bool restartanim) } #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