#include <server/autocvars.qh>
#include <server/constants.qh>
#include <server/defs.qh>
- #include "../notifications.qh"
+ #include "../notifications/all.qh"
#include "../deathtypes/all.qh"
#include <server/mutators/all.qh>
#include "../mapinfo.qh"
{
if (s == "0" || stof(s)) return s;
s = W_UndeprecateName(s);
- FOREACH(Weapons, it != WEP_Null && it.netname == s, LAMBDA(return ftos(i)));
+ FOREACH(Weapons, it != WEP_Null && it.netname == s, return ftos(i));
return s;
}
string W_NumberWeaponOrder(string order)
return substring(o, 1, -1);
}
-string W_FixWeaponOrder_AllowIncomplete(string order)
+string W_FixWeaponOrder_AllowIncomplete(entity this, string order)
{
return W_FixWeaponOrder(order, 0);
}
for (i = 0; i < n; ++i)
{
RandomSelection_Init();
- FOREACH(Weapons, it != WEP_Null, LAMBDA(
+ FOREACH(Weapons, it != WEP_Null, {
if (remaining & (it.m_wepset))
RandomSelection_Add(it, 0, string_null, 1, 1);
- ));
+ });
Weapon w = RandomSelection_chosen_ent;
result |= WepSet_FromWeapon(w);
remaining &= ~WepSet_FromWeapon(w);
string output = strcat("weapons/", w_snd);
#ifdef SVQC
MUTATOR_CALLHOOK(WeaponSound, w_snd, output);
- return weapon_sound_output;
+ return M_ARGV(1, string);
#else
return output;
#endif
{
string output = strcat("models/weapons/", w_mdl);
MUTATOR_CALLHOOK(WeaponModel, w_mdl, output);
- return weapon_model_output;
+ return M_ARGV(1, string);
}
#ifndef MENUQC
* call again with ""
* remove the ent
*/
-void CL_WeaponEntity_SetModel(entity this, string name)
+void CL_WeaponEntity_SetModel(entity this, string name, bool _anim)
{
if (name == "")
{
if (!this.weaponchild)
{
this.weaponchild = new(weaponchild);
- make_pure(this.weaponchild);
#ifdef CSQC
this.weaponchild.drawmask = MASK_NORMAL;
this.weaponchild.renderflags |= RF_VIEWMODEL;
#endif
}
_setmodel(this.weaponchild, W_Model(strcat("v_", name, ".md3")));
+ setsize(this.weaponchild, '0 0 0', '0 0 0');
setattachment(this.weaponchild, this, t);
}
else
this.weaponchild = NULL;
}
+ setsize(this, '0 0 0', '0 0 0');
setorigin(this, '0 0 0');
this.angles = '0 0 0';
this.frame = 0;
// check if an instant weapon switch occurred
setorigin(this, this.view_ofs);
+ if (!_anim) return;
// reset animstate now
this.wframe = WFRAME_IDLE;
setanim(this, this.anim_idle, true, false, true);