From: terencehill Date: Thu, 4 Jan 2024 01:23:35 +0000 (+0100) Subject: Fix and make indentation consistent in the Overkill weapon files X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=131db00023ea7a4cc75920f6260d34d0e44f8eba;p=xonotic%2Fxonotic-data.pk3dir.git Fix and make indentation consistent in the Overkill weapon files --- diff --git a/qcsrc/common/mutators/mutator/overkill/okhmg.qc b/qcsrc/common/mutators/mutator/overkill/okhmg.qc index cf83e41c0..391d9acbb 100644 --- a/qcsrc/common/mutators/mutator/overkill/okhmg.qc +++ b/qcsrc/common/mutators/mutator/overkill/okhmg.qc @@ -80,10 +80,10 @@ METHOD(OverkillHeavyMachineGun, wr_think, void(entity thiswep, entity actor, .en animdecide_setaction(actor, ANIMACTION_SHOOT, true); } } - if (WEP_CVAR(okhmg, reload_ammo) && actor.(weaponentity).clip_load < WEP_CVAR_PRI(okhmg, ammo)) + if (WEP_CVAR(okhmg, reload_ammo) && actor.(weaponentity).clip_load < WEP_CVAR_PRI(okhmg, ammo)) { // Forced reload. - thiswep.wr_reload(thiswep, actor, weaponentity); + thiswep.wr_reload(thiswep, actor, weaponentity); return; } if (fire & 1) // Primary attack @@ -130,20 +130,20 @@ METHOD(OverkillHeavyMachineGun, wr_checkammo2, bool(entity thiswep, entity actor METHOD(OverkillHeavyMachineGun, wr_reload, void(entity thiswep, entity actor, .entity weaponentity)) { - W_Reload(actor, weaponentity, WEP_CVAR_PRI(okhmg, ammo), SND_RELOAD); + W_Reload(actor, weaponentity, WEP_CVAR_PRI(okhmg, ammo), SND_RELOAD); } METHOD(OverkillHeavyMachineGun, wr_suicidemessage, Notification(entity thiswep)) { - return WEAPON_THINKING_WITH_PORTALS; + return WEAPON_THINKING_WITH_PORTALS; } METHOD(OverkillHeavyMachineGun, wr_killmessage, Notification(entity thiswep)) { - if(w_deathtype & HITTYPE_SECONDARY) - return WEAPON_OVERKILL_HMG_MURDER_SNIPE; - else - return WEAPON_OVERKILL_HMG_MURDER_SPRAY; + if(w_deathtype & HITTYPE_SECONDARY) + return WEAPON_OVERKILL_HMG_MURDER_SNIPE; + else + return WEAPON_OVERKILL_HMG_MURDER_SPRAY; } #endif @@ -151,10 +151,10 @@ METHOD(OverkillHeavyMachineGun, wr_killmessage, Notification(entity thiswep)) METHOD(OverkillHeavyMachineGun, wr_impacteffect, void(entity thiswep, entity actor)) { - vector org2 = w_org + w_backoff * 2; - pointparticles(EFFECT_MACHINEGUN_IMPACT, org2, w_backoff * 1000, 1); - if(!w_issilent) - sound(actor, CH_SHOTS, SND_RIC_RANDOM(), VOL_BASE, ATTEN_NORM); + vector org2 = w_org + w_backoff * 2; + pointparticles(EFFECT_MACHINEGUN_IMPACT, org2, w_backoff * 1000, 1); + if(!w_issilent) + sound(actor, CH_SHOTS, SND_RIC_RANDOM(), VOL_BASE, ATTEN_NORM); } #endif diff --git a/qcsrc/common/mutators/mutator/overkill/okhmg.qh b/qcsrc/common/mutators/mutator/overkill/okhmg.qh index 55fea8ca7..c4e140234 100644 --- a/qcsrc/common/mutators/mutator/overkill/okhmg.qh +++ b/qcsrc/common/mutators/mutator/overkill/okhmg.qh @@ -54,8 +54,8 @@ CLASS(OverkillHeavyMachineGun, Weapon) P(class, prefix, weaponstartoverride, float, NONE) \ P(class, prefix, weaponstart, float, NONE) \ P(class, prefix, weaponthrowable, float, NONE) \ - END() - W_PROPS(X, OverkillHeavyMachineGun, okhmg) + END() + W_PROPS(X, OverkillHeavyMachineGun, okhmg) #undef X ENDCLASS(OverkillHeavyMachineGun) diff --git a/qcsrc/common/mutators/mutator/overkill/okmachinegun.qh b/qcsrc/common/mutators/mutator/overkill/okmachinegun.qh index 7cf072b33..5ec40b7f7 100644 --- a/qcsrc/common/mutators/mutator/overkill/okmachinegun.qh +++ b/qcsrc/common/mutators/mutator/overkill/okmachinegun.qh @@ -4,18 +4,18 @@ CLASS(OverkillMachineGun, Weapon) /* spawnfunc */ ATTRIB(OverkillMachineGun, m_canonical_spawnfunc, string, "weapon_okmachinegun"); /* ammotype */ ATTRIB(OverkillMachineGun, ammo_type, Resource, RES_BULLETS); /* impulse */ ATTRIB(OverkillMachineGun, impulse, int, 3); -/* flags */ ATTRIB(OverkillMachineGun, spawnflags, int, WEP_FLAG_HIDDEN | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN | WEP_FLAG_PENETRATEWALLS | WEP_FLAG_MUTATORBLOCKED); -/* rating */ ATTRIB(OverkillMachineGun, bot_pickupbasevalue, float, 7000); -/* color */ ATTRIB(OverkillMachineGun, wpcolor, vector, '1 1 0'); +/* flags */ ATTRIB(OverkillMachineGun, spawnflags, int, WEP_FLAG_HIDDEN | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN | WEP_FLAG_PENETRATEWALLS | WEP_FLAG_MUTATORBLOCKED); +/* rating */ ATTRIB(OverkillMachineGun, bot_pickupbasevalue, float, 7000); +/* color */ ATTRIB(OverkillMachineGun, wpcolor, vector, '1 1 0'); /* modelname */ ATTRIB(OverkillMachineGun, mdl, string, "ok_mg"); #ifdef GAMEQC -/* model */ ATTRIB(OverkillMachineGun, m_model, Model, MDL_OK_MG_ITEM); +/* model */ ATTRIB(OverkillMachineGun, m_model, Model, MDL_OK_MG_ITEM); /* flash mdl */ ATTRIB(OverkillMachineGun, m_muzzlemodel, Model, MDL_MACHINEGUN_MUZZLEFLASH); /* flash eff */ ATTRIB(OverkillMachineGun, m_muzzleeffect, entity, EFFECT_MACHINEGUN_MUZZLEFLASH); #endif /* crosshair */ ATTRIB(OverkillMachineGun, w_crosshair, string, "gfx/crosshairuzi"); /* crosshair */ ATTRIB(OverkillMachineGun, w_crosshair_size, float, 0.6); -/* wepimg */ ATTRIB(OverkillMachineGun, model2, string, "ok_weapon_smg"); +/* wepimg */ ATTRIB(OverkillMachineGun, model2, string, "ok_weapon_smg"); /* refname */ ATTRIB(OverkillMachineGun, netname, string, "okmachinegun"); /* wepname */ ATTRIB(OverkillMachineGun, m_name, string, _("Overkill MachineGun")); diff --git a/qcsrc/common/mutators/mutator/overkill/okrpc.qc b/qcsrc/common/mutators/mutator/overkill/okrpc.qc index d84a6766a..a1f9d5db6 100644 --- a/qcsrc/common/mutators/mutator/overkill/okrpc.qc +++ b/qcsrc/common/mutators/mutator/overkill/okrpc.qc @@ -130,7 +130,7 @@ void W_OverkillRocketPropelledChainsaw_Attack(Weapon thiswep, entity actor, .ent METHOD(OverkillRocketPropelledChainsaw, wr_aim, void(entity thiswep, entity actor, .entity weaponentity)) { - PHYS_INPUT_BUTTON_ATCK(actor) = bot_aim(actor, weaponentity, WEP_CVAR_PRI(okrpc, speed), 0, WEP_CVAR_PRI(okrpc, lifetime), false, true); + PHYS_INPUT_BUTTON_ATCK(actor) = bot_aim(actor, weaponentity, WEP_CVAR_PRI(okrpc, speed), 0, WEP_CVAR_PRI(okrpc, lifetime), false, true); } METHOD(OverkillRocketPropelledChainsaw, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire)) @@ -199,25 +199,25 @@ METHOD(OverkillRocketPropelledChainsaw, wr_checkammo2, bool(entity thiswep, enti METHOD(OverkillRocketPropelledChainsaw, wr_reload, void(entity thiswep, entity actor, .entity weaponentity)) { - W_Reload(actor, weaponentity, WEP_CVAR_PRI(okrpc, ammo), SND_RELOAD); + W_Reload(actor, weaponentity, WEP_CVAR_PRI(okrpc, ammo), SND_RELOAD); } METHOD(OverkillRocketPropelledChainsaw, wr_suicidemessage, Notification(entity thiswep)) { - if((w_deathtype & HITTYPE_BOUNCE) || (w_deathtype & HITTYPE_SPLASH)) - return WEAPON_OVERKILL_RPC_SUICIDE_SPLASH; - else - return WEAPON_OVERKILL_RPC_SUICIDE_DIRECT; + if((w_deathtype & HITTYPE_BOUNCE) || (w_deathtype & HITTYPE_SPLASH)) + return WEAPON_OVERKILL_RPC_SUICIDE_SPLASH; + else + return WEAPON_OVERKILL_RPC_SUICIDE_DIRECT; } METHOD(OverkillRocketPropelledChainsaw, wr_killmessage, Notification(entity thiswep)) { - if(w_deathtype & HITTYPE_SECONDARY) - return WEAPON_BLASTER_MURDER; - else if((w_deathtype & HITTYPE_BOUNCE) || (w_deathtype & HITTYPE_SPLASH)) - return WEAPON_OVERKILL_RPC_MURDER_SPLASH; - else - return WEAPON_OVERKILL_RPC_MURDER_DIRECT; + if(w_deathtype & HITTYPE_SECONDARY) + return WEAPON_BLASTER_MURDER; + else if((w_deathtype & HITTYPE_BOUNCE) || (w_deathtype & HITTYPE_SPLASH)) + return WEAPON_OVERKILL_RPC_MURDER_SPLASH; + else + return WEAPON_OVERKILL_RPC_MURDER_DIRECT; } #endif @@ -226,10 +226,10 @@ METHOD(OverkillRocketPropelledChainsaw, wr_killmessage, Notification(entity this METHOD(OverkillRocketPropelledChainsaw, wr_impacteffect, void(entity thiswep, entity actor)) { - vector org2 = w_org + w_backoff * 2; - pointparticles(EFFECT_ROCKET_EXPLODE, org2, '0 0 0', 1); - if(!w_issilent) - sound(actor, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_NORM); + vector org2 = w_org + w_backoff * 2; + pointparticles(EFFECT_ROCKET_EXPLODE, org2, '0 0 0', 1); + if(!w_issilent) + sound(actor, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_NORM); } #endif diff --git a/qcsrc/common/mutators/mutator/overkill/okrpc.qh b/qcsrc/common/mutators/mutator/overkill/okrpc.qh index 23421d2f5..28b763488 100644 --- a/qcsrc/common/mutators/mutator/overkill/okrpc.qh +++ b/qcsrc/common/mutators/mutator/overkill/okrpc.qh @@ -52,15 +52,15 @@ CLASS(OverkillRocketPropelledChainsaw, Weapon) P(class, prefix, speed, float, SEC) \ P(class, prefix, spread, float, SEC) \ P(class, prefix, reload_ammo, float, NONE) \ - P(class, prefix, reload_time, float, NONE) \ - P(class, prefix, switchdelay_drop, float, NONE) \ - P(class, prefix, switchdelay_raise, float, NONE) \ - P(class, prefix, weaponreplace, string, NONE) \ - P(class, prefix, weaponstartoverride, float, NONE) \ - P(class, prefix, weaponstart, float, NONE) \ - P(class, prefix, weaponthrowable, float, NONE) \ - END() - W_PROPS(X, OverkillRocketPropelledChainsaw, okrpc) + P(class, prefix, reload_time, float, NONE) \ + P(class, prefix, switchdelay_drop, float, NONE) \ + P(class, prefix, switchdelay_raise, float, NONE) \ + P(class, prefix, weaponreplace, string, NONE) \ + P(class, prefix, weaponstartoverride, float, NONE) \ + P(class, prefix, weaponstart, float, NONE) \ + P(class, prefix, weaponthrowable, float, NONE) \ + END() + W_PROPS(X, OverkillRocketPropelledChainsaw, okrpc) #undef X ENDCLASS(OverkillRocketPropelledChainsaw)