]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix and make indentation consistent in the Overkill weapon files
authorterencehill <piuntn@gmail.com>
Thu, 4 Jan 2024 01:23:35 +0000 (02:23 +0100)
committerterencehill <piuntn@gmail.com>
Thu, 4 Jan 2024 01:23:35 +0000 (02:23 +0100)
qcsrc/common/mutators/mutator/overkill/okhmg.qc
qcsrc/common/mutators/mutator/overkill/okhmg.qh
qcsrc/common/mutators/mutator/overkill/okmachinegun.qh
qcsrc/common/mutators/mutator/overkill/okrpc.qc
qcsrc/common/mutators/mutator/overkill/okrpc.qh

index cf83e41c03fe17fa4a5f6ec8db40b3de2aa93a70..391d9acbbab15defbdef1828f81c7685b6dee780 100644 (file)
@@ -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
index 55fea8ca754e4570ab99293d8d86476296e07fb6..c4e140234c482fc31e09012069b69d8608206570 100644 (file)
@@ -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)
index 7cf072b33a5c5bf41e92baa3f3b41c2e982580b5..5ec40b7f73b14f79803dc61dc8258813a2655b6d 100644 (file)
@@ -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"));
 
index d84a6766a3bbafe5fe27fab2ecafbbdf4e433818..a1f9d5db63b38d68a0b239a13612f8738042f9aa 100644 (file)
@@ -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
index 23421d2f542dfd4f467994ec04d34ab605c2b89e..28b76348840e84512f75083eb341a5e328ad3b0c 100644 (file)
@@ -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)