]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Weapons: remove useless weapon return values and implementations
authorTimePath <andrew.hardaker1995@gmail.com>
Thu, 1 Oct 2015 10:37:41 +0000 (20:37 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Thu, 1 Oct 2015 10:37:41 +0000 (20:37 +1000)
41 files changed:
qcsrc/common/monsters/monster/mage.qc
qcsrc/common/monsters/monster/spider.qc
qcsrc/common/monsters/monster/wyvern.qc
qcsrc/common/turrets/turret/ewheel_weapon.qc
qcsrc/common/turrets/turret/flac_weapon.qc
qcsrc/common/turrets/turret/hellion_weapon.qc
qcsrc/common/turrets/turret/hk_weapon.qc
qcsrc/common/turrets/turret/machinegun_weapon.qc
qcsrc/common/turrets/turret/mlrs_weapon.qc
qcsrc/common/turrets/turret/phaser_weapon.qc
qcsrc/common/turrets/turret/plasma_weapon.qc
qcsrc/common/turrets/turret/tesla_weapon.qc
qcsrc/common/turrets/turret/walker_weapon.qc
qcsrc/common/vehicles/vehicle/racer_weapon.qc
qcsrc/common/vehicles/vehicle/raptor_weapons.qc
qcsrc/common/weapons/weapon.qh
qcsrc/common/weapons/weapon/arc.qc
qcsrc/common/weapons/weapon/blaster.qc
qcsrc/common/weapons/weapon/crylink.qc
qcsrc/common/weapons/weapon/devastator.qc
qcsrc/common/weapons/weapon/electro.qc
qcsrc/common/weapons/weapon/fireball.qc
qcsrc/common/weapons/weapon/hagar.qc
qcsrc/common/weapons/weapon/hlac.qc
qcsrc/common/weapons/weapon/hmg.qc
qcsrc/common/weapons/weapon/hook.qc
qcsrc/common/weapons/weapon/machinegun.qc
qcsrc/common/weapons/weapon/minelayer.qc
qcsrc/common/weapons/weapon/mortar.qc
qcsrc/common/weapons/weapon/porto.qc
qcsrc/common/weapons/weapon/rifle.qc
qcsrc/common/weapons/weapon/rpc.qc
qcsrc/common/weapons/weapon/seeker.qc
qcsrc/common/weapons/weapon/shockwave.qc
qcsrc/common/weapons/weapon/shotgun.qc
qcsrc/common/weapons/weapon/tuba.qc
qcsrc/common/weapons/weapon/vaporizer.qc
qcsrc/common/weapons/weapon/vortex.qc
qcsrc/server/mutators/gamemode_nexball.qc
qcsrc/server/weapons/weaponsystem.qc
qcsrc/server/weapons/weaponsystem.qh

index e2521fb0b73a48bdfac1761f5dd605bcfd49da54..f7ec0140857109434169b10fe0cfc55a393a9995 100644 (file)
@@ -40,7 +40,7 @@ REGISTER_WEAPON(MAGE_SPIKE, NEW(MageSpike));
 
 void M_Mage_Attack_Spike(vector dir);
 void M_Mage_Attack_Push();
-METHOD(MageSpike, wr_think, bool(MageSpike thiswep, bool fire1, bool fire2)) {
+METHOD(MageSpike, wr_think, void(MageSpike thiswep, bool fire1, bool fire2)) {
     SELFPARAM();
     if (fire1)
     if (!IS_PLAYER(self) || weapon_prepareattack(false, 0.2)) {
@@ -56,7 +56,6 @@ METHOD(MageSpike, wr_think, bool(MageSpike thiswep, bool fire1, bool fire2)) {
         M_Mage_Attack_Push();
         weapon_thinkf(WFRAME_FIRE2, 0, w_ready);
     }
-    return true;
 }
 
 void M_Mage_Attack_Teleport();
index 78f8aff09e95867ddb5e9b37b56704ff12c2eca2..c305ec668039d7dff99083fd2f5c122630edb6f1 100644 (file)
@@ -50,7 +50,7 @@ float autocvar_g_monster_spider_attack_bite_delay;
 
 void M_Spider_Attack_Web();
 
-METHOD(SpiderAttack, wr_think, bool(SpiderAttack thiswep, bool fire1, bool fire2)) {
+METHOD(SpiderAttack, wr_think, void(SpiderAttack thiswep, bool fire1, bool fire2)) {
     SELFPARAM();
     bool isPlayer = IS_PLAYER(self);
     if (fire1)
@@ -66,7 +66,7 @@ METHOD(SpiderAttack, wr_think, bool(SpiderAttack thiswep, bool fire1, bool fire2
        if (!isPlayer) w_shotdir = normalize((self.enemy.origin + '0 0 10') - self.origin);
                M_Spider_Attack_Web();
         weapon_thinkf(WFRAME_FIRE1, 0, w_ready);
-        return true;
+        return;
     }
     if (fire2)
     if (!isPlayer || weapon_prepareattack(true, 0.5)) {
@@ -77,7 +77,6 @@ METHOD(SpiderAttack, wr_think, bool(SpiderAttack thiswep, bool fire1, bool fire2
        Monster_Attack_Melee(self.enemy, (autocvar_g_monster_spider_attack_bite_damage), ((random() > 0.5) ? self.anim_melee : self.anim_shoot), self.attack_range, (autocvar_g_monster_spider_attack_bite_delay), DEATH_MONSTER_SPIDER, true);
         weapon_thinkf(WFRAME_FIRE2, 0, w_ready);
     }
-    return true;
 }
 
 float autocvar_g_monster_spider_health;
@@ -160,11 +159,13 @@ bool M_Spider_Attack(int attack_type, entity targ)
                Weapon wep = WEP_SPIDER_ATTACK;
                case MONSTER_ATTACK_MELEE:
                {
-                       return wep.wr_think(wep, false, true);
+                       wep.wr_think(wep, false, true);
+                       return true;
                }
                case MONSTER_ATTACK_RANGED:
                {
-                       return wep.wr_think(wep, true, false);
+                       wep.wr_think(wep, true, false);
+                       return true;
                }
        }
 
index 7474150cc78903d3b1c30e2defed4fdb57ed5326..c74067a4eadfbe1171a8cb5bdf7b8217c17a480a 100644 (file)
@@ -48,7 +48,7 @@ float autocvar_g_monster_wyvern_attack_fireball_speed;
 void M_Wyvern_Attack_Fireball_Explode();
 void M_Wyvern_Attack_Fireball_Touch();
 
-METHOD(WyvernAttack, wr_think, bool(WyvernAttack thiswep, bool fire1, bool fire2)) {
+METHOD(WyvernAttack, wr_think, void(WyvernAttack thiswep, bool fire1, bool fire2)) {
     SELFPARAM();
 
     if (fire1)
@@ -76,9 +76,7 @@ METHOD(WyvernAttack, wr_think, bool(WyvernAttack thiswep, bool fire1, bool fire2
                CSQCProjectile(missile, true, PROJECTILE_FIREMINE, true);
 
         weapon_thinkf(WFRAME_FIRE1, 0, w_ready);
-        return true;
     }
-    return true;
 }
 
 METHOD(WyvernAttack, wr_checkammo1, bool(WyvernAttack thiswep)) {
index ca7949f36154aee86c493c3bb94d5be122dedf45..377c8a4f47de63905faaa7c0c81cd8c3ab663d36 100644 (file)
@@ -16,7 +16,7 @@ REGISTER_WEAPON(EWHEEL, NEW(EWheelAttack));
 #ifdef SVQC
 
 void turret_initparams(entity);
-METHOD(EWheelAttack, wr_think, bool(entity thiswep, bool fire1, bool fire2)) {
+METHOD(EWheelAttack, wr_think, void(entity thiswep, bool fire1, bool fire2)) {
     SELFPARAM();
     bool isPlayer = IS_PLAYER(self);
     if (fire1)
@@ -44,7 +44,6 @@ METHOD(EWheelAttack, wr_think, bool(entity thiswep, bool fire1, bool fire2)) {
                 self.tur_head.frame = 0;
         }
     }
-    return true;
 }
 
 #endif
index de9c6d0c2f870e45dd5f5fbbdd649c9891d8ffc2..277df6e4585e2439da97dcb6e34c395be71ca254 100644 (file)
@@ -16,7 +16,7 @@ REGISTER_WEAPON(FLAC, NEW(FlacAttack));
 #ifdef SVQC
 
 void turret_flac_projectile_think_explode();
-METHOD(FlacAttack, wr_think, bool(entity thiswep, bool fire1, bool fire2)) {
+METHOD(FlacAttack, wr_think, void(entity thiswep, bool fire1, bool fire2)) {
     SELFPARAM();
     bool isPlayer = IS_PLAYER(self);
     if (fire1)
@@ -45,7 +45,6 @@ METHOD(FlacAttack, wr_think, bool(entity thiswep, bool fire1, bool fire2)) {
                 self.tur_head.frame = 0;
         }
     }
-    return true;
 }
 
 void turret_flac_projectile_think_explode()
index 10299798bfbb15da67a9c19c9dfacbaf12622ca0..0556c66002220c1fed79b8228eb20fb84c037dc5 100644 (file)
@@ -19,7 +19,7 @@ float autocvar_g_turrets_unit_hellion_shot_speed_gain;
 float autocvar_g_turrets_unit_hellion_shot_speed_max;
 
 void turret_hellion_missile_think();
-METHOD(HellionAttack, wr_think, bool(entity thiswep, bool fire1, bool fire2)) {
+METHOD(HellionAttack, wr_think, void(entity thiswep, bool fire1, bool fire2)) {
     SELFPARAM();
     bool isPlayer = IS_PLAYER(self);
     if (fire1)
@@ -50,7 +50,6 @@ METHOD(HellionAttack, wr_think, bool(entity thiswep, bool fire1, bool fire2)) {
         missile.missile_flags = MIF_SPLASH | MIF_PROXY | MIF_GUIDED_HEAT;
         if (!isPlayer) self.tur_head.frame += 1;
     }
-    return true;
 }
 
 void turret_hellion_missile_think()
index a33e9af9ed9fd11c1a95a49c96c1a8974187d20c..3678c9628b8a13e58505b056ed152f1ace211aeb 100644 (file)
@@ -23,7 +23,7 @@ float autocvar_g_turrets_unit_hk_shot_speed_max;
 float autocvar_g_turrets_unit_hk_shot_speed_turnrate;
 
 void turret_hk_missile_think();
-METHOD(HunterKillerAttack, wr_think, bool(entity thiswep, bool fire1, bool fire2))
+METHOD(HunterKillerAttack, wr_think, void(entity thiswep, bool fire1, bool fire2))
 {
        SELFPARAM();
        bool isPlayer = IS_PLAYER(self);
@@ -53,7 +53,6 @@ METHOD(HunterKillerAttack, wr_think, bool(entity thiswep, bool fire1, bool fire2
         if (self.tur_head.frame == 0)
             self.tur_head.frame = self.tur_head.frame + 1;
        }
-       return true;
 }
 
 bool hk_is_valid_target(entity e_target);
index 1dce92cad3460e1be2295e3870b0011a1b8fe505..b467187ba1f916f6bd6043918681fe9e37df5867 100644 (file)
@@ -17,7 +17,7 @@ REGISTER_WEAPON(TUR_MACHINEGUN, NEW(MachineGunTurretAttack));
 
 void W_MachineGun_MuzzleFlash();
 
-METHOD(MachineGunTurretAttack, wr_think, bool(entity thiswep, bool fire1, bool fire2))
+METHOD(MachineGunTurretAttack, wr_think, void(entity thiswep, bool fire1, bool fire2))
 {
     SELFPARAM();
     bool isPlayer = IS_PLAYER(self);
@@ -35,7 +35,6 @@ METHOD(MachineGunTurretAttack, wr_think, bool(entity thiswep, bool fire1, bool f
         W_MachineGun_MuzzleFlash();
         setattachment(self.muzzle_flash, self.tur_head, "tag_fire");
     }
-    return true;
 }
 
 #endif
index 39436b8097c10e641afb90ce421586e706424c40..4e17d75312ad3cd8368aa0ece3671368657d9ea8 100644 (file)
@@ -15,7 +15,7 @@ REGISTER_WEAPON(TUR_MLRS, NEW(MLRSTurretAttack));
 
 #ifdef SVQC
 
-METHOD(MLRSTurretAttack, wr_think, bool(entity thiswep, bool fire1, bool fire2))
+METHOD(MLRSTurretAttack, wr_think, void(entity thiswep, bool fire1, bool fire2))
 {
     SELFPARAM();
     bool isPlayer = IS_PLAYER(self);
@@ -36,7 +36,6 @@ METHOD(MLRSTurretAttack, wr_think, bool(entity thiswep, bool fire1, bool fire2))
         missile.missile_flags = MIF_SPLASH;
         te_explosion (missile.origin);
     }
-    return true;
 }
 
 #endif
index 1a337d85accb605dbd7e44f3eaa9f3373cb86b81..5db0bbb273130f66a19591bb040f9e56ab77ba1e 100644 (file)
@@ -18,7 +18,7 @@ void beam_think();
 
 .int fireflag;
 
-METHOD(PhaserTurretAttack, wr_think, bool(entity thiswep, bool fire1, bool fire2))
+METHOD(PhaserTurretAttack, wr_think, void(entity thiswep, bool fire1, bool fire2))
 {
     SELFPARAM();
     bool isPlayer = IS_PLAYER(self);
@@ -62,7 +62,6 @@ METHOD(PhaserTurretAttack, wr_think, bool(entity thiswep, bool fire1, bool fire2
         if (self.tur_head.frame == 0)
             self.tur_head.frame = 1;
     }
-    return true;
 }
 
 void beam_think()
index 1e1a01c6d72ef237aca952a33676492eeb945c5a..a7a23f452454a360a9ef66471ca91292a129858a 100644 (file)
@@ -15,7 +15,7 @@ REGISTER_WEAPON(PLASMA, NEW(PlasmaAttack));
 
 #ifdef SVQC
 
-METHOD(PlasmaAttack, wr_think, bool(entity thiswep, bool fire1, bool fire2)) {
+METHOD(PlasmaAttack, wr_think, void(entity thiswep, bool fire1, bool fire2)) {
     SELFPARAM();
        bool isPlayer = IS_PLAYER(self);
        if (fire1)
@@ -32,7 +32,6 @@ METHOD(PlasmaAttack, wr_think, bool(entity thiswep, bool fire1, bool fire2)) {
         missile.missile_flags = MIF_SPLASH;
         Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
        }
-       return true;
 }
 
 #endif
index 1e8d6b2a9da0066c05464261504fcc6721f00c6e..130bac0f332b77d91ce7bc24cb5a118d022208a6 100644 (file)
@@ -16,7 +16,7 @@ REGISTER_WEAPON(TESLA, NEW(TeslaCoilTurretAttack));
 #ifdef SVQC
 
 entity toast(entity from, float range, float damage);
-METHOD(TeslaCoilTurretAttack, wr_think, bool(entity thiswep, bool fire1, bool fire2)) {
+METHOD(TeslaCoilTurretAttack, wr_think, void(entity thiswep, bool fire1, bool fire2)) {
     SELFPARAM();
     bool isPlayer = IS_PLAYER(self);
     if (fire1)
@@ -40,7 +40,7 @@ METHOD(TeslaCoilTurretAttack, wr_think, bool(entity thiswep, bool fire1, bool fi
         entity t = toast(e,r,d);
         remove(e);
 
-        if (t == NULL) return true;
+        if (t == NULL) return;
 
         self.target_validate_flags = TFL_TARGETSELECT_PLAYERS | TFL_TARGETSELECT_MISSILES | TFL_TARGETSELECT_TEAMCHECK;
 
@@ -60,7 +60,6 @@ METHOD(TeslaCoilTurretAttack, wr_think, bool(entity thiswep, bool fire1, bool fi
         }
 
     }
-    return true;
 }
 
 entity toast(entity from, float range, float damage)
index eb2da58f2400407c5e8aaf9e1a96eb4d060df811..a557d7ff0433d734b0a489e2b1fffe641bed4c01 100644 (file)
@@ -15,7 +15,7 @@ REGISTER_WEAPON(WALKER, NEW(WalkerTurretAttack));
 
 #ifdef SVQC
 
-METHOD(WalkerTurretAttack, wr_think, bool(entity thiswep, bool fire1, bool fire2)) {
+METHOD(WalkerTurretAttack, wr_think, void(entity thiswep, bool fire1, bool fire2)) {
     SELFPARAM();
     bool isPlayer = IS_PLAYER(self);
     if (fire1)
@@ -32,7 +32,6 @@ METHOD(WalkerTurretAttack, wr_think, bool(entity thiswep, bool fire1, bool fire2
         fireBullet (self.tur_shotorg, self.tur_shotdir_updated, self.shot_spread, 0, self.shot_dmg, self.shot_force, DEATH_TURRET_WALK_GUN, 0);
         Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
     }
-    return true;
 }
 
 #endif
index c5059a0049a0ffde8a01e58f43acdcd5e4d6db39..e201260f043318fc1a8caa8ad74bc28819f534a6 100644 (file)
@@ -42,7 +42,7 @@ float autocvar_g_vehicle_racer_rocket_climbspeed;
 float autocvar_g_vehicle_racer_rocket_locked_maxangle;
 
 void racer_fire_rocket(vector org, vector dir, entity trg);
-METHOD(RacerAttack, wr_think, bool(entity thiswep, bool fire1, bool fire2))
+METHOD(RacerAttack, wr_think, void(entity thiswep, bool fire1, bool fire2))
 {
     SELFPARAM();
     bool isPlayer = IS_PLAYER(self);
@@ -72,7 +72,6 @@ METHOD(RacerAttack, wr_think, bool(entity thiswep, bool fire1, bool fire2))
         weapon_thinkf(WFRAME_FIRE2, 0, w_ready);
     }
     setself(this);
-    return true;
 }
 
 METHOD(RacerAttack, wr_checkammo1, bool(RacerAttack thiswep))
index c884e5a28b908e5e1c0f8bc755382d3ed92acfba..47c480c46de89aafbfcf3edc60c859054ba3085d 100644 (file)
@@ -51,7 +51,7 @@ float autocvar_g_vehicle_raptor_bomblet_radius;
 float autocvar_g_vehicle_raptor_bomblet_force;
 float autocvar_g_vehicle_raptor_bomblet_explode_delay;
 
-METHOD(RaptorCannon, wr_think, bool(entity thiswep, bool fire1, bool fire2)) {
+METHOD(RaptorCannon, wr_think, void(entity thiswep, bool fire1, bool fire2)) {
     SELFPARAM();
     bool isPlayer = IS_PLAYER(self);
     entity player = isPlayer ? self : self.owner;
@@ -79,7 +79,6 @@ METHOD(RaptorCannon, wr_think, bool(entity thiswep, bool fire1, bool fire2)) {
         weapon_thinkf(WFRAME_FIRE1, 0, w_ready);
     }
     setself(this);
-    return true;
 }
 METHOD(RaptorCannon, wr_checkammo1, bool(RacerAttack thiswep)) {
     SELFPARAM();
@@ -92,7 +91,7 @@ METHOD(RaptorCannon, wr_checkammo1, bool(RacerAttack thiswep)) {
 float autocvar_g_vehicle_raptor_bombs_refire;
 
 void raptor_bombdrop();
-METHOD(RaptorBomb, wr_think, bool(entity thiswep, bool fire1, bool fire2)) {
+METHOD(RaptorBomb, wr_think, void(entity thiswep, bool fire1, bool fire2)) {
     SELFPARAM();
     bool isPlayer = IS_PLAYER(self);
     entity player = isPlayer ? self : self.owner;
@@ -105,7 +104,6 @@ METHOD(RaptorBomb, wr_think, bool(entity thiswep, bool fire1, bool fire2)) {
         weapon_thinkf(WFRAME_FIRE1, 0, w_ready);
     }
     setself(this);
-    return true;
 }
 
 float autocvar_g_vehicle_raptor_flare_refire;
@@ -117,7 +115,7 @@ void raptor_flare_think();
 void raptor_flare_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force);
 void raptor_flare_touch();
 
-METHOD(RaptorFlare, wr_think, bool(entity thiswep, bool fire1, bool fire2)) {
+METHOD(RaptorFlare, wr_think, void(entity thiswep, bool fire1, bool fire2)) {
     SELFPARAM();
     bool isPlayer = IS_PLAYER(self);
     entity player = isPlayer ? self : self.owner;
@@ -147,7 +145,6 @@ METHOD(RaptorFlare, wr_think, bool(entity thiswep, bool fire1, bool fire2)) {
         weapon_thinkf(WFRAME_FIRE2, 0, w_ready);
     }
     setself(this);
-    return true;
 }
 
 
index 71c42065c9dd145e0cb300aa918f526fcd717192..718272adf18dc2df7ce94a556544eafe2148e1b2 100644 (file)
@@ -47,39 +47,42 @@ CLASS(Weapon, Object)
     ATTRIB(Weapon, message, string, "AOL CD Thrower");
 
     /** (SERVER) setup weapon data */
-    METHOD(Weapon, wr_setup, bool(Weapon this)) {return false;}
+    METHOD(Weapon, wr_setup, void(Weapon this)) {}
     /** (SERVER) logic to run every frame */
-    METHOD(Weapon, wr_think, bool(Weapon this, bool fire1, bool fire2)) {return false;}
+    METHOD(Weapon, wr_think, void(Weapon this, bool fire1, bool fire2)) {}
     /** (SERVER) checks ammo for weapon primary */
     METHOD(Weapon, wr_checkammo1, bool(Weapon this)) {return false;}
     /** (SERVER) checks ammo for weapon second */
     METHOD(Weapon, wr_checkammo2, bool(Weapon this)) {return false;}
     /** (SERVER) runs bot aiming code for this weapon */
-    METHOD(Weapon, wr_aim, bool(Weapon this)) {return false;}
+    METHOD(Weapon, wr_aim, void(Weapon this)) {}
     /** (BOTH)   precaches models/sounds used by this weapon, also sets up weapon properties */
-    METHOD(Weapon, wr_init, bool(Weapon this)) {return false;}
+    METHOD(Weapon, wr_init, void(Weapon this)) {}
     /** (SERVER) notification number for suicide message (may inspect w_deathtype for details) */
-    METHOD(Weapon, wr_suicidemessage, bool(Weapon this)) {return false;}
+    METHOD(Weapon, wr_suicidemessage, int(Weapon this)) {return 0;}
     /** (SERVER) notification number for kill message (may inspect w_deathtype for details) */
-    METHOD(Weapon, wr_killmessage, bool(Weapon this)) {return false;}
+    METHOD(Weapon, wr_killmessage, int(Weapon this)) {return 0;}
     /** (SERVER) handles reloading for weapon */
-    METHOD(Weapon, wr_reload, bool(Weapon this)) {return false;}
+    METHOD(Weapon, wr_reload, void(Weapon this)) {}
     /** (SERVER) clears fields that the weapon may use */
-    METHOD(Weapon, wr_resetplayer, bool(Weapon this)) {return false;}
+    METHOD(Weapon, wr_resetplayer, void(Weapon this)) {}
     /** (CLIENT) impact effect for weapon explosion */
-    METHOD(Weapon, wr_impacteffect, bool(Weapon this)) {return false;}
+    METHOD(Weapon, wr_impacteffect, void(Weapon this)) {}
     /** (SERVER) called whenever a player dies */
-    METHOD(Weapon, wr_playerdeath, bool(Weapon this)) {return false;}
+    METHOD(Weapon, wr_playerdeath, void(Weapon this)) {}
     /** (SERVER) logic to run when weapon is lost */
-    METHOD(Weapon, wr_gonethink, bool(Weapon this)) {return false;}
+    METHOD(Weapon, wr_gonethink, void(Weapon this)) {}
     /** (ALL)    dump weapon cvars to config in data directory (see: sv_cmd dumpweapons) */
-    METHOD(Weapon, wr_config, bool(Weapon this)) {return false;}
+    METHOD(Weapon, wr_config, void(Weapon this)) {}
     /** (CLIENT) weapon specific zoom reticle */
-    METHOD(Weapon, wr_zoomreticle, bool(Weapon this)) {return false;}
+    METHOD(Weapon, wr_zoomreticle, bool(Weapon this)) {
+        // no weapon specific image for this weapon
+        return false;
+    }
     /** (SERVER) the weapon is dropped */
-    METHOD(Weapon, wr_drop, bool(Weapon this)) {return false;}
+    METHOD(Weapon, wr_drop, void(Weapon this)) {}
     /** (SERVER) a weapon is picked up */
-    METHOD(Weapon, wr_pickup, bool(Weapon this)) {return false;}
+    METHOD(Weapon, wr_pickup, void(Weapon this)) {}
 
        METHOD(Weapon, display, void(entity this, void(string name, string icon) returns)) {
                returns(this.message, this.model2 ? sprintf("/gfx/hud/%s/%s", cvar_string("menu_skin"), this.model2) : string_null);
index 4714c03f102fb449f1596d6a2174c5d9c21b3517..36ba74e2c478dc73a91380555f00ac1da6391422 100644 (file)
@@ -634,7 +634,7 @@ void Arc_Smoke()
        }
 }
 
-               METHOD(Arc, wr_aim, bool(entity thiswep))
+               METHOD(Arc, wr_aim, void(entity thiswep))
                {
                        SELFPARAM();
                        if(WEP_CVAR(arc, beam_botaimspeed))
@@ -655,9 +655,8 @@ void Arc_Smoke()
                                        false
                                );
                        }
-                       return true;
                }
-               METHOD(Arc, wr_think, bool(entity thiswep, bool fire1, bool fire2))
+               METHOD(Arc, wr_think, void(entity thiswep, bool fire1, bool fire2))
                {
                        SELFPARAM();
                        Arc_Player_SetHeat(self);
@@ -691,7 +690,7 @@ void Arc_Smoke()
                                        }
                                }
 
-                               return true;
+                               return;
                        }
 
                        if(self.arc_BUTTON_ATCK_prev)
@@ -712,10 +711,8 @@ void Arc_Smoke()
                                self.arc_secondarytime = time + autocvar_g_balance_arc_secondary_refire2 * W_WeaponRateFactor();
                        }
                        #endif
-
-                       return true;
                }
-               METHOD(Arc, wr_init, bool(entity thiswep))
+               METHOD(Arc, wr_init, void(entity thiswep))
                {
                        if(!arc_shotorigin[0])
                        {
@@ -725,7 +722,6 @@ void Arc_Smoke()
                                arc_shotorigin[3] = shotorg_adjust_values(CL_Weapon_GetShotOrg(WEP_ARC.m_id), false, false, 4);
                        }
                        ARC_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
-                       return true;
                }
                METHOD(Arc, wr_checkammo1, bool(entity thiswep))
                {
@@ -738,24 +734,22 @@ void Arc_Smoke()
                        return WEP_CVAR(arc, overheat_max) > 0 &&
                                ((!WEP_CVAR(arc, burst_ammo)) || (self.WEP_AMMO(ARC) > 0));
                }
-               METHOD(Arc, wr_config, bool(entity thiswep))
+               METHOD(Arc, wr_config, void(entity thiswep))
                {
                        ARC_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
-                       return true;
                }
-               METHOD(Arc, wr_killmessage, bool(entity thiswep))
+               METHOD(Arc, wr_killmessage, int(entity thiswep))
                {
                        return WEAPON_ARC_MURDER;
                }
-               METHOD(Arc, wr_drop, bool(entity thiswep))
+               METHOD(Arc, wr_drop, void(entity thiswep))
                {
                        weapon_dropevent_item.arc_overheat = self.arc_overheat;
                        weapon_dropevent_item.arc_cooldown = self.arc_cooldown;
                        self.arc_overheat = 0;
                        self.arc_cooldown = 0;
-                       return true;
                }
-               METHOD(Arc, wr_pickup, bool(entity thiswep))
+               METHOD(Arc, wr_pickup, void(entity thiswep))
                {
                        if ( !client_hasweapon(self, WEP_ARC.m_id, false, false) &&
                                weapon_dropevent_item.arc_overheat > time )
@@ -763,7 +757,6 @@ void Arc_Smoke()
                                self.arc_overheat = weapon_dropevent_item.arc_overheat;
                                self.arc_cooldown = weapon_dropevent_item.arc_cooldown;
                        }
-                       return true;
                }
 #endif
 #ifdef CSQC
@@ -1509,19 +1502,5 @@ void Ent_ReadArcBeam(float isnew)
        }
 }
 
-               METHOD(Arc, wr_impacteffect, bool(entity thiswep))
-               {
-                       // todo
-                       return true;
-               }
-               METHOD(Arc, wr_init, bool(entity thiswep))
-               {
-                       return true;
-               }
-               METHOD(Arc, wr_zoomreticle, bool(entity thiswep))
-               {
-                       // no weapon specific image for this weapon
-                       return false;
-               }
 #endif
 #endif
index df54c6b921360c7ad2bcd5045c11cd67bbf8004a..699f8f1d914182a145160d7129b872c969dea67e 100644 (file)
@@ -147,7 +147,7 @@ void W_Blaster_Attack(
        }
 }
 
-               METHOD(Blaster, wr_aim, bool(entity thiswep))
+               METHOD(Blaster, wr_aim, void(entity thiswep))
                {
                        if(WEP_CVAR(blaster, secondary))
                        {
@@ -158,11 +158,9 @@ void W_Blaster_Attack(
                        }
                        else
                                { self.BUTTON_ATCK = bot_aim(WEP_CVAR_PRI(blaster, speed), 0, WEP_CVAR_PRI(blaster, lifetime), false); }
-
-                       return true;
                }
 
-               METHOD(Blaster, wr_think, bool(entity thiswep, bool fire1, bool fire2))
+               METHOD(Blaster, wr_think, void(entity thiswep, bool fire1, bool fire2))
                {
                        if(fire1)
                        {
@@ -217,19 +215,16 @@ void W_Blaster_Attack(
                                        }
                                }
                        }
-                       return true;
                }
 
-               METHOD(Blaster, wr_init, bool(entity thiswep))
+               METHOD(Blaster, wr_init, void(entity thiswep))
                {
                        BLASTER_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
-                       return true;
                }
 
-               METHOD(Blaster, wr_setup, bool(entity thiswep))
+               METHOD(Blaster, wr_setup, void(entity thiswep))
                {
                        self.ammo_field = ammo_none;
-                       return true;
                }
 
                METHOD(Blaster, wr_checkammo1, bool(entity thiswep))
@@ -242,18 +237,17 @@ void W_Blaster_Attack(
                        return true; // blaster has infinite ammo
                }
 
-               METHOD(Blaster, wr_config, bool(entity thiswep))
+               METHOD(Blaster, wr_config, void(entity thiswep))
                {
                        BLASTER_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
-                       return true;
                }
 
-               METHOD(Blaster, wr_suicidemessage, bool(entity thiswep))
+               METHOD(Blaster, wr_suicidemessage, int(entity thiswep))
                {
                        return WEAPON_BLASTER_SUICIDE;
                }
 
-               METHOD(Blaster, wr_killmessage, bool(entity thiswep))
+               METHOD(Blaster, wr_killmessage, int(entity thiswep))
                {
                        return WEAPON_BLASTER_MURDER;
                }
@@ -261,24 +255,12 @@ void W_Blaster_Attack(
 #endif
 #ifdef CSQC
 
-               METHOD(Blaster, wr_impacteffect, bool(entity thiswep))
+               METHOD(Blaster, wr_impacteffect, void(entity thiswep))
                {
                        vector org2;
                        org2 = w_org + w_backoff * 6;
                        pointparticles(particleeffectnum(EFFECT_BLASTER_IMPACT), org2, w_backoff * 1000, 1);
                        if(!w_issilent) { sound(self, CH_SHOTS, SND_LASERIMPACT, VOL_BASE, ATTN_NORM); }
-                       return true;
-               }
-
-               METHOD(Blaster, wr_init, bool(entity thiswep))
-               {
-                       return true;
-               }
-
-               METHOD(Blaster, wr_zoomreticle, bool(entity thiswep))
-               {
-                       // no weapon specific image for this weapon
-                       return false;
                }
 
 #endif
index efa5387646bbf73721a4fd9442f1bcc0d18d3780..229580562dceb4663b459065d7b6eedb44a1cca7 100644 (file)
@@ -566,17 +566,15 @@ void W_Crylink_Attack2(Weapon thiswep)
        }
 }
 
-               METHOD(Crylink, wr_aim, bool(entity thiswep))
+               METHOD(Crylink, wr_aim, void(entity thiswep))
                {
                        SELFPARAM();
                        if(random() < 0.10)
                                self.BUTTON_ATCK = bot_aim(WEP_CVAR_PRI(crylink, speed), 0, WEP_CVAR_PRI(crylink, middle_lifetime), false);
                        else
                                self.BUTTON_ATCK2 = bot_aim(WEP_CVAR_SEC(crylink, speed), 0, WEP_CVAR_SEC(crylink, middle_lifetime), false);
-
-                       return true;
                }
-               METHOD(Crylink, wr_think, bool(entity thiswep, bool fire1, bool fire2))
+               METHOD(Crylink, wr_think, void(entity thiswep, bool fire1, bool fire2))
                {
                        SELFPARAM();
                        if(autocvar_g_balance_crylink_reload_ammo && self.clip_load < min(WEP_CVAR_PRI(crylink, ammo), WEP_CVAR_SEC(crylink, ammo))) { // forced reload
@@ -634,13 +632,10 @@ void W_Crylink_Attack2(Weapon thiswep)
                                        }
                                }
                        }
-
-                       return true;
                }
-               METHOD(Crylink, wr_init, bool(entity thiswep))
+               METHOD(Crylink, wr_init, void(entity thiswep))
                {
                        CRYLINK_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
-                       return true;
                }
                METHOD(Crylink, wr_checkammo1, bool(entity thiswep))
                {
@@ -664,27 +659,25 @@ void W_Crylink_Attack2(Weapon thiswep)
                        ammo_amount += self.(weapon_load[WEP_CRYLINK.m_id]) >= WEP_CVAR_SEC(crylink, ammo);
                        return ammo_amount;
                }
-               METHOD(Crylink, wr_config, bool(entity thiswep))
+               METHOD(Crylink, wr_config, void(entity thiswep))
                {
                        CRYLINK_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
-                       return true;
                }
-               METHOD(Crylink, wr_reload, bool(entity thiswep))
+               METHOD(Crylink, wr_reload, void(entity thiswep))
                {
                        W_Reload(min(WEP_CVAR_PRI(crylink, ammo), WEP_CVAR_SEC(crylink, ammo)), SND(RELOAD));
-                       return true;
                }
-               METHOD(Crylink, wr_suicidemessage, bool(entity thiswep))
+               METHOD(Crylink, wr_suicidemessage, int(entity thiswep))
                {
                        return WEAPON_CRYLINK_SUICIDE;
                }
-               METHOD(Crylink, wr_killmessage, bool(entity thiswep))
+               METHOD(Crylink, wr_killmessage, int(entity thiswep))
                {
                        return WEAPON_CRYLINK_MURDER;
                }
 #endif
 #ifdef CSQC
-               METHOD(Crylink, wr_impacteffect, bool(entity thiswep))
+               METHOD(Crylink, wr_impacteffect, void(entity thiswep))
                {
                        SELFPARAM();
                        vector org2;
@@ -701,17 +694,6 @@ void W_Crylink_Attack2(Weapon thiswep)
                                if(!w_issilent)
                                        sound(self, CH_SHOTS, SND_CRYLINK_IMPACT, VOL_BASE, ATTN_NORM);
                        }
-
-                       return true;
-               }
-               METHOD(Crylink, wr_init, bool(entity thiswep))
-               {
-                       return true;
-               }
-               METHOD(Crylink, wr_zoomreticle, bool(entity thiswep))
-               {
-                       // no weapon specific image for this weapon
-                       return false;
                }
 #endif
 #endif
index 2204548b232537019e49160cf48ff18b0fda0430..130eb88b0f07952575eb4ddd8f5875ca775b69cb 100644 (file)
@@ -395,7 +395,7 @@ void W_Devastator_Attack(Weapon thiswep)
 }
 
                #if 0
-               METHOD(Devastator, wr_aim, bool(entity thiswep))
+               METHOD(Devastator, wr_aim, void(entity thiswep))
                {
                        // aim and decide to fire if appropriate
                        self.BUTTON_ATCK = bot_aim(WEP_CVAR(devastator, speed), 0, WEP_CVAR(devastator, lifetime), false);
@@ -420,11 +420,9 @@ void W_Devastator_Attack(Weapon thiswep)
 
                                if(self.BUTTON_ATCK2) self.BUTTON_ATCK = false;
                        }
-
-                       return true;
                }
                #else
-               METHOD(Devastator, wr_aim, bool(entity thiswep))
+               METHOD(Devastator, wr_aim, void(entity thiswep))
                {
                        // aim and decide to fire if appropriate
                        self.BUTTON_ATCK = bot_aim(WEP_CVAR(devastator, speed), 0, WEP_CVAR(devastator, lifetime), false);
@@ -518,11 +516,9 @@ void W_Devastator_Attack(Weapon thiswep)
                                //      dprint(ftos(desirabledamage),"\n");
                                if(self.BUTTON_ATCK2 == true) self.BUTTON_ATCK = false;
                        }
-
-                       return true;
                }
                #endif
-               METHOD(Devastator, wr_think, bool(entity thiswep, bool fire1, bool fire2))
+               METHOD(Devastator, wr_think, void(entity thiswep, bool fire1, bool fire2))
                {
                        if(WEP_CVAR(devastator, reload_ammo) && self.clip_load < WEP_CVAR(devastator, ammo)) { // forced reload
                                Weapon w = get_weaponinfo(self.weapon);
@@ -559,18 +555,14 @@ void W_Devastator_Attack(Weapon thiswep)
                                                sound(self, CH_WEAPON_B, SND_ROCKET_DET, VOL_BASE, ATTN_NORM);
                                }
                        }
-
-                       return true;
                }
-               METHOD(Devastator, wr_init, bool(entity thiswep))
+               METHOD(Devastator, wr_init, void(entity thiswep))
                {
                        DEVASTATOR_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
-                       return true;
                }
-               METHOD(Devastator, wr_setup, bool(entity thiswep))
+               METHOD(Devastator, wr_setup, void(entity thiswep))
                {
                        self.rl_release = 1;
-                       return true;
                }
                METHOD(Devastator, wr_checkammo1, bool(entity thiswep))
                {
@@ -612,26 +604,23 @@ void W_Devastator_Attack(Weapon thiswep)
                {
                        return false;
                }
-               METHOD(Devastator, wr_config, bool(entity thiswep))
+               METHOD(Devastator, wr_config, void(entity thiswep))
                {
                        DEVASTATOR_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
-                       return true;
                }
-               METHOD(Devastator, wr_resetplayer, bool(entity thiswep))
+               METHOD(Devastator, wr_resetplayer, void(entity thiswep))
                {
                        self.rl_release = 0;
-                       return true;
                }
-               METHOD(Devastator, wr_reload, bool(entity thiswep))
+               METHOD(Devastator, wr_reload, void(entity thiswep))
                {
                        W_Reload(WEP_CVAR(devastator, ammo), SND(RELOAD));
-                       return true;
                }
-               METHOD(Devastator, wr_suicidemessage, bool(entity thiswep))
+               METHOD(Devastator, wr_suicidemessage, int(entity thiswep))
                {
                        return WEAPON_DEVASTATOR_SUICIDE;
                }
-               METHOD(Devastator, wr_killmessage, bool(entity thiswep))
+               METHOD(Devastator, wr_killmessage, int(entity thiswep))
                {
                        if((w_deathtype & HITTYPE_BOUNCE) || (w_deathtype & HITTYPE_SPLASH))
                                return WEAPON_DEVASTATOR_MURDER_SPLASH;
@@ -642,24 +631,13 @@ void W_Devastator_Attack(Weapon thiswep)
 #endif
 #ifdef CSQC
 
-               METHOD(Devastator, wr_impacteffect, bool(entity thiswep))
+               METHOD(Devastator, wr_impacteffect, void(entity thiswep))
                {
                        vector org2;
                        org2 = w_org + w_backoff * 12;
                        pointparticles(particleeffectnum(EFFECT_ROCKET_EXPLODE), org2, '0 0 0', 1);
                        if(!w_issilent)
                                sound(self, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTN_NORM);
-
-                       return true;
-               }
-               METHOD(Devastator, wr_init, bool(entity thiswep))
-               {
-                       return true;
-               }
-               METHOD(Devastator, wr_zoomreticle, bool(entity thiswep))
-               {
-                       // no weapon specific image for this weapon
-                       return false;
                }
 
 #endif
index b23072c34aeb599f8db9604d22b3fc0b3bc7d8f8..14f24e8761b380ef9b4f136fd8ddf7d39fd74859 100644 (file)
@@ -423,7 +423,7 @@ void W_Electro_CheckAttack(Weapon thiswep, bool fire1, bool fire2)
 
 .float bot_secondary_electromooth;
 
-               METHOD(Electro, wr_aim, bool(entity thiswep))
+               METHOD(Electro, wr_aim, void(entity thiswep))
                {
                        self.BUTTON_ATCK = self.BUTTON_ATCK2 = false;
                        if(vlen(self.origin-self.enemy.origin) > 1000) { self.bot_secondary_electromooth = 0; }
@@ -450,10 +450,8 @@ void W_Electro_CheckAttack(Weapon thiswep, bool fire1, bool fire2)
                                        if(random() < 0.03) self.bot_secondary_electromooth = 0;
                                }
                        }
-
-                       return true;
                }
-               METHOD(Electro, wr_think, bool(entity thiswep, bool fire1, bool fire2))
+               METHOD(Electro, wr_think, void(entity thiswep, bool fire1, bool fire2))
                {
                        if(autocvar_g_balance_electro_reload_ammo) // forced reload // WEAPONTODO
                        {
@@ -467,10 +465,8 @@ void W_Electro_CheckAttack(Weapon thiswep, bool fire1, bool fire2)
                                {
                                        Weapon w = get_weaponinfo(self.weapon);
                                        w.wr_reload(w);
-                                       return false;
+                                       return;
                                }
-
-                               return true;
                        }
 
                        if(fire1)
@@ -492,13 +488,10 @@ void W_Electro_CheckAttack(Weapon thiswep, bool fire1, bool fire2)
                                        self.electro_secondarytime = time + WEP_CVAR_SEC(electro, refire2) * W_WeaponRateFactor();
                                }
                        }
-
-                       return true;
                }
-               METHOD(Electro, wr_init, bool(entity thiswep))
+               METHOD(Electro, wr_init, void(entity thiswep))
                {
                        ELECTRO_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
-                       return true;
                }
                METHOD(Electro, wr_checkammo1, bool(entity thiswep))
                {
@@ -521,29 +514,26 @@ void W_Electro_CheckAttack(Weapon thiswep, bool fire1, bool fire2)
                        }
                        return ammo_amount;
                }
-               METHOD(Electro, wr_config, bool(entity thiswep))
+               METHOD(Electro, wr_config, void(entity thiswep))
                {
                        ELECTRO_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
-                       return true;
                }
-               METHOD(Electro, wr_resetplayer, bool(entity thiswep))
+               METHOD(Electro, wr_resetplayer, void(entity thiswep))
                {
                        self.electro_secondarytime = time;
-                       return true;
                }
-               METHOD(Electro, wr_reload, bool(entity thiswep))
+               METHOD(Electro, wr_reload, void(entity thiswep))
                {
                        W_Reload(min(WEP_CVAR_PRI(electro, ammo), WEP_CVAR_SEC(electro, ammo)), SND(RELOAD));
-                       return true;
                }
-               METHOD(Electro, wr_suicidemessage, bool(entity thiswep))
+               METHOD(Electro, wr_suicidemessage, int(entity thiswep))
                {
                        if(w_deathtype & HITTYPE_SECONDARY)
                                return WEAPON_ELECTRO_SUICIDE_ORBS;
                        else
                                return WEAPON_ELECTRO_SUICIDE_BOLT;
                }
-               METHOD(Electro, wr_killmessage, bool(entity thiswep))
+               METHOD(Electro, wr_killmessage, int(entity thiswep))
                {
                        if(w_deathtype & HITTYPE_SECONDARY)
                        {
@@ -561,7 +551,7 @@ void W_Electro_CheckAttack(Weapon thiswep, bool fire1, bool fire2)
 #endif
 #ifdef CSQC
 
-               METHOD(Electro, wr_impacteffect, bool(entity thiswep))
+               METHOD(Electro, wr_impacteffect, void(entity thiswep))
                {
                        vector org2;
                        org2 = w_org + w_backoff * 6;
@@ -587,17 +577,6 @@ void W_Electro_CheckAttack(Weapon thiswep, bool fire1, bool fire2)
                                                sound(self, CH_SHOTS, SND_ELECTRO_IMPACT, VOL_BASE, ATTEN_NORM);
                                }
                        }
-
-                       return true;
-               }
-               METHOD(Electro, wr_init, bool(entity thiswep))
-               {
-                       return true;
-               }
-               METHOD(Electro, wr_zoomreticle, bool(entity thiswep))
-               {
-                       // no weapon specific image for this weapon
-                       return false;
                }
 
 #endif
index 6eb4a976e8933a55bd82d410db10113a2990bf58..9a292c5dd0dca7a375e5a5ce3c23bee378db89fb 100644 (file)
@@ -350,7 +350,7 @@ void W_Fireball_Attack2(void)
        MUTATOR_CALLHOOK(EditProjectile, self, proj);
 }
 
-               METHOD(Fireball, wr_aim, bool(entity thiswep))
+               METHOD(Fireball, wr_aim, void(entity thiswep))
                {
                        self.BUTTON_ATCK = false;
                        self.BUTTON_ATCK2 = false;
@@ -370,10 +370,8 @@ void W_Fireball_Attack2(void)
                                        if(random() < 0.01) self.bot_primary_fireballmooth = 1;
                                }
                        }
-
-                       return true;
                }
-               METHOD(Fireball, wr_think, bool(entity thiswep, bool fire1, bool fire2))
+               METHOD(Fireball, wr_think, void(entity thiswep, bool fire1, bool fire2))
                {
                        if(fire1)
                        {
@@ -392,18 +390,14 @@ void W_Fireball_Attack2(void)
                                        weapon_thinkf(WFRAME_FIRE2, WEP_CVAR_SEC(fireball, animtime), w_ready);
                                }
                        }
-
-                       return true;
                }
-               METHOD(Fireball, wr_init, bool(entity thiswep))
+               METHOD(Fireball, wr_init, void(entity thiswep))
                {
                        FIREBALL_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
-                       return true;
                }
-               METHOD(Fireball, wr_setup, bool(entity thiswep))
+               METHOD(Fireball, wr_setup, void(entity thiswep))
                {
                        self.ammo_field = ammo_none;
-                       return true;
                }
                METHOD(Fireball, wr_checkammo1, bool(entity thiswep))
                {
@@ -413,24 +407,22 @@ void W_Fireball_Attack2(void)
                {
                        return true; // fireball has infinite ammo
                }
-               METHOD(Fireball, wr_config, bool(entity thiswep))
+               METHOD(Fireball, wr_config, void(entity thiswep))
                {
                        FIREBALL_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
-                       return true;
                }
-               METHOD(Fireball, wr_resetplayer, bool(entity thiswep))
+               METHOD(Fireball, wr_resetplayer, void(entity thiswep))
                {
                        self.fireball_primarytime = time;
-                       return true;
                }
-               METHOD(Fireball, wr_suicidemessage, bool(entity thiswep))
+               METHOD(Fireball, wr_suicidemessage, int(entity thiswep))
                {
                        if(w_deathtype & HITTYPE_SECONDARY)
                                return WEAPON_FIREBALL_SUICIDE_FIREMINE;
                        else
                                return WEAPON_FIREBALL_SUICIDE_BLAST;
                }
-               METHOD(Fireball, wr_killmessage, bool(entity thiswep))
+               METHOD(Fireball, wr_killmessage, int(entity thiswep))
                {
                        if(w_deathtype & HITTYPE_SECONDARY)
                                return WEAPON_FIREBALL_MURDER_FIREMINE;
@@ -441,7 +433,7 @@ void W_Fireball_Attack2(void)
 #endif
 #ifdef CSQC
 
-               METHOD(Fireball, wr_impacteffect, bool(entity thiswep))
+               METHOD(Fireball, wr_impacteffect, void(entity thiswep))
                {
                        vector org2;
                        if(w_deathtype & HITTYPE_SECONDARY)
@@ -455,17 +447,6 @@ void W_Fireball_Attack2(void)
                                if(!w_issilent)
                                        sound(self, CH_SHOTS, SND_FIREBALL_IMPACT2, VOL_BASE, ATTEN_NORM * 0.25); // long range boom
                        }
-
-                       return true;
-               }
-               METHOD(Fireball, wr_init, bool(entity thiswep))
-               {
-                       return true;
-               }
-               METHOD(Fireball, wr_zoomreticle, bool(entity thiswep))
-               {
-                       // no weapon specific image for this weapon
-                       return false;
                }
 
 #endif
index 00d8226052ed282b8e7add42947f6c8a87bf3118..3feeb0b32a39c4170d7108457ca5c4897a6e45f2 100644 (file)
@@ -400,16 +400,14 @@ void W_Hagar_Attack2_Load(Weapon thiswep)
        }
 }
 
-               METHOD(Hagar, wr_aim, bool(entity thiswep))
+               METHOD(Hagar, wr_aim, void(entity thiswep))
                {
                        if(random()>0.15)
                                self.BUTTON_ATCK = bot_aim(WEP_CVAR_PRI(hagar, speed), 0, WEP_CVAR_PRI(hagar, lifetime), false);
                        else // not using secondary_speed since these are only 15% and should cause some ricochets without re-aiming
                                self.BUTTON_ATCK2 = bot_aim(WEP_CVAR_PRI(hagar, speed), 0, WEP_CVAR_PRI(hagar, lifetime), false);
-
-                       return true;
                }
-               METHOD(Hagar, wr_think, bool(entity thiswep, bool fire1, bool fire2))
+               METHOD(Hagar, wr_think, void(entity thiswep, bool fire1, bool fire2))
                {
                        float loadable_secondary;
                        loadable_secondary = (WEP_CVAR_SEC(hagar, load) && WEP_CVAR(hagar, secondary));
@@ -435,9 +433,8 @@ void W_Hagar_Attack2_Load(Weapon thiswep)
                                        weapon_thinkf(WFRAME_FIRE2, WEP_CVAR_SEC(hagar, refire), w_ready);
                                }
                        }
-                       return true;
                }
-               METHOD(Hagar, wr_gonethink, bool(entity thiswep))
+               METHOD(Hagar, wr_gonethink, void(entity thiswep))
                {
                        // we lost the weapon and want to prepare switching away
                        if(self.hagar_load)
@@ -445,15 +442,12 @@ void W_Hagar_Attack2_Load(Weapon thiswep)
                                self.weaponentity.state = WS_READY;
                                W_Hagar_Attack2_Load_Release();
                        }
-
-                       return true;
                }
-               METHOD(Hagar, wr_init, bool(entity thiswep))
+               METHOD(Hagar, wr_init, void(entity thiswep))
                {
                        HAGAR_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
-                       return true;
                }
-               METHOD(Hagar, wr_setup, bool(entity thiswep))
+               METHOD(Hagar, wr_setup, void(entity thiswep))
                {
                        self.hagar_loadblock = false;
 
@@ -462,8 +456,6 @@ void W_Hagar_Attack2_Load(Weapon thiswep)
                                W_DecreaseAmmo(thiswep, WEP_CVAR_SEC(hagar, ammo) * self.hagar_load * -1); // give back ammo if necessary
                                self.hagar_load = 0;
                        }
-
-                       return true;
                }
                METHOD(Hagar, wr_checkammo1, bool(entity thiswep))
                {
@@ -477,36 +469,30 @@ void W_Hagar_Attack2_Load(Weapon thiswep)
                        ammo_amount += self.(weapon_load[WEP_HAGAR.m_id]) >= WEP_CVAR_SEC(hagar, ammo);
                        return ammo_amount;
                }
-               METHOD(Hagar, wr_config, bool(entity thiswep))
+               METHOD(Hagar, wr_config, void(entity thiswep))
                {
                        HAGAR_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
-                       return true;
                }
-               METHOD(Hagar, wr_resetplayer, bool(entity thiswep))
+               METHOD(Hagar, wr_resetplayer, void(entity thiswep))
                {
                        self.hagar_load = 0;
-                       return true;
                }
-               METHOD(Hagar, wr_playerdeath, bool(entity thiswep))
+               METHOD(Hagar, wr_playerdeath, void(entity thiswep))
                {
                        // if we have any rockets loaded when we die, release them
                        if(self.hagar_load && WEP_CVAR_SEC(hagar, load_releasedeath))
                                W_Hagar_Attack2_Load_Release();
-
-                       return true;
                }
-               METHOD(Hagar, wr_reload, bool(entity thiswep))
+               METHOD(Hagar, wr_reload, void(entity thiswep))
                {
                        if(!self.hagar_load) // require releasing loaded rockets first
                                W_Reload(min(WEP_CVAR_PRI(hagar, ammo), WEP_CVAR_SEC(hagar, ammo)), SND(RELOAD));
-
-                       return true;
                }
-               METHOD(Hagar, wr_suicidemessage, bool(entity thiswep))
+               METHOD(Hagar, wr_suicidemessage, int(entity thiswep))
                {
                        return WEAPON_HAGAR_SUICIDE;
                }
-               METHOD(Hagar, wr_killmessage, bool(entity thiswep))
+               METHOD(Hagar, wr_killmessage, int(entity thiswep))
                {
                        if(w_deathtype & HITTYPE_SECONDARY)
                                return WEAPON_HAGAR_MURDER_BURST;
@@ -517,7 +503,7 @@ void W_Hagar_Attack2_Load(Weapon thiswep)
 #endif
 #ifdef CSQC
 
-               METHOD(Hagar, wr_impacteffect, bool(entity thiswep))
+               METHOD(Hagar, wr_impacteffect, void(entity thiswep))
                {
                        vector org2;
                        org2 = w_org + w_backoff * 6;
@@ -531,17 +517,6 @@ void W_Hagar_Attack2_Load(Weapon thiswep)
                                else
                                        sound(self, CH_SHOTS, SND_HAGEXP3, VOL_BASE, ATTN_NORM);
                        }
-
-                       return true;
-               }
-               METHOD(Hagar, wr_init, bool(entity thiswep))
-               {
-                       return true;
-               }
-               METHOD(Hagar, wr_zoomreticle, bool(entity thiswep))
-               {
-                       // no weapon specific image for this weapon
-                       return false;
                }
 
 #endif
index c7cab6d98fa2cde9616e9bc0e29f86d8c6a06dc7..fe1a04f263bb2a3f73edc446b4672e47cf52ae19 100644 (file)
@@ -207,12 +207,11 @@ void W_HLAC_Attack2_Frame(Weapon thiswep)
        }
 }
 
-               METHOD(HLAC, wr_aim, bool(entity thiswep))
+               METHOD(HLAC, wr_aim, void(entity thiswep))
                {
                        self.BUTTON_ATCK = bot_aim(WEP_CVAR_PRI(hlac, speed), 0, WEP_CVAR_PRI(hlac, lifetime), false);
-                       return true;
                }
-               METHOD(HLAC, wr_think, bool(entity thiswep, bool fire1, bool fire2))
+               METHOD(HLAC, wr_think, void(entity thiswep, bool fire1, bool fire2))
                {
                        if(autocvar_g_balance_hlac_reload_ammo && self.clip_load < min(WEP_CVAR_PRI(hlac, ammo), WEP_CVAR_SEC(hlac, ammo))) { // forced reload
                                Weapon w = get_weaponinfo(self.weapon);
@@ -235,13 +234,10 @@ void W_HLAC_Attack2_Frame(Weapon thiswep)
                                        weapon_thinkf(WFRAME_FIRE2, WEP_CVAR_SEC(hlac, animtime), w_ready);
                                }
                        }
-
-                       return true;
                }
-               METHOD(HLAC, wr_init, bool(entity thiswep))
+               METHOD(HLAC, wr_init, void(entity thiswep))
                {
                        HLAC_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
-                       return true;
                }
                METHOD(HLAC, wr_checkammo1, bool(entity thiswep))
                {
@@ -255,21 +251,19 @@ void W_HLAC_Attack2_Frame(Weapon thiswep)
                        ammo_amount += self.(weapon_load[WEP_HLAC.m_id]) >= WEP_CVAR_SEC(hlac, ammo);
                        return ammo_amount;
                }
-               METHOD(HLAC, wr_config, bool(entity thiswep))
+               METHOD(HLAC, wr_config, void(entity thiswep))
                {
                        HLAC_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
-                       return true;
                }
-               METHOD(HLAC, wr_reload, bool(entity thiswep))
+               METHOD(HLAC, wr_reload, void(entity thiswep))
                {
                        W_Reload(min(WEP_CVAR_PRI(hlac, ammo), WEP_CVAR_SEC(hlac, ammo)), SND(RELOAD));
-                       return true;
                }
-               METHOD(HLAC, wr_suicidemessage, bool(entity thiswep))
+               METHOD(HLAC, wr_suicidemessage, int(entity thiswep))
                {
                        return WEAPON_HLAC_SUICIDE;
                }
-               METHOD(HLAC, wr_killmessage, bool(entity thiswep))
+               METHOD(HLAC, wr_killmessage, int(entity thiswep))
                {
                        return WEAPON_HLAC_MURDER;
                }
@@ -277,24 +271,13 @@ void W_HLAC_Attack2_Frame(Weapon thiswep)
 #endif
 #ifdef CSQC
 
-               METHOD(HLAC, wr_impacteffect, bool(entity thiswep))
+               METHOD(HLAC, wr_impacteffect, void(entity thiswep))
                {
                        vector org2;
                        org2 = w_org + w_backoff * 6;
                        pointparticles(particleeffectnum(EFFECT_BLASTER_IMPACT), org2, w_backoff * 1000, 1);
                        if(!w_issilent)
                                sound(self, CH_SHOTS, SND_LASERIMPACT, VOL_BASE, ATTN_NORM);
-
-                       return true;
-               }
-               METHOD(HLAC, wr_init, bool(entity thiswep))
-               {
-                       return true;
-               }
-               METHOD(HLAC, wr_zoomreticle, bool(entity thiswep))
-               {
-                       // no weapon specific image for this weapon
-                       return false;
                }
 
 #endif
index aae7d7792ace988a7f49b2110c393a1e932c48f9..1ed33f8b1fe9bf5c5c63112d9553ea9d98b1028d 100644 (file)
@@ -89,16 +89,14 @@ void W_HeavyMachineGun_Attack_Auto(Weapon thiswep, bool fire1, bool fire2)
        weapon_thinkf(WFRAME_FIRE1, WEP_CVAR(hmg, refire), W_HeavyMachineGun_Attack_Auto);
 }
 
-               METHOD(HeavyMachineGun, wr_aim, bool(entity thiswep))
+               METHOD(HeavyMachineGun, wr_aim, void(entity thiswep))
                {
                        if(vlen(self.origin-self.enemy.origin) < 3000 - bound(0, skill, 10) * 200)
                                self.BUTTON_ATCK = bot_aim(1000000, 0, 0.001, false);
                        else
                                self.BUTTON_ATCK2 = bot_aim(1000000, 0, 0.001, false);
-
-                       return true;
                }
-               METHOD(HeavyMachineGun, wr_think, bool(entity thiswep, bool fire1, bool fire2))
+               METHOD(HeavyMachineGun, wr_think, void(entity thiswep, bool fire1, bool fire2))
                {
                        if(WEP_CVAR(hmg, reload_ammo) && self.clip_load < WEP_CVAR(hmg, ammo)) { // forced reload
                                Weapon w = get_weaponinfo(self.weapon);
@@ -112,13 +110,10 @@ void W_HeavyMachineGun_Attack_Auto(Weapon thiswep, bool fire1, bool fire2)
                                        W_HeavyMachineGun_Attack_Auto(thiswep, fire1, fire2);
                                }
                        }
-
-                       return true;
                }
-               METHOD(HeavyMachineGun, wr_init, bool(entity thiswep))
+               METHOD(HeavyMachineGun, wr_init, void(entity thiswep))
                {
                        HMG_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
-                       return true;
                }
                METHOD(HeavyMachineGun, wr_checkammo1, bool(entity thiswep))
                {
@@ -138,21 +133,19 @@ void W_HeavyMachineGun_Attack_Auto(Weapon thiswep, bool fire1, bool fire2)
 
                        return ammo_amount;
                }
-               METHOD(HeavyMachineGun, wr_config, bool(entity thiswep))
+               METHOD(HeavyMachineGun, wr_config, void(entity thiswep))
                {
                        HMG_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
-                       return true;
                }
-               METHOD(HeavyMachineGun, wr_reload, bool(entity thiswep))
+               METHOD(HeavyMachineGun, wr_reload, void(entity thiswep))
                {
                        W_Reload(WEP_CVAR(hmg, ammo), SND(RELOAD));
-                       return true;
                }
-               METHOD(HeavyMachineGun, wr_suicidemessage, bool(entity thiswep))
+               METHOD(HeavyMachineGun, wr_suicidemessage, int(entity thiswep))
                {
                        return WEAPON_THINKING_WITH_PORTALS;
                }
-               METHOD(HeavyMachineGun, wr_killmessage, bool(entity thiswep))
+               METHOD(HeavyMachineGun, wr_killmessage, int(entity thiswep))
                {
                        if(w_deathtype & HITTYPE_SECONDARY)
                                return WEAPON_HMG_MURDER_SNIPE;
@@ -163,7 +156,7 @@ void W_HeavyMachineGun_Attack_Auto(Weapon thiswep, bool fire1, bool fire2)
 #endif
 #ifdef CSQC
 
-               METHOD(HeavyMachineGun, wr_impacteffect, bool(entity thiswep))
+               METHOD(HeavyMachineGun, wr_impacteffect, void(entity thiswep))
                {
                        vector org2;
                        org2 = w_org + w_backoff * 2;
@@ -175,17 +168,6 @@ void W_HeavyMachineGun_Attack_Auto(Weapon thiswep, bool fire1, bool fire2)
                                        sound(self, CH_SHOTS, SND_RIC2, VOL_BASE, ATTEN_NORM);
                                else if(w_random < 0.2)
                                        sound(self, CH_SHOTS, SND_RIC3, VOL_BASE, ATTEN_NORM);
-
-                       return true;
-               }
-               METHOD(HeavyMachineGun, wr_init, bool(entity thiswep))
-               {
-                       return true;
-               }
-               METHOD(HeavyMachineGun, wr_zoomreticle, bool(entity thiswep))
-               {
-                       // no weapon specific image for this weapon
-                       return false;
                }
 
 #endif
index fc52287ddd4fc75b266231b6b58ea82f294fe497..fdb98a0cc517db471e35fcd06456185a8b158170 100644 (file)
@@ -176,12 +176,7 @@ void W_Hook_Attack2(Weapon thiswep)
        MUTATOR_CALLHOOK(EditProjectile, self, gren);
 }
 
-               METHOD(Hook, wr_aim, bool(entity thiswep))
-               {
-                       // no bot AI for hook (yet?)
-                       return true;
-               }
-               METHOD(Hook, wr_think, bool(entity thiswep, bool fire1, bool fire2))
+               METHOD(Hook, wr_think, void(entity thiswep, bool fire1, bool fire2))
                {
                        if(fire1 || self.BUTTON_HOOK)
                        {
@@ -281,18 +276,14 @@ void W_Hook_Attack2(Weapon thiswep)
                        }
 
                        _GrapplingHookFrame();
-
-                       return true;
                }
-               METHOD(Hook, wr_init, bool(entity thiswep))
+               METHOD(Hook, wr_init, void(entity thiswep))
                {
                        HOOK_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
-                       return true;
                }
-               METHOD(Hook, wr_setup, bool(entity thiswep))
+               METHOD(Hook, wr_setup, void(entity thiswep))
                {
                        self.hook_state &= ~HOOK_WAITING_FOR_RELEASE;
-                       return true;
                }
                METHOD(Hook, wr_checkammo1, bool(entity thiswep))
                {
@@ -306,21 +297,19 @@ void W_Hook_Attack2(Weapon thiswep)
                        // infinite ammo for now
                        return true; // self.ammo_cells >= WEP_CVAR_SEC(hook, ammo); // WEAPONTODO: see above
                }
-               METHOD(Hook, wr_config, bool(entity thiswep))
+               METHOD(Hook, wr_config, void(entity thiswep))
                {
                        HOOK_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
-                       return true;
                }
-               METHOD(Hook, wr_resetplayer, bool(entity thiswep))
+               METHOD(Hook, wr_resetplayer, void(entity thiswep))
                {
                        self.hook_refire = time;
-                       return true;
                }
-               METHOD(Hook, wr_suicidemessage, bool(entity thiswep))
+               METHOD(Hook, wr_suicidemessage, int(entity thiswep))
                {
                        return false;
                }
-               METHOD(Hook, wr_killmessage, bool(entity thiswep))
+               METHOD(Hook, wr_killmessage, int(entity thiswep))
                {
                        return WEAPON_HOOK_MURDER;
                }
@@ -328,24 +317,13 @@ void W_Hook_Attack2(Weapon thiswep)
 #endif
 #ifdef CSQC
 
-               METHOD(Hook, wr_impacteffect, bool(entity thiswep))
+               METHOD(Hook, wr_impacteffect, void(entity thiswep))
                {
                        vector org2;
                        org2 = w_org + w_backoff * 2;
                        pointparticles(particleeffectnum(EFFECT_HOOK_EXPLODE), org2, '0 0 0', 1);
                        if(!w_issilent)
                                sound(self, CH_SHOTS, SND_HOOKBOMB_IMPACT, VOL_BASE, ATTN_NORM);
-
-                       return true;
-               }
-               METHOD(Hook, wr_init, bool(entity thiswep))
-               {
-                       return true;
-               }
-               METHOD(Hook, wr_zoomreticle, bool(entity thiswep))
-               {
-                       // no weapon specific image for this weapon
-                       return false;
                }
 
 #endif
index cc2d893c9bf7480305c433aec1b41d570dabc748..59c0f15b0a1a56f24cad7b8f04ec3fe2c6b427b7 100644 (file)
@@ -240,16 +240,14 @@ void W_MachineGun_Attack_Burst(Weapon thiswep, bool fire1, bool fire2)
 
 }
 
-               METHOD(MachineGun, wr_aim, bool(entity thiswep))
+               METHOD(MachineGun, wr_aim, void(entity thiswep))
                {
                        if(vlen(self.origin-self.enemy.origin) < 3000 - bound(0, skill, 10) * 200)
                                self.BUTTON_ATCK = bot_aim(1000000, 0, 0.001, false);
                        else
                                self.BUTTON_ATCK2 = bot_aim(1000000, 0, 0.001, false);
-
-                       return true;
                }
-               METHOD(MachineGun, wr_think, bool(entity thiswep, bool fire1, bool fire2))
+               METHOD(MachineGun, wr_think, void(entity thiswep, bool fire1, bool fire2))
                {
                        if(WEP_CVAR(machinegun, reload_ammo) && self.clip_load < min(max(WEP_CVAR(machinegun, sustained_ammo), WEP_CVAR(machinegun, first_ammo)), WEP_CVAR(machinegun, burst_ammo))) { // forced reload
                                Weapon w = get_weaponinfo(self.weapon);
@@ -273,7 +271,7 @@ void W_MachineGun_Attack_Burst(Weapon thiswep, bool fire1, bool fire2)
                                        {
                                                W_SwitchWeapon_Force(self, w_getbestweapon(self));
                                                w_ready(thiswep, fire1, fire2);
-                                               return false;
+                                               return;
                                        }
 
                                        W_DecreaseAmmo(thiswep, WEP_CVAR(machinegun, burst_ammo));
@@ -301,13 +299,10 @@ void W_MachineGun_Attack_Burst(Weapon thiswep, bool fire1, bool fire2)
                                        weapon_thinkf(WFRAME_FIRE2, WEP_CVAR(machinegun, first_refire), w_ready);
                                }
                        }
-
-                       return true;
                }
-               METHOD(MachineGun, wr_init, bool(entity thiswep))
+               METHOD(MachineGun, wr_init, void(entity thiswep))
                {
                        MACHINEGUN_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
-                       return true;
                }
                METHOD(MachineGun, wr_checkammo1, bool(entity thiswep))
                {
@@ -343,21 +338,19 @@ void W_MachineGun_Attack_Burst(Weapon thiswep, bool fire1, bool fire2)
                        }
                        return ammo_amount;
                }
-               METHOD(MachineGun, wr_config, bool(entity thiswep))
+               METHOD(MachineGun, wr_config, void(entity thiswep))
                {
                        MACHINEGUN_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
-                       return true;
                }
-               METHOD(MachineGun, wr_reload, bool(entity thiswep))
+               METHOD(MachineGun, wr_reload, void(entity thiswep))
                {
                        W_Reload(min(max(WEP_CVAR(machinegun, sustained_ammo), WEP_CVAR(machinegun, first_ammo)), WEP_CVAR(machinegun, burst_ammo)), SND(RELOAD));
-                       return true;
                }
-               METHOD(MachineGun, wr_suicidemessage, bool(entity thiswep))
+               METHOD(MachineGun, wr_suicidemessage, int(entity thiswep))
                {
                        return WEAPON_THINKING_WITH_PORTALS;
                }
-               METHOD(MachineGun, wr_killmessage, bool(entity thiswep))
+               METHOD(MachineGun, wr_killmessage, int(entity thiswep))
                {
                        if(w_deathtype & HITTYPE_SECONDARY)
                                return WEAPON_MACHINEGUN_MURDER_SNIPE;
@@ -368,7 +361,7 @@ void W_MachineGun_Attack_Burst(Weapon thiswep, bool fire1, bool fire2)
 #endif
 #ifdef CSQC
 
-               METHOD(MachineGun, wr_impacteffect, bool(entity thiswep))
+               METHOD(MachineGun, wr_impacteffect, void(entity thiswep))
                {
                        vector org2;
                        org2 = w_org + w_backoff * 2;
@@ -380,17 +373,6 @@ void W_MachineGun_Attack_Burst(Weapon thiswep, bool fire1, bool fire2)
                                        sound(self, CH_SHOTS, SND_RIC2, VOL_BASE, ATTN_NORM);
                                else if(w_random < 0.2)
                                        sound(self, CH_SHOTS, SND_RIC3, VOL_BASE, ATTN_NORM);
-
-                       return true;
-               }
-               METHOD(MachineGun, wr_init, bool(entity thiswep))
-               {
-                       return true;
-               }
-               METHOD(MachineGun, wr_zoomreticle, bool(entity thiswep))
-               {
-                       // no weapon specific image for this weapon
-                       return false;
                }
 
 #endif
index 0ecc4b73f45697c2143e694da12f71e6ea2a5734..0ca67ab9a98bfba6778a9ef97f8b988a30767e86 100644 (file)
@@ -401,7 +401,7 @@ float W_MineLayer_PlacedMines(float detonate)
        return minfound;
 }
 
-               METHOD(MineLayer, wr_aim, bool(entity thiswep))
+               METHOD(MineLayer, wr_aim, void(entity thiswep))
                {
                        // aim and decide to fire if appropriate
                        if(self.minelayer_mines >= WEP_CVAR(minelayer, limit))
@@ -498,10 +498,8 @@ float W_MineLayer_PlacedMines(float detonate)
                                //      dprint(ftos(desirabledamage),"\n");
                                if(self.BUTTON_ATCK2 == true) self.BUTTON_ATCK = false;
                        }
-
-                       return true;
                }
-               METHOD(MineLayer, wr_think, bool(entity thiswep, bool fire1, bool fire2))
+               METHOD(MineLayer, wr_think, void(entity thiswep, bool fire1, bool fire2))
                {
                        if(autocvar_g_balance_minelayer_reload_ammo && self.clip_load < WEP_CVAR(minelayer, ammo)) // forced reload
                        {
@@ -525,13 +523,10 @@ float W_MineLayer_PlacedMines(float detonate)
                                if(W_MineLayer_PlacedMines(true))
                                        sound(self, CH_WEAPON_B, SND_MINE_DET, VOL_BASE, ATTN_NORM);
                        }
-
-                       return true;
                }
-               METHOD(MineLayer, wr_init, bool(entity thiswep))
+               METHOD(MineLayer, wr_init, void(entity thiswep))
                {
                        MINELAYER_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
-                       return true;
                }
                METHOD(MineLayer, wr_checkammo1, bool(entity thiswep))
                {
@@ -551,26 +546,23 @@ float W_MineLayer_PlacedMines(float detonate)
                        else
                                return false;
                }
-               METHOD(MineLayer, wr_config, bool(entity thiswep))
+               METHOD(MineLayer, wr_config, void(entity thiswep))
                {
                        MINELAYER_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
-                       return true;
                }
-               METHOD(MineLayer, wr_resetplayers, bool(entity thiswep))
+               METHOD(MineLayer, wr_resetplayers, void(entity thiswep))
                {
                        self.minelayer_mines = 0;
-                       return true;
                }
-               METHOD(MineLayer, wr_reload, bool(entity thiswep))
+               METHOD(MineLayer, wr_reload, void(entity thiswep))
                {
                        W_Reload(WEP_CVAR(minelayer, ammo), SND(RELOAD));
-                       return true;
                }
-               METHOD(MineLayer, wr_suicidemessage, bool(entity thiswep))
+               METHOD(MineLayer, wr_suicidemessage, int(entity thiswep))
                {
                        return WEAPON_MINELAYER_SUICIDE;
                }
-               METHOD(MineLayer, wr_killmessage, bool(entity thiswep))
+               METHOD(MineLayer, wr_killmessage, int(entity thiswep))
                {
                        return WEAPON_MINELAYER_MURDER;
                }
@@ -578,24 +570,13 @@ float W_MineLayer_PlacedMines(float detonate)
 #endif
 #ifdef CSQC
 
-               METHOD(MineLayer, wr_impacteffect, bool(entity thiswep))
+               METHOD(MineLayer, wr_impacteffect, void(entity thiswep))
                {
                        vector org2;
                        org2 = w_org + w_backoff * 12;
                        pointparticles(particleeffectnum(EFFECT_ROCKET_EXPLODE), org2, '0 0 0', 1);
                        if(!w_issilent)
                                sound(self, CH_SHOTS, SND_MINE_EXP, VOL_BASE, ATTN_NORM);
-
-                       return true;
-               }
-               METHOD(MineLayer, wr_init, bool(entity thiswep))
-               {
-                       return true;
-               }
-               METHOD(MineLayer, wr_zoomreticle, bool(entity thiswep))
-               {
-                       // no weapon specific image for this weapon
-                       return false;
                }
 
 #endif
index 91533f790dd03259bc35dd9bb786d3a15c93e8e0..e4fef1b2720687ae5ac332ce3c39bab7e58d35ed 100644 (file)
@@ -297,7 +297,7 @@ void W_Mortar_Attack2(Weapon thiswep)
 
 .float bot_secondary_grenademooth;
 
-               METHOD(Mortar, wr_aim, bool(entity thiswep))
+               METHOD(Mortar, wr_aim, void(entity thiswep))
                {
                        self.BUTTON_ATCK = false;
                        self.BUTTON_ATCK2 = false;
@@ -317,8 +317,6 @@ void W_Mortar_Attack2(Weapon thiswep)
                                        if(random() < 0.02) self.bot_secondary_grenademooth = 0;
                                }
                        }
-
-                       return true;
                }
                /*case WR_CALCINFO:
                {
@@ -336,7 +334,7 @@ void W_Mortar_Attack2(Weapon thiswep)
                        wepinfo_sec_dps = (WEP_CVAR_SEC(mortar, damage) * (1 / max3(sys_frametime, WEP_CVAR_SEC(mortar, refire), WEP_CVAR_SEC(mortar, animtime))));
                        wepinfo_ter_dps = 0;
                        */
-               METHOD(Mortar, wr_think, bool(entity thiswep, bool fire1, bool fire2))
+               METHOD(Mortar, wr_think, void(entity thiswep, bool fire1, bool fire2))
                {
                        if(autocvar_g_balance_mortar_reload_ammo && self.clip_load < min(WEP_CVAR_PRI(mortar, ammo), WEP_CVAR_SEC(mortar, ammo))) { // forced reload
                                Weapon w = get_weaponinfo(self.weapon);
@@ -372,13 +370,10 @@ void W_Mortar_Attack2(Weapon thiswep)
                                        weapon_thinkf(WFRAME_FIRE2, WEP_CVAR_SEC(mortar, animtime), w_ready);
                                }
                        }
-
-                       return true;
                }
-               METHOD(Mortar, wr_init, bool(entity thiswep))
+               METHOD(Mortar, wr_init, void(entity thiswep))
                {
                        MORTAR_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
-                       return true;
                }
                METHOD(Mortar, wr_checkammo1, bool(entity thiswep))
                {
@@ -392,24 +387,22 @@ void W_Mortar_Attack2(Weapon thiswep)
                        ammo_amount += self.(weapon_load[WEP_MORTAR.m_id]) >= WEP_CVAR_SEC(mortar, ammo);
                        return ammo_amount;
                }
-               METHOD(Mortar, wr_config, bool(entity thiswep))
+               METHOD(Mortar, wr_config, void(entity thiswep))
                {
                        MORTAR_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
-                       return true;
                }
-               METHOD(Mortar, wr_reload, bool(entity thiswep))
+               METHOD(Mortar, wr_reload, void(entity thiswep))
                {
                        W_Reload(min(WEP_CVAR_PRI(mortar, ammo), WEP_CVAR_SEC(mortar, ammo)), SND(RELOAD)); // WEAPONTODO
-                       return true;
                }
-               METHOD(Mortar, wr_suicidemessage, bool(entity thiswep))
+               METHOD(Mortar, wr_suicidemessage, int(entity thiswep))
                {
                        if(w_deathtype & HITTYPE_SECONDARY)
                                return WEAPON_MORTAR_SUICIDE_BOUNCE;
                        else
                                return WEAPON_MORTAR_SUICIDE_EXPLODE;
                }
-               METHOD(Mortar, wr_killmessage, bool(entity thiswep))
+               METHOD(Mortar, wr_killmessage, int(entity thiswep))
                {
                        if(w_deathtype & HITTYPE_SECONDARY)
                                return WEAPON_MORTAR_MURDER_BOUNCE;
@@ -420,24 +413,13 @@ void W_Mortar_Attack2(Weapon thiswep)
 #endif
 #ifdef CSQC
 
-               METHOD(Mortar, wr_impacteffect, bool(entity thiswep))
+               METHOD(Mortar, wr_impacteffect, void(entity thiswep))
                {
                        vector org2;
                        org2 = w_org + w_backoff * 12;
                        pointparticles(particleeffectnum(EFFECT_GRENADE_EXPLODE), org2, '0 0 0', 1);
                        if(!w_issilent)
                                sound(self, CH_SHOTS, SND_GRENADE_IMPACT, VOL_BASE, ATTN_NORM);
-
-                       return true;
-               }
-               METHOD(Mortar, wr_init, bool(entity thiswep))
-               {
-                       return true;
-               }
-               METHOD(Mortar, wr_zoomreticle, bool(entity thiswep))
-               {
-                       // no weapon specific image for this weapon
-                       return false;
                }
 
 #endif
index 26edade48cf7c8831f294779a502b2e5e7667c05..cfc14694482e13fe15e2618a392c3e57938f06b7 100644 (file)
@@ -285,7 +285,7 @@ void W_Porto_Attack(float type)
        MUTATOR_CALLHOOK(EditProjectile, self, gren);
 }
 
-               METHOD(PortoLaunch, wr_aim, bool(entity thiswep))
+               METHOD(PortoLaunch, wr_aim, void(entity thiswep))
                {
                        SELFPARAM();
                        self.BUTTON_ATCK = false;
@@ -293,15 +293,12 @@ void W_Porto_Attack(float type)
                        if(!WEP_CVAR(porto, secondary))
                                if(bot_aim(WEP_CVAR_PRI(porto, speed), 0, WEP_CVAR_PRI(porto, lifetime), false))
                                        self.BUTTON_ATCK = true;
-
-                       return true;
                }
-               METHOD(PortoLaunch, wr_config, bool(entity this))
+               METHOD(PortoLaunch, wr_config, void(entity this))
                {
                        PORTO_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
-                       return true;
                }
-               METHOD(PortoLaunch, wr_think, bool(entity thiswep, bool fire1, bool fire2))
+               METHOD(PortoLaunch, wr_think, void(entity thiswep, bool fire1, bool fire2))
                {
                        SELFPARAM();
                        if(WEP_CVAR(porto, secondary))
@@ -357,8 +354,6 @@ void W_Porto_Attack(float type)
                                        weapon_thinkf(WFRAME_FIRE1, WEP_CVAR_PRI(porto, animtime), w_ready);
                                }
                        }
-
-                       return true;
                }
                METHOD(PortoLaunch, wr_checkammo1, bool(entity this))
                {
@@ -370,36 +365,24 @@ void W_Porto_Attack(float type)
                        // always allow infinite ammo
                        return true;
                }
-               METHOD(PortoLaunch, wr_init, bool(entity this))
+               METHOD(PortoLaunch, wr_init, void(entity this))
                {
                        PORTO_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
-                       return true;
                }
-               METHOD(PortoLaunch, wr_setup, bool(entity thiswep))
+               METHOD(PortoLaunch, wr_setup, void(entity thiswep))
                {
                        SELFPARAM();
                        self.ammo_field = ammo_none;
-                       return true;
                }
-               METHOD(PortoLaunch, wr_resetplayer, bool(entity thiswep))
+               METHOD(PortoLaunch, wr_resetplayer, void(entity thiswep))
                {
                        SELFPARAM();
                        self.porto_current = world;
-                       return true;
                }
 #endif
 #ifdef CSQC
-               METHOD(PortoLaunch, wr_impacteffect, bool(entity this)) {
+               METHOD(PortoLaunch, wr_impacteffect, void(entity this)) {
                        LOG_WARNING("Since when does Porto send DamageInfo?\n");
-                       return true;
-               }
-               METHOD(PortoLaunch, wr_init, bool(entity this)) {
-                       // nothing to do
-                       return true;
-               }
-               METHOD(PortoLaunch, wr_zoomreticle, bool(entity this)) {
-                       // no weapon specific image for this weapon
-                       return false;
                }
 #endif
 #endif
index 5a438e0b8da1e933f3d47f11482a7bc0a70c82ee..8d57cd3397c919821c79f7c2cf7192257fdc7eed 100644 (file)
@@ -137,7 +137,7 @@ void W_Rifle_BulletHail(float mode, void(void) AttackFunc, float fr, float animt
 
 .float bot_secondary_riflemooth;
 
-               METHOD(Rifle, wr_aim, bool(entity thiswep))
+               METHOD(Rifle, wr_aim, void(entity thiswep))
                {
                        self.BUTTON_ATCK=false;
                        self.BUTTON_ATCK2=false;
@@ -159,10 +159,8 @@ void W_Rifle_BulletHail(float mode, void(void) AttackFunc, float fr, float animt
                                        if(random() < 0.03) self.bot_secondary_riflemooth = 0;
                                }
                        }
-
-                       return true;
                }
-               METHOD(Rifle, wr_think, bool(entity thiswep, bool fire1, bool fire2))
+               METHOD(Rifle, wr_think, void(entity thiswep, bool fire1, bool fire2))
                {
                        if(autocvar_g_balance_rifle_reload_ammo && self.clip_load < min(WEP_CVAR_PRI(rifle, ammo), WEP_CVAR_SEC(rifle, ammo))) { // forced reload
                                Weapon w = get_weaponinfo(self.weapon);
@@ -198,13 +196,10 @@ void W_Rifle_BulletHail(float mode, void(void) AttackFunc, float fr, float animt
                                        }
                                }
                        }
-
-                       return true;
                }
-               METHOD(Rifle, wr_init, bool(entity thiswep))
+               METHOD(Rifle, wr_init, void(entity thiswep))
                {
                        RIFLE_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
-                       return true;
                }
                METHOD(Rifle, wr_checkammo1, bool(entity thiswep))
                {
@@ -218,26 +213,23 @@ void W_Rifle_BulletHail(float mode, void(void) AttackFunc, float fr, float animt
                        ammo_amount += self.(weapon_load[WEP_RIFLE.m_id]) >= WEP_CVAR_SEC(rifle, ammo);
                        return ammo_amount;
                }
-               METHOD(Rifle, wr_config, bool(entity thiswep))
+               METHOD(Rifle, wr_config, void(entity thiswep))
                {
                        RIFLE_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
-                       return true;
                }
-               METHOD(Rifle, wr_resetplayer, bool(entity thiswep))
+               METHOD(Rifle, wr_resetplayer, void(entity thiswep))
                {
                        self.rifle_accumulator = time - WEP_CVAR(rifle, bursttime);
-                       return true;
                }
-               METHOD(Rifle, wr_reload, bool(entity thiswep))
+               METHOD(Rifle, wr_reload, void(entity thiswep))
                {
                        W_Reload(min(WEP_CVAR_PRI(rifle, ammo), WEP_CVAR_SEC(rifle, ammo)), SND(RELOAD));
-                       return true;
                }
-               METHOD(Rifle, wr_suicidemessage, bool(entity thiswep))
+               METHOD(Rifle, wr_suicidemessage, int(entity thiswep))
                {
                        return WEAPON_THINKING_WITH_PORTALS;
                }
-               METHOD(Rifle, wr_killmessage, bool(entity thiswep))
+               METHOD(Rifle, wr_killmessage, int(entity thiswep))
                {
                        if(w_deathtype & HITTYPE_SECONDARY)
                        {
@@ -258,7 +250,7 @@ void W_Rifle_BulletHail(float mode, void(void) AttackFunc, float fr, float animt
 #endif
 #ifdef CSQC
 
-               METHOD(Rifle, wr_impacteffect, bool(entity thiswep))
+               METHOD(Rifle, wr_impacteffect, void(entity thiswep))
                {
                        vector org2;
                        org2 = w_org + w_backoff * 2;
@@ -272,16 +264,13 @@ void W_Rifle_BulletHail(float mode, void(void) AttackFunc, float fr, float animt
                                else if(w_random < 0.5)
                                        sound(self, CH_SHOTS, SND_RIC3, VOL_BASE, ATTN_NORM);
                        }
-
-                       return true;
                }
-               METHOD(Rifle, wr_init, bool(entity thiswep))
+               METHOD(Rifle, wr_init, void(entity thiswep))
                {
                        if(autocvar_cl_reticle && autocvar_cl_reticle_weapon)
                        {
                                precache_pic("gfx/reticle_nex");
                        }
-                       return true;
                }
                METHOD(Rifle, wr_zoomreticle, bool(entity thiswep))
                {
index d18b268878d5516f7c18ef82402d34827e28c233..cce7cebaa05305b890c13f0a4f8b225eb92a5f5f 100644 (file)
@@ -149,12 +149,11 @@ void W_RocketPropelledChainsaw_Attack (Weapon thiswep)
        MUTATOR_CALLHOOK(EditProjectile, self, missile);
 }
 
-               METHOD(RocketPropelledChainsaw, wr_aim, bool(entity thiswep))
+               METHOD(RocketPropelledChainsaw, wr_aim, void(entity thiswep))
                {
                        self.BUTTON_ATCK = bot_aim(WEP_CVAR(rpc, speed), 0, WEP_CVAR(rpc, lifetime), false);
-                       return true;
                }
-               METHOD(RocketPropelledChainsaw, wr_think, bool(entity thiswep, bool fire1, bool fire2))
+               METHOD(RocketPropelledChainsaw, wr_think, void(entity thiswep, bool fire1, bool fire2))
                {
                        if(WEP_CVAR(rpc, reload_ammo) && self.clip_load < WEP_CVAR(rpc, ammo)) {
                                Weapon w = get_weaponinfo(self.weapon);
@@ -175,13 +174,10 @@ void W_RocketPropelledChainsaw_Attack (Weapon thiswep)
                                        // to-do
                                }
                        }
-
-                       return true;
                }
-               METHOD(RocketPropelledChainsaw, wr_init, bool(entity thiswep))
+               METHOD(RocketPropelledChainsaw, wr_init, void(entity thiswep))
                {
                        RPC_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
-                       return true;
                }
                METHOD(RocketPropelledChainsaw, wr_checkammo1, bool(entity thiswep))
                {
@@ -193,24 +189,22 @@ void W_RocketPropelledChainsaw_Attack (Weapon thiswep)
                {
                        return false;
                }
-               METHOD(RocketPropelledChainsaw, wr_config, bool(entity thiswep))
+               METHOD(RocketPropelledChainsaw, wr_config, void(entity thiswep))
                {
                        RPC_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
-                       return true;
                }
-               METHOD(RocketPropelledChainsaw, wr_reload, bool(entity thiswep))
+               METHOD(RocketPropelledChainsaw, wr_reload, void(entity thiswep))
                {
                        W_Reload(WEP_CVAR(rpc, ammo), SND(RELOAD));
-                       return true;
                }
-               METHOD(RocketPropelledChainsaw, wr_suicidemessage, bool(entity thiswep))
+               METHOD(RocketPropelledChainsaw, wr_suicidemessage, int(entity thiswep))
                {
                        if((w_deathtype & HITTYPE_BOUNCE) || (w_deathtype & HITTYPE_SPLASH))
                                return WEAPON_RPC_SUICIDE_SPLASH;
                        else
                                return WEAPON_RPC_SUICIDE_DIRECT;
                }
-               METHOD(RocketPropelledChainsaw, wr_killmessage, bool(entity thiswep))
+               METHOD(RocketPropelledChainsaw, wr_killmessage, int(entity thiswep))
                {
                        if(w_deathtype & HITTYPE_SECONDARY)
                                return WEAPON_BLASTER_MURDER;
@@ -224,24 +218,13 @@ void W_RocketPropelledChainsaw_Attack (Weapon thiswep)
 
 #ifdef CSQC
 
-               METHOD(RocketPropelledChainsaw, wr_impacteffect, bool(entity thiswep))
+               METHOD(RocketPropelledChainsaw, wr_impacteffect, void(entity thiswep))
                {
                        vector org2;
                        org2 = w_org + w_backoff * 12;
                        pointparticles(particleeffectnum(EFFECT_ROCKET_EXPLODE), org2, '0 0 0', 1);
                        if(!w_issilent)
                                sound(self, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_NORM);
-
-                       return true;
-               }
-               METHOD(RocketPropelledChainsaw, wr_init, bool(entity thiswep))
-               {
-                       return true;
-               }
-               METHOD(RocketPropelledChainsaw, wr_zoomreticle, bool(entity thiswep))
-               {
-                       // no weapon specific image for this weapon
-                       return false;
                }
 
 #endif
index e551485dc0c77a3908a5b8f38fc9e7289c04aca7..24cb325d64dd6744181f6a4de097212a89874b4d 100644 (file)
@@ -598,7 +598,7 @@ void W_Seeker_Fire_Tag(Weapon thiswep)
 // Begin: Genereal weapon functions
 // ============================
 
-               METHOD(Seeker, wr_aim, bool(entity thiswep))
+               METHOD(Seeker, wr_aim, void(entity thiswep))
                {
                        if(WEP_CVAR(seeker, type) == 1)
                                if(W_Seeker_Tagged_Info(self, self.enemy) != world)
@@ -607,9 +607,8 @@ void W_Seeker_Fire_Tag(Weapon thiswep)
                                        self.BUTTON_ATCK2 = bot_aim(WEP_CVAR(seeker, tag_speed), 0, WEP_CVAR(seeker, tag_lifetime), false);
                        else
                                self.BUTTON_ATCK = bot_aim(WEP_CVAR(seeker, tag_speed), 0, WEP_CVAR(seeker, tag_lifetime), false);
-                       return true;
                }
-               METHOD(Seeker, wr_think, bool(entity thiswep, bool fire1, bool fire2))
+               METHOD(Seeker, wr_think, void(entity thiswep, bool fire1, bool fire2))
                {
                        if(autocvar_g_balance_seeker_reload_ammo && self.clip_load < min(WEP_CVAR(seeker, missile_ammo), WEP_CVAR(seeker, tag_ammo))) { // forced reload
                                Weapon w = get_weaponinfo(self.weapon);
@@ -653,13 +652,10 @@ void W_Seeker_Fire_Tag(Weapon thiswep)
                                        }
                                }
                        }
-
-                       return true;
                }
-               METHOD(Seeker, wr_init, bool(entity thiswep))
+               METHOD(Seeker, wr_init, void(entity thiswep))
                {
                        SEEKER_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
-                       return true;
                }
                METHOD(Seeker, wr_checkammo1, bool(entity thiswep))
                {
@@ -691,21 +687,19 @@ void W_Seeker_Fire_Tag(Weapon thiswep)
                        }
                        return ammo_amount;
                }
-               METHOD(Seeker, wr_config, bool(entity thiswep))
+               METHOD(Seeker, wr_config, void(entity thiswep))
                {
                        SEEKER_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
-                       return true;
                }
-               METHOD(Seeker, wr_reload, bool(entity thiswep))
+               METHOD(Seeker, wr_reload, void(entity thiswep))
                {
                        W_Reload(min(WEP_CVAR(seeker, missile_ammo), WEP_CVAR(seeker, tag_ammo)), SND(RELOAD));
-                       return true;
                }
-               METHOD(Seeker, wr_suicidemessage, bool(entity thiswep))
+               METHOD(Seeker, wr_suicidemessage, int(entity thiswep))
                {
                        return WEAPON_SEEKER_SUICIDE;
                }
-               METHOD(Seeker, wr_killmessage, bool(entity thiswep))
+               METHOD(Seeker, wr_killmessage, int(entity thiswep))
                {
                        if(w_deathtype & HITTYPE_SECONDARY)
                                return WEAPON_SEEKER_MURDER_TAG;
@@ -716,7 +710,7 @@ void W_Seeker_Fire_Tag(Weapon thiswep)
 #endif
 #ifdef CSQC
 
-               METHOD(Seeker, wr_impacteffect, bool(entity thiswep))
+               METHOD(Seeker, wr_impacteffect, void(entity thiswep))
                {
                        vector org2;
                        org2 = w_org + w_backoff * 6;
@@ -754,16 +748,6 @@ void W_Seeker_Fire_Tag(Weapon thiswep)
                                                sound(self, CH_SHOTS, SND_SEEKEREXP3, 1, ATTEN_NORM);
                                }
                        }
-                       return true;
-               }
-               METHOD(Seeker, wr_init, bool(entity thiswep))
-               {
-                       return true;
-               }
-               METHOD(Seeker, wr_zoomreticle, bool(entity thiswep))
-               {
-                       // no weapon specific image for this weapon
-                       return false;
                }
 
 #endif
index bbe579bd55414a3dcb944cedddc7d6aace0c40f8..0755adcf679953156405586d0076c64c87c33718 100644 (file)
@@ -668,16 +668,14 @@ void W_Shockwave_Attack(void)
        }
 }
 
-               METHOD(Shockwave, wr_aim, bool(entity thiswep))
+               METHOD(Shockwave, wr_aim, void(entity thiswep))
                {
                        if(vlen(self.origin - self.enemy.origin) <= WEP_CVAR(shockwave, melee_range))
                                { self.BUTTON_ATCK2 = bot_aim(1000000, 0, 0.001, false); }
                        else
                                { self.BUTTON_ATCK = bot_aim(1000000, 0, 0.001, false); }
-
-                       return true;
                }
-               METHOD(Shockwave, wr_think, bool(entity thiswep, bool fire1, bool fire2))
+               METHOD(Shockwave, wr_think, void(entity thiswep, bool fire1, bool fire2))
                {
                        if(fire1)
                        {
@@ -701,13 +699,10 @@ void W_Shockwave_Attack(void)
                                        weapon_thinkf(WFRAME_FIRE1, 0, W_Shockwave_Melee);
                                }
                        }
-
-                       return true;
                }
-               METHOD(Shockwave, wr_init, bool(entity thiswep))
+               METHOD(Shockwave, wr_init, void(entity thiswep))
                {
                        SHOCKWAVE_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
-                       return true;
                }
                METHOD(Shockwave, wr_checkammo1, bool(entity thiswep))
                {
@@ -718,16 +713,15 @@ void W_Shockwave_Attack(void)
                        // shockwave has infinite ammo
                        return true;
                }
-               METHOD(Shockwave, wr_config, bool(entity thiswep))
+               METHOD(Shockwave, wr_config, void(entity thiswep))
                {
                        SHOCKWAVE_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
-                       return true;
                }
-               METHOD(Shockwave, wr_suicidemessage, bool(entity thiswep))
+               METHOD(Shockwave, wr_suicidemessage, int(entity thiswep))
                {
                        return WEAPON_THINKING_WITH_PORTALS;
                }
-               METHOD(Shockwave, wr_killmessage, bool(entity thiswep))
+               METHOD(Shockwave, wr_killmessage, int(entity thiswep))
                {
                        if(w_deathtype & HITTYPE_SECONDARY)
                                return WEAPON_SHOCKWAVE_MURDER_SLAP;
@@ -857,22 +851,12 @@ void Net_ReadShockwaveParticle(void)
        shockwave.sw_time = time;
 }
 
-               METHOD(Shockwave, wr_impacteffect, bool(entity thiswep))
+               METHOD(Shockwave, wr_impacteffect, void(entity thiswep))
                {
                        // handled by Net_ReadShockwaveParticle
                        //vector org2;
                        //org2 = w_org + w_backoff * 2;
                        //pointparticles(particleeffectnum(EFFECT_BLASTER_IMPACT), org2, w_backoff * 1000, 1);
-                       return false;
-               }
-               METHOD(Shockwave, wr_init, bool(entity thiswep))
-               {
-                       return false;
-               }
-               METHOD(Shockwave, wr_zoomreticle, bool(entity thiswep))
-               {
-                       // no weapon specific image for this weapon
-                       return false;
                }
 
 #endif
index c634fe6637c490e6a41e8f80af30b0b17ec86de4..7f5ef5728bf7fcb874648106cfb8a407104ae12e 100644 (file)
@@ -227,16 +227,14 @@ void W_Shotgun_Attack3_Frame1(Weapon thiswep, bool fire1, bool fire2)
 
 .float shotgun_primarytime;
 
-               METHOD(Shotgun, wr_aim, bool(entity thiswep))
+               METHOD(Shotgun, wr_aim, void(entity thiswep))
                {
                        if(vlen(self.origin-self.enemy.origin) <= WEP_CVAR_SEC(shotgun, melee_range))
                                self.BUTTON_ATCK2 = bot_aim(1000000, 0, 0.001, false);
                        else
                                self.BUTTON_ATCK = bot_aim(1000000, 0, 0.001, false);
-
-                       return true;
                }
-               METHOD(Shotgun, wr_think, bool(entity thiswep, bool fire1, bool fire2))
+               METHOD(Shotgun, wr_think, void(entity thiswep, bool fire1, bool fire2))
                {
                        if(WEP_CVAR(shotgun, reload_ammo) && self.clip_load < WEP_CVAR_PRI(shotgun, ammo)) // forced reload
                        {
@@ -282,18 +280,14 @@ void W_Shotgun_Attack3_Frame1(Weapon thiswep, bool fire1, bool fire2)
                                // attempt forcing playback of the anim by switching to another anim (that we never play) here...
                                weapon_thinkf(WFRAME_FIRE1, 0, W_Shotgun_Attack2);
                        }
-
-                       return true;
                }
-               METHOD(Shotgun, wr_init, bool(entity thiswep))
+               METHOD(Shotgun, wr_init, void(entity thiswep))
                {
                        SHOTGUN_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
-                       return true;
                }
-               METHOD(Shotgun, wr_setup, bool(entity thiswep))
+               METHOD(Shotgun, wr_setup, void(entity thiswep))
                {
                        self.ammo_field = ammo_none;
-                       return true;
                }
                METHOD(Shotgun, wr_checkammo1, bool(entity thiswep))
                {
@@ -318,21 +312,19 @@ void W_Shotgun_Attack3_Frame1(Weapon thiswep, bool fire1, bool fire2)
                                default: return false; // secondary unavailable
                        }
                }
-               METHOD(Shotgun, wr_config, bool(entity thiswep))
+               METHOD(Shotgun, wr_config, void(entity thiswep))
                {
                        SHOTGUN_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
-                       return true;
                }
-               METHOD(Shotgun, wr_reload, bool(entity thiswep))
+               METHOD(Shotgun, wr_reload, void(entity thiswep))
                {
                        W_Reload(WEP_CVAR_PRI(shotgun, ammo), SND(RELOAD)); // WEAPONTODO
-                       return true;
                }
-               METHOD(Shotgun, wr_suicidemessage, bool(entity thiswep))
+               METHOD(Shotgun, wr_suicidemessage, int(entity thiswep))
                {
                        return WEAPON_THINKING_WITH_PORTALS;
                }
-               METHOD(Shotgun, wr_killmessage, bool(entity thiswep))
+               METHOD(Shotgun, wr_killmessage, int(entity thiswep))
                {
                        if(w_deathtype & HITTYPE_SECONDARY)
                                return WEAPON_SHOTGUN_MURDER_SLAP;
@@ -344,10 +336,9 @@ void W_Shotgun_Attack3_Frame1(Weapon thiswep, bool fire1, bool fire2)
 #ifdef CSQC
 .float prevric;
 
-               METHOD(Shotgun, wr_impacteffect, bool(entity thiswep))
+               METHOD(Shotgun, wr_impacteffect, void(entity thiswep))
                {
-                       vector org2;
-                       org2 = w_org + w_backoff * 2;
+                       vector org2 = w_org + w_backoff * 2;
                        pointparticles(particleeffectnum(EFFECT_SHOTGUN_IMPACT), org2, w_backoff * 1000, 1);
                        if(!w_issilent && time - self.prevric > 0.25)
                        {
@@ -359,17 +350,6 @@ void W_Shotgun_Attack3_Frame1(Weapon thiswep, bool fire1, bool fire2)
                                        sound(self, CH_SHOTS, SND_RIC3, VOL_BASE, ATTEN_NORM);
                                self.prevric = time;
                        }
-
-                       return true;
-               }
-               METHOD(Shotgun, wr_init, bool(entity thiswep))
-               {
-                       return true;
-               }
-               METHOD(Shotgun, wr_zoomreticle, bool(entity thiswep))
-               {
-                       // no weapon specific image for this weapon
-                       return false;
                }
 
 #endif
index 21fa7a6f5cf49a6b1f95323d5a6c6f6dac347897..60b9ec6ac388acffa5330092b3ee1a6c13bfe12c 100644 (file)
@@ -367,7 +367,7 @@ void W_Tuba_NoteOn(float hittype)
        }
 }
 
-               METHOD(Tuba, wr_aim, bool(entity thiswep))
+               METHOD(Tuba, wr_aim, void(entity thiswep))
                {
                        // bots cannot play the Tuba well yet
                        // I think they should start with the recorder first
@@ -378,10 +378,8 @@ void W_Tuba_NoteOn(float hittype)
                                else
                                        self.BUTTON_ATCK2 = 1;
                        }
-
-                       return true;
                }
-               METHOD(Tuba, wr_think, bool(entity thiswep, bool fire1, bool fire2))
+               METHOD(Tuba, wr_think, void(entity thiswep, bool fire1, bool fire2))
                {
                        if(fire1)
                        if(weapon_prepareattack(false, WEP_CVAR(tuba, refire)))
@@ -404,21 +402,17 @@ void W_Tuba_NoteOn(float hittype)
                                        WITH(entity, self, self.tuba_note, W_Tuba_NoteOff());
                                }
                        }
-
-                       return true;
                }
-               METHOD(Tuba, wr_init, bool(entity thiswep))
+               METHOD(Tuba, wr_init, void(entity thiswep))
                {
                        TUBA_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
-                       return true;
                }
-               METHOD(Tuba, wr_setup, bool(entity thiswep))
+               METHOD(Tuba, wr_setup, void(entity thiswep))
                {
                        self.ammo_field = ammo_none;
                        self.tuba_instrument = 0;
-                       return true;
                }
-               METHOD(Tuba, wr_reload, bool(entity thiswep))
+               METHOD(Tuba, wr_reload, void(entity thiswep))
                {
                        // switch to alternate instruments :)
                        if(self.weaponentity.state == WS_READY)
@@ -443,8 +437,6 @@ void W_Tuba_NoteOn(float hittype)
                                self.weaponentity.state = WS_INUSE;
                                weapon_thinkf(WFRAME_RELOAD, 0.5, w_ready);
                        }
-
-                       return true;
                }
                METHOD(Tuba, wr_checkammo1, bool(entity thiswep))
                {
@@ -454,12 +446,11 @@ void W_Tuba_NoteOn(float hittype)
                {
                        return true; // tuba has infinite ammo
                }
-               METHOD(Tuba, wr_config, bool(entity thiswep))
+               METHOD(Tuba, wr_config, void(entity thiswep))
                {
                        TUBA_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
-                       return true;
                }
-               METHOD(Tuba, wr_suicidemessage, bool(entity thiswep))
+               METHOD(Tuba, wr_suicidemessage, int(entity thiswep))
                {
                        if(w_deathtype & HITTYPE_BOUNCE)
                                return WEAPON_KLEINBOTTLE_SUICIDE;
@@ -468,7 +459,7 @@ void W_Tuba_NoteOn(float hittype)
                        else
                                return WEAPON_TUBA_SUICIDE;
                }
-               METHOD(Tuba, wr_killmessage, bool(entity thiswep))
+               METHOD(Tuba, wr_killmessage, int(entity thiswep))
                {
                        if(w_deathtype & HITTYPE_BOUNCE)
                                return WEAPON_KLEINBOTTLE_MURDER;
@@ -478,14 +469,5 @@ void W_Tuba_NoteOn(float hittype)
                                return WEAPON_TUBA_MURDER;
                }
 
-#endif
-#ifdef CSQC
-
-               METHOD(Tuba, wr_zoomreticle, bool(entity thiswep))
-               {
-                       // no weapon specific image for this weapon
-                       return false;
-               }
-
 #endif
 #endif
index aeb9125108a9b4a74c8e9f5db13258c9b0a9b6d2..bb0283c669e2ad65e917b4cf31ba57aa6329b8d8 100644 (file)
@@ -237,16 +237,14 @@ void W_RocketMinsta_Attack3 (void)
     }
 }
 
-               METHOD(Vaporizer, wr_aim, bool(entity thiswep))
+               METHOD(Vaporizer, wr_aim, void(entity thiswep))
                {
                        if(self.WEP_AMMO(VAPORIZER) > 0)
                                self.BUTTON_ATCK = bot_aim(1000000, 0, 1, false);
                        else
                                self.BUTTON_ATCK2 = bot_aim(WEP_CVAR_SEC(vaporizer, speed), 0, WEP_CVAR_SEC(vaporizer, lifetime), false); // WEAPONTODO: replace with proper vaporizer cvars
-
-                       return true;
                }
-               METHOD(Vaporizer, wr_think, bool(entity thiswep, bool fire1, bool fire2))
+               METHOD(Vaporizer, wr_think, void(entity thiswep, bool fire1, bool fire2))
                {
                        float vaporizer_ammo = ((g_instagib) ? 1 : WEP_CVAR_PRI(vaporizer, ammo));
                        // if the laser uses load, we also consider its ammo for reloading
@@ -320,20 +318,16 @@ void W_RocketMinsta_Attack3 (void)
                        }
                        else
                                self.held_down = false;
-
-                       return true;
                }
-               METHOD(Vaporizer, wr_init, bool(entity thiswep))
+               METHOD(Vaporizer, wr_init, void(entity thiswep))
                {
                        //W_Blaster(WR_INIT); // Samual: Is this really the proper thing to do? Didn't we already run this previously?
                        VAPORIZER_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
-                       return true;
                }
-               METHOD(Vaporizer, wr_setup, bool(entity thiswep))
+               METHOD(Vaporizer, wr_setup, void(entity thiswep))
                {
                        self.ammo_field = WEP_AMMO(VAPORIZER);
                        self.vaporizer_lasthit = 0;
-                       return true;
                }
                METHOD(Vaporizer, wr_checkammo1, bool(entity thiswep))
                {
@@ -350,17 +344,15 @@ void W_RocketMinsta_Attack3 (void)
                        ammo_amount += self.(weapon_load[WEP_VAPORIZER.m_id]) >= WEP_CVAR_SEC(vaporizer, ammo);
                        return ammo_amount;
                }
-               METHOD(Vaporizer, wr_config, bool(entity thiswep))
+               METHOD(Vaporizer, wr_config, void(entity thiswep))
                {
                        VAPORIZER_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
-                       return true;
                }
-               METHOD(Vaporizer, wr_resetplayer, bool(entity thiswep))
+               METHOD(Vaporizer, wr_resetplayer, void(entity thiswep))
                {
                        self.vaporizer_lasthit = 0;
-                       return true;
                }
-               METHOD(Vaporizer, wr_reload, bool(entity thiswep))
+               METHOD(Vaporizer, wr_reload, void(entity thiswep))
                {
                        float vaporizer_ammo = ((g_instagib) ? 1 : WEP_CVAR_PRI(vaporizer, ammo));
                        float used_ammo;
@@ -370,13 +362,12 @@ void W_RocketMinsta_Attack3 (void)
                                used_ammo = vaporizer_ammo;
 
                        W_Reload(used_ammo, SND(RELOAD));
-                       return true;
                }
-               METHOD(Vaporizer, wr_suicidemessage, bool(entity thiswep))
+               METHOD(Vaporizer, wr_suicidemessage, int(entity thiswep))
                {
                        return WEAPON_THINKING_WITH_PORTALS;
                }
-               METHOD(Vaporizer, wr_killmessage, bool(entity thiswep))
+               METHOD(Vaporizer, wr_killmessage, int(entity thiswep))
                {
                        return WEAPON_VAPORIZER_MURDER;
                }
@@ -384,7 +375,7 @@ void W_RocketMinsta_Attack3 (void)
 #endif
 #ifdef CSQC
 
-               METHOD(Vaporizer, wr_impacteffect, bool(entity thiswep))
+               METHOD(Vaporizer, wr_impacteffect, void(entity thiswep))
                {
                        vector org2 = w_org + w_backoff * 6;
                        if(w_deathtype & HITTYPE_SECONDARY)
@@ -397,15 +388,13 @@ void W_RocketMinsta_Attack3 (void)
                                pointparticles(particleeffectnum(EFFECT_VORTEX_IMPACT), org2, '0 0 0', 1);
                                if(!w_issilent) { sound(self, CH_SHOTS, SND_NEXIMPACT, VOL_BASE, ATTN_NORM); }
                        }
-                       return true;
                }
-               METHOD(Vaporizer, wr_init, bool(entity thiswep))
+               METHOD(Vaporizer, wr_init, void(entity thiswep))
                {
                        if(autocvar_cl_reticle && autocvar_cl_reticle_weapon)
                        {
                                precache_pic("gfx/reticle_nex");
                        }
-                       return true;
                }
                METHOD(Vaporizer, wr_zoomreticle, bool(entity thiswep))
                {
index 0ed6aa85cb0fb9fa4dfa33b2350ef4942de08f8a..15c10caee334a78b53712f5f9fd4acbe73fc6c65 100644 (file)
@@ -133,7 +133,7 @@ void W_Vortex_Attack(Weapon thiswep, float issecondary)
 
 .float vortex_chargepool_pauseregen_finished;
 
-               METHOD(Vortex, wr_aim, bool(entity thiswep))
+               METHOD(Vortex, wr_aim, void(entity thiswep))
                {
                        if(bot_aim(1000000, 0, 1, false))
                                self.BUTTON_ATCK = true;
@@ -142,9 +142,8 @@ void W_Vortex_Attack(Weapon thiswep, float issecondary)
                                if(WEP_CVAR(vortex, charge))
                                        self.BUTTON_ATCK2 = true;
                        }
-                       return true;
                }
-               METHOD(Vortex, wr_think, bool(entity thiswep, bool fire1, bool fire2))
+               METHOD(Vortex, wr_think, void(entity thiswep, bool fire1, bool fire2))
                {
                        if(WEP_CVAR(vortex, charge) && self.vortex_charge < WEP_CVAR(vortex, charge_limit))
                                self.vortex_charge = min(1, self.vortex_charge + WEP_CVAR(vortex, charge_rate) * frametime / W_TICSPERFRAME);
@@ -244,18 +243,14 @@ void W_Vortex_Attack(Weapon thiswep, float issecondary)
                                        }
                                }
                        }
-
-                       return true;
                }
-               METHOD(Vortex, wr_init, bool(entity thiswep))
+               METHOD(Vortex, wr_init, void(entity thiswep))
                {
                        VORTEX_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP);
-                       return true;
                }
-               METHOD(Vortex, wr_setup, bool(entity thiswep))
+               METHOD(Vortex, wr_setup, void(entity thiswep))
                {
                        self.vortex_lasthit = 0;
-                       return true;
                }
                METHOD(Vortex, wr_checkammo1, bool(entity thiswep))
                {
@@ -277,26 +272,23 @@ void W_Vortex_Attack(Weapon thiswep, float issecondary)
                                return false; // zoom is not a fire mode
                        }
                }
-               METHOD(Vortex, wr_config, bool(entity thiswep))
+               METHOD(Vortex, wr_config, void(entity thiswep))
                {
                        VORTEX_SETTINGS(WEP_CONFIG_WRITE_CVARS, WEP_CONFIG_WRITE_PROPS);
-                       return true;
                }
-               METHOD(Vortex, wr_resetplayer, bool(entity thiswep))
+               METHOD(Vortex, wr_resetplayer, void(entity thiswep))
                {
                        self.vortex_lasthit = 0;
-                       return true;
                }
-               METHOD(Vortex, wr_reload, bool(entity thiswep))
+               METHOD(Vortex, wr_reload, void(entity thiswep))
                {
                        W_Reload(min(WEP_CVAR_PRI(vortex, ammo), WEP_CVAR_SEC(vortex, ammo)), SND(RELOAD));
-                       return true;
                }
-               METHOD(Vortex, wr_suicidemessage, bool(entity thiswep))
+               METHOD(Vortex, wr_suicidemessage, int(entity thiswep))
                {
                        return WEAPON_THINKING_WITH_PORTALS;
                }
-               METHOD(Vortex, wr_killmessage, bool(entity thiswep))
+               METHOD(Vortex, wr_killmessage, int(entity thiswep))
                {
                        return WEAPON_VORTEX_MURDER;
                }
@@ -305,23 +297,19 @@ void W_Vortex_Attack(Weapon thiswep, float issecondary)
 #ifdef CSQC
 float autocvar_g_balance_vortex_secondary = 0; // WEAPONTODO
 
-               METHOD(Vortex, wr_impacteffect, bool(entity thiswep))
+               METHOD(Vortex, wr_impacteffect, void(entity thiswep))
                {
-                       vector org2;
-                       org2 = w_org + w_backoff * 6;
+                       vector org2 = w_org + w_backoff * 6;
                        pointparticles(particleeffectnum(EFFECT_VORTEX_IMPACT), org2, '0 0 0', 1);
                        if(!w_issilent)
                                sound(self, CH_SHOTS, SND_NEXIMPACT, VOL_BASE, ATTN_NORM);
-
-                       return true;
                }
-               METHOD(Vortex, wr_init, bool(entity thiswep))
+               METHOD(Vortex, wr_init, void(entity thiswep))
                {
                        if(autocvar_cl_reticle && autocvar_cl_reticle_weapon)
                        {
                                precache_pic("gfx/reticle_nex");
                        }
-                       return true;
                }
                METHOD(Vortex, wr_zoomreticle, bool(entity thiswep))
                {
index 590968290b2189bcea2c0bafaa0a257c525e605d..5d034870e67a0418c9814d3d18ca3158f07b2d85 100644 (file)
@@ -842,7 +842,7 @@ float ball_customize()
        return true;
 }
 
-       METHOD(BallStealer, wr_think, bool(BallStealer thiswep, bool fire1, bool fire2))
+       METHOD(BallStealer, wr_think, void(BallStealer thiswep, bool fire1, bool fire2))
        {
                if(fire1)
                        if(weapon_prepareattack(false, autocvar_g_balance_nexball_primary_refire))
@@ -871,20 +871,10 @@ float ball_customize()
                        // DropBall or stealing will set metertime back to 0
                        weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_nexball_primary_animtime, w_ready);
                }
-               return true;
-       }
-       METHOD(BallStealer, wr_init, bool(BallStealer thiswep))
-       {
-               return true;
        }
-       METHOD(BallStealer, wr_setup, bool(BallStealer thiswep))
+       METHOD(BallStealer, wr_setup, void(BallStealer thiswep))
        {
                //weapon_setup(WEP_PORTO.m_id);
-               return true;
-       }
-       METHOD(BallStealer, wr_aim, bool(BallStealer thiswep))
-       {
-               return true;
        }
        METHOD(BallStealer, wr_checkammo1, bool(BallStealer thiswep))
        {
index 951128f2d7dc1aed836d45c1706dd859fa5adfaf..de95128595a90059829b487c5042e71e09b829ed 100644 (file)
@@ -777,8 +777,8 @@ void W_WeaponFrame()
         }
 
                if (w) {
-                       entity e = get_weaponinfo(self.weapon);
-                       if (e.wr_think) e.wr_think(e, self.BUTTON_ATCK, self.BUTTON_ATCK2);
+                       Weapon e = get_weaponinfo(self.weapon);
+                       e.wr_think(e, self.BUTTON_ATCK, self.BUTTON_ATCK2);
                } else {
                        Weapon w = get_weaponinfo(self.weapon);
                        w.wr_gonethink(w);
@@ -981,7 +981,7 @@ void W_Reload(float sent_ammo_min, string sent_sound)
        self.clip_load = self.(weapon_load[self.weapon]) = -1;
 }
 
-void W_DropEvent(.bool(Weapon) event, entity player, float weapon_type, entity weapon_item)
+void W_DropEvent(.void(Weapon) event, entity player, float weapon_type, entity weapon_item)
 {SELFPARAM();
        setself(player);
        weapon_dropevent_item = weapon_item;
index 196cac85700f5aae3ff4e3e7badb97992e1fd0c6..9849f9bd4800edb5160c939811dd9a3c37cf74f4 100644 (file)
@@ -24,7 +24,7 @@ void W_AttachToShotorg(entity flash, vector offset);
 
 void W_DecreaseAmmo(Weapon wep, float ammo_use);
 
-void W_DropEvent(.bool(Weapon) event, entity player, float weapon_type, entity weapon_item);
+void W_DropEvent(.void(Weapon) event, entity player, float weapon_type, entity weapon_item);
 
 void W_Reload(float sent_ammo_min, string sent_sound);