X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fweapon%2Fminelayer.qc;h=6063c666eb5093b0aea9ba9af3b17730948f342d;hp=29192ac58168c153ae2561b86ed128f9c20fe4da;hb=2e0ea8a4df1c5170b228f7a4ea425d8c4ef5fa8b;hpb=ce2607cc7491e18b3229e1e24dc2929c894fb2bc diff --git a/qcsrc/common/weapons/weapon/minelayer.qc b/qcsrc/common/weapons/weapon/minelayer.qc index 29192ac581..6063c666eb 100644 --- a/qcsrc/common/weapons/weapon/minelayer.qc +++ b/qcsrc/common/weapons/weapon/minelayer.qc @@ -74,8 +74,7 @@ void W_MineLayer_Explode(entity this, entity directhitentity) 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); } } @@ -106,8 +105,7 @@ void W_MineLayer_DoRemoteExplode(entity this) 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); } } @@ -464,9 +462,8 @@ METHOD(MineLayer, wr_think, void(entity thiswep, entity actor, .entity weaponent } 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);