X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fw_rifle.qc;h=fc8f60ec4f7d855dc92eb43329b9a5cb4121e0bb;hb=ca811d45f7e7b64a01657b2252cab3cfdfedd970;hp=eb80215bcec9502b84b1c48a69770e04beafd722;hpb=54626fc8dc1b2ec9932b93121994a6d0f2e6643e;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/w_rifle.qc b/qcsrc/common/weapons/w_rifle.qc index eb80215bc..fc8f60ec4 100644 --- a/qcsrc/common/weapons/w_rifle.qc +++ b/qcsrc/common/weapons/w_rifle.qc @@ -47,7 +47,7 @@ RIFLE_SETTINGS(WEP_ADD_CVAR, WEP_ADD_PROP) #endif #ifdef IMPLEMENTATION #ifdef SVQC -void spawnfunc_weapon_rifle(void) { weapon_defaultspawnfunc(WEP_RIFLE); } +void spawnfunc_weapon_rifle(void) { weapon_defaultspawnfunc(WEP_RIFLE.m_id); } void spawnfunc_weapon_campingrifle(void) { spawnfunc_weapon_rifle(); } void spawnfunc_weapon_sniperrifle(void) { spawnfunc_weapon_rifle(); } @@ -76,12 +76,12 @@ void W_Rifle_FireBullet(float pSpread, float pDamage, float pForce, float pSolid void W_Rifle_Attack(void) { - W_Rifle_FireBullet(WEP_CVAR_PRI(rifle, spread), WEP_CVAR_PRI(rifle, damage), WEP_CVAR_PRI(rifle, force), WEP_CVAR_PRI(rifle, solidpenetration), WEP_CVAR_PRI(rifle, ammo), WEP_RIFLE, WEP_CVAR_PRI(rifle, tracer), WEP_CVAR_PRI(rifle, shots), "weapons/campingrifle_fire.wav"); + W_Rifle_FireBullet(WEP_CVAR_PRI(rifle, spread), WEP_CVAR_PRI(rifle, damage), WEP_CVAR_PRI(rifle, force), WEP_CVAR_PRI(rifle, solidpenetration), WEP_CVAR_PRI(rifle, ammo), WEP_RIFLE.m_id, WEP_CVAR_PRI(rifle, tracer), WEP_CVAR_PRI(rifle, shots), "weapons/campingrifle_fire.wav"); } void W_Rifle_Attack2(void) { - W_Rifle_FireBullet(WEP_CVAR_SEC(rifle, spread), WEP_CVAR_SEC(rifle, damage), WEP_CVAR_SEC(rifle, force), WEP_CVAR_SEC(rifle, solidpenetration), WEP_CVAR_SEC(rifle, ammo), WEP_RIFLE | HITTYPE_SECONDARY, WEP_CVAR_SEC(rifle, tracer), WEP_CVAR_SEC(rifle, shots), "weapons/campingrifle_fire2.wav"); + W_Rifle_FireBullet(WEP_CVAR_SEC(rifle, spread), WEP_CVAR_SEC(rifle, damage), WEP_CVAR_SEC(rifle, force), WEP_CVAR_SEC(rifle, solidpenetration), WEP_CVAR_SEC(rifle, ammo), WEP_RIFLE.m_id | HITTYPE_SECONDARY, WEP_CVAR_SEC(rifle, tracer), WEP_CVAR_SEC(rifle, shots), "weapons/campingrifle_fire2.wav"); } .void(void) rifle_bullethail_attackfunc; @@ -215,13 +215,13 @@ bool W_Rifle(int req) case WR_CHECKAMMO1: { ammo_amount = self.WEP_AMMO(RIFLE) >= WEP_CVAR_PRI(rifle, ammo); - ammo_amount += self.(weapon_load[WEP_RIFLE]) >= WEP_CVAR_PRI(rifle, ammo); + ammo_amount += self.(weapon_load[WEP_RIFLE.m_id]) >= WEP_CVAR_PRI(rifle, ammo); return ammo_amount; } case WR_CHECKAMMO2: { ammo_amount = self.WEP_AMMO(RIFLE) >= WEP_CVAR_SEC(rifle, ammo); - ammo_amount += self.(weapon_load[WEP_RIFLE]) >= WEP_CVAR_SEC(rifle, ammo); + ammo_amount += self.(weapon_load[WEP_RIFLE.m_id]) >= WEP_CVAR_SEC(rifle, ammo); return ammo_amount; } case WR_CONFIG: