X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fw_machinegun.qc;h=7e2cc5278ea8a96bfac6d5335ea635b704623b19;hb=c54f00d44afe3b7d3a95d03d8d0a13525d638c9f;hp=14a59e39892583450992262c11cdff7dd9c92cc0;hpb=77f03e6ce033bef39ac19e0e7cb6e606ffcb26db;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/w_machinegun.qc b/qcsrc/common/weapons/w_machinegun.qc index 14a59e398..7e2cc5278 100644 --- a/qcsrc/common/weapons/w_machinegun.qc +++ b/qcsrc/common/weapons/w_machinegun.qc @@ -1,4 +1,4 @@ -#ifdef REGISTER_WEAPON +#ifndef IMPLEMENTATION REGISTER_WEAPON( /* WEP_##id */ MACHINEGUN, /* function */ W_MachineGun, @@ -51,7 +51,8 @@ REGISTER_WEAPON( #ifdef SVQC MACHINEGUN_SETTINGS(WEP_ADD_CVAR, WEP_ADD_PROP) #endif -#else +#endif +#ifdef IMPLEMENTATION #ifdef SVQC void spawnfunc_weapon_machinegun(void) @@ -101,7 +102,7 @@ void W_MachineGun_MuzzleFlash(void) self.muzzle_flash.owner = self.muzzle_flash.realowner = self; } -void W_MachineGun_Attack(float deathtype) +void W_MachineGun_Attack(int deathtype) { W_SetupShot(self, true, 0, "weapons/uzi_fire.wav", CH_WEAPON_A, ((self.misc_bulletcounter == 1) ? WEP_CVAR(machinegun, first_damage) : WEP_CVAR(machinegun, sustained_damage))); if(!autocvar_g_norecoil) @@ -235,7 +236,7 @@ void W_MachineGun_Attack_Burst(void) } -float W_MachineGun(float req) +bool W_MachineGun(int req) { float ammo_amount; switch(req) @@ -369,7 +370,7 @@ float W_MachineGun(float req) } #endif #ifdef CSQC -float W_MachineGun(float req) +bool W_MachineGun(int req) { switch(req) {