if(!thiswep.wr_checkammo1(thiswep, own, weaponentity))
{
own.cnt = thiswep.m_id;
- int slot = weaponslot(weaponentity);
- ATTACK_FINISHED(own, slot) = time;
+ ATTACK_FINISHED(own, weaponentity) = time;
own.(weaponentity).m_switchweapon = w_getbestweapon(own, weaponentity);
}
}
if(!thiswep.wr_checkammo1(thiswep, own, weaponentity))
{
own.cnt = thiswep.m_id;
- int slot = weaponslot(weaponentity);
- ATTACK_FINISHED(own, slot) = time;
+ ATTACK_FINISHED(own, weaponentity) = time;
own.(weaponentity).m_switchweapon = w_getbestweapon(own, weaponentity);
}
}
}
METHOD(MineLayer, wr_checkammo1, bool(entity thiswep, entity actor, .entity weaponentity))
{
- //int slot = 0; // TODO: unhardcode
// actually do // don't switch while placing a mine
- //if(ATTACK_FINISHED(actor, slot) <= time || PS(actor).m_weapon != WEP_MINE_LAYER)
+ //if(ATTACK_FINISHED(actor, weaponentity) <= time || PS(actor).m_weapon != WEP_MINE_LAYER)
//{
float ammo_amount = GetResourceAmount(actor, thiswep.ammo_type) >= WEP_CVAR(minelayer, ammo);
ammo_amount += actor.(weaponentity).(weapon_load[thiswep.m_id]) >= WEP_CVAR(minelayer, ammo);