]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'marin-t/nadectr' into 'master'
authorMario <zacjardine@y7mail.com>
Fri, 25 Aug 2017 10:28:37 +0000 (10:28 +0000)
committerMario <zacjardine@y7mail.com>
Fri, 25 Aug 2017 10:28:37 +0000 (10:28 +0000)
Remove `dppolygonoffset -6000` from nade countdown shader

See merge request !466

134 files changed:
.gitlab-ci.yml
qcsrc/client/hud/panel/scoreboard.qc
qcsrc/client/main.qc
qcsrc/client/player_skeleton.qc
qcsrc/client/progs.inc
qcsrc/common/_all.inc
qcsrc/common/csqcmodel_settings.qh
qcsrc/common/effects/qc/_mod.inc
qcsrc/common/effects/qc/_mod.qh
qcsrc/common/effects/qc/all.inc [deleted file]
qcsrc/common/effects/qc/all.qc [deleted file]
qcsrc/common/effects/qc/all.qh [deleted file]
qcsrc/common/effects/qc/casings.qc
qcsrc/common/effects/qc/casings.qh
qcsrc/common/effects/qc/damageeffects.qc
qcsrc/common/effects/qc/gibs.qc
qcsrc/common/effects/qc/globalsound.qc
qcsrc/common/effects/qc/lightningarc.qc
qcsrc/common/effects/qc/modeleffects.qc
qcsrc/common/gamemodes/gamemode/onslaught/sv_onslaught.qc
qcsrc/common/monsters/monster/shambler.qc
qcsrc/common/monsters/sv_spawn.qc
qcsrc/common/mutators/mutator/nades/nades.qc
qcsrc/common/physics/player.qh
qcsrc/common/state.qc
qcsrc/common/turrets/_all.inc [deleted file]
qcsrc/common/turrets/_all.qh [deleted file]
qcsrc/common/turrets/_mod.inc
qcsrc/common/turrets/_mod.qh
qcsrc/common/turrets/all.qc
qcsrc/common/turrets/all.qh
qcsrc/common/turrets/checkpoint.qc
qcsrc/common/turrets/config.qc
qcsrc/common/turrets/targettrigger.qc
qcsrc/common/turrets/turret/ewheel.qc
qcsrc/common/turrets/turret/ewheel_weapon.qc
qcsrc/common/turrets/turret/flac.qc
qcsrc/common/turrets/turret/flac_weapon.qc
qcsrc/common/turrets/turret/fusionreactor.qc
qcsrc/common/turrets/turret/hellion.qc
qcsrc/common/turrets/turret/hellion_weapon.qc
qcsrc/common/turrets/turret/hk.qc
qcsrc/common/turrets/turret/hk_weapon.qc
qcsrc/common/turrets/turret/machinegun.qc
qcsrc/common/turrets/turret/machinegun_weapon.qc
qcsrc/common/turrets/turret/mlrs.qc
qcsrc/common/turrets/turret/mlrs_weapon.qc
qcsrc/common/turrets/turret/phaser.qc
qcsrc/common/turrets/turret/phaser_weapon.qc
qcsrc/common/turrets/turret/plasma.qc
qcsrc/common/turrets/turret/plasma_dual.qc
qcsrc/common/turrets/turret/plasma_weapon.qc
qcsrc/common/turrets/turret/tesla.qc
qcsrc/common/turrets/turret/tesla_weapon.qc
qcsrc/common/turrets/turret/walker.qc
qcsrc/common/turrets/turret/walker_weapon.qc
qcsrc/common/turrets/util.qc
qcsrc/common/turrets/util.qh
qcsrc/common/vehicles/_all.inc [deleted file]
qcsrc/common/vehicles/_all.qh [deleted file]
qcsrc/common/vehicles/_mod.inc
qcsrc/common/vehicles/_mod.qh
qcsrc/common/vehicles/all.qc
qcsrc/common/vehicles/all.qh
qcsrc/common/vehicles/vehicle/bumblebee.qc
qcsrc/common/vehicles/vehicle/bumblebee_weapons.qc
qcsrc/common/vehicles/vehicle/racer.qc
qcsrc/common/vehicles/vehicle/racer_weapon.qc
qcsrc/common/vehicles/vehicle/raptor.qc
qcsrc/common/vehicles/vehicle/raptor_weapons.qc
qcsrc/common/vehicles/vehicle/spiderbot.qc
qcsrc/common/vehicles/vehicle/spiderbot_weapons.qc
qcsrc/common/weapons/all.inc
qcsrc/common/weapons/all.qc
qcsrc/common/weapons/weapon.qh
qcsrc/common/weapons/weapon/arc.qc
qcsrc/common/weapons/weapon/arc.qh
qcsrc/common/weapons/weapon/blaster.qc
qcsrc/common/weapons/weapon/blaster.qh
qcsrc/common/weapons/weapon/crylink.qc
qcsrc/common/weapons/weapon/crylink.qh
qcsrc/common/weapons/weapon/devastator.qc
qcsrc/common/weapons/weapon/devastator.qh
qcsrc/common/weapons/weapon/electro.qc
qcsrc/common/weapons/weapon/electro.qh
qcsrc/common/weapons/weapon/fireball.qc
qcsrc/common/weapons/weapon/fireball.qh
qcsrc/common/weapons/weapon/hagar.qc
qcsrc/common/weapons/weapon/hagar.qh
qcsrc/common/weapons/weapon/hlac.qc
qcsrc/common/weapons/weapon/hlac.qh
qcsrc/common/weapons/weapon/hook.qc
qcsrc/common/weapons/weapon/hook.qh
qcsrc/common/weapons/weapon/machinegun.qc
qcsrc/common/weapons/weapon/machinegun.qh
qcsrc/common/weapons/weapon/minelayer.qc
qcsrc/common/weapons/weapon/minelayer.qh
qcsrc/common/weapons/weapon/mortar.qc
qcsrc/common/weapons/weapon/mortar.qh
qcsrc/common/weapons/weapon/porto.qc
qcsrc/common/weapons/weapon/porto.qh
qcsrc/common/weapons/weapon/rifle.qc
qcsrc/common/weapons/weapon/rifle.qh
qcsrc/common/weapons/weapon/seeker.qc
qcsrc/common/weapons/weapon/seeker.qh
qcsrc/common/weapons/weapon/shockwave.qc
qcsrc/common/weapons/weapon/shockwave.qh
qcsrc/common/weapons/weapon/shotgun.qc
qcsrc/common/weapons/weapon/shotgun.qh
qcsrc/common/weapons/weapon/tuba.qc
qcsrc/common/weapons/weapon/tuba.qh
qcsrc/common/weapons/weapon/vaporizer.qc
qcsrc/common/weapons/weapon/vaporizer.qh
qcsrc/common/weapons/weapon/vortex.qc
qcsrc/common/weapons/weapon/vortex.qh
qcsrc/lib/angle.qc
qcsrc/lib/csqcmodel/interpolate.qh
qcsrc/server/bot/default/aim.qc
qcsrc/server/bot/default/bot.qc
qcsrc/server/client.qc
qcsrc/server/client.qh
qcsrc/server/command/cmd.qc
qcsrc/server/compat/quake3.qc
qcsrc/server/impulse.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/miscfunctions.qh
qcsrc/server/mutators/gamemode.qh
qcsrc/server/mutators/mutator/gamemode_assault.qc
qcsrc/server/player.qc
qcsrc/server/progs.inc
qcsrc/server/weapons/common.qc
qcsrc/server/weapons/selection.qc
qcsrc/server/weapons/selection.qh
qcsrc/server/weapons/tracing.qc

index 5427860963c0ccbf2c1760a8f49e6d75497d7acc..5d525a4c5773a647cd82ee8e27bd338b927153f0 100644 (file)
@@ -29,7 +29,7 @@ test_sv_game:
     - wget -O data/maps/stormkeep.waypoints https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints
     - wget -O data/maps/stormkeep.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints.cache
     - make
-    - EXPECT=585cfa6d62ce59f4854bedfce7c51c20
+    - EXPECT=662ab75eeb91d25c2d86ebb81ce8dc02
     - HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg
       | tee /dev/stderr
       | grep '^:'
index 34ecd834f7ec682ca1e6c1c00d9f8164928e783a..3a11bdb1e7f0085aba298ff439644428dfc7e253 100644 (file)
@@ -153,13 +153,12 @@ float SetTeam(entity pl, float Team);
 //float lastpnum;
 void Scoreboard_UpdatePlayerTeams()
 {
-       float Team;
        entity pl, tmp;
        //int num = 0;
        for(pl = players.sort_next; pl; pl = pl.sort_next)
        {
                //num += 1;
-               Team = entcs_GetScoreTeam(pl.sv_entnum);
+               int Team = entcs_GetScoreTeam(pl.sv_entnum);
                if(SetTeam(pl, Team))
                {
                        tmp = pl.sort_prev;
index 479dd7e8eab8486ed14e23b1b333a58df3a1ac59..7ad10879f7ac23b05a69a96ae7d4f7441ea51c2d 100644 (file)
@@ -1,8 +1,10 @@
 #include "main.qh"
 
+#include "defs.qh"
+#include <common/ent_cs.qh>
 #include "miscfunctions.qh"
 #include <common/effects/effect.qh>
-#include <common/effects/qc/all.qh>
+#include <common/effects/qc/_mod.qh>
 #include <common/effects/all.qh>
 #include <common/effects/all.inc>
 #include "hud/_mod.qh"
@@ -150,6 +152,9 @@ void CSQC_Init()
 
        GetTeam(NUM_SPECTATOR, true); // add specs first
 
+       for (int w = 0; w <= WEP_LAST - WEP_FIRST; ++w)
+               weapon_accuracy[w] = -1;
+
        // precaches
 
        if(autocvar_cl_reticle)
@@ -491,9 +496,9 @@ NET_HANDLE(ENT_CLIENT_CLIENTDATA, bool isnew)
 
     int f = ReadByte();
 
-       scoreboard_showscores_force = (f & 1);
+       scoreboard_showscores_force = (f & BIT(0));
 
-       if(f & 2)
+       if(f & BIT(1))
        {
                newspectatee_status = ReadByte();
                if(newspectatee_status == player_localnum + 1)
@@ -502,9 +507,9 @@ NET_HANDLE(ENT_CLIENT_CLIENTDATA, bool isnew)
        else
                newspectatee_status = 0;
 
-       spectatorbutton_zoom = (f & 4);
+       spectatorbutton_zoom = (f & BIT(2));
 
-       if(f & 16)
+       if(f & BIT(4))
        {
                num_spectators = ReadByte();
 
index 66827c8f30e3bdc2bfeb9508ce64a5a69bf86bea..55e54d8ac2c641ad49b10bf03a979f0603eff9d3 100644 (file)
@@ -1,11 +1,11 @@
 #include "player_skeleton.qh"
 
 #include <common/physics/movetypes/movetypes.qh>
+#include <common/physics/player.qh>
 #include "mutators/events.qh"
 #include "../lib/csqcmodel/cl_player.qh"
 #include "../lib/warpzone/anglestransform.qh"
 
-.vector v_angle;
 .float v_angle_save_x;
 
 class(Skeleton) .float skeleton_info_modelindex;
index f6a7999d440a455a30dc5d0b70aa9e74f4113139..3b607a7e14add199cd354940018de71d588f2566 100644 (file)
@@ -5,7 +5,7 @@
 #include <client/_mod.inc>
 
 #include <common/_all.inc>
-#include <common/effects/qc/all.qc>
+#include <common/effects/qc/_mod.inc>
 
 #include <lib/csqcmodel/cl_model.qc>
 #include <lib/csqcmodel/cl_player.qc>
index 56681b099e756f6075da949446ca5dd605c7f102..32dbf5208ff23a278196f70ad4d9156a1e0f9d55 100644 (file)
@@ -45,8 +45,8 @@ noref float autocvar_net_connecttimeout = 30;
 #include "items/_mod.inc"
     #include "weapons/_all.inc"
         #include "monsters/_mod.inc"
-        #include "turrets/all.qc"
-        #include "vehicles/all.qc"
+        #include "turrets/_mod.inc"
+        #include "vehicles/_mod.inc"
 
 #include "mutators/_mod.inc"
     #include "gamemodes/_mod.inc"
index 9e96756ba52de4feb7709164226599e2a8d1632f..125ef6bf36c99bf5d25a281e88c2053113109a91 100644 (file)
@@ -26,9 +26,6 @@
 # define TAG_VIEWLOC_TYPE entity
 #endif
 
-// new fields
-.vector v_angle;
-
 // add properties you want networked to CSQC here
 #define CSQCMODEL_EXTRAPROPERTIES \
        CSQCMODEL_PROPERTY(BIT(0), int, ReadShort, WriteShort, colormap) \
index befcce83d8d95ee23300856661ba1fab3ffe46e8..8df95b821ae2ea07cec594230396235d74fb2529 100644 (file)
@@ -1,5 +1,4 @@
 // generated file; do not modify
-#include <common/effects/qc/all.qc>
 #include <common/effects/qc/casings.qc>
 #include <common/effects/qc/damageeffects.qc>
 #include <common/effects/qc/gibs.qc>
index 91298f3124d61c972b9d6bdd970d241c5f882acc..3f6387f0eb21a179d6a259466c914dfbb6cc4d19 100644 (file)
@@ -1,5 +1,4 @@
 // generated file; do not modify
-#include <common/effects/qc/all.qh>
 #include <common/effects/qc/casings.qh>
 #include <common/effects/qc/damageeffects.qh>
 #include <common/effects/qc/gibs.qh>
diff --git a/qcsrc/common/effects/qc/all.inc b/qcsrc/common/effects/qc/all.inc
deleted file mode 100644 (file)
index 6b5c2ff..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#include "casings.qc"
-#include "damageeffects.qc"
-#include "gibs.qc"
-#include "globalsound.qc"
-#include "lightningarc.qc"
-#include "modeleffects.qc"
diff --git a/qcsrc/common/effects/qc/all.qc b/qcsrc/common/effects/qc/all.qc
deleted file mode 100644 (file)
index f0fc719..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#include "all.qh"
-
-#define IMPLEMENTATION
-#include "all.inc"
-#undef IMPLEMENTATION
diff --git a/qcsrc/common/effects/qc/all.qh b/qcsrc/common/effects/qc/all.qh
deleted file mode 100644 (file)
index 54cf6b6..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#pragma once
-
-#include "all.inc"
index d0befbb7ed04705feb92bb01e63d291011003bed..60f9633027eb2125d0278bd6abaaa2cb9ed1505a 100644 (file)
@@ -1,9 +1,4 @@
 #include "casings.qh"
-#ifdef SVQC
-void SpawnCasing(vector vel, float randomvel, vector ang, vector avel, float randomavel, int casingtype, entity casingowner, .entity weaponentity);
-#endif
-
-#ifdef IMPLEMENTATION
 
 #include <common/util.qh>
 
@@ -178,4 +173,3 @@ NET_HANDLE(casings, bool isNew)
 }
 
 #endif
-#endif
index 6f70f09beec2219624baeca92e2cd7deaa104fb4..137aa365ca1412b16c83b6eda2b0ca681d13709d 100644 (file)
@@ -1 +1,5 @@
 #pragma once
+
+#ifdef SVQC
+void SpawnCasing(vector vel, float randomvel, vector ang, vector avel, float randomavel, int casingtype, entity casingowner, .entity weaponentity);
+#endif
index 38241c2cc2df62999807f2cc2b153580a2c40d15..c85d66eeb6686cee70d27d77482757baf0336550 100644 (file)
@@ -1,7 +1,5 @@
 #include "damageeffects.qh"
 
-#ifdef IMPLEMENTATION
-
 REGISTER_NET_LINKED(ENT_CLIENT_DAMAGEINFO)
 
 #ifdef SVQC
@@ -415,5 +413,3 @@ NET_HANDLE(ENT_CLIENT_DAMAGEINFO, bool isNew)
 }
 
 #endif
-
-#endif
index d1e3d9880da4244206e9ea38ef037c38a828653b..7be63e2e55c5e1056a544f23ae9bc0331ec8138a 100644 (file)
@@ -1,6 +1,5 @@
 #include "gibs.qh"
 
-#ifdef IMPLEMENTATION
 REGISTER_NET_TEMP(net_gibsplash)
 
 #ifdef SVQC
@@ -314,5 +313,3 @@ NET_HANDLE(net_gibsplash, bool isNew)
        delete(this);
 }
 #endif
-
-#endif
index c3aaf62d46d7e91d5c78679585c82d471374665f..edf995a0f6ccf453f64aa49ff175608aa3c6205f 100644 (file)
@@ -2,7 +2,6 @@
 
 #include <common/ent_cs.qh>
 
-#ifdef IMPLEMENTATION
        #include <common/animdecide.qh>
 
        #ifdef SVQC
                }
 
        #endif
-#endif
index c1c3bb8872c3ea917e51168b90be0a8566d43a75..6388575b72cb09a5baa576a0e8c3882fdeff8ffb 100644 (file)
@@ -1,6 +1,5 @@
 #include "lightningarc.qh"
 
-#ifdef IMPLEMENTATION
 REGISTER_NET_TEMP(TE_CSQC_ARC)
 
 #if defined(SVQC)
@@ -117,5 +116,3 @@ void b_make(vector s,vector e, string t,float l,float z)
        }
 
 #endif
-
-#endif
index 8fbef5b587e9c56a7ed1f7cbc20d445cd32dab4f..1b70daee2fbbd5621e8e33198ffcec7c7380b2fd 100644 (file)
@@ -1,7 +1,5 @@
 #include "modeleffects.qh"
 
-#ifdef IMPLEMENTATION
-
 REGISTER_NET_LINKED(ENT_CLIENT_MODELEFFECT)
 
 #ifdef SVQC
@@ -162,5 +160,3 @@ NET_HANDLE(ENT_CLIENT_MODELEFFECT, bool isnew)
        return true;
 }
 #endif
-
-#endif
index 223a81f7c4d4dfb6039a3ea6b2189b0df864dfd0..9992a37f4ce032faa7f25549728ff5d3303846a2 100644 (file)
@@ -1377,8 +1377,8 @@ void havocbot_goalrating_ons_controlpoints_attack(entity this, float ratingscale
                        best.cnt += 1;
 
                        this.havocbot_attack_time = 0;
-                       if(checkpvs(this.view_ofs,cp))
-                       if(checkpvs(this.view_ofs,best))
+                       if(checkpvs(this.origin + this.view_ofs, cp))
+                       if(checkpvs(this.origin + this.view_ofs, best))
                                this.havocbot_attack_time = time + 2;
                }
                else
@@ -1448,8 +1448,8 @@ bool havocbot_goalrating_ons_generator_attack(entity this, float ratingscale)
                        bestwp.cnt += 1;
 
                        this.havocbot_attack_time = 0;
-                       if(checkpvs(this.view_ofs,g))
-                       if(checkpvs(this.view_ofs,bestwp))
+                       if(checkpvs(this.origin + this.view_ofs, g))
+                       if(checkpvs(this.origin + this.view_ofs, bestwp))
                                this.havocbot_attack_time = time + 5;
 
                        return true;
index b03766bcf234b55d4753b5c65a1c2dddb1b91922..338acacd61fdb343357451cc09c801526196cc2e 100644 (file)
@@ -50,7 +50,7 @@ void M_Shambler_Attack_Swing(entity this)
        Monster_Attack_Melee(this, this.enemy, (autocvar_g_monster_shambler_attack_claw_damage), ((random() >= 0.5) ? this.anim_melee2 : this.anim_melee3), this.attack_range, 0.8, DEATH_MONSTER_SHAMBLER_CLAW.m_id, true);
 }
 
-#include <common/effects/qc/all.qh>
+#include <common/effects/qc/_mod.qh>
 
 void M_Shambler_Attack_Lightning_Explode(entity this, entity directhitentity)
 {
index 4bbe2ce3d8f8a94fc336a0165e8009d0c16b0767..d6989ad31839d52229cc8f612879fd6c83ab8686 100644 (file)
@@ -16,11 +16,12 @@ entity spawnmonster (entity e, string monster, int monster_id, entity spawnedby,
        //if(invincible) { e.spawnflags |= MONSTERFLAG_INVINCIBLE; }
 
        setorigin(e, orig);
+       bool allow_any = boolean(monster == "anyrandom");
 
-       if(monster == "random")
+       if(monster == "random" || allow_any)
        {
                RandomSelection_Init();
-               FOREACH(Monsters, it != MON_Null && !(it.spawnflags & MONSTER_TYPE_PASSIVE) && !(it.spawnflags & MON_FLAG_HIDDEN),
+               FOREACH(Monsters, it != MON_Null && (allow_any || (!(it.spawnflags & MONSTER_TYPE_PASSIVE) && !(it.spawnflags & MON_FLAG_HIDDEN))),
                {
                        RandomSelection_AddEnt(it, 1, 1);
                });
index 090ff82a362f22c7555f851b4c3477ebcfac18fa..ae1bbff6525cac70a7348eb46bc4049ae81c76a7 100644 (file)
@@ -1481,11 +1481,6 @@ MUTATOR_HOOKFUNCTION(nades, BuildMutatorsString)
        M_ARGV(0, string) = strcat(M_ARGV(0, string), ":Nades");
 }
 
-MUTATOR_HOOKFUNCTION(nades, BuildMutatorsPrettyString)
-{
-       M_ARGV(0, string) = strcat(M_ARGV(0, string), ", Nades");
-}
-
 MUTATOR_HOOKFUNCTION(nades, BuildGameplayTipsString)
 {
        M_ARGV(0, string) = strcat(M_ARGV(0, string), "\n\n^3nades^8 are enabled, press 'g' to use them\n");
index 7e0d397f38a8f3bf139438e5422a2df8038d54ce..d5a8e605af8a5b1721fa4d478b35d7de88727cc7 100644 (file)
@@ -190,6 +190,13 @@ STATIC_INIT(PHYS_INPUT_BUTTON_DODGE)
        .int items;
 
        .vector movement;
+
+       // angles of the player's view (as opposed to their model which uses `.vector angles;`) in degrees
+       // x is pitch: positive means down (unlike .angles)
+       // y is yaw: between -180 and 180, increases when turning left
+       // z is roll: positive means tilted clockwise, usually is 0
+       // when .fixangle is set, the player's view will change to the direction where the model is facing
+       // more info: https://gitlab.com/xonotic/xonotic-data.pk3dir/merge_requests/447#note_32816794
        .vector v_angle;
 
        .entity hook;
index 3bd6c60ae0aec624d079ffa8557d3eded634fc28..ea936185b95ee2b1227a58be5664a7e2ecfda30c 100644 (file)
@@ -25,7 +25,7 @@ void PlayerState_detach(entity this)
     Inventory_delete(this);
 }
 
-void GetCvars(entity this, int);
+void GetCvars(entity this, entity store, int);
 void DecodeLevelParms(entity this);
 void PlayerScore_Attach(entity this);
 void ClientData_Attach(entity this);
@@ -40,7 +40,7 @@ void ClientState_attach(entity this)
 {
        this._cs = NEW(ClientState, this);
 
-    GetCvars(this, 0);  // get other cvars from player
+    GetCvars(this, CS(this), 0);  // get other cvars from player
 
        // TODO: fold all of these into ClientState
 
@@ -69,7 +69,7 @@ void PlayerScore_Detach(entity this);
 
 void ClientState_detach(entity this)
 {
-    GetCvars(this, -1);  // free cvars TODO: is this still needed now that it's stored on the clientstate entity?
+    GetCvars(this, CS(this), -1);  // free cvars TODO: is this still needed now that it's stored on the clientstate entity?
     accuracy_free(this); // TODO: needs to be before CS() is deleted!
     PlayerScore_Detach(this); // what ^they^ said
     W_HitPlotClose(this);
diff --git a/qcsrc/common/turrets/_all.inc b/qcsrc/common/turrets/_all.inc
deleted file mode 100644 (file)
index 8bc63f7..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "_all.qh"
-#include "_mod.inc"
diff --git a/qcsrc/common/turrets/_all.qh b/qcsrc/common/turrets/_all.qh
deleted file mode 100644 (file)
index 947026d..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#pragma once
-#include "_mod.qh"
index 8fff9535c5ce40ca345d9175a859b509dd053218..f8eb32263b30eb48f6d5b7329354a8f5f1a8a605 100644 (file)
@@ -11,3 +11,5 @@
     #include <common/turrets/sv_turrets.qc>
 #endif
 #include <common/turrets/util.qc>
+
+#include <common/turrets/turret/_mod.inc>
index 06978f1d41e23fa375a94ab19463287553d0736c..427ec4049a807e70bc659edfcd0ddfc9c414d51d 100644 (file)
@@ -11,3 +11,5 @@
     #include <common/turrets/sv_turrets.qh>
 #endif
 #include <common/turrets/util.qh>
+
+#include <common/turrets/turret/_mod.qh>
index 469a64c9274b240758ebd40eeeb8d4f19576d767..54e63748c3d2360d7e34be08ac20aaf4f6b419e0 100644 (file)
@@ -1,23 +1,3 @@
 #include "all.qh"
 
 REGISTER_NET_LINKED(ENT_CLIENT_TURRET)
-
-#ifdef SVQC
-#include "sv_turrets.qh"
-#endif
-
-#define IMPLEMENTATION
-#include "turret/_mod.inc"
-#undef IMPLEMENTATION
-
-#ifdef CSQC
-#include "cl_turrets.qc"
-#endif
-
-#ifdef SVQC
-#include "sv_turrets.qc"
-#include "config.qc"
-#include "util.qc"
-#include "checkpoint.qc"
-#include "targettrigger.qc"
-#endif
index 1a77e989121b0cade1ab49e584f93e6e575b29d4..8bd0b14b712c21a833d777951dc815a104af4efc 100644 (file)
@@ -73,4 +73,4 @@ const int TUR_FIRST = 1;
 
 REGISTER_TURRET(Null, NEW(Turret));
 
-#include "turret/_mod.inc"
+#include "turret/_mod.qh"
index d9a20dc97c81d52104604e612e0d59c1b27ded74..f5ba71477982d4ec6b727d1312aaf36633269a1c 100644 (file)
@@ -1,4 +1,7 @@
 #include "checkpoint.qh"
+
+#ifdef SVQC
+
 /**
     turret_checkpoint
 **/
@@ -75,3 +78,5 @@ spawnfunc(walker_checkpoint)
     this.classname = "turret_checkpoint";
     spawnfunc_turret_checkpoint(this);
 }
+
+#endif
index 7d1a81d490b1be213ad7d12faa20ca3d6e2d6355..a5a23f93780768e7a51f542bfdc2eb278ed3ad61 100644 (file)
@@ -3,6 +3,8 @@
 //  Turret Config Generator
 // ==========================
 
+#ifdef SVQC
+
 void T_Config_Queue_Swap(float root, float child, entity pass)
 {
        string oldroot = config_queue[root];
@@ -60,3 +62,5 @@ void Dump_Turret_Settings()
        // extra information
        LOG_INFO(sprintf("Totals: %d turrets, %d settings\n", (Turrets_COUNT - 1), totalsettings));
 }
+
+#endif
index 152a7d6a2715e362fde40fca3be8f20497ccc511..d64616f50354ca6ad092c4a0b1dae10a6ef8881b 100644 (file)
@@ -1,4 +1,7 @@
 #include "targettrigger.qh"
+
+#ifdef SVQC
+
 spawnfunc(turret_targettrigger);
 void turret_targettrigger_touch(entity this, entity toucher);
 
@@ -24,3 +27,5 @@ spawnfunc(turret_targettrigger)
 
     settouch(this, turret_targettrigger_touch);
 }
+
+#endif
index 403a0ddf6c2bedcefa2a23b8e20d993710137786..5625d23fc935e8be8453afb9517ef40e333243a8 100644 (file)
@@ -1,7 +1,5 @@
 #include "ewheel.qh"
 
-#ifdef IMPLEMENTATION
-
 #ifdef SVQC
 
 float autocvar_g_turrets_unit_ewheel_speed_fast;
@@ -245,4 +243,3 @@ void ewheel_draw(entity this)
         }
 
 #endif // CSQC
-#endif
index e77b534022423e2ae72de04f2de5e4822c2de027..fc22c3086c861505e57b49baff564297a74a1b26 100644 (file)
@@ -1,7 +1,5 @@
 #include "ewheel_weapon.qh"
 
-#ifdef IMPLEMENTATION
-
 #ifdef SVQC
 
 void turret_initparams(entity);
@@ -36,5 +34,3 @@ METHOD(EWheelAttack, wr_think, void(entity thiswep, entity actor, .entity weapon
 }
 
 #endif
-
-#endif
index ab6e5f5cb67afe9bec1f43fb0adf6a88df0a309f..6a81bc2c9919d28d04c8fea015593803a51b27cd 100644 (file)
@@ -1,7 +1,5 @@
 #include "flac.qh"
 
-#ifdef IMPLEMENTATION
-
 #ifdef SVQC
 
 spawnfunc(turret_flac) { if (!turret_initialize(this, TUR_FLAC)) delete(this); }
@@ -15,5 +13,3 @@ METHOD(Flac, tr_setup, void(Flac this, entity it))
 }
 
 #endif
-
-#endif
index 357bba975d853cfcd6cb50af66692cb16165a099..10d53aa08f527e64dd53ce05d92a0329d54d8465 100644 (file)
@@ -1,7 +1,5 @@
 #include "flac_weapon.qh"
 
-#ifdef IMPLEMENTATION
-
 #ifdef SVQC
 
 void turret_flac_projectile_think_explode(entity this);
@@ -53,5 +51,3 @@ void turret_flac_projectile_think_explode(entity this)
 }
 
 #endif
-
-#endif
index 3c468535c86f87962ef5894662f8243e3793b540..32ac81d586cc7ecc9035d7accddf5aada188bbdb 100644 (file)
@@ -1,6 +1,5 @@
 #include "fusionreactor.qh"
 
-#ifdef IMPLEMENTATION
 #ifdef SVQC
 bool turret_fusionreactor_firecheck(entity this)
 {
@@ -53,4 +52,3 @@ METHOD(FusionReactor, tr_setup, void(FusionReactor this, entity it))
 }
 
 #endif
-#endif
index 88a0170ea67d4d556f7dd8a72c483615d0af8016..15dc36b3d7eadeb107446c3d257bd9c5a5a08eb9 100644 (file)
@@ -1,7 +1,5 @@
 #include "hellion.qh"
 
-#ifdef IMPLEMENTATION
-
 #ifdef SVQC
 
 spawnfunc(turret_hellion) { if (!turret_initialize(this, TUR_HELLION)) delete(this); }
@@ -23,4 +21,3 @@ METHOD(Hellion, tr_setup, void(Hellion this, entity it))
 }
 
 #endif
-#endif
index ea392ec4ed9540f94fde30c999c5ae8aed3c1841..a1065dec1b12033916dc30437a2a9a92c9be62bd 100644 (file)
@@ -1,7 +1,5 @@
 #include "hellion_weapon.qh"
 
-#ifdef IMPLEMENTATION
-
 #ifdef SVQC
 
 float autocvar_g_turrets_unit_hellion_shot_speed_gain;
@@ -103,5 +101,3 @@ void turret_hellion_missile_think(entity this)
 }
 
 #endif
-
-#endif
index 255821e1c368209aa8d229703f6c5dedcc8ec7ba..811e386f5b4e38bc85cb90f8f0ade95e0e3b3e8c 100644 (file)
@@ -1,7 +1,5 @@
 #include "hk.qh"
 
-#ifdef IMPLEMENTATION
-
 #ifdef SVQC
 
 #ifdef TURRET_DEBUG_HK
@@ -47,4 +45,3 @@ bool turret_hk_addtarget(entity this, entity e_target,entity e_sender)
 }
 
 #endif // SVQC
-#endif
index 5a2f05a4832219fdc3ed9c51a3238c79de625f49..9a243adaa73c6903cad83ea22e1eb9155bb84d44 100644 (file)
@@ -1,7 +1,5 @@
 #include "hk_weapon.qh"
 
-#ifdef IMPLEMENTATION
-
 #ifdef SVQC
 
 float autocvar_g_turrets_unit_hk_shot_speed;
@@ -278,5 +276,3 @@ bool hk_is_valid_target(entity this, entity proj, entity targ)
 }
 
 #endif
-
-#endif
index db3cb47bf2fbb6cc3d173ccce2edba39f3ea6072..a2ee1def6b8a68bb65671c545f33dc5871574718 100644 (file)
@@ -1,7 +1,5 @@
 #include "machinegun.qh"
 
-#ifdef IMPLEMENTATION
-
 #ifdef SVQC
 
 spawnfunc(turret_machinegun) { if (!turret_initialize(this, TUR_MACHINEGUN)) delete(this); }
@@ -16,4 +14,3 @@ METHOD(MachineGunTurret, tr_setup, void(MachineGunTurret this, entity it))
 }
 
 #endif // SVQC
-#endif
index c60cd3b37e11ff245e3877dd76c638585079ce3c..846b5234376a0c7bcaf50c1e85224e49846d1eff 100644 (file)
@@ -1,7 +1,5 @@
 #include "machinegun_weapon.qh"
 
-#ifdef IMPLEMENTATION
-
 #ifdef SVQC
 
 void W_MachineGun_MuzzleFlash(entity actor, .entity weaponentity);
@@ -26,5 +24,3 @@ METHOD(MachineGunTurretAttack, wr_think, void(entity thiswep, entity actor, .ent
 }
 
 #endif
-
-#endif
index 472a0cb09a5c410ad5ae5a7060e410799189ccd4..2315012b11379bed39838e697795a6345569dbf5 100644 (file)
@@ -1,7 +1,5 @@
 #include "mlrs.qh"
 
-#ifdef IMPLEMENTATION
-
 #ifdef SVQC
 
 spawnfunc(turret_mlrs) { if (!turret_initialize(this, TUR_MLRS)) delete(this); }
@@ -27,4 +25,3 @@ METHOD(MLRSTurret, tr_setup, void(MLRSTurret this, entity it))
 }
 
 #endif // SVQC
-#endif
index cfd51c732076b2686fc9ae12e96adae33db462ea..ccf309aaf7c31ef8015b788b17d3a112551f49f6 100644 (file)
@@ -1,7 +1,5 @@
 #include "mlrs_weapon.qh"
 
-#ifdef IMPLEMENTATION
-
 #ifdef SVQC
 SOUND(MLRSTurretAttack_FIRE, W_Sound("electro_fire"));
 METHOD(MLRSTurretAttack, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
@@ -27,5 +25,3 @@ METHOD(MLRSTurretAttack, wr_think, void(entity thiswep, entity actor, .entity we
 }
 
 #endif
-
-#endif
index 31ece9cb2b8b86d7946d9c0eaf45634910e09036..9c93a6e89a742313b097ba23fd1a03a3267a16df 100644 (file)
@@ -1,7 +1,5 @@
 #include "phaser.qh"
 
-#ifdef IMPLEMENTATION
-
 #ifdef SVQC
 
 spawnfunc(turret_phaser) { if (!turret_initialize(this, TUR_PHASER)) delete(this); }
@@ -45,4 +43,3 @@ bool turret_phaser_firecheck(entity this)
 }
 
 #endif
-#endif
index bf901d886a77e407292d8d208d20f37819f5b8cc..3fb34fb14c2b9b1d97f7c0a6ad3008ba3e6011af 100644 (file)
@@ -1,7 +1,5 @@
 #include "phaser_weapon.qh"
 
-#ifdef IMPLEMENTATION
-
 #ifdef SVQC
 void beam_think(entity this);
 
@@ -90,5 +88,3 @@ void beam_think(entity this)
 }
 
 #endif
-
-#endif
index 7317930c9005001578140ceb2233352393215ee4..96fa81f8eee98cdbbf72ce9761e2f5eaf2c1c717 100644 (file)
@@ -1,7 +1,5 @@
 #include "plasma.qh"
 
-#ifdef IMPLEMENTATION
-
 #ifdef SVQC
 
 spawnfunc(turret_plasma) { if (!turret_initialize(this, TUR_PLASMA)) delete(this); }
@@ -46,4 +44,3 @@ METHOD(PlasmaTurret, tr_setup, void(PlasmaTurret this, entity it))
 }
 
 #endif
-#endif
index 3efe969f31afe79d73702e014c770032ac59bc86..2a6f997cf3f009f533858d9099c0fb3492e2b7c3 100644 (file)
@@ -1,7 +1,5 @@
 #include "plasma_dual.qh"
 
-#ifdef IMPLEMENTATION
-
 #ifdef SVQC
 
 spawnfunc(turret_plasma_dual) { if (!turret_initialize(this, TUR_PLASMA_DUAL)) delete(this); }
@@ -34,4 +32,3 @@ METHOD(DualPlasmaTurret, tr_think, void(DualPlasmaTurret thistur, entity it))
 }
 
 #endif
-#endif
index f6f717f85ff6b612974ec854de8888913199aa20..7de7406e2da1fe195f38bf1b06caf70cbcfb54aa 100644 (file)
@@ -1,7 +1,5 @@
 #include "plasma_weapon.qh"
 
-#ifdef IMPLEMENTATION
-
 #ifdef SVQC
 SOUND(PlasmaAttack_FIRE, W_Sound("electro_fire"));
 METHOD(PlasmaAttack, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire)) {
@@ -23,5 +21,3 @@ METHOD(PlasmaAttack, wr_think, void(entity thiswep, entity actor, .entity weapon
 }
 
 #endif
-
-#endif
index 249fe18eb92042465d499a947929c672aee49fa3..4c27bc9acce8cd112e0426e0062a0cceee1e115e 100644 (file)
@@ -1,7 +1,5 @@
 #include "tesla.qh"
 
-#ifdef IMPLEMENTATION
-
 #ifdef SVQC
 
 spawnfunc(turret_tesla) { if (!turret_initialize(this, TUR_TESLA)) delete(this); }
@@ -88,4 +86,3 @@ bool turret_tesla_firecheck(entity this)
 }
 
 #endif
-#endif
index 7e6fda78ab8df41381679ad98b159fd1d6c24f98..88ca4db9702f491d237edd4adade82a526b0c9af 100644 (file)
@@ -1,7 +1,5 @@
 #include "tesla_weapon.qh"
 
-#ifdef IMPLEMENTATION
-
 #ifdef SVQC
 
 entity toast(entity actor, entity from, float range, float damage);
@@ -84,5 +82,3 @@ entity toast(entity actor, entity from, float range, float damage)
 }
 
 #endif
-
-#endif
index 2f651589d76728a611f7325ddaf3f683345a0f30..415d5dfeef16fd315cd5c08d7dc269be2c199bd9 100644 (file)
@@ -1,7 +1,5 @@
 #include "walker.qh"
 
-#ifdef IMPLEMENTATION
-
 #ifdef SVQC
 
 float autocvar_g_turrets_unit_walker_melee_damage;
@@ -643,4 +641,3 @@ void walker_draw(entity this)
         }
 
 #endif // CSQC
-#endif
index 9bcf902902f2b43f07efe0cba526d08b086f3a64..b418ce40d32240445a75560a8e35bbbd521f89ff 100644 (file)
@@ -1,7 +1,5 @@
 #include "walker_weapon.qh"
 
-#ifdef IMPLEMENTATION
-
 #ifdef SVQC
 
 SOUND(WalkerTurretAttack_FIRE, W_Sound("electro_fire"));
@@ -24,5 +22,3 @@ METHOD(WalkerTurretAttack, wr_think, void(entity thiswep, entity actor, .entity
 }
 
 #endif
-
-#endif
index 5fef364580860b256d624eb552b32a13c55fc098..d4cbb4fb1da280665f62c00f00dc3b340f251909 100644 (file)
@@ -1,4 +1,7 @@
 #include "util.qh"
+
+#ifdef SVQC
+
 /*
 * Update this.tur_shotorg by getting up2date bone info
 * NOTICE this func overwrites the global v_forward, v_right and v_up vectors.
@@ -210,3 +213,5 @@ void paint_target3(vector where, float f_size, vector v_color, float f_time)
        SUB_SetFade(e,time,f_time);
 }
 #endif
+
+#endif
index be207b711e85748328723a6d31e2919bf5cc6403..4c84f268d3024679102f158cf5e017bf229ff28a 100644 (file)
@@ -1,4 +1,8 @@
 #pragma once
 
+#ifdef SVQC
+
 float turret_tag_fire_update(entity this);
 void FireImoBeam(entity this, vector start, vector end, vector smin, vector smax, float bforce, float f_dmg, float f_velfactor, float deathtype);
+
+#endif
diff --git a/qcsrc/common/vehicles/_all.inc b/qcsrc/common/vehicles/_all.inc
deleted file mode 100644 (file)
index 8bc63f7..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "_all.qh"
-#include "_mod.inc"
diff --git a/qcsrc/common/vehicles/_all.qh b/qcsrc/common/vehicles/_all.qh
deleted file mode 100644 (file)
index 947026d..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#pragma once
-#include "_mod.qh"
index ed26659daa5c9ed37cbb384c8d9a2823e73d6c05..b358830dfe12d0df70392ff8ac25870bfe4821e0 100644 (file)
@@ -7,3 +7,5 @@
 #ifdef SVQC
     #include <common/vehicles/sv_vehicles.qc>
 #endif
+
+#include <common/vehicles/vehicle/_mod.inc>
index 4892b0f317baad43e5bc15d6e8fef0d91931f2ff..755a9a049f7e82c79dc229ec6338301805980cd2 100644 (file)
@@ -7,3 +7,5 @@
 #ifdef SVQC
     #include <common/vehicles/sv_vehicles.qh>
 #endif
+
+#include <common/vehicles/vehicle/_mod.qh>
index 4aef11cad56ed35fc49ca0b037842aceb861a74b..eed249b978d6d5fbd11f5187321853d94af8d64e 100644 (file)
@@ -1,17 +1,3 @@
 #include "all.qh"
-#ifndef VEHICLES_ALL_C
-#define VEHICLES_ALL_C
 
 REGISTER_NET_LINKED(ENT_CLIENT_AUXILIARYXHAIR)
-
-#if defined(SVQC)
-       #include "sv_vehicles.qc"
-#elif defined(CSQC)
-       #include "cl_vehicles.qc"
-#endif
-
-#define IMPLEMENTATION
-#include "vehicle/_mod.inc"
-#undef IMPLEMENTATION
-
-#endif
index 158492f661e7e1326cc248283c3b4841bb64c76a..ed44be777bf369acd3cc2ad697b89cb03b5bfd11 100644 (file)
@@ -20,4 +20,4 @@ const int VEH_FIRST = 1;
 
 REGISTER_VEHICLE(Null, NEW(Vehicle));
 
-#include "vehicle/_mod.inc"
+#include "vehicle/_mod.qh"
index d3f802791eb578c3d6a6c26a26096f95bbde3cda..018e1a17db9cf3ee0277d7097ec8188bcb7ce2f0 100644 (file)
@@ -1,7 +1,5 @@
 #include "bumblebee.qh"
 
-#ifdef IMPLEMENTATION
-
 const float BRG_SETUP = 2;
 const float BRG_START = 4;
 const float BRG_END = 8;
@@ -968,4 +966,3 @@ METHOD(Bumblebee, vr_setup, void(Bumblebee thisveh, entity instance))
 }
 
 #endif
-#endif
index 889ca471593f4930741e4816a2267d07e6b7231e..fa05c6a6f12dbd46343c941148c46b4c14db0366 100644 (file)
@@ -1,7 +1,5 @@
 #include "bumblebee_weapons.qh"
 
-#ifdef IMPLEMENTATION
-
 REGISTER_NET_LINKED(ENT_CLIENT_BUMBLE_RAYGUN)
 
 #ifdef SVQC
@@ -132,5 +130,3 @@ void bumble_raygun_draw(entity this)
 }
 
 #endif
-
-#endif
index a648a005e4892994fa6a9177fd744c3fdeb59730..8dbfae4677221eb70a7d63feb206b3f9724f3f4a 100644 (file)
@@ -1,7 +1,5 @@
 #include "racer.qh"
 
-#ifdef IMPLEMENTATION
-
 #ifdef SVQC
 #include <common/triggers/trigger/impulse.qh>
 
@@ -637,5 +635,3 @@ METHOD(Racer, vr_setup, void(Racer thisveh, entity instance))
     AuxiliaryXhair[0].axh_image = vCROSS_LOCK; // Rocket
 #endif
 }
-
-#endif
index 838f0cf42773b81469326c48d17dfe88e32c9268..02015eb8daba23c239bee5794c9734b206b2decc 100644 (file)
@@ -1,7 +1,5 @@
 #include "racer_weapon.qh"
 
-#ifdef IMPLEMENTATION
-
 #ifdef SVQC
 
 void racer_fire_rocket(entity player, vector org, vector dir, entity trg);
@@ -169,5 +167,3 @@ void racer_rocket_groundhugger(entity this)
 }
 
 #endif
-
-#endif
index e48600c47a0ae38c653a8513cadee7e28fdb0c00..d7ef38abcad18d731ee7337e5f7a17bcc9f4c7f4 100644 (file)
@@ -1,7 +1,5 @@
 #include "raptor.qh"
 
-#ifdef IMPLEMENTATION
-
 #ifdef SVQC
 
 bool autocvar_g_vehicle_raptor = true;
@@ -833,4 +831,3 @@ METHOD(Raptor, vr_setup, void(Raptor thisveh, entity instance))
 }
 
 #endif
-#endif
index 5cb0f271c52fec0effb514dff201983fa2069c02..514d67c0e6cd5b31c0ea805c39d0200c26fd2c2b 100644 (file)
@@ -1,7 +1,5 @@
 #include "raptor_weapons.qh"
 
-#ifdef IMPLEMENTATION
-
 #ifdef SVQC
 
 METHOD(RaptorCannon, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire)) {
@@ -259,5 +257,3 @@ void RaptorCBShellfragToss(vector _org, vector _vel, vector _ang)
 }
 
 #endif
-
-#endif
index 93f479b14f3efb1f7e46f5cd7a5738d211fcfd4b..57486a2f38bf22987abcdb403db3a68086c51214 100644 (file)
@@ -1,7 +1,5 @@
 #include "spiderbot.qh"
 
-#ifdef IMPLEMENTATION
-
 const int SBRM_FIRST = 1;
 const int SBRM_VOLLY = 1;
 const int SBRM_GUIDE = 2;
@@ -639,4 +637,3 @@ METHOD(Spiderbot, vr_setup, void(Spiderbot thisveh, entity instance))
 }
 
 #endif
-#endif
index 1fde99b3fcc48e87014fa84f57e1d1a0d11bd9b2..7887781ed7a74f3b5c3850dfad0cfdd64a48e398 100644 (file)
@@ -1,7 +1,5 @@
 #include "spiderbot_weapons.qh"
 
-#ifdef IMPLEMENTATION
-
 #ifdef SVQC
 
 void spiderbot_rocket_artillery(entity this)
@@ -248,5 +246,3 @@ void spiderbot_rocket_do(entity this)
 }
 
 #endif
-
-#endif
index 99c7225ac1a4402f475e907a820d07b6d97bfc3f..4da01579f19b55edbf4f22a89d609e4420263047 100644 (file)
@@ -3,25 +3,25 @@
 // IF YOU DISREGARD THIS NOTICE, I'LL KILL YOU WITH THE @!#%'N TUBA
 
 // core weapons
-#include "weapon/blaster.qc"
-#include "weapon/shotgun.qc"
-#include "weapon/machinegun.qc"
-#include "weapon/mortar.qc"
-#include "weapon/minelayer.qc"
-#include "weapon/electro.qc"
-#include "weapon/crylink.qc"
-#include "weapon/vortex.qc"
-#include "weapon/hagar.qc"
-#include "weapon/devastator.qc"
+#include "weapon/blaster.qh"
+#include "weapon/shotgun.qh"
+#include "weapon/machinegun.qh"
+#include "weapon/mortar.qh"
+#include "weapon/minelayer.qh"
+#include "weapon/electro.qh"
+#include "weapon/crylink.qh"
+#include "weapon/vortex.qh"
+#include "weapon/hagar.qh"
+#include "weapon/devastator.qh"
 
 // other weapons
-#include "weapon/porto.qc"
-#include "weapon/vaporizer.qc"
-#include "weapon/hook.qc"
-#include "weapon/hlac.qc"
-#include "weapon/tuba.qc"
-#include "weapon/rifle.qc"
-#include "weapon/fireball.qc"
-#include "weapon/seeker.qc"
-#include "weapon/shockwave.qc"
-#include "weapon/arc.qc"
+#include "weapon/porto.qh"
+#include "weapon/vaporizer.qh"
+#include "weapon/hook.qh"
+#include "weapon/hlac.qh"
+#include "weapon/tuba.qh"
+#include "weapon/rifle.qh"
+#include "weapon/fireball.qh"
+#include "weapon/seeker.qh"
+#include "weapon/shockwave.qh"
+#include "weapon/arc.qh"
index 9efbb29a2615aab18f98eaddd1a0359620455086..0d595dff47154f2af587a1158a9b20c92cc0d10c 100644 (file)
@@ -50,9 +50,9 @@
 #ifdef SVQC
        #include "config.qc"
 #endif
-#define IMPLEMENTATION
-#include "all.inc"
-#undef IMPLEMENTATION
+
+#include "weapon/_mod.inc"
+
 
 // WEAPON PLUGIN SYSTEM
 
index ab24ec4a87d894c6c924ebde154b2df753e88516..4be22446bf9dae2f8a314138be4e4b4fd4909426 100644 (file)
@@ -4,7 +4,7 @@
 #include <common/stats.qh>
 
 #ifdef SVQC
-#include <common/effects/qc/all.qh>
+#include <common/effects/qc/_mod.qh>
 #endif
 
 USING(WepSet, vector);
@@ -198,6 +198,7 @@ const int WEP_TYPE_MELEE_PRI      = 0x400; // primary attack is melee swing (for
 const int WEP_TYPE_MELEE_SEC      = 0x800; // secondary attack is melee swing (for animation)
 const int WEP_FLAG_DUALWIELD      = 0x1000; // weapon can be dual wielded
 const int WEP_FLAG_NODUAL         = 0x2000; // weapon doesn't work well with dual wielding (fireball etc just explode on fire), doesn't currently prevent anything
+const int WEP_FLAG_PENETRATEWALLS = 0x4000; // weapon has high calibur bullets that can penetrate thick walls (WEAPONTODO)
 
 // variables:
 string weaponorder_byid;
index ed5c966f1b17609b5817dcc3a01455e3a63ae996..47b92cc9f3a3819f27b6fff8bbb9be1f5496d664 100644 (file)
@@ -1,149 +1,5 @@
 #include "arc.qh"
-#ifndef IMPLEMENTATION
-CLASS(Arc, Weapon)
-/* ammotype  */ ATTRIB(Arc, ammo_field, .int, ammo_cells);
-/* impulse   */ ATTRIB(Arc, impulse, int, 3);
-/* flags     */ ATTRIB(Arc, spawnflags, int, WEP_TYPE_HITSCAN);
-/* rating    */ ATTRIB(Arc, bot_pickupbasevalue, float, 8000);
-/* color     */ ATTRIB(Arc, wpcolor, vector, '1 1 1');
-/* modelname */ ATTRIB(Arc, mdl, string, "arc");
-#ifdef GAMEQC
-/* model     */ ATTRIB(Arc, m_model, Model, MDL_ARC_ITEM);
-#endif
-/* crosshair */ ATTRIB(Arc, w_crosshair, string, "gfx/crosshairhlac");
-/* crosshair */ ATTRIB(Arc, w_crosshair_size, float, 0.7);
-/* wepimg    */ ATTRIB(Arc, model2, string, "weaponarc");
-/* refname   */ ATTRIB(Arc, netname, string, "arc");
-/* wepname   */ ATTRIB(Arc, m_name, string, _("Arc"));
-
-#define X(BEGIN, P, END, class, prefix) \
-       BEGIN(class) \
-               P(class, prefix, bolt, float, NONE) \
-               P(class, prefix, bolt_ammo, float, NONE) \
-        P(class, prefix, bolt_damageforcescale, float, NONE) \
-        P(class, prefix, bolt_damage, float, NONE) \
-        P(class, prefix, bolt_edgedamage, float, NONE) \
-        P(class, prefix, bolt_force, float, NONE) \
-        P(class, prefix, bolt_health, float, NONE) \
-        P(class, prefix, bolt_lifetime, float, NONE) \
-        P(class, prefix, bolt_radius, float, NONE) \
-        P(class, prefix, bolt_refire, float, NONE) \
-        P(class, prefix, bolt_speed, float, NONE) \
-        P(class, prefix, bolt_spread, float, NONE) \
-               P(class, prefix, beam_ammo, float, NONE) \
-        P(class, prefix, beam_animtime, float, NONE) \
-        P(class, prefix, beam_botaimlifetime, float, NONE) \
-        P(class, prefix, beam_botaimspeed, float, NONE) \
-        P(class, prefix, beam_damage, float, NONE) \
-        P(class, prefix, beam_degreespersegment, float, NONE) \
-        P(class, prefix, beam_distancepersegment, float, NONE) \
-        P(class, prefix, beam_falloff_halflifedist, float, NONE) \
-        P(class, prefix, beam_falloff_maxdist, float, NONE) \
-        P(class, prefix, beam_falloff_mindist, float, NONE) \
-        P(class, prefix, beam_force, float, NONE) \
-        P(class, prefix, beam_healing_amax, float, NONE) \
-        P(class, prefix, beam_healing_aps, float, NONE) \
-        P(class, prefix, beam_healing_hmax, float, NONE) \
-        P(class, prefix, beam_healing_hps, float, NONE) \
-        P(class, prefix, beam_heat, float, NONE) /* heat increase per second (primary) */ \
-        P(class, prefix, beam_maxangle, float, NONE) \
-        P(class, prefix, beam_nonplayerdamage, float, NONE) \
-        P(class, prefix, beam_range, float, NONE) \
-        P(class, prefix, beam_refire, float, NONE) \
-        P(class, prefix, beam_returnspeed, float, NONE) \
-        P(class, prefix, beam_tightness, float, NONE) \
-        P(class, prefix, burst_ammo, float, NONE) \
-        P(class, prefix, burst_damage, float, NONE) \
-        P(class, prefix, burst_healing_aps, float, NONE) \
-        P(class, prefix, burst_healing_hps, float, NONE) \
-        P(class, prefix, burst_heat, float, NONE) /* heat increase per second (secondary) */ \
-        P(class, prefix, cooldown, float, NONE) /* heat decrease per second when resting */ \
-        P(class, prefix, cooldown_release, float, NONE) /* delay weapon re-use when releasing button */ \
-        P(class, prefix, overheat_max, float, NONE) /* maximum heat before jamming */ \
-        P(class, prefix, overheat_min, float, NONE) /* minimum heat to wait for cooldown */ \
-        P(class, prefix, switchdelay_drop, float, NONE) \
-        P(class, prefix, switchdelay_raise, float, NONE) \
-        P(class, prefix, weaponreplace, string, NONE) \
-        P(class, prefix, weaponstartoverride, float, NONE) \
-        P(class, prefix, weaponstart, float, NONE) \
-        P(class, prefix, weaponthrowable, float, NONE) \
-    END()
-    W_PROPS(X, Arc, arc)
-#undef X
-
-ENDCLASS(Arc)
-REGISTER_WEAPON(ARC, arc, NEW(Arc));
-
-
-#ifdef GAMEQC
-const float ARC_MAX_SEGMENTS = 20;
-vector arc_shotorigin[4];
-.vector beam_start;
-.vector beam_dir;
-.vector beam_wantdir;
-.int beam_type;
-
-const int ARC_BT_MISS =        0x00;
-const int ARC_BT_WALL =        0x01;
-const int ARC_BT_HEAL =        0x02;
-const int ARC_BT_HIT =         0x03;
-const int ARC_BT_BURST_MISS =  0x10;
-const int ARC_BT_BURST_WALL =  0x11;
-const int ARC_BT_BURST_HEAL =  0x12;
-const int ARC_BT_BURST_HIT =   0x13;
-const int ARC_BT_BURSTMASK =   0x10;
-
-const int ARC_SF_SETTINGS =    BIT(0);
-const int ARC_SF_START =       BIT(1);
-const int ARC_SF_WANTDIR =     BIT(2);
-const int ARC_SF_BEAMDIR =     BIT(3);
-const int ARC_SF_BEAMTYPE =    BIT(4);
-const int ARC_SF_LOCALMASK =   ARC_SF_START | ARC_SF_WANTDIR | ARC_SF_BEAMDIR;
-#endif
-#ifdef SVQC
-.entity arc_beam;
-.bool arc_BUTTON_ATCK_prev; // for better animation control
-.float beam_prev;
-.float beam_initialized;
-.float beam_bursting;
-.float beam_teleporttime;
-.float beam_heat; // (beam) amount of heat produced
-.float arc_overheat; // (dropped arc/player) time during which it's too hot
-.float arc_cooldown; // (dropped arc/player) cooling speed
-.float arc_heat_percent = _STAT(ARC_HEAT);
-.float arc_smoke_sound;
-#endif
-#ifdef CSQC
 
-.vector beam_color;
-.float beam_alpha;
-.float beam_thickness;
-.entity beam_traileffect;
-.entity beam_hiteffect;
-.float beam_hitlight[4]; // 0: radius, 123: rgb
-.entity beam_muzzleeffect;
-.float beam_muzzlelight[4]; // 0: radius, 123: rgb
-.string beam_image;
-
-.entity beam_muzzleentity;
-
-.float beam_degreespersegment;
-.float beam_distancepersegment;
-.float beam_usevieworigin;
-.float beam_initialized;
-.float beam_maxangle;
-.float beam_range;
-.float beam_returnspeed;
-.float beam_tightness;
-.vector beam_shotorigin;
-
-entity Draw_ArcBeam_callback_entity;
-float Draw_ArcBeam_callback_last_thickness;
-vector Draw_ArcBeam_callback_last_top; // NOTE: in same coordinate system as player.
-vector Draw_ArcBeam_callback_last_bottom; // NOTE: in same coordinate system as player.
-#endif
-#endif
-#ifdef IMPLEMENTATION
 #ifdef SVQC
 spawnfunc(weapon_arc) { weapon_defaultspawnfunc(this, WEP_ARC); }
 
@@ -1656,4 +1512,3 @@ NET_HANDLE(ENT_CLIENT_ARC_BEAM, bool isnew)
 }
 
 #endif
-#endif
index 6f70f09beec2219624baeca92e2cd7deaa104fb4..01c4f2f6a3cf7b8a71c5a5fbdd50e0ded97fe9df 100644 (file)
@@ -1 +1,144 @@
 #pragma once
+
+CLASS(Arc, Weapon)
+/* ammotype  */ ATTRIB(Arc, ammo_field, .int, ammo_cells);
+/* impulse   */ ATTRIB(Arc, impulse, int, 3);
+/* flags     */ ATTRIB(Arc, spawnflags, int, WEP_TYPE_HITSCAN);
+/* rating    */ ATTRIB(Arc, bot_pickupbasevalue, float, 8000);
+/* color     */ ATTRIB(Arc, wpcolor, vector, '1 1 1');
+/* modelname */ ATTRIB(Arc, mdl, string, "arc");
+#ifdef GAMEQC
+/* model     */ ATTRIB(Arc, m_model, Model, MDL_ARC_ITEM);
+#endif
+/* crosshair */ ATTRIB(Arc, w_crosshair, string, "gfx/crosshairhlac");
+/* crosshair */ ATTRIB(Arc, w_crosshair_size, float, 0.7);
+/* wepimg    */ ATTRIB(Arc, model2, string, "weaponarc");
+/* refname   */ ATTRIB(Arc, netname, string, "arc");
+/* wepname   */ ATTRIB(Arc, m_name, string, _("Arc"));
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, bolt, float, NONE) \
+               P(class, prefix, bolt_ammo, float, NONE) \
+        P(class, prefix, bolt_damageforcescale, float, NONE) \
+        P(class, prefix, bolt_damage, float, NONE) \
+        P(class, prefix, bolt_edgedamage, float, NONE) \
+        P(class, prefix, bolt_force, float, NONE) \
+        P(class, prefix, bolt_health, float, NONE) \
+        P(class, prefix, bolt_lifetime, float, NONE) \
+        P(class, prefix, bolt_radius, float, NONE) \
+        P(class, prefix, bolt_refire, float, NONE) \
+        P(class, prefix, bolt_speed, float, NONE) \
+        P(class, prefix, bolt_spread, float, NONE) \
+               P(class, prefix, beam_ammo, float, NONE) \
+        P(class, prefix, beam_animtime, float, NONE) \
+        P(class, prefix, beam_botaimlifetime, float, NONE) \
+        P(class, prefix, beam_botaimspeed, float, NONE) \
+        P(class, prefix, beam_damage, float, NONE) \
+        P(class, prefix, beam_degreespersegment, float, NONE) \
+        P(class, prefix, beam_distancepersegment, float, NONE) \
+        P(class, prefix, beam_falloff_halflifedist, float, NONE) \
+        P(class, prefix, beam_falloff_maxdist, float, NONE) \
+        P(class, prefix, beam_falloff_mindist, float, NONE) \
+        P(class, prefix, beam_force, float, NONE) \
+        P(class, prefix, beam_healing_amax, float, NONE) \
+        P(class, prefix, beam_healing_aps, float, NONE) \
+        P(class, prefix, beam_healing_hmax, float, NONE) \
+        P(class, prefix, beam_healing_hps, float, NONE) \
+        P(class, prefix, beam_heat, float, NONE) /* heat increase per second (primary) */ \
+        P(class, prefix, beam_maxangle, float, NONE) \
+        P(class, prefix, beam_nonplayerdamage, float, NONE) \
+        P(class, prefix, beam_range, float, NONE) \
+        P(class, prefix, beam_refire, float, NONE) \
+        P(class, prefix, beam_returnspeed, float, NONE) \
+        P(class, prefix, beam_tightness, float, NONE) \
+        P(class, prefix, burst_ammo, float, NONE) \
+        P(class, prefix, burst_damage, float, NONE) \
+        P(class, prefix, burst_healing_aps, float, NONE) \
+        P(class, prefix, burst_healing_hps, float, NONE) \
+        P(class, prefix, burst_heat, float, NONE) /* heat increase per second (secondary) */ \
+        P(class, prefix, cooldown, float, NONE) /* heat decrease per second when resting */ \
+        P(class, prefix, cooldown_release, float, NONE) /* delay weapon re-use when releasing button */ \
+        P(class, prefix, overheat_max, float, NONE) /* maximum heat before jamming */ \
+        P(class, prefix, overheat_min, float, NONE) /* minimum heat to wait for cooldown */ \
+        P(class, prefix, switchdelay_drop, float, NONE) \
+        P(class, prefix, switchdelay_raise, float, NONE) \
+        P(class, prefix, weaponreplace, string, NONE) \
+        P(class, prefix, weaponstartoverride, float, NONE) \
+        P(class, prefix, weaponstart, float, NONE) \
+        P(class, prefix, weaponthrowable, float, NONE) \
+    END()
+    W_PROPS(X, Arc, arc)
+#undef X
+
+ENDCLASS(Arc)
+REGISTER_WEAPON(ARC, arc, NEW(Arc));
+
+
+#ifdef GAMEQC
+const float ARC_MAX_SEGMENTS = 20;
+vector arc_shotorigin[4];
+.vector beam_start;
+.vector beam_dir;
+.vector beam_wantdir;
+.int beam_type;
+
+const int ARC_BT_MISS =        0x00;
+const int ARC_BT_WALL =        0x01;
+const int ARC_BT_HEAL =        0x02;
+const int ARC_BT_HIT =         0x03;
+const int ARC_BT_BURST_MISS =  0x10;
+const int ARC_BT_BURST_WALL =  0x11;
+const int ARC_BT_BURST_HEAL =  0x12;
+const int ARC_BT_BURST_HIT =   0x13;
+const int ARC_BT_BURSTMASK =   0x10;
+
+const int ARC_SF_SETTINGS =    BIT(0);
+const int ARC_SF_START =       BIT(1);
+const int ARC_SF_WANTDIR =     BIT(2);
+const int ARC_SF_BEAMDIR =     BIT(3);
+const int ARC_SF_BEAMTYPE =    BIT(4);
+const int ARC_SF_LOCALMASK =   ARC_SF_START | ARC_SF_WANTDIR | ARC_SF_BEAMDIR;
+#endif
+#ifdef SVQC
+.entity arc_beam;
+.bool arc_BUTTON_ATCK_prev; // for better animation control
+.float beam_prev;
+.float beam_initialized;
+.float beam_bursting;
+.float beam_teleporttime;
+.float beam_heat; // (beam) amount of heat produced
+.float arc_overheat; // (dropped arc/player) time during which it's too hot
+.float arc_cooldown; // (dropped arc/player) cooling speed
+.float arc_heat_percent = _STAT(ARC_HEAT);
+.float arc_smoke_sound;
+#endif
+#ifdef CSQC
+
+.vector beam_color;
+.float beam_alpha;
+.float beam_thickness;
+.entity beam_traileffect;
+.entity beam_hiteffect;
+.float beam_hitlight[4]; // 0: radius, 123: rgb
+.entity beam_muzzleeffect;
+.float beam_muzzlelight[4]; // 0: radius, 123: rgb
+.string beam_image;
+
+.entity beam_muzzleentity;
+
+.float beam_degreespersegment;
+.float beam_distancepersegment;
+.float beam_usevieworigin;
+.float beam_initialized;
+.float beam_maxangle;
+.float beam_range;
+.float beam_returnspeed;
+.float beam_tightness;
+.vector beam_shotorigin;
+
+entity Draw_ArcBeam_callback_entity;
+float Draw_ArcBeam_callback_last_thickness;
+vector Draw_ArcBeam_callback_last_top; // NOTE: in same coordinate system as player.
+vector Draw_ArcBeam_callback_last_bottom; // NOTE: in same coordinate system as player.
+#endif
index cc2fedccfe84e21be7ccedc038aa9e12985eba1f..ac1540cd51fc860038f1f04072b55c75a40e5656 100644 (file)
@@ -1,58 +1,5 @@
 #include "blaster.qh"
-#ifndef IMPLEMENTATION
-CLASS(Blaster, Weapon)
-/* ammotype  */ //ATTRIB(Blaster, ammo_field, .int, ammo_none);
-/* impulse   */ ATTRIB(Blaster, impulse, int, 1);
-/* flags     */ ATTRIB(Blaster, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH);
-/* rating    */ ATTRIB(Blaster, bot_pickupbasevalue, float, 0);
-/* color     */ ATTRIB(Blaster, wpcolor, vector, '1 0.5 0.5');
-/* modelname */ ATTRIB(Blaster, mdl, string, "laser");
-#ifdef GAMEQC
-/* model     */ ATTRIB(Blaster, m_model, Model, MDL_BLASTER_ITEM);
-#endif
-/* crosshair */ ATTRIB(Blaster, w_crosshair, string, "gfx/crosshairlaser");
-/* crosshair */ ATTRIB(Blaster, w_crosshair_size, float, 0.5);
-/* wepimg    */ ATTRIB(Blaster, model2, string, "weaponlaser");
-/* refname   */ ATTRIB(Blaster, netname, string, "blaster");
-/* wepname   */ ATTRIB(Blaster, m_name, string, _("Blaster"));
-
-#define X(BEGIN, P, END, class, prefix) \
-       BEGIN(class) \
-               P(class, prefix, animtime, float, BOTH) \
-               P(class, prefix, damage, float, BOTH) \
-               P(class, prefix, delay, float, BOTH) \
-               P(class, prefix, edgedamage, float, BOTH) \
-               P(class, prefix, force, float, BOTH) \
-               P(class, prefix, force_zscale, float, BOTH) \
-               P(class, prefix, lifetime, float, BOTH) \
-               P(class, prefix, radius, float, BOTH) \
-               P(class, prefix, refire, float, BOTH) \
-               P(class, prefix, secondary, float, NONE) \
-               P(class, prefix, shotangle, float, BOTH) \
-               P(class, prefix, speed, float, BOTH) \
-               P(class, prefix, spread, float, BOTH) \
-        P(class, prefix, switchdelay_drop, float, NONE) \
-               P(class, prefix, switchdelay_raise, float, NONE) \
-        P(class, prefix, weaponreplace, string, NONE) \
-        P(class, prefix, weaponstartoverride, float, NONE) \
-        P(class, prefix, weaponstart, float, NONE) \
-        P(class, prefix, weaponthrowable, float, NONE) \
-       END()
-       W_PROPS(X, Blaster, blaster)
-#undef X
-
-ENDCLASS(Blaster)
-REGISTER_WEAPON(BLASTER, blaster, NEW(Blaster));
 
-#ifdef SVQC
-.float blaster_damage;
-.float blaster_edgedamage;
-.float blaster_radius;
-.float blaster_force;
-.float blaster_lifetime;
-#endif
-#endif
-#ifdef IMPLEMENTATION
 #ifdef SVQC
 spawnfunc(weapon_blaster) { weapon_defaultspawnfunc(this, WEP_BLASTER); }
 spawnfunc(weapon_laser) { spawnfunc_weapon_blaster(this); }
@@ -260,4 +207,3 @@ METHOD(Blaster, wr_impacteffect, void(entity thiswep, entity actor))
 }
 
 #endif
-#endif
index 6f70f09beec2219624baeca92e2cd7deaa104fb4..990add96bd8f271fe30571b524b148ba38536245 100644 (file)
@@ -1 +1,53 @@
 #pragma once
+
+CLASS(Blaster, Weapon)
+/* ammotype  */ //ATTRIB(Blaster, ammo_field, .int, ammo_none);
+/* impulse   */ ATTRIB(Blaster, impulse, int, 1);
+/* flags     */ ATTRIB(Blaster, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH);
+/* rating    */ ATTRIB(Blaster, bot_pickupbasevalue, float, 0);
+/* color     */ ATTRIB(Blaster, wpcolor, vector, '1 0.5 0.5');
+/* modelname */ ATTRIB(Blaster, mdl, string, "laser");
+#ifdef GAMEQC
+/* model     */ ATTRIB(Blaster, m_model, Model, MDL_BLASTER_ITEM);
+#endif
+/* crosshair */ ATTRIB(Blaster, w_crosshair, string, "gfx/crosshairlaser");
+/* crosshair */ ATTRIB(Blaster, w_crosshair_size, float, 0.5);
+/* wepimg    */ ATTRIB(Blaster, model2, string, "weaponlaser");
+/* refname   */ ATTRIB(Blaster, netname, string, "blaster");
+/* wepname   */ ATTRIB(Blaster, m_name, string, _("Blaster"));
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, animtime, float, BOTH) \
+               P(class, prefix, damage, float, BOTH) \
+               P(class, prefix, delay, float, BOTH) \
+               P(class, prefix, edgedamage, float, BOTH) \
+               P(class, prefix, force, float, BOTH) \
+               P(class, prefix, force_zscale, float, BOTH) \
+               P(class, prefix, lifetime, float, BOTH) \
+               P(class, prefix, radius, float, BOTH) \
+               P(class, prefix, refire, float, BOTH) \
+               P(class, prefix, secondary, float, NONE) \
+               P(class, prefix, shotangle, float, BOTH) \
+               P(class, prefix, speed, float, BOTH) \
+               P(class, prefix, spread, float, BOTH) \
+        P(class, prefix, switchdelay_drop, float, NONE) \
+               P(class, prefix, switchdelay_raise, float, NONE) \
+        P(class, prefix, weaponreplace, string, NONE) \
+        P(class, prefix, weaponstartoverride, float, NONE) \
+        P(class, prefix, weaponstart, float, NONE) \
+        P(class, prefix, weaponthrowable, float, NONE) \
+       END()
+       W_PROPS(X, Blaster, blaster)
+#undef X
+
+ENDCLASS(Blaster)
+REGISTER_WEAPON(BLASTER, blaster, NEW(Blaster));
+
+#ifdef SVQC
+.float blaster_damage;
+.float blaster_edgedamage;
+.float blaster_radius;
+.float blaster_force;
+.float blaster_lifetime;
+#endif
index b3381fbc2fbbae4f41ccda9cb1e6e5453089872e..82b47037615e1d51cf6808e5ba55cf9fcb7a9493 100644 (file)
@@ -1,76 +1,5 @@
 #include "crylink.qh"
-#ifndef IMPLEMENTATION
-CLASS(Crylink, Weapon)
-/* ammotype  */ ATTRIB(Crylink, ammo_field, .int, ammo_cells);
-/* impulse   */ ATTRIB(Crylink, impulse, int, 6);
-/* flags     */ ATTRIB(Crylink, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH | WEP_FLAG_CANCLIMB | WEP_FLAG_NODUAL);
-/* rating    */ ATTRIB(Crylink, bot_pickupbasevalue, float, 6000);
-/* color     */ ATTRIB(Crylink, wpcolor, vector, '1 0.5 1');
-/* modelname */ ATTRIB(Crylink, mdl, string, "crylink");
-#ifdef GAMEQC
-/* model     */ ATTRIB(Crylink, m_model, Model, MDL_CRYLINK_ITEM);
-#endif
-/* crosshair */ ATTRIB(Crylink, w_crosshair, string, "gfx/crosshaircrylink");
-/* crosshair */ ATTRIB(Crylink, w_crosshair_size, float, 0.5);
-/* wepimg    */ ATTRIB(Crylink, model2, string, "weaponcrylink");
-/* refname   */ ATTRIB(Crylink, netname, string, "crylink");
-/* wepname   */ ATTRIB(Crylink, m_name, string, _("Crylink"));
-
-#define X(BEGIN, P, END, class, prefix) \
-       BEGIN(class) \
-               P(class, prefix, ammo, float, BOTH) \
-        P(class, prefix, animtime, float, BOTH) \
-        P(class, prefix, bouncedamagefactor, float, BOTH) \
-        P(class, prefix, bounces, float, BOTH) \
-        P(class, prefix, damage, float, BOTH) \
-        P(class, prefix, edgedamage, float, BOTH) \
-        P(class, prefix, force, float, BOTH) \
-        P(class, prefix, joindelay, float, BOTH) \
-        P(class, prefix, joinexplode, float, BOTH) \
-        P(class, prefix, joinexplode_damage, float, BOTH) \
-        P(class, prefix, joinexplode_edgedamage, float, BOTH) \
-        P(class, prefix, joinexplode_force, float, BOTH) \
-        P(class, prefix, joinexplode_radius, float, BOTH) \
-        P(class, prefix, joinspread, float, BOTH) \
-        P(class, prefix, linkexplode, float, BOTH) \
-        P(class, prefix, middle_fadetime, float, BOTH) \
-        P(class, prefix, middle_lifetime, float, BOTH) \
-        P(class, prefix, other_fadetime, float, BOTH) \
-        P(class, prefix, other_lifetime, float, BOTH) \
-        P(class, prefix, radius, float, BOTH) \
-        P(class, prefix, refire, float, BOTH) \
-        P(class, prefix, reload_ammo, float, NONE) \
-        P(class, prefix, reload_time, float, NONE) \
-        P(class, prefix, secondary, float, NONE) \
-        P(class, prefix, shots, float, BOTH) \
-        P(class, prefix, speed, float, BOTH) \
-        P(class, prefix, spreadtype, float, SEC) \
-        P(class, prefix, spread, float, BOTH) \
-        P(class, prefix, switchdelay_drop, float, NONE) \
-        P(class, prefix, switchdelay_raise, float, NONE) \
-        P(class, prefix, weaponreplace, string, NONE) \
-        P(class, prefix, weaponstartoverride, float, NONE) \
-        P(class, prefix, weaponstart, float, NONE) \
-        P(class, prefix, weaponthrowable, float, NONE) \
-       END()
-       W_PROPS(X, Crylink, crylink)
-#undef X
-
-ENDCLASS(Crylink)
-REGISTER_WEAPON(CRYLINK, crylink, NEW(Crylink));
 
-#ifdef SVQC
-.float gravity;
-.float crylink_waitrelease;
-.entity crylink_lastgroup;
-
-.entity crylink_owner; // we can't use realowner, as that's subject to change
-
-.entity queuenext;
-.entity queueprev;
-#endif
-#endif
-#ifdef IMPLEMENTATION
 #ifdef SVQC
 spawnfunc(weapon_crylink) { weapon_defaultspawnfunc(this, WEP_CRYLINK); }
 
@@ -699,4 +628,3 @@ METHOD(Crylink, wr_impacteffect, void(entity thiswep, entity actor))
     }
 }
 #endif
-#endif
index 6f70f09beec2219624baeca92e2cd7deaa104fb4..326fdf15bec0aa4d970b2b4f3264776868a23845 100644 (file)
@@ -1 +1,71 @@
 #pragma once
+
+CLASS(Crylink, Weapon)
+/* ammotype  */ ATTRIB(Crylink, ammo_field, .int, ammo_cells);
+/* impulse   */ ATTRIB(Crylink, impulse, int, 6);
+/* flags     */ ATTRIB(Crylink, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH | WEP_FLAG_CANCLIMB | WEP_FLAG_NODUAL);
+/* rating    */ ATTRIB(Crylink, bot_pickupbasevalue, float, 6000);
+/* color     */ ATTRIB(Crylink, wpcolor, vector, '1 0.5 1');
+/* modelname */ ATTRIB(Crylink, mdl, string, "crylink");
+#ifdef GAMEQC
+/* model     */ ATTRIB(Crylink, m_model, Model, MDL_CRYLINK_ITEM);
+#endif
+/* crosshair */ ATTRIB(Crylink, w_crosshair, string, "gfx/crosshaircrylink");
+/* crosshair */ ATTRIB(Crylink, w_crosshair_size, float, 0.5);
+/* wepimg    */ ATTRIB(Crylink, model2, string, "weaponcrylink");
+/* refname   */ ATTRIB(Crylink, netname, string, "crylink");
+/* wepname   */ ATTRIB(Crylink, m_name, string, _("Crylink"));
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, ammo, float, BOTH) \
+        P(class, prefix, animtime, float, BOTH) \
+        P(class, prefix, bouncedamagefactor, float, BOTH) \
+        P(class, prefix, bounces, float, BOTH) \
+        P(class, prefix, damage, float, BOTH) \
+        P(class, prefix, edgedamage, float, BOTH) \
+        P(class, prefix, force, float, BOTH) \
+        P(class, prefix, joindelay, float, BOTH) \
+        P(class, prefix, joinexplode, float, BOTH) \
+        P(class, prefix, joinexplode_damage, float, BOTH) \
+        P(class, prefix, joinexplode_edgedamage, float, BOTH) \
+        P(class, prefix, joinexplode_force, float, BOTH) \
+        P(class, prefix, joinexplode_radius, float, BOTH) \
+        P(class, prefix, joinspread, float, BOTH) \
+        P(class, prefix, linkexplode, float, BOTH) \
+        P(class, prefix, middle_fadetime, float, BOTH) \
+        P(class, prefix, middle_lifetime, float, BOTH) \
+        P(class, prefix, other_fadetime, float, BOTH) \
+        P(class, prefix, other_lifetime, float, BOTH) \
+        P(class, prefix, radius, float, BOTH) \
+        P(class, prefix, refire, float, BOTH) \
+        P(class, prefix, reload_ammo, float, NONE) \
+        P(class, prefix, reload_time, float, NONE) \
+        P(class, prefix, secondary, float, NONE) \
+        P(class, prefix, shots, float, BOTH) \
+        P(class, prefix, speed, float, BOTH) \
+        P(class, prefix, spreadtype, float, SEC) \
+        P(class, prefix, spread, float, BOTH) \
+        P(class, prefix, switchdelay_drop, float, NONE) \
+        P(class, prefix, switchdelay_raise, float, NONE) \
+        P(class, prefix, weaponreplace, string, NONE) \
+        P(class, prefix, weaponstartoverride, float, NONE) \
+        P(class, prefix, weaponstart, float, NONE) \
+        P(class, prefix, weaponthrowable, float, NONE) \
+       END()
+       W_PROPS(X, Crylink, crylink)
+#undef X
+
+ENDCLASS(Crylink)
+REGISTER_WEAPON(CRYLINK, crylink, NEW(Crylink));
+
+#ifdef SVQC
+.float gravity;
+.float crylink_waitrelease;
+.entity crylink_lastgroup;
+
+.entity crylink_owner; // we can't use realowner, as that's subject to change
+
+.entity queuenext;
+.entity queueprev;
+#endif
index dbdb7374b0244c3a26849680c5b21ac103ded86e..6e618c88ec22eda2d70197423a21b751d7b8afaf 100644 (file)
@@ -1,73 +1,5 @@
 #include "devastator.qh"
-#ifndef IMPLEMENTATION
-CLASS(Devastator, Weapon)
-/* ammotype  */ ATTRIB(Devastator, ammo_field, .int, ammo_rockets);
-/* impulse   */ ATTRIB(Devastator, impulse, int, 9);
-/* flags     */ ATTRIB(Devastator, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH | WEP_FLAG_NODUAL);
-/* rating    */ ATTRIB(Devastator, bot_pickupbasevalue, float, 8000);
-/* color     */ ATTRIB(Devastator, wpcolor, vector, '1 1 0');
-/* modelname */ ATTRIB(Devastator, mdl, string, "rl");
-#ifdef GAMEQC
-/* model     */ ATTRIB(Devastator, m_model, Model, MDL_DEVASTATOR_ITEM);
-#endif
-/* crosshair */ ATTRIB(Devastator, w_crosshair, string, "gfx/crosshairrocketlauncher");
-/* crosshair */ ATTRIB(Devastator, w_crosshair_size, float, 0.7);
-/* wepimg    */ ATTRIB(Devastator, model2, string, "weaponrocketlauncher");
-/* refname   */ ATTRIB(Devastator, netname, string, "devastator");
-/* wepname   */ ATTRIB(Devastator, m_name, string, _("Devastator"));
-
-#define X(BEGIN, P, END, class, prefix) \
-       BEGIN(class) \
-               P(class, prefix, ammo, float, NONE) \
-        P(class, prefix, animtime, float, NONE) \
-        P(class, prefix, damageforcescale, float, NONE) \
-        P(class, prefix, damage, float, NONE) \
-        P(class, prefix, detonatedelay, float, NONE) \
-        P(class, prefix, edgedamage, float, NONE) \
-        P(class, prefix, force, float, NONE) \
-        P(class, prefix, guidedelay, float, NONE) \
-        P(class, prefix, guidegoal, float, NONE) \
-        P(class, prefix, guideratedelay, float, NONE) \
-        P(class, prefix, guiderate, float, NONE) \
-        P(class, prefix, guidestop, float, NONE) \
-        P(class, prefix, health, float, NONE) \
-        P(class, prefix, lifetime, float, NONE) \
-        P(class, prefix, radius, float, NONE) \
-        P(class, prefix, refire, float, NONE) \
-               P(class, prefix, reload_ammo, float, NONE) \
-               P(class, prefix, reload_time, float, NONE) \
-        P(class, prefix, remote_damage, float, NONE) \
-        P(class, prefix, remote_edgedamage, float, NONE) \
-        P(class, prefix, remote_force, float, NONE) \
-        P(class, prefix, remote_jump_damage, float, NONE) \
-        P(class, prefix, remote_jump_force, float, NONE) \
-        P(class, prefix, remote_jump_radius, float, NONE) \
-        P(class, prefix, remote_jump_velocity_z_add, float, NONE) \
-        P(class, prefix, remote_jump_velocity_z_max, float, NONE) \
-        P(class, prefix, remote_jump_velocity_z_min, float, NONE) \
-        P(class, prefix, remote_radius, float, NONE) \
-        P(class, prefix, speedaccel, float, NONE) \
-        P(class, prefix, speedstart, float, NONE) \
-        P(class, prefix, speed, float, NONE) \
-               P(class, prefix, switchdelay_drop, float, NONE) \
-               P(class, prefix, switchdelay_raise, float, NONE) \
-               P(class, prefix, weaponreplace, string,NONE) \
-               P(class, prefix, weaponstartoverride, float, NONE) \
-               P(class, prefix, weaponstart, float, NONE) \
-               P(class, prefix, weaponthrowable, float, NONE) \
-       END()
-       W_PROPS(X, Devastator, devastator)
-#undef X
-
-ENDCLASS(Devastator)
-REGISTER_WEAPON(DEVASTATOR, devastator, NEW(Devastator));
 
-#ifdef SVQC
-.float rl_release;
-.float rl_detonate_later;
-#endif
-#endif
-#ifdef IMPLEMENTATION
 #ifdef SVQC
 spawnfunc(weapon_devastator) { weapon_defaultspawnfunc(this, WEP_DEVASTATOR); }
 spawnfunc(weapon_rocketlauncher) { spawnfunc_weapon_devastator(this); }
@@ -615,4 +547,3 @@ METHOD(Devastator, wr_impacteffect, void(entity thiswep, entity actor))
 }
 
 #endif
-#endif
index 6f70f09beec2219624baeca92e2cd7deaa104fb4..dd68ccf58e3f6ad223ecc4b68a79366cebd98c3e 100644 (file)
@@ -1 +1,68 @@
 #pragma once
+
+CLASS(Devastator, Weapon)
+/* ammotype  */ ATTRIB(Devastator, ammo_field, .int, ammo_rockets);
+/* impulse   */ ATTRIB(Devastator, impulse, int, 9);
+/* flags     */ ATTRIB(Devastator, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH | WEP_FLAG_NODUAL);
+/* rating    */ ATTRIB(Devastator, bot_pickupbasevalue, float, 8000);
+/* color     */ ATTRIB(Devastator, wpcolor, vector, '1 1 0');
+/* modelname */ ATTRIB(Devastator, mdl, string, "rl");
+#ifdef GAMEQC
+/* model     */ ATTRIB(Devastator, m_model, Model, MDL_DEVASTATOR_ITEM);
+#endif
+/* crosshair */ ATTRIB(Devastator, w_crosshair, string, "gfx/crosshairrocketlauncher");
+/* crosshair */ ATTRIB(Devastator, w_crosshair_size, float, 0.7);
+/* wepimg    */ ATTRIB(Devastator, model2, string, "weaponrocketlauncher");
+/* refname   */ ATTRIB(Devastator, netname, string, "devastator");
+/* wepname   */ ATTRIB(Devastator, m_name, string, _("Devastator"));
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, ammo, float, NONE) \
+        P(class, prefix, animtime, float, NONE) \
+        P(class, prefix, damageforcescale, float, NONE) \
+        P(class, prefix, damage, float, NONE) \
+        P(class, prefix, detonatedelay, float, NONE) \
+        P(class, prefix, edgedamage, float, NONE) \
+        P(class, prefix, force, float, NONE) \
+        P(class, prefix, guidedelay, float, NONE) \
+        P(class, prefix, guidegoal, float, NONE) \
+        P(class, prefix, guideratedelay, float, NONE) \
+        P(class, prefix, guiderate, float, NONE) \
+        P(class, prefix, guidestop, float, NONE) \
+        P(class, prefix, health, float, NONE) \
+        P(class, prefix, lifetime, float, NONE) \
+        P(class, prefix, radius, float, NONE) \
+        P(class, prefix, refire, float, NONE) \
+               P(class, prefix, reload_ammo, float, NONE) \
+               P(class, prefix, reload_time, float, NONE) \
+        P(class, prefix, remote_damage, float, NONE) \
+        P(class, prefix, remote_edgedamage, float, NONE) \
+        P(class, prefix, remote_force, float, NONE) \
+        P(class, prefix, remote_jump_damage, float, NONE) \
+        P(class, prefix, remote_jump_force, float, NONE) \
+        P(class, prefix, remote_jump_radius, float, NONE) \
+        P(class, prefix, remote_jump_velocity_z_add, float, NONE) \
+        P(class, prefix, remote_jump_velocity_z_max, float, NONE) \
+        P(class, prefix, remote_jump_velocity_z_min, float, NONE) \
+        P(class, prefix, remote_radius, float, NONE) \
+        P(class, prefix, speedaccel, float, NONE) \
+        P(class, prefix, speedstart, float, NONE) \
+        P(class, prefix, speed, float, NONE) \
+               P(class, prefix, switchdelay_drop, float, NONE) \
+               P(class, prefix, switchdelay_raise, float, NONE) \
+               P(class, prefix, weaponreplace, string,NONE) \
+               P(class, prefix, weaponstartoverride, float, NONE) \
+               P(class, prefix, weaponstart, float, NONE) \
+               P(class, prefix, weaponthrowable, float, NONE) \
+       END()
+       W_PROPS(X, Devastator, devastator)
+#undef X
+
+ENDCLASS(Devastator)
+REGISTER_WEAPON(DEVASTATOR, devastator, NEW(Devastator));
+
+#ifdef SVQC
+.float rl_release;
+.float rl_detonate_later;
+#endif
index 9d01d1c329c46ecc6fb1de8e07f7631e9269ece7..f2fb14614004e9ef2982d5656753514ad7ecf016 100644 (file)
@@ -1,79 +1,5 @@
 #include "electro.qh"
-#ifndef IMPLEMENTATION
-CLASS(Electro, Weapon)
-/* ammotype  */ ATTRIB(Electro, ammo_field, .int, ammo_cells);
-/* impulse   */ ATTRIB(Electro, impulse, int, 5);
-/* flags     */ ATTRIB(Electro, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH);
-/* rating    */ ATTRIB(Electro, bot_pickupbasevalue, float, 5000);
-/* color     */ ATTRIB(Electro, wpcolor, vector, '0 0.5 1');
-/* modelname */ ATTRIB(Electro, mdl, string, "electro");
-#ifdef GAMEQC
-/* model     */ ATTRIB(Electro, m_model, Model, MDL_ELECTRO_ITEM);
-#endif
-/* crosshair */ ATTRIB(Electro, w_crosshair, string, "gfx/crosshairelectro");
-/* crosshair */ ATTRIB(Electro, w_crosshair_size, float, 0.6);
-/* wepimg    */ ATTRIB(Electro, model2, string, "weaponelectro");
-/* refname   */ ATTRIB(Electro, netname, string, "electro");
-/* wepname   */ ATTRIB(Electro, m_name, string, _("Electro"));
-
-#define X(BEGIN, P, END, class, prefix) \
-       BEGIN(class) \
-               P(class, prefix, ammo, float, BOTH) \
-               P(class, prefix, animtime, float, BOTH) \
-               P(class, prefix, bouncefactor, float, SEC) \
-               P(class, prefix, bouncestop, float, SEC) \
-               P(class, prefix, comboradius, float, PRI) \
-               P(class, prefix, combo_comboradius, float, NONE) \
-               P(class, prefix, combo_comboradius_thruwall, float, NONE) \
-               P(class, prefix, combo_damage, float, NONE) \
-               P(class, prefix, combo_edgedamage, float, NONE) \
-               P(class, prefix, combo_force, float, NONE) \
-               P(class, prefix, combo_radius, float, NONE) \
-               P(class, prefix, combo_safeammocheck, float, NONE) \
-               P(class, prefix, combo_speed, float, NONE) \
-               P(class, prefix, count, float, SEC) \
-               P(class, prefix, damagedbycontents, float, SEC) \
-               P(class, prefix, damageforcescale, float, SEC) \
-               P(class, prefix, damage, float, BOTH) \
-               P(class, prefix, edgedamage, float, BOTH) \
-               P(class, prefix, force, float, BOTH) \
-               P(class, prefix, health, float, SEC) \
-               P(class, prefix, lifetime, float, BOTH) \
-               P(class, prefix, midaircombo_explode, float, PRI) \
-               P(class, prefix, midaircombo_interval, float, PRI) \
-               P(class, prefix, midaircombo_radius, float, PRI) \
-               P(class, prefix, radius, float, BOTH) \
-               P(class, prefix, refire2, float, SEC) \
-               P(class, prefix, refire, float, BOTH) \
-               P(class, prefix, reload_ammo, float, NONE) \
-               P(class, prefix, reload_time, float, NONE) \
-               P(class, prefix, speed, float, BOTH) \
-               P(class, prefix, speed_up, float, SEC) \
-               P(class, prefix, speed_z, float, SEC) \
-               P(class, prefix, spread, float, BOTH) \
-               P(class, prefix, stick, float, SEC) \
-               P(class, prefix, switchdelay_drop, float, NONE) \
-               P(class, prefix, switchdelay_raise, float, NONE) \
-               P(class, prefix, touchexplode, float, SEC) \
-               P(class, prefix, weaponreplace, string,NONE) \
-               P(class, prefix, weaponstartoverride, float, NONE) \
-               P(class, prefix, weaponstart, float, NONE) \
-               P(class, prefix, weaponthrowable, float, NONE) \
-       END()
-       W_PROPS(X, Electro, electro)
-#undef X
-
-ENDCLASS(Electro)
-REGISTER_WEAPON(ELECTRO, electro, NEW(Electro));
-
 
-#ifdef SVQC
-.float electro_count;
-.float electro_secondarytime;
-void W_Electro_ExplodeCombo(entity this);
-#endif
-#endif
-#ifdef IMPLEMENTATION
 #ifdef SVQC
 spawnfunc(weapon_electro) { weapon_defaultspawnfunc(this, WEP_ELECTRO); }
 
@@ -643,4 +569,3 @@ METHOD(Electro, wr_impacteffect, void(entity thiswep, entity actor))
 }
 
 #endif
-#endif
index 6f70f09beec2219624baeca92e2cd7deaa104fb4..32b45c6928f2bb7faf1fe94919ef03260f7ce5fe 100644 (file)
@@ -1 +1,74 @@
 #pragma once
+
+CLASS(Electro, Weapon)
+/* ammotype  */ ATTRIB(Electro, ammo_field, .int, ammo_cells);
+/* impulse   */ ATTRIB(Electro, impulse, int, 5);
+/* flags     */ ATTRIB(Electro, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH);
+/* rating    */ ATTRIB(Electro, bot_pickupbasevalue, float, 5000);
+/* color     */ ATTRIB(Electro, wpcolor, vector, '0 0.5 1');
+/* modelname */ ATTRIB(Electro, mdl, string, "electro");
+#ifdef GAMEQC
+/* model     */ ATTRIB(Electro, m_model, Model, MDL_ELECTRO_ITEM);
+#endif
+/* crosshair */ ATTRIB(Electro, w_crosshair, string, "gfx/crosshairelectro");
+/* crosshair */ ATTRIB(Electro, w_crosshair_size, float, 0.6);
+/* wepimg    */ ATTRIB(Electro, model2, string, "weaponelectro");
+/* refname   */ ATTRIB(Electro, netname, string, "electro");
+/* wepname   */ ATTRIB(Electro, m_name, string, _("Electro"));
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, ammo, float, BOTH) \
+               P(class, prefix, animtime, float, BOTH) \
+               P(class, prefix, bouncefactor, float, SEC) \
+               P(class, prefix, bouncestop, float, SEC) \
+               P(class, prefix, comboradius, float, PRI) \
+               P(class, prefix, combo_comboradius, float, NONE) \
+               P(class, prefix, combo_comboradius_thruwall, float, NONE) \
+               P(class, prefix, combo_damage, float, NONE) \
+               P(class, prefix, combo_edgedamage, float, NONE) \
+               P(class, prefix, combo_force, float, NONE) \
+               P(class, prefix, combo_radius, float, NONE) \
+               P(class, prefix, combo_safeammocheck, float, NONE) \
+               P(class, prefix, combo_speed, float, NONE) \
+               P(class, prefix, count, float, SEC) \
+               P(class, prefix, damagedbycontents, float, SEC) \
+               P(class, prefix, damageforcescale, float, SEC) \
+               P(class, prefix, damage, float, BOTH) \
+               P(class, prefix, edgedamage, float, BOTH) \
+               P(class, prefix, force, float, BOTH) \
+               P(class, prefix, health, float, SEC) \
+               P(class, prefix, lifetime, float, BOTH) \
+               P(class, prefix, midaircombo_explode, float, PRI) \
+               P(class, prefix, midaircombo_interval, float, PRI) \
+               P(class, prefix, midaircombo_radius, float, PRI) \
+               P(class, prefix, radius, float, BOTH) \
+               P(class, prefix, refire2, float, SEC) \
+               P(class, prefix, refire, float, BOTH) \
+               P(class, prefix, reload_ammo, float, NONE) \
+               P(class, prefix, reload_time, float, NONE) \
+               P(class, prefix, speed, float, BOTH) \
+               P(class, prefix, speed_up, float, SEC) \
+               P(class, prefix, speed_z, float, SEC) \
+               P(class, prefix, spread, float, BOTH) \
+               P(class, prefix, stick, float, SEC) \
+               P(class, prefix, switchdelay_drop, float, NONE) \
+               P(class, prefix, switchdelay_raise, float, NONE) \
+               P(class, prefix, touchexplode, float, SEC) \
+               P(class, prefix, weaponreplace, string,NONE) \
+               P(class, prefix, weaponstartoverride, float, NONE) \
+               P(class, prefix, weaponstart, float, NONE) \
+               P(class, prefix, weaponthrowable, float, NONE) \
+       END()
+       W_PROPS(X, Electro, electro)
+#undef X
+
+ENDCLASS(Electro)
+REGISTER_WEAPON(ELECTRO, electro, NEW(Electro));
+
+
+#ifdef SVQC
+.float electro_count;
+.float electro_secondarytime;
+void W_Electro_ExplodeCombo(entity this);
+#endif
index e968f881f25f9c14012ae78ad6435a24a37980ae..3f9cd4c4e18f6d731d2d7db54764b983ceb8ec0e 100644 (file)
@@ -1,65 +1,5 @@
 #include "fireball.qh"
-#ifndef IMPLEMENTATION
-CLASS(Fireball, Weapon)
-/* ammotype  */ //ATTRIB(Fireball, ammo_field, .int, ammo_none);
-/* impulse   */ ATTRIB(Fireball, impulse, int, 9);
-/* flags     */ ATTRIB(Fireball, spawnflags, int, WEP_FLAG_SUPERWEAPON | WEP_TYPE_SPLASH | WEP_FLAG_NODUAL);
-/* rating    */ ATTRIB(Fireball, bot_pickupbasevalue, float, 5000);
-/* color     */ ATTRIB(Fireball, wpcolor, vector, '1 0.5 0');
-/* modelname */ ATTRIB(Fireball, mdl, string, "fireball");
-#ifdef GAMEQC
-/* model     */ ATTRIB(Fireball, m_model, Model, MDL_FIREBALL_ITEM);
-#endif
-/* crosshair */ ATTRIB(Fireball, w_crosshair, string, "gfx/crosshairfireball");
-/* crosshair */ //ATTRIB(Fireball, w_crosshair_size, float, 0.65);
-/* wepimg    */ ATTRIB(Fireball, model2, string, "weaponfireball");
-/* refname   */ ATTRIB(Fireball, netname, string, "fireball");
-/* wepname   */ ATTRIB(Fireball, m_name, string, _("Fireball"));
-
-#define X(BEGIN, P, END, class, prefix) \
-       BEGIN(class) \
-               P(class, prefix, animtime, float, BOTH) \
-               P(class, prefix, bfgdamage, float, PRI) \
-               P(class, prefix, bfgforce, float, PRI) \
-               P(class, prefix, bfgradius, float, PRI) \
-               P(class, prefix, damageforcescale, float, BOTH) \
-               P(class, prefix, damagetime, float, SEC) \
-               P(class, prefix, damage, float, BOTH) \
-               P(class, prefix, edgedamage, float, PRI) \
-               P(class, prefix, force, float, PRI) \
-               P(class, prefix, health, float, PRI) \
-               P(class, prefix, laserburntime, float, BOTH) \
-               P(class, prefix, laserdamage, float, BOTH) \
-               P(class, prefix, laseredgedamage, float, BOTH) \
-               P(class, prefix, laserradius, float, BOTH) \
-               P(class, prefix, lifetime, float, BOTH) \
-               P(class, prefix, radius, float, PRI) \
-               P(class, prefix, refire2, float, PRI) \
-               P(class, prefix, refire, float, BOTH) \
-               P(class, prefix, speed, float, BOTH) \
-               P(class, prefix, speed_up, float, SEC) \
-               P(class, prefix, speed_z, float, SEC) \
-               P(class, prefix, spread, float, BOTH) \
-               P(class, prefix, switchdelay_drop, float, NONE) \
-               P(class, prefix, switchdelay_raise, float, NONE) \
-               P(class, prefix, weaponreplace, string,NONE) \
-               P(class, prefix, weaponstartoverride, float, NONE) \
-               P(class, prefix, weaponstart, float, NONE) \
-               P(class, prefix, weaponthrowable, float, NONE) \
-       END()
-       W_PROPS(X, Fireball, fireball)
-#undef X
-
-ENDCLASS(Fireball)
-REGISTER_WEAPON(FIREBALL, fireball, NEW(Fireball));
 
-#ifdef SVQC
-.float bot_primary_fireballmooth; // whatever a mooth is
-.vector fireball_impactvec;
-.float fireball_primarytime;
-#endif
-#endif
-#ifdef IMPLEMENTATION
 #ifdef SVQC
 spawnfunc(weapon_fireball) { weapon_defaultspawnfunc(this, WEP_FIREBALL); }
 
@@ -456,4 +396,3 @@ METHOD(Fireball, wr_impacteffect, void(entity thiswep, entity actor))
 }
 
 #endif
-#endif
index 6f70f09beec2219624baeca92e2cd7deaa104fb4..d6d8f017edc9c0027726200f00a89b689f895321 100644 (file)
@@ -1 +1,60 @@
 #pragma once
+
+CLASS(Fireball, Weapon)
+/* ammotype  */ //ATTRIB(Fireball, ammo_field, .int, ammo_none);
+/* impulse   */ ATTRIB(Fireball, impulse, int, 9);
+/* flags     */ ATTRIB(Fireball, spawnflags, int, WEP_FLAG_SUPERWEAPON | WEP_TYPE_SPLASH | WEP_FLAG_NODUAL);
+/* rating    */ ATTRIB(Fireball, bot_pickupbasevalue, float, 5000);
+/* color     */ ATTRIB(Fireball, wpcolor, vector, '1 0.5 0');
+/* modelname */ ATTRIB(Fireball, mdl, string, "fireball");
+#ifdef GAMEQC
+/* model     */ ATTRIB(Fireball, m_model, Model, MDL_FIREBALL_ITEM);
+#endif
+/* crosshair */ ATTRIB(Fireball, w_crosshair, string, "gfx/crosshairfireball");
+/* crosshair */ //ATTRIB(Fireball, w_crosshair_size, float, 0.65);
+/* wepimg    */ ATTRIB(Fireball, model2, string, "weaponfireball");
+/* refname   */ ATTRIB(Fireball, netname, string, "fireball");
+/* wepname   */ ATTRIB(Fireball, m_name, string, _("Fireball"));
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, animtime, float, BOTH) \
+               P(class, prefix, bfgdamage, float, PRI) \
+               P(class, prefix, bfgforce, float, PRI) \
+               P(class, prefix, bfgradius, float, PRI) \
+               P(class, prefix, damageforcescale, float, BOTH) \
+               P(class, prefix, damagetime, float, SEC) \
+               P(class, prefix, damage, float, BOTH) \
+               P(class, prefix, edgedamage, float, PRI) \
+               P(class, prefix, force, float, PRI) \
+               P(class, prefix, health, float, PRI) \
+               P(class, prefix, laserburntime, float, BOTH) \
+               P(class, prefix, laserdamage, float, BOTH) \
+               P(class, prefix, laseredgedamage, float, BOTH) \
+               P(class, prefix, laserradius, float, BOTH) \
+               P(class, prefix, lifetime, float, BOTH) \
+               P(class, prefix, radius, float, PRI) \
+               P(class, prefix, refire2, float, PRI) \
+               P(class, prefix, refire, float, BOTH) \
+               P(class, prefix, speed, float, BOTH) \
+               P(class, prefix, speed_up, float, SEC) \
+               P(class, prefix, speed_z, float, SEC) \
+               P(class, prefix, spread, float, BOTH) \
+               P(class, prefix, switchdelay_drop, float, NONE) \
+               P(class, prefix, switchdelay_raise, float, NONE) \
+               P(class, prefix, weaponreplace, string,NONE) \
+               P(class, prefix, weaponstartoverride, float, NONE) \
+               P(class, prefix, weaponstart, float, NONE) \
+               P(class, prefix, weaponthrowable, float, NONE) \
+       END()
+       W_PROPS(X, Fireball, fireball)
+#undef X
+
+ENDCLASS(Fireball)
+REGISTER_WEAPON(FIREBALL, fireball, NEW(Fireball));
+
+#ifdef SVQC
+.float bot_primary_fireballmooth; // whatever a mooth is
+.vector fireball_impactvec;
+.float fireball_primarytime;
+#endif
index f7b289278608a7a0591abb74481d2d0878965302..5272e6060a8fdab0c417ab986c96898fe2097f07 100644 (file)
@@ -1,64 +1,5 @@
 #include "hagar.qh"
-#ifndef IMPLEMENTATION
-CLASS(Hagar, Weapon)
-/* ammotype  */ ATTRIB(Hagar, ammo_field, .int, ammo_rockets);
-/* impulse   */ ATTRIB(Hagar, impulse, int, 8);
-/* flags     */ ATTRIB(Hagar, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH);
-/* rating    */ ATTRIB(Hagar, bot_pickupbasevalue, float, 6000);
-/* color     */ ATTRIB(Hagar, wpcolor, vector, '1 1 0.5');
-/* modelname */ ATTRIB(Hagar, mdl, string, "hagar");
-#ifdef GAMEQC
-/* model     */ ATTRIB(Hagar, m_model, Model, MDL_HAGAR_ITEM);
-#endif
-/* crosshair */ ATTRIB(Hagar, w_crosshair, string, "gfx/crosshairhagar");
-/* crosshair */ ATTRIB(Hagar, w_crosshair_size, float, 0.8);
-/* wepimg    */ ATTRIB(Hagar, model2, string, "weaponhagar");
-/* refname   */ ATTRIB(Hagar, netname, string, "hagar");
-/* wepname   */ ATTRIB(Hagar, m_name, string, _("Hagar"));
-
-#define X(BEGIN, P, END, class, prefix) \
-       BEGIN(class) \
-               P(class, prefix, ammo, float, BOTH) \
-        P(class, prefix, damageforcescale, float, BOTH) \
-        P(class, prefix, damage, float, BOTH) \
-        P(class, prefix, edgedamage, float, BOTH) \
-        P(class, prefix, force, float, BOTH) \
-        P(class, prefix, health, float, BOTH) \
-        P(class, prefix, lifetime, float, PRI) \
-        P(class, prefix, lifetime_min, float, SEC) \
-        P(class, prefix, lifetime_rand, float, SEC) \
-        P(class, prefix, load, float, SEC) \
-        P(class, prefix, load_abort, float, SEC) \
-        P(class, prefix, load_animtime, float, SEC) \
-        P(class, prefix, load_hold, float, SEC) \
-        P(class, prefix, load_linkexplode, float, SEC) \
-        P(class, prefix, load_max, float, SEC) \
-        P(class, prefix, load_releasedeath, float, SEC) \
-        P(class, prefix, load_speed, float, SEC) \
-        P(class, prefix, load_spread, float, SEC) \
-        P(class, prefix, load_spread_bias, float, SEC) \
-        P(class, prefix, radius, float, BOTH) \
-        P(class, prefix, refire, float, BOTH) \
-        P(class, prefix, reload_ammo, float, NONE) \
-        P(class, prefix, reload_time, float, NONE) \
-        P(class, prefix, secondary, float, NONE) \
-        P(class, prefix, speed, float, BOTH) \
-        P(class, prefix, spread, float, BOTH) \
-        P(class, prefix, switchdelay_drop, float, NONE) \
-        P(class, prefix, switchdelay_raise, float, NONE) \
-        P(class, prefix, weaponreplace, string,NONE) \
-        P(class, prefix, weaponstartoverride, float, NONE) \
-        P(class, prefix, weaponstart, float, NONE) \
-        P(class, prefix, weaponthrowable, float, NONE) \
-       END()
-    W_PROPS(X, Hagar, hagar)
-#undef X
-
-ENDCLASS(Hagar)
-REGISTER_WEAPON(HAGAR, hagar, NEW(Hagar));
 
-#endif
-#ifdef IMPLEMENTATION
 #ifdef SVQC
 spawnfunc(weapon_hagar) { weapon_defaultspawnfunc(this, WEP_HAGAR); }
 
@@ -569,4 +510,3 @@ METHOD(Hagar, wr_impacteffect, void(entity thiswep, entity actor))
 }
 
 #endif
-#endif
index 6f70f09beec2219624baeca92e2cd7deaa104fb4..7dfd3c6312541e47f4534f3af1cb756a3a5abbc6 100644 (file)
@@ -1 +1,58 @@
 #pragma once
+
+CLASS(Hagar, Weapon)
+/* ammotype  */ ATTRIB(Hagar, ammo_field, .int, ammo_rockets);
+/* impulse   */ ATTRIB(Hagar, impulse, int, 8);
+/* flags     */ ATTRIB(Hagar, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH);
+/* rating    */ ATTRIB(Hagar, bot_pickupbasevalue, float, 6000);
+/* color     */ ATTRIB(Hagar, wpcolor, vector, '1 1 0.5');
+/* modelname */ ATTRIB(Hagar, mdl, string, "hagar");
+#ifdef GAMEQC
+/* model     */ ATTRIB(Hagar, m_model, Model, MDL_HAGAR_ITEM);
+#endif
+/* crosshair */ ATTRIB(Hagar, w_crosshair, string, "gfx/crosshairhagar");
+/* crosshair */ ATTRIB(Hagar, w_crosshair_size, float, 0.8);
+/* wepimg    */ ATTRIB(Hagar, model2, string, "weaponhagar");
+/* refname   */ ATTRIB(Hagar, netname, string, "hagar");
+/* wepname   */ ATTRIB(Hagar, m_name, string, _("Hagar"));
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, ammo, float, BOTH) \
+        P(class, prefix, damageforcescale, float, BOTH) \
+        P(class, prefix, damage, float, BOTH) \
+        P(class, prefix, edgedamage, float, BOTH) \
+        P(class, prefix, force, float, BOTH) \
+        P(class, prefix, health, float, BOTH) \
+        P(class, prefix, lifetime, float, PRI) \
+        P(class, prefix, lifetime_min, float, SEC) \
+        P(class, prefix, lifetime_rand, float, SEC) \
+        P(class, prefix, load, float, SEC) \
+        P(class, prefix, load_abort, float, SEC) \
+        P(class, prefix, load_animtime, float, SEC) \
+        P(class, prefix, load_hold, float, SEC) \
+        P(class, prefix, load_linkexplode, float, SEC) \
+        P(class, prefix, load_max, float, SEC) \
+        P(class, prefix, load_releasedeath, float, SEC) \
+        P(class, prefix, load_speed, float, SEC) \
+        P(class, prefix, load_spread, float, SEC) \
+        P(class, prefix, load_spread_bias, float, SEC) \
+        P(class, prefix, radius, float, BOTH) \
+        P(class, prefix, refire, float, BOTH) \
+        P(class, prefix, reload_ammo, float, NONE) \
+        P(class, prefix, reload_time, float, NONE) \
+        P(class, prefix, secondary, float, NONE) \
+        P(class, prefix, speed, float, BOTH) \
+        P(class, prefix, spread, float, BOTH) \
+        P(class, prefix, switchdelay_drop, float, NONE) \
+        P(class, prefix, switchdelay_raise, float, NONE) \
+        P(class, prefix, weaponreplace, string,NONE) \
+        P(class, prefix, weaponstartoverride, float, NONE) \
+        P(class, prefix, weaponstart, float, NONE) \
+        P(class, prefix, weaponthrowable, float, NONE) \
+       END()
+    W_PROPS(X, Hagar, hagar)
+#undef X
+
+ENDCLASS(Hagar)
+REGISTER_WEAPON(HAGAR, hagar, NEW(Hagar));
index 6e03b1041406233b5c0130f08be7c8782c79c25f..0193270a61e592108213e723afccba610d636e92 100644 (file)
@@ -1,57 +1,5 @@
 #include "hlac.qh"
-#ifndef IMPLEMENTATION
-CLASS(HLAC, Weapon)
-/* ammotype  */ ATTRIB(HLAC, ammo_field, .int, ammo_cells);
-/* impulse   */ ATTRIB(HLAC, impulse, int, 6);
-/* flags     */ ATTRIB(HLAC, spawnflags, int, WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH);
-/* rating    */ ATTRIB(HLAC, bot_pickupbasevalue, float, 4000);
-/* color     */ ATTRIB(HLAC, wpcolor, vector, '0 1 0');
-/* modelname */ ATTRIB(HLAC, mdl, string, "hlac");
-#ifdef GAMEQC
-/* model     */ ATTRIB(HLAC, m_model, Model, MDL_HLAC_ITEM);
-#endif
-/* crosshair */ ATTRIB(HLAC, w_crosshair, string, "gfx/crosshairhlac");
-/* crosshair */ ATTRIB(HLAC, w_crosshair_size, float, 0.6);
-/* wepimg    */ ATTRIB(HLAC, model2, string, "weaponhlac");
-/* refname   */ ATTRIB(HLAC, netname, string, "hlac");
-/* wepname   */ ATTRIB(HLAC, m_name, string, _("Heavy Laser Assault Cannon"));
-
-#define X(BEGIN, P, END, class, prefix) \
-       BEGIN(class) \
-               P(class, prefix, ammo, float, BOTH) \
-               P(class, prefix, animtime, float, BOTH) \
-               P(class, prefix, damage, float, BOTH) \
-               P(class, prefix, edgedamage, float, BOTH) \
-               P(class, prefix, force, float, BOTH) \
-               P(class, prefix, lifetime, float, BOTH) \
-               P(class, prefix, radius, float, BOTH) \
-               P(class, prefix, refire, float, BOTH) \
-               P(class, prefix, reload_ammo, float, NONE) \
-               P(class, prefix, reload_time, float, NONE) \
-               P(class, prefix, secondary, float, NONE) \
-               P(class, prefix, shots, float, SEC) \
-               P(class, prefix, speed, float, BOTH) \
-               P(class, prefix, spread, float, SEC) \
-               P(class, prefix, spread_add, float, PRI) \
-               P(class, prefix, spread_crouchmod, float, BOTH) \
-               P(class, prefix, spread_max, float, PRI) \
-               P(class, prefix, spread_min, float, PRI) \
-               P(class, prefix, switchdelay_drop, float, NONE) \
-               P(class, prefix, switchdelay_raise, float, NONE) \
-               P(class, prefix, weaponreplace, string,NONE) \
-               P(class, prefix, weaponstartoverride, float, NONE) \
-               P(class, prefix, weaponstart, float, NONE) \
-               P(class, prefix, weaponthrowable, float, NONE) \
-       END()
-    W_PROPS(X, HLAC, hlac)
-#undef X
-
-ENDCLASS(HLAC)
-REGISTER_WEAPON(HLAC, hlac, NEW(HLAC));
-
 
-#endif
-#ifdef IMPLEMENTATION
 #ifdef SVQC
 spawnfunc(weapon_hlac) { weapon_defaultspawnfunc(this, WEP_HLAC); }
 
@@ -277,4 +225,3 @@ METHOD(HLAC, wr_impacteffect, void(entity thiswep, entity actor))
 }
 
 #endif
-#endif
index 6f70f09beec2219624baeca92e2cd7deaa104fb4..f965abcbf79e62fac163c5f2c52dec2e98fb476e 100644 (file)
@@ -1 +1,50 @@
 #pragma once
+
+CLASS(HLAC, Weapon)
+/* ammotype  */ ATTRIB(HLAC, ammo_field, .int, ammo_cells);
+/* impulse   */ ATTRIB(HLAC, impulse, int, 6);
+/* flags     */ ATTRIB(HLAC, spawnflags, int, WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH);
+/* rating    */ ATTRIB(HLAC, bot_pickupbasevalue, float, 4000);
+/* color     */ ATTRIB(HLAC, wpcolor, vector, '0 1 0');
+/* modelname */ ATTRIB(HLAC, mdl, string, "hlac");
+#ifdef GAMEQC
+/* model     */ ATTRIB(HLAC, m_model, Model, MDL_HLAC_ITEM);
+#endif
+/* crosshair */ ATTRIB(HLAC, w_crosshair, string, "gfx/crosshairhlac");
+/* crosshair */ ATTRIB(HLAC, w_crosshair_size, float, 0.6);
+/* wepimg    */ ATTRIB(HLAC, model2, string, "weaponhlac");
+/* refname   */ ATTRIB(HLAC, netname, string, "hlac");
+/* wepname   */ ATTRIB(HLAC, m_name, string, _("Heavy Laser Assault Cannon"));
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, ammo, float, BOTH) \
+               P(class, prefix, animtime, float, BOTH) \
+               P(class, prefix, damage, float, BOTH) \
+               P(class, prefix, edgedamage, float, BOTH) \
+               P(class, prefix, force, float, BOTH) \
+               P(class, prefix, lifetime, float, BOTH) \
+               P(class, prefix, radius, float, BOTH) \
+               P(class, prefix, refire, float, BOTH) \
+               P(class, prefix, reload_ammo, float, NONE) \
+               P(class, prefix, reload_time, float, NONE) \
+               P(class, prefix, secondary, float, NONE) \
+               P(class, prefix, shots, float, SEC) \
+               P(class, prefix, speed, float, BOTH) \
+               P(class, prefix, spread, float, SEC) \
+               P(class, prefix, spread_add, float, PRI) \
+               P(class, prefix, spread_crouchmod, float, BOTH) \
+               P(class, prefix, spread_max, float, PRI) \
+               P(class, prefix, spread_min, float, PRI) \
+               P(class, prefix, switchdelay_drop, float, NONE) \
+               P(class, prefix, switchdelay_raise, float, NONE) \
+               P(class, prefix, weaponreplace, string,NONE) \
+               P(class, prefix, weaponstartoverride, float, NONE) \
+               P(class, prefix, weaponstart, float, NONE) \
+               P(class, prefix, weaponthrowable, float, NONE) \
+       END()
+    W_PROPS(X, HLAC, hlac)
+#undef X
+
+ENDCLASS(HLAC)
+REGISTER_WEAPON(HLAC, hlac, NEW(HLAC));
index 26c04ad4fa200f536252a5389b5dea089137932b..d92e0caa8538b4c9ec4ccc5c0bc79a3fef41e7f4 100644 (file)
@@ -1,83 +1,7 @@
 #include "hook.qh"
-#ifndef IMPLEMENTATION
-CLASS(Hook, Weapon)
-/* ammotype  */ ATTRIB(Hook, ammo_field, .int, ammo_fuel);
-/* impulse   */ ATTRIB(Hook, impulse, int, 0);
-/* flags     */ ATTRIB(Hook, spawnflags, int, WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH);
-/* rating    */ ATTRIB(Hook, bot_pickupbasevalue, float, 0);
-/* color     */ ATTRIB(Hook, wpcolor, vector, '0 0.5 0');
-/* modelname */ ATTRIB(Hook, mdl, string, "hookgun");
-#ifdef GAMEQC
-/* model     */ ATTRIB(Hook, m_model, Model, MDL_HOOK_ITEM);
-#endif
-/* crosshair */ ATTRIB(Hook, w_crosshair, string, "gfx/crosshairhook");
-/* crosshair */ ATTRIB(Hook, w_crosshair_size, float, 0.5);
-/* wepimg    */ ATTRIB(Hook, model2, string, "weaponhook");
-/* refname   */ ATTRIB(Hook, netname, string, "hook");
-/* wepname   */ ATTRIB(Hook, m_name, string, _("Grappling Hook"));
-       ATTRIB(Hook, ammo_factor, float, 1);
-
-#define X(BEGIN, P, END, class, prefix) \
-       BEGIN(class) \
-               P(class, prefix, ammo, float, PRI) \
-               P(class, prefix, animtime, float, BOTH) \
-               P(class, prefix, damageforcescale, float, SEC) \
-               P(class, prefix, damage, float, SEC) \
-               P(class, prefix, duration, float, SEC) \
-               P(class, prefix, edgedamage, float, SEC) \
-               P(class, prefix, force, float, SEC) \
-               P(class, prefix, gravity, float, SEC) \
-               P(class, prefix, health, float, SEC) \
-               P(class, prefix, hooked_ammo, float, PRI) \
-               P(class, prefix, hooked_time_free, float, PRI) \
-               P(class, prefix, hooked_time_max, float, PRI) \
-               P(class, prefix, lifetime, float, SEC) \
-               P(class, prefix, power, float, SEC) \
-               P(class, prefix, radius, float, SEC) \
-               P(class, prefix, refire, float, BOTH) \
-               P(class, prefix, speed, float, SEC) \
-        P(class, prefix, switchdelay_drop, float, NONE) \
-               P(class, prefix, switchdelay_raise, float, NONE) \
-        P(class, prefix, weaponreplace, string, NONE) \
-        P(class, prefix, weaponstartoverride, float, NONE) \
-        P(class, prefix, weaponstart, float, NONE) \
-        P(class, prefix, weaponthrowable, float, NONE) \
-       END()
-    W_PROPS(X, Hook, hook)
-#undef X
-
-ENDCLASS(Hook)
-REGISTER_WEAPON(HOOK, hook, NEW(Hook));
-
-CLASS(OffhandHook, OffhandWeapon)
-#ifdef SVQC
-    METHOD(OffhandHook, offhand_think, void(OffhandHook this, entity actor, bool key_pressed))
-    {
-       Weapon wep = WEP_HOOK;
-       .entity weaponentity = weaponentities[1];
-       wep.wr_think(wep, actor, weaponentity, key_pressed ? 1 : 0);
-    }
-#endif
-ENDCLASS(OffhandHook)
-OffhandHook OFFHAND_HOOK; STATIC_INIT(OFFHAND_HOOK) { OFFHAND_HOOK = NEW(OffhandHook); }
 
 #ifdef SVQC
 
-.float dmg;
-.float dmg_edge;
-.float dmg_radius;
-.float dmg_force;
-.float dmg_power;
-.float dmg_duration;
-.float dmg_last;
-.float hook_refire;
-.float hook_time_hooked;
-.float hook_time_fueldecrease;
-#endif
-#endif
-#ifdef IMPLEMENTATION
-#ifdef SVQC
-
 spawnfunc(weapon_hook) { weapon_defaultspawnfunc(this, WEP_HOOK); }
 
 void W_Hook_ExplodeThink(entity this)
@@ -583,5 +507,3 @@ NET_HANDLE(ENT_CLIENT_HOOK, bool bIsNew)
 
 // TODO: hook: temporarily transform this.origin for drawing the model along warpzones!
 #endif
-
-#endif
index 6f70f09beec2219624baeca92e2cd7deaa104fb4..f67db3d00d462ac141c52be86adc2d6879b49bdb 100644 (file)
@@ -1 +1,76 @@
 #pragma once
+
+CLASS(Hook, Weapon)
+/* ammotype  */ ATTRIB(Hook, ammo_field, .int, ammo_fuel);
+/* impulse   */ ATTRIB(Hook, impulse, int, 0);
+/* flags     */ ATTRIB(Hook, spawnflags, int, WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH);
+/* rating    */ ATTRIB(Hook, bot_pickupbasevalue, float, 0);
+/* color     */ ATTRIB(Hook, wpcolor, vector, '0 0.5 0');
+/* modelname */ ATTRIB(Hook, mdl, string, "hookgun");
+#ifdef GAMEQC
+/* model     */ ATTRIB(Hook, m_model, Model, MDL_HOOK_ITEM);
+#endif
+/* crosshair */ ATTRIB(Hook, w_crosshair, string, "gfx/crosshairhook");
+/* crosshair */ ATTRIB(Hook, w_crosshair_size, float, 0.5);
+/* wepimg    */ ATTRIB(Hook, model2, string, "weaponhook");
+/* refname   */ ATTRIB(Hook, netname, string, "hook");
+/* wepname   */ ATTRIB(Hook, m_name, string, _("Grappling Hook"));
+       ATTRIB(Hook, ammo_factor, float, 1);
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, ammo, float, PRI) \
+               P(class, prefix, animtime, float, BOTH) \
+               P(class, prefix, damageforcescale, float, SEC) \
+               P(class, prefix, damage, float, SEC) \
+               P(class, prefix, duration, float, SEC) \
+               P(class, prefix, edgedamage, float, SEC) \
+               P(class, prefix, force, float, SEC) \
+               P(class, prefix, gravity, float, SEC) \
+               P(class, prefix, health, float, SEC) \
+               P(class, prefix, hooked_ammo, float, PRI) \
+               P(class, prefix, hooked_time_free, float, PRI) \
+               P(class, prefix, hooked_time_max, float, PRI) \
+               P(class, prefix, lifetime, float, SEC) \
+               P(class, prefix, power, float, SEC) \
+               P(class, prefix, radius, float, SEC) \
+               P(class, prefix, refire, float, BOTH) \
+               P(class, prefix, speed, float, SEC) \
+        P(class, prefix, switchdelay_drop, float, NONE) \
+               P(class, prefix, switchdelay_raise, float, NONE) \
+        P(class, prefix, weaponreplace, string, NONE) \
+        P(class, prefix, weaponstartoverride, float, NONE) \
+        P(class, prefix, weaponstart, float, NONE) \
+        P(class, prefix, weaponthrowable, float, NONE) \
+       END()
+    W_PROPS(X, Hook, hook)
+#undef X
+
+ENDCLASS(Hook)
+REGISTER_WEAPON(HOOK, hook, NEW(Hook));
+
+CLASS(OffhandHook, OffhandWeapon)
+#ifdef SVQC
+    METHOD(OffhandHook, offhand_think, void(OffhandHook this, entity actor, bool key_pressed))
+    {
+       Weapon wep = WEP_HOOK;
+       .entity weaponentity = weaponentities[1];
+       wep.wr_think(wep, actor, weaponentity, key_pressed ? 1 : 0);
+    }
+#endif
+ENDCLASS(OffhandHook)
+OffhandHook OFFHAND_HOOK; STATIC_INIT(OFFHAND_HOOK) { OFFHAND_HOOK = NEW(OffhandHook); }
+
+#ifdef SVQC
+
+.float dmg;
+.float dmg_edge;
+.float dmg_radius;
+.float dmg_force;
+.float dmg_power;
+.float dmg_duration;
+.float dmg_last;
+.float hook_refire;
+.float hook_time_hooked;
+.float hook_time_fueldecrease;
+#endif
index 163b81ca117398056acefca567c42d3b636e7611..c4f3b9bb3b29183bbcd25d0243eefdde0f5bec76 100644 (file)
@@ -1,63 +1,5 @@
 #include "machinegun.qh"
-#ifndef IMPLEMENTATION
-CLASS(MachineGun, Weapon)
-/* ammotype  */ ATTRIB(MachineGun, ammo_field, .int, ammo_nails);
-/* impulse   */ ATTRIB(MachineGun, impulse, int, 3);
-/* flags     */ ATTRIB(MachineGun, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN);
-/* rating    */ ATTRIB(MachineGun, bot_pickupbasevalue, float, 7000);
-/* color     */ ATTRIB(MachineGun, wpcolor, vector, '1 1 0');
-/* modelname */ ATTRIB(MachineGun, mdl, string, "uzi");
-#ifdef GAMEQC
-/* model     */ ATTRIB(MachineGun, m_model, Model, MDL_MACHINEGUN_ITEM);
-#endif
-/* crosshair */ ATTRIB(MachineGun, w_crosshair, string, "gfx/crosshairuzi");
-/* crosshair */ ATTRIB(MachineGun, w_crosshair_size, float, 0.6);
-/* wepimg    */ ATTRIB(MachineGun, model2, string, "weaponuzi");
-/* refname   */ ATTRIB(MachineGun, netname, string, "machinegun");
-/* wepname   */ ATTRIB(MachineGun, m_name, string, _("MachineGun"));
-
-#define X(BEGIN, P, END, class, prefix) \
-       BEGIN(class) \
-               P(class, prefix, burst, float, NONE) \
-               P(class, prefix, burst_ammo, float, NONE) \
-               P(class, prefix, burst_animtime, float, NONE) \
-               P(class, prefix, burst_refire2, float, NONE) \
-               P(class, prefix, burst_refire, float, NONE) \
-               P(class, prefix, burst_speed, float, NONE) \
-               P(class, prefix, first, float, NONE) \
-               P(class, prefix, first_ammo, float, NONE) \
-               P(class, prefix, first_damage, float, NONE) \
-               P(class, prefix, first_force, float, NONE) \
-               P(class, prefix, first_refire, float, NONE) \
-               P(class, prefix, first_spread, float, NONE) \
-               P(class, prefix, mode, float, NONE) \
-               P(class, prefix, reload_ammo, float, NONE) \
-        P(class, prefix, reload_time, float, NONE) \
-               P(class, prefix, solidpenetration, float, NONE) \
-               P(class, prefix, spread_add, float, NONE) \
-               P(class, prefix, spread_max, float, NONE) \
-               P(class, prefix, spread_min, float, NONE) \
-               P(class, prefix, sustained_ammo, float, NONE) \
-               P(class, prefix, sustained_damage, float, NONE) \
-               P(class, prefix, sustained_force, float, NONE) \
-               P(class, prefix, sustained_refire, float, NONE) \
-               P(class, prefix, sustained_spread, float, NONE) \
-        P(class, prefix, switchdelay_drop, float, NONE) \
-        P(class, prefix, switchdelay_raise, float, NONE) \
-        P(class, prefix, weaponreplace, string,NONE) \
-        P(class, prefix, weaponstartoverride, float, NONE) \
-        P(class, prefix, weaponstart, float, NONE) \
-        P(class, prefix, weaponthrowable, float, NONE) \
-       END()
-    W_PROPS(X, MachineGun, machinegun)
-#undef X
-
-ENDCLASS(MachineGun)
-REGISTER_WEAPON(MACHINEGUN, machinegun, NEW(MachineGun));
-
 
-#endif
-#ifdef IMPLEMENTATION
 #ifdef SVQC
 
 spawnfunc(weapon_machinegun)
@@ -375,4 +317,3 @@ METHOD(MachineGun, wr_impacteffect, void(entity thiswep, entity actor))
 }
 
 #endif
-#endif
index 6f70f09beec2219624baeca92e2cd7deaa104fb4..66a7cb674f07069f57c507c836c844df613de826 100644 (file)
@@ -1 +1,56 @@
 #pragma once
+
+CLASS(MachineGun, Weapon)
+/* ammotype  */ ATTRIB(MachineGun, ammo_field, .int, ammo_nails);
+/* impulse   */ ATTRIB(MachineGun, impulse, int, 3);
+/* flags     */ ATTRIB(MachineGun, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN);
+/* rating    */ ATTRIB(MachineGun, bot_pickupbasevalue, float, 7000);
+/* color     */ ATTRIB(MachineGun, wpcolor, vector, '1 1 0');
+/* modelname */ ATTRIB(MachineGun, mdl, string, "uzi");
+#ifdef GAMEQC
+/* model     */ ATTRIB(MachineGun, m_model, Model, MDL_MACHINEGUN_ITEM);
+#endif
+/* crosshair */ ATTRIB(MachineGun, w_crosshair, string, "gfx/crosshairuzi");
+/* crosshair */ ATTRIB(MachineGun, w_crosshair_size, float, 0.6);
+/* wepimg    */ ATTRIB(MachineGun, model2, string, "weaponuzi");
+/* refname   */ ATTRIB(MachineGun, netname, string, "machinegun");
+/* wepname   */ ATTRIB(MachineGun, m_name, string, _("MachineGun"));
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, burst, float, NONE) \
+               P(class, prefix, burst_ammo, float, NONE) \
+               P(class, prefix, burst_animtime, float, NONE) \
+               P(class, prefix, burst_refire2, float, NONE) \
+               P(class, prefix, burst_refire, float, NONE) \
+               P(class, prefix, burst_speed, float, NONE) \
+               P(class, prefix, first, float, NONE) \
+               P(class, prefix, first_ammo, float, NONE) \
+               P(class, prefix, first_damage, float, NONE) \
+               P(class, prefix, first_force, float, NONE) \
+               P(class, prefix, first_refire, float, NONE) \
+               P(class, prefix, first_spread, float, NONE) \
+               P(class, prefix, mode, float, NONE) \
+               P(class, prefix, reload_ammo, float, NONE) \
+        P(class, prefix, reload_time, float, NONE) \
+               P(class, prefix, solidpenetration, float, NONE) \
+               P(class, prefix, spread_add, float, NONE) \
+               P(class, prefix, spread_max, float, NONE) \
+               P(class, prefix, spread_min, float, NONE) \
+               P(class, prefix, sustained_ammo, float, NONE) \
+               P(class, prefix, sustained_damage, float, NONE) \
+               P(class, prefix, sustained_force, float, NONE) \
+               P(class, prefix, sustained_refire, float, NONE) \
+               P(class, prefix, sustained_spread, float, NONE) \
+        P(class, prefix, switchdelay_drop, float, NONE) \
+        P(class, prefix, switchdelay_raise, float, NONE) \
+        P(class, prefix, weaponreplace, string,NONE) \
+        P(class, prefix, weaponstartoverride, float, NONE) \
+        P(class, prefix, weaponstart, float, NONE) \
+        P(class, prefix, weaponthrowable, float, NONE) \
+       END()
+    W_PROPS(X, MachineGun, machinegun)
+#undef X
+
+ENDCLASS(MachineGun)
+REGISTER_WEAPON(MACHINEGUN, machinegun, NEW(MachineGun));
index 73b29a48de6a97a252843512bd7c480abad539f4..463f5109b918187ed45bfe6b41e66f1eb440af76 100644 (file)
@@ -1,66 +1,5 @@
 #include "minelayer.qh"
-#ifndef IMPLEMENTATION
-CLASS(MineLayer, Weapon)
-/* ammotype  */ ATTRIB(MineLayer, ammo_field, .int, ammo_rockets);
-/* impulse   */ ATTRIB(MineLayer, impulse, int, 4);
-/* flags     */ ATTRIB(MineLayer, spawnflags, int, WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH);
-/* rating    */ ATTRIB(MineLayer, bot_pickupbasevalue, float, 7000);
-/* color     */ ATTRIB(MineLayer, wpcolor, vector, '0.75 1 0');
-/* modelname */ ATTRIB(MineLayer, mdl, string, "minelayer");
-#ifdef GAMEQC
-/* model     */ ATTRIB(MineLayer, m_model, Model, MDL_MINELAYER_ITEM);
-#endif
-/* crosshair */ ATTRIB(MineLayer, w_crosshair, string, "gfx/crosshairminelayer");
-/* crosshair */ ATTRIB(MineLayer, w_crosshair_size, float, 0.9);
-/* wepimg    */ ATTRIB(MineLayer, model2, string, "weaponminelayer");
-/* refname   */ ATTRIB(MineLayer, netname, string, "minelayer");
-/* wepname   */ ATTRIB(MineLayer, m_name, string, _("Mine Layer"));
-
-#define X(BEGIN, P, END, class, prefix) \
-       BEGIN(class) \
-               P(class, prefix, ammo, float, NONE) \
-               P(class, prefix, animtime, float, NONE) \
-               P(class, prefix, damageforcescale, float, NONE) \
-               P(class, prefix, damage, float, NONE) \
-               P(class, prefix, detonatedelay, float, NONE) \
-               P(class, prefix, edgedamage, float, NONE) \
-               P(class, prefix, force, float, NONE) \
-               P(class, prefix, health, float, NONE) \
-               P(class, prefix, lifetime, float, NONE) \
-               P(class, prefix, lifetime_countdown, float, NONE) \
-               P(class, prefix, limit, float, NONE) \
-               P(class, prefix, protection, float, NONE) \
-               P(class, prefix, proximityradius, float, NONE) \
-               P(class, prefix, radius, float, NONE) \
-               P(class, prefix, refire, float, NONE) \
-               P(class, prefix, reload_ammo, float, NONE) \
-        P(class, prefix, reload_time, float, NONE) \
-               P(class, prefix, remote_damage, float, NONE) \
-               P(class, prefix, remote_edgedamage, float, NONE) \
-               P(class, prefix, remote_force, float, NONE) \
-               P(class, prefix, remote_radius, float, NONE) \
-               P(class, prefix, speed, float, NONE) \
-        P(class, prefix, switchdelay_drop, float, NONE) \
-        P(class, prefix, switchdelay_raise, float, NONE) \
-               P(class, prefix, time, float, NONE) \
-        P(class, prefix, weaponreplace, string, NONE) \
-        P(class, prefix, weaponstartoverride, float, NONE) \
-        P(class, prefix, weaponstart, float, NONE) \
-        P(class, prefix, weaponthrowable, float, NONE) \
-       END()
-    W_PROPS(X, MineLayer, minelayer)
-#undef X
-ENDCLASS(MineLayer)
-REGISTER_WEAPON(MINE_LAYER, minelayer, NEW(MineLayer));
 
-#ifdef SVQC
-void W_MineLayer_Think(entity this);
-.float minelayer_detonate, mine_explodeanyway;
-.float mine_time;
-.vector mine_orientation;
-#endif
-#endif
-#ifdef IMPLEMENTATION
 #ifdef SVQC
 spawnfunc(weapon_minelayer) { weapon_defaultspawnfunc(this, WEP_MINE_LAYER); }
 
@@ -587,4 +526,3 @@ METHOD(MineLayer, wr_impacteffect, void(entity thiswep, entity actor))
 }
 
 #endif
-#endif
index 6f70f09beec2219624baeca92e2cd7deaa104fb4..e867db8d31634764f5f459f8df028f346535b478 100644 (file)
@@ -1 +1,61 @@
 #pragma once
+
+CLASS(MineLayer, Weapon)
+/* ammotype  */ ATTRIB(MineLayer, ammo_field, .int, ammo_rockets);
+/* impulse   */ ATTRIB(MineLayer, impulse, int, 4);
+/* flags     */ ATTRIB(MineLayer, spawnflags, int, WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH);
+/* rating    */ ATTRIB(MineLayer, bot_pickupbasevalue, float, 7000);
+/* color     */ ATTRIB(MineLayer, wpcolor, vector, '0.75 1 0');
+/* modelname */ ATTRIB(MineLayer, mdl, string, "minelayer");
+#ifdef GAMEQC
+/* model     */ ATTRIB(MineLayer, m_model, Model, MDL_MINELAYER_ITEM);
+#endif
+/* crosshair */ ATTRIB(MineLayer, w_crosshair, string, "gfx/crosshairminelayer");
+/* crosshair */ ATTRIB(MineLayer, w_crosshair_size, float, 0.9);
+/* wepimg    */ ATTRIB(MineLayer, model2, string, "weaponminelayer");
+/* refname   */ ATTRIB(MineLayer, netname, string, "minelayer");
+/* wepname   */ ATTRIB(MineLayer, m_name, string, _("Mine Layer"));
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, ammo, float, NONE) \
+               P(class, prefix, animtime, float, NONE) \
+               P(class, prefix, damageforcescale, float, NONE) \
+               P(class, prefix, damage, float, NONE) \
+               P(class, prefix, detonatedelay, float, NONE) \
+               P(class, prefix, edgedamage, float, NONE) \
+               P(class, prefix, force, float, NONE) \
+               P(class, prefix, health, float, NONE) \
+               P(class, prefix, lifetime, float, NONE) \
+               P(class, prefix, lifetime_countdown, float, NONE) \
+               P(class, prefix, limit, float, NONE) \
+               P(class, prefix, protection, float, NONE) \
+               P(class, prefix, proximityradius, float, NONE) \
+               P(class, prefix, radius, float, NONE) \
+               P(class, prefix, refire, float, NONE) \
+               P(class, prefix, reload_ammo, float, NONE) \
+        P(class, prefix, reload_time, float, NONE) \
+               P(class, prefix, remote_damage, float, NONE) \
+               P(class, prefix, remote_edgedamage, float, NONE) \
+               P(class, prefix, remote_force, float, NONE) \
+               P(class, prefix, remote_radius, float, NONE) \
+               P(class, prefix, speed, float, NONE) \
+        P(class, prefix, switchdelay_drop, float, NONE) \
+        P(class, prefix, switchdelay_raise, float, NONE) \
+               P(class, prefix, time, float, NONE) \
+        P(class, prefix, weaponreplace, string, NONE) \
+        P(class, prefix, weaponstartoverride, float, NONE) \
+        P(class, prefix, weaponstart, float, NONE) \
+        P(class, prefix, weaponthrowable, float, NONE) \
+       END()
+    W_PROPS(X, MineLayer, minelayer)
+#undef X
+ENDCLASS(MineLayer)
+REGISTER_WEAPON(MINE_LAYER, minelayer, NEW(MineLayer));
+
+#ifdef SVQC
+void W_MineLayer_Think(entity this);
+.float minelayer_detonate, mine_explodeanyway;
+.float mine_time;
+.vector mine_orientation;
+#endif
index f6b498a8bcd0fb690d18c0772552d9e9cb448d54..186d1f139d3f52de758e69e0bdd5360c5e4fc7e3 100644 (file)
@@ -1,65 +1,5 @@
 #include "mortar.qh"
-#ifndef IMPLEMENTATION
-CLASS(Mortar, Weapon)
-/* ammotype  */ ATTRIB(Mortar, ammo_field, .int, ammo_rockets);
-/* impulse   */ ATTRIB(Mortar, impulse, int, 4);
-/* flags     */ ATTRIB(Mortar, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH);
-/* rating    */ ATTRIB(Mortar, bot_pickupbasevalue, float, 7000);
-/* color     */ ATTRIB(Mortar, wpcolor, vector, '1 0 0');
-/* modelname */ ATTRIB(Mortar, mdl, string, "gl");
-#ifdef GAMEQC
-/* model     */ ATTRIB(Mortar, m_model, Model, MDL_MORTAR_ITEM);
-#endif
-/* crosshair */ ATTRIB(Mortar, w_crosshair, string, "gfx/crosshairgrenadelauncher");
-/* crosshair */ ATTRIB(Mortar, w_crosshair_size, float, 0.7);
-/* wepimg    */ ATTRIB(Mortar, model2, string, "weapongrenadelauncher");
-/* refname   */ ATTRIB(Mortar, netname, string, "mortar");
-/* wepname   */ ATTRIB(Mortar, m_name, string, _("Mortar"));
-
-#define X(BEGIN, P, END, class, prefix) \
-       BEGIN(class) \
-               P(class, prefix, ammo, float, BOTH) \
-               P(class, prefix, animtime, float, BOTH) \
-               P(class, prefix, bouncefactor, float, NONE) \
-               P(class, prefix, bouncestop, float, NONE) \
-               P(class, prefix, damageforcescale, float, BOTH) \
-               P(class, prefix, damage, float, BOTH) \
-               P(class, prefix, edgedamage, float, BOTH) \
-               P(class, prefix, force, float, BOTH) \
-               P(class, prefix, health, float, BOTH) \
-               P(class, prefix, lifetime, float, BOTH) \
-               P(class, prefix, lifetime_bounce, float, SEC) \
-               P(class, prefix, lifetime_stick, float, BOTH) \
-               P(class, prefix, radius, float, BOTH) \
-               P(class, prefix, refire, float, BOTH) \
-               P(class, prefix, reload_ammo, float, NONE) \
-               P(class, prefix, reload_time, float, NONE) \
-               P(class, prefix, remote_detonateprimary, float, SEC) \
-               P(class, prefix, remote_minbouncecnt, float, PRI) \
-               P(class, prefix, speed, float, BOTH) \
-               P(class, prefix, speed_up, float, BOTH) \
-               P(class, prefix, speed_z, float, BOTH) \
-               P(class, prefix, spread, float, BOTH) \
-               P(class, prefix, switchdelay_drop, float, NONE) \
-               P(class, prefix, switchdelay_raise, float, NONE) \
-               P(class, prefix, type, float, BOTH) \
-               P(class, prefix, weaponreplace, string, NONE) \
-               P(class, prefix, weaponstartoverride, float, NONE) \
-               P(class, prefix, weaponstart, float, NONE) \
-               P(class, prefix, weaponthrowable, float, NONE) \
-       END()
-    W_PROPS(X, Mortar, mortar)
-#undef X
-ENDCLASS(Mortar)
-REGISTER_WEAPON(MORTAR, mortar, NEW(Mortar));
-
 
-#ifdef SVQC
-.float gl_detonate_later;
-.float gl_bouncecnt;
-#endif
-#endif
-#ifdef IMPLEMENTATION
 #ifdef SVQC
 
 spawnfunc(weapon_mortar) { weapon_defaultspawnfunc(this, WEP_MORTAR); }
@@ -427,4 +367,3 @@ METHOD(Mortar, wr_impacteffect, void(entity thiswep, entity actor))
 }
 
 #endif
-#endif
index 6f70f09beec2219624baeca92e2cd7deaa104fb4..58b526b8ec4eddf58e3804ceb4dd5277c9978688 100644 (file)
@@ -1 +1,60 @@
 #pragma once
+
+CLASS(Mortar, Weapon)
+/* ammotype  */ ATTRIB(Mortar, ammo_field, .int, ammo_rockets);
+/* impulse   */ ATTRIB(Mortar, impulse, int, 4);
+/* flags     */ ATTRIB(Mortar, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH);
+/* rating    */ ATTRIB(Mortar, bot_pickupbasevalue, float, 7000);
+/* color     */ ATTRIB(Mortar, wpcolor, vector, '1 0 0');
+/* modelname */ ATTRIB(Mortar, mdl, string, "gl");
+#ifdef GAMEQC
+/* model     */ ATTRIB(Mortar, m_model, Model, MDL_MORTAR_ITEM);
+#endif
+/* crosshair */ ATTRIB(Mortar, w_crosshair, string, "gfx/crosshairgrenadelauncher");
+/* crosshair */ ATTRIB(Mortar, w_crosshair_size, float, 0.7);
+/* wepimg    */ ATTRIB(Mortar, model2, string, "weapongrenadelauncher");
+/* refname   */ ATTRIB(Mortar, netname, string, "mortar");
+/* wepname   */ ATTRIB(Mortar, m_name, string, _("Mortar"));
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, ammo, float, BOTH) \
+               P(class, prefix, animtime, float, BOTH) \
+               P(class, prefix, bouncefactor, float, NONE) \
+               P(class, prefix, bouncestop, float, NONE) \
+               P(class, prefix, damageforcescale, float, BOTH) \
+               P(class, prefix, damage, float, BOTH) \
+               P(class, prefix, edgedamage, float, BOTH) \
+               P(class, prefix, force, float, BOTH) \
+               P(class, prefix, health, float, BOTH) \
+               P(class, prefix, lifetime, float, BOTH) \
+               P(class, prefix, lifetime_bounce, float, SEC) \
+               P(class, prefix, lifetime_stick, float, BOTH) \
+               P(class, prefix, radius, float, BOTH) \
+               P(class, prefix, refire, float, BOTH) \
+               P(class, prefix, reload_ammo, float, NONE) \
+               P(class, prefix, reload_time, float, NONE) \
+               P(class, prefix, remote_detonateprimary, float, SEC) \
+               P(class, prefix, remote_minbouncecnt, float, PRI) \
+               P(class, prefix, speed, float, BOTH) \
+               P(class, prefix, speed_up, float, BOTH) \
+               P(class, prefix, speed_z, float, BOTH) \
+               P(class, prefix, spread, float, BOTH) \
+               P(class, prefix, switchdelay_drop, float, NONE) \
+               P(class, prefix, switchdelay_raise, float, NONE) \
+               P(class, prefix, type, float, BOTH) \
+               P(class, prefix, weaponreplace, string, NONE) \
+               P(class, prefix, weaponstartoverride, float, NONE) \
+               P(class, prefix, weaponstart, float, NONE) \
+               P(class, prefix, weaponthrowable, float, NONE) \
+       END()
+    W_PROPS(X, Mortar, mortar)
+#undef X
+ENDCLASS(Mortar)
+REGISTER_WEAPON(MORTAR, mortar, NEW(Mortar));
+
+
+#ifdef SVQC
+.float gl_detonate_later;
+.float gl_bouncecnt;
+#endif
index f5a19b2c776e98f78748d9e6d2748273929a0215..b4dab73cc951c2d8e93ba90c3024da215b799e00 100644 (file)
@@ -1,49 +1,5 @@
 #include "porto.qh"
-#ifndef IMPLEMENTATION
-CLASS(PortoLaunch, Weapon)
-/* ammotype  */ ATTRIB(PortoLaunch, ammo_field, .int, ammo_none);
-/* impulse   */ ATTRIB(PortoLaunch, impulse, int, 0);
-/* flags     */ ATTRIB(PortoLaunch, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_SUPERWEAPON | WEP_FLAG_NODUAL);
-/* rating    */ ATTRIB(PortoLaunch, bot_pickupbasevalue, float, 0);
-/* color     */ ATTRIB(PortoLaunch, wpcolor, vector, '0.5 0.5 0.5');
-/* modelname */ ATTRIB(PortoLaunch, mdl, string, "porto");
-#ifdef GAMEQC
-/* model     */ ATTRIB(PortoLaunch, m_model, Model, MDL_PORTO_ITEM);
-#endif
-/* crosshair */ ATTRIB(PortoLaunch, w_crosshair, string, "gfx/crosshairporto");
-/* crosshair */ ATTRIB(PortoLaunch, w_crosshair_size, float, 0.6);
-/* wepimg    */ ATTRIB(PortoLaunch, model2, string, "weaponporto");
-/* refname   */ ATTRIB(PortoLaunch, netname, string, "porto");
-/* wepname   */ ATTRIB(PortoLaunch, m_name, string, _("Port-O-Launch"));
-
-#define X(BEGIN, P, END, class, prefix) \
-       BEGIN(class) \
-               P(class, prefix, animtime, float, BOTH) \
-               P(class, prefix, lifetime, float, BOTH) \
-               P(class, prefix, refire, float, BOTH) \
-               P(class, prefix, secondary, float, NONE) \
-               P(class, prefix, speed, float, BOTH) \
-        P(class, prefix, switchdelay_drop, float, NONE) \
-               P(class, prefix, switchdelay_raise, float, NONE) \
-        P(class, prefix, weaponreplace, string,NONE) \
-        P(class, prefix, weaponstartoverride, float, NONE) \
-        P(class, prefix, weaponstart, float, NONE) \
-        P(class, prefix, weaponthrowable, float, NONE) \
-       END()
-    W_PROPS(X, PortoLaunch, porto)
-#undef X
-ENDCLASS(PortoLaunch)
-REGISTER_WEAPON(PORTO, porto, NEW(PortoLaunch));
 
-#ifdef SVQC
-.entity porto_current;
-.vector porto_v_angle; // holds "held" view angles
-.float porto_v_angle_held;
-.vector right_vector;
-.float porto_forbidden;
-#endif
-#endif
-#ifdef IMPLEMENTATION
 #ifdef SVQC
 #include <common/triggers/trigger/jumppads.qh>
 
@@ -377,4 +333,3 @@ METHOD(PortoLaunch, wr_impacteffect, void(entity this, entity actor)) {
     LOG_WARN("Since when does Porto send DamageInfo?");
 }
 #endif
-#endif
index 6f70f09beec2219624baeca92e2cd7deaa104fb4..94c6e165c587f0f095740339c3e8e30d90e23bfe 100644 (file)
@@ -1 +1,44 @@
 #pragma once
+
+CLASS(PortoLaunch, Weapon)
+/* ammotype  */ ATTRIB(PortoLaunch, ammo_field, .int, ammo_none);
+/* impulse   */ ATTRIB(PortoLaunch, impulse, int, 0);
+/* flags     */ ATTRIB(PortoLaunch, spawnflags, int, WEP_TYPE_OTHER | WEP_FLAG_SUPERWEAPON | WEP_FLAG_NODUAL);
+/* rating    */ ATTRIB(PortoLaunch, bot_pickupbasevalue, float, 0);
+/* color     */ ATTRIB(PortoLaunch, wpcolor, vector, '0.5 0.5 0.5');
+/* modelname */ ATTRIB(PortoLaunch, mdl, string, "porto");
+#ifdef GAMEQC
+/* model     */ ATTRIB(PortoLaunch, m_model, Model, MDL_PORTO_ITEM);
+#endif
+/* crosshair */ ATTRIB(PortoLaunch, w_crosshair, string, "gfx/crosshairporto");
+/* crosshair */ ATTRIB(PortoLaunch, w_crosshair_size, float, 0.6);
+/* wepimg    */ ATTRIB(PortoLaunch, model2, string, "weaponporto");
+/* refname   */ ATTRIB(PortoLaunch, netname, string, "porto");
+/* wepname   */ ATTRIB(PortoLaunch, m_name, string, _("Port-O-Launch"));
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, animtime, float, BOTH) \
+               P(class, prefix, lifetime, float, BOTH) \
+               P(class, prefix, refire, float, BOTH) \
+               P(class, prefix, secondary, float, NONE) \
+               P(class, prefix, speed, float, BOTH) \
+        P(class, prefix, switchdelay_drop, float, NONE) \
+               P(class, prefix, switchdelay_raise, float, NONE) \
+        P(class, prefix, weaponreplace, string,NONE) \
+        P(class, prefix, weaponstartoverride, float, NONE) \
+        P(class, prefix, weaponstart, float, NONE) \
+        P(class, prefix, weaponthrowable, float, NONE) \
+       END()
+    W_PROPS(X, PortoLaunch, porto)
+#undef X
+ENDCLASS(PortoLaunch)
+REGISTER_WEAPON(PORTO, porto, NEW(PortoLaunch));
+
+#ifdef SVQC
+.entity porto_current;
+.vector porto_v_angle; // holds "held" view angles
+.float porto_v_angle_held;
+.vector right_vector;
+.float porto_forbidden;
+#endif
index 771f384361c7b6fbdbff0860452c0d48fb9ee9e9..92694e2e2248570b9bcc8ebd878bd8569c23aa83 100644 (file)
@@ -1,58 +1,5 @@
 #include "rifle.qh"
-#ifndef IMPLEMENTATION
-CLASS(Rifle, Weapon)
-/* ammotype  */ ATTRIB(Rifle, ammo_field, .int, ammo_nails);
-/* impulse   */ ATTRIB(Rifle, impulse, int, 7);
-/* flags     */ ATTRIB(Rifle, spawnflags, int, WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN);
-/* rating    */ ATTRIB(Rifle, bot_pickupbasevalue, float, 7000);
-/* color     */ ATTRIB(Rifle, wpcolor, vector, '0.5 1 0');
-/* modelname */ ATTRIB(Rifle, mdl, string, "campingrifle");
-#ifdef GAMEQC
-/* model     */ ATTRIB(Rifle, m_model, Model, MDL_RIFLE_ITEM);
-#endif
-/* crosshair */ ATTRIB(Rifle, w_crosshair, string, "gfx/crosshairrifle");
-/* crosshair */ ATTRIB(Rifle, w_crosshair_size, float, 0.6);
-/* reticle   */ ATTRIB(Rifle, w_reticle, string, "gfx/reticle_nex");
-/* wepimg    */ ATTRIB(Rifle, model2, string, "weaponrifle");
-/* refname   */ ATTRIB(Rifle, netname, string, "rifle");
-/* wepname   */ ATTRIB(Rifle, m_name, string, _("Rifle"));
-
-#define X(BEGIN, P, END, class, prefix) \
-       BEGIN(class) \
-               P(class, prefix, ammo, float, BOTH) \
-               P(class, prefix, animtime, float, BOTH) \
-               P(class, prefix, bullethail, float, BOTH) \
-               P(class, prefix, burstcost, float, BOTH) \
-               P(class, prefix, bursttime, float, NONE) \
-               P(class, prefix, damage, float, BOTH) \
-               P(class, prefix, force, float, BOTH) \
-               P(class, prefix, refire, float, BOTH) \
-               P(class, prefix, reload, float, SEC) \
-               P(class, prefix, reload_ammo, float, NONE) \
-       P(class, prefix, reload_time, float, NONE) \
-               P(class, prefix, secondary, float, NONE) \
-               P(class, prefix, shots, float, BOTH) \
-               P(class, prefix, solidpenetration, float, BOTH) \
-               P(class, prefix, spread, float, BOTH) \
-       P(class, prefix, switchdelay_drop, float, NONE) \
-       P(class, prefix, switchdelay_raise, float, NONE) \
-               P(class, prefix, tracer, float, BOTH) \
-       P(class, prefix, weaponreplace, string, NONE) \
-       P(class, prefix, weaponstartoverride, float, NONE) \
-       P(class, prefix, weaponstart, float, NONE) \
-       P(class, prefix, weaponthrowable, float, NONE) \
-       END()
-    W_PROPS(X, Rifle, rifle)
-#undef X
-ENDCLASS(Rifle)
-REGISTER_WEAPON(RIFLE, rifle, NEW(Rifle));
-
 
-#ifdef SVQC
-.float rifle_accumulator;
-#endif
-#endif
-#ifdef IMPLEMENTATION
 #ifdef SVQC
 spawnfunc(weapon_rifle) { weapon_defaultspawnfunc(this, WEP_RIFLE); }
 spawnfunc(weapon_campingrifle) { spawnfunc_weapon_rifle(this); }
@@ -281,4 +228,3 @@ METHOD(Rifle, wr_zoom, bool(entity thiswep, entity actor))
 }
 
 #endif
-#endif
index 6f70f09beec2219624baeca92e2cd7deaa104fb4..ed5496f050f28cb841949a0937ebd4a279c589d6 100644 (file)
@@ -1 +1,53 @@
 #pragma once
+
+CLASS(Rifle, Weapon)
+/* ammotype  */ ATTRIB(Rifle, ammo_field, .int, ammo_nails);
+/* impulse   */ ATTRIB(Rifle, impulse, int, 7);
+/* flags     */ ATTRIB(Rifle, spawnflags, int, WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN | WEP_FLAG_PENETRATEWALLS);
+/* rating    */ ATTRIB(Rifle, bot_pickupbasevalue, float, 7000);
+/* color     */ ATTRIB(Rifle, wpcolor, vector, '0.5 1 0');
+/* modelname */ ATTRIB(Rifle, mdl, string, "campingrifle");
+#ifdef GAMEQC
+/* model     */ ATTRIB(Rifle, m_model, Model, MDL_RIFLE_ITEM);
+#endif
+/* crosshair */ ATTRIB(Rifle, w_crosshair, string, "gfx/crosshairrifle");
+/* crosshair */ ATTRIB(Rifle, w_crosshair_size, float, 0.6);
+/* reticle   */ ATTRIB(Rifle, w_reticle, string, "gfx/reticle_nex");
+/* wepimg    */ ATTRIB(Rifle, model2, string, "weaponrifle");
+/* refname   */ ATTRIB(Rifle, netname, string, "rifle");
+/* wepname   */ ATTRIB(Rifle, m_name, string, _("Rifle"));
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, ammo, float, BOTH) \
+               P(class, prefix, animtime, float, BOTH) \
+               P(class, prefix, bullethail, float, BOTH) \
+               P(class, prefix, burstcost, float, BOTH) \
+               P(class, prefix, bursttime, float, NONE) \
+               P(class, prefix, damage, float, BOTH) \
+               P(class, prefix, force, float, BOTH) \
+               P(class, prefix, refire, float, BOTH) \
+               P(class, prefix, reload, float, SEC) \
+               P(class, prefix, reload_ammo, float, NONE) \
+       P(class, prefix, reload_time, float, NONE) \
+               P(class, prefix, secondary, float, NONE) \
+               P(class, prefix, shots, float, BOTH) \
+               P(class, prefix, solidpenetration, float, BOTH) \
+               P(class, prefix, spread, float, BOTH) \
+       P(class, prefix, switchdelay_drop, float, NONE) \
+       P(class, prefix, switchdelay_raise, float, NONE) \
+               P(class, prefix, tracer, float, BOTH) \
+       P(class, prefix, weaponreplace, string, NONE) \
+       P(class, prefix, weaponstartoverride, float, NONE) \
+       P(class, prefix, weaponstart, float, NONE) \
+       P(class, prefix, weaponthrowable, float, NONE) \
+       END()
+    W_PROPS(X, Rifle, rifle)
+#undef X
+ENDCLASS(Rifle)
+REGISTER_WEAPON(RIFLE, rifle, NEW(Rifle));
+
+
+#ifdef SVQC
+.float rifle_accumulator;
+#endif
index 4b5ccab4a55a5f371c8475ecf032c7321c834cab..35b48b8ea03159e9a40b448bda4be2103e794a2c 100644 (file)
@@ -1,94 +1,5 @@
 #include "seeker.qh"
-#ifndef IMPLEMENTATION
-CLASS(Seeker, Weapon)
-/* ammotype  */ ATTRIB(Seeker, ammo_field, .int, ammo_rockets);
-/* impulse   */ ATTRIB(Seeker, impulse, int, 8);
-/* flags     */ ATTRIB(Seeker, spawnflags, int, WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH);
-/* rating    */ ATTRIB(Seeker, bot_pickupbasevalue, float, 5000);
-/* color     */ ATTRIB(Seeker, wpcolor, vector, '0.5 1 0');
-/* modelname */ ATTRIB(Seeker, mdl, string, "seeker");
-#ifdef GAMEQC
-/* model     */ ATTRIB(Seeker, m_model, Model, MDL_SEEKER_ITEM);
-#endif
-/* crosshair */ ATTRIB(Seeker, w_crosshair, string, "gfx/crosshairseeker");
-/* crosshair */ ATTRIB(Seeker, w_crosshair_size, float, 0.8);
-/* wepimg    */ ATTRIB(Seeker, model2, string, "weaponseeker");
-/* refname   */ ATTRIB(Seeker, netname, string, "seeker");
-/* wepname   */ ATTRIB(Seeker, m_name, string, _("T.A.G. Seeker"));
-
-#define X(BEGIN, P, END, class, prefix) \
-       BEGIN(class) \
-       P(class, prefix, flac_ammo, float, NONE) \
-       P(class, prefix, flac_animtime, float, NONE) \
-       P(class, prefix, flac_damage, float, NONE) \
-       P(class, prefix, flac_edgedamage, float, NONE) \
-       P(class, prefix, flac_force, float, NONE) \
-       P(class, prefix, flac_lifetime, float, NONE) \
-       P(class, prefix, flac_lifetime_rand, float, NONE) \
-       P(class, prefix, flac_radius, float, NONE) \
-       P(class, prefix, flac_refire, float, NONE) \
-       P(class, prefix, flac_speed, float, NONE) \
-       P(class, prefix, flac_speed_up, float, NONE) \
-       P(class, prefix, flac_speed_z, float, NONE) \
-       P(class, prefix, flac_spread, float, NONE) \
-       P(class, prefix, missile_accel, float, NONE) \
-       P(class, prefix, missile_ammo, float, NONE) \
-       P(class, prefix, missile_animtime, float, NONE) \
-       P(class, prefix, missile_count, float, NONE) \
-       P(class, prefix, missile_damageforcescale, float, NONE) \
-       P(class, prefix, missile_damage, float, NONE) \
-       P(class, prefix, missile_decel, float, NONE) \
-       P(class, prefix, missile_delay, float, NONE) \
-       P(class, prefix, missile_edgedamage, float, NONE) \
-       P(class, prefix, missile_force, float, NONE) \
-       P(class, prefix, missile_health, float, NONE) \
-       P(class, prefix, missile_lifetime, float, NONE) \
-       P(class, prefix, missile_proxy, float, NONE) \
-       P(class, prefix, missile_proxy_delay, float, NONE) \
-       P(class, prefix, missile_proxy_maxrange, float, NONE) \
-       P(class, prefix, missile_radius, float, NONE) \
-       P(class, prefix, missile_refire, float, NONE) \
-       P(class, prefix, missile_smart, float, NONE) \
-       P(class, prefix, missile_smart_mindist, float, NONE) \
-       P(class, prefix, missile_smart_trace_max, float, NONE) \
-       P(class, prefix, missile_smart_trace_min, float, NONE) \
-       P(class, prefix, missile_speed, float, NONE) \
-       P(class, prefix, missile_speed_max, float, NONE) \
-       P(class, prefix, missile_speed_up, float, NONE) \
-       P(class, prefix, missile_speed_z, float, NONE) \
-       P(class, prefix, missile_spread, float, NONE) \
-       P(class, prefix, missile_turnrate, float, NONE) \
-       P(class, prefix, reload_ammo, float, NONE) \
-               P(class, prefix, reload_time, float, NONE) \
-               P(class, prefix, switchdelay_drop, float, NONE) \
-               P(class, prefix, switchdelay_raise, float, NONE) \
-       P(class, prefix, tag_ammo, float, NONE) \
-       P(class, prefix, tag_animtime, float, NONE) \
-       P(class, prefix, tag_damageforcescale, float, NONE) \
-       P(class, prefix, tag_health, float, NONE) \
-       P(class, prefix, tag_lifetime, float, NONE) \
-       P(class, prefix, tag_refire, float, NONE) \
-       P(class, prefix, tag_speed, float, NONE) \
-       P(class, prefix, tag_spread, float, NONE) \
-       P(class, prefix, tag_tracker_lifetime, float, NONE) \
-               P(class, prefix, type, float, NONE) \
-               P(class, prefix, weaponreplace, string, NONE) \
-               P(class, prefix, weaponstartoverride, float, NONE) \
-               P(class, prefix, weaponstart, float, NONE) \
-               P(class, prefix, weaponthrowable, float, NONE) \
-       END()
-       W_PROPS(X, Seeker, seeker)
-#undef X
-ENDCLASS(Seeker)
-REGISTER_WEAPON(SEEKER, seeker, NEW(Seeker));
-
 
-#ifdef SVQC
-.entity tag_target, wps_tag_tracker;
-.float tag_time;
-#endif
-#endif
-#ifdef IMPLEMENTATION
 #ifdef SVQC
 spawnfunc(weapon_seeker) { weapon_defaultspawnfunc(this, WEP_SEEKER); }
 
@@ -763,4 +674,3 @@ METHOD(Seeker, wr_impacteffect, void(entity thiswep, entity actor))
 }
 
 #endif
-#endif
index 5a1a73f824d5c60b2902f503bdef9dd30fb4740d..04567d1b9a583083e5cfa3dec19a804eaef7adcb 100644 (file)
@@ -1,6 +1,91 @@
 #pragma once
 
+CLASS(Seeker, Weapon)
+/* ammotype  */ ATTRIB(Seeker, ammo_field, .int, ammo_rockets);
+/* impulse   */ ATTRIB(Seeker, impulse, int, 8);
+/* flags     */ ATTRIB(Seeker, spawnflags, int, WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH);
+/* rating    */ ATTRIB(Seeker, bot_pickupbasevalue, float, 5000);
+/* color     */ ATTRIB(Seeker, wpcolor, vector, '0.5 1 0');
+/* modelname */ ATTRIB(Seeker, mdl, string, "seeker");
+#ifdef GAMEQC
+/* model     */ ATTRIB(Seeker, m_model, Model, MDL_SEEKER_ITEM);
+#endif
+/* crosshair */ ATTRIB(Seeker, w_crosshair, string, "gfx/crosshairseeker");
+/* crosshair */ ATTRIB(Seeker, w_crosshair_size, float, 0.8);
+/* wepimg    */ ATTRIB(Seeker, model2, string, "weaponseeker");
+/* refname   */ ATTRIB(Seeker, netname, string, "seeker");
+/* wepname   */ ATTRIB(Seeker, m_name, string, _("T.A.G. Seeker"));
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+       P(class, prefix, flac_ammo, float, NONE) \
+       P(class, prefix, flac_animtime, float, NONE) \
+       P(class, prefix, flac_damage, float, NONE) \
+       P(class, prefix, flac_edgedamage, float, NONE) \
+       P(class, prefix, flac_force, float, NONE) \
+       P(class, prefix, flac_lifetime, float, NONE) \
+       P(class, prefix, flac_lifetime_rand, float, NONE) \
+       P(class, prefix, flac_radius, float, NONE) \
+       P(class, prefix, flac_refire, float, NONE) \
+       P(class, prefix, flac_speed, float, NONE) \
+       P(class, prefix, flac_speed_up, float, NONE) \
+       P(class, prefix, flac_speed_z, float, NONE) \
+       P(class, prefix, flac_spread, float, NONE) \
+       P(class, prefix, missile_accel, float, NONE) \
+       P(class, prefix, missile_ammo, float, NONE) \
+       P(class, prefix, missile_animtime, float, NONE) \
+       P(class, prefix, missile_count, float, NONE) \
+       P(class, prefix, missile_damageforcescale, float, NONE) \
+       P(class, prefix, missile_damage, float, NONE) \
+       P(class, prefix, missile_decel, float, NONE) \
+       P(class, prefix, missile_delay, float, NONE) \
+       P(class, prefix, missile_edgedamage, float, NONE) \
+       P(class, prefix, missile_force, float, NONE) \
+       P(class, prefix, missile_health, float, NONE) \
+       P(class, prefix, missile_lifetime, float, NONE) \
+       P(class, prefix, missile_proxy, float, NONE) \
+       P(class, prefix, missile_proxy_delay, float, NONE) \
+       P(class, prefix, missile_proxy_maxrange, float, NONE) \
+       P(class, prefix, missile_radius, float, NONE) \
+       P(class, prefix, missile_refire, float, NONE) \
+       P(class, prefix, missile_smart, float, NONE) \
+       P(class, prefix, missile_smart_mindist, float, NONE) \
+       P(class, prefix, missile_smart_trace_max, float, NONE) \
+       P(class, prefix, missile_smart_trace_min, float, NONE) \
+       P(class, prefix, missile_speed, float, NONE) \
+       P(class, prefix, missile_speed_max, float, NONE) \
+       P(class, prefix, missile_speed_up, float, NONE) \
+       P(class, prefix, missile_speed_z, float, NONE) \
+       P(class, prefix, missile_spread, float, NONE) \
+       P(class, prefix, missile_turnrate, float, NONE) \
+       P(class, prefix, reload_ammo, float, NONE) \
+               P(class, prefix, reload_time, float, NONE) \
+               P(class, prefix, switchdelay_drop, float, NONE) \
+               P(class, prefix, switchdelay_raise, float, NONE) \
+       P(class, prefix, tag_ammo, float, NONE) \
+       P(class, prefix, tag_animtime, float, NONE) \
+       P(class, prefix, tag_damageforcescale, float, NONE) \
+       P(class, prefix, tag_health, float, NONE) \
+       P(class, prefix, tag_lifetime, float, NONE) \
+       P(class, prefix, tag_refire, float, NONE) \
+       P(class, prefix, tag_speed, float, NONE) \
+       P(class, prefix, tag_spread, float, NONE) \
+       P(class, prefix, tag_tracker_lifetime, float, NONE) \
+               P(class, prefix, type, float, NONE) \
+               P(class, prefix, weaponreplace, string, NONE) \
+               P(class, prefix, weaponstartoverride, float, NONE) \
+               P(class, prefix, weaponstart, float, NONE) \
+               P(class, prefix, weaponthrowable, float, NONE) \
+       END()
+       W_PROPS(X, Seeker, seeker)
+#undef X
+ENDCLASS(Seeker)
+REGISTER_WEAPON(SEEKER, seeker, NEW(Seeker));
+
 #ifdef SVQC
+.entity tag_target, wps_tag_tracker;
+.float tag_time;
+
 IntrusiveList g_seeker_trackers;
 STATIC_INIT(g_seeker_trackers) { g_seeker_trackers = IL_NEW(); }
 #endif
index 1fa0adc4dd58835002456f35ad0d0eded72d6072..b190cce69f11271046de2ba7cb21a1df957f7dfb 100644 (file)
@@ -1,91 +1,4 @@
 #include "shockwave.qh"
-#ifndef IMPLEMENTATION
-CLASS(Shockwave, Weapon)
-/* ammotype  */ //ATTRIB(Shockwave, ammo_field, .int, ammo_none);
-/* impulse   */ ATTRIB(Shockwave, impulse, int, 2);
-/* flags     */ ATTRIB(Shockwave, spawnflags, int, WEP_TYPE_HITSCAN | WEP_FLAG_CANCLIMB | WEP_TYPE_MELEE_SEC);
-/* rating    */ ATTRIB(Shockwave, bot_pickupbasevalue, float, 3000);
-/* color     */ ATTRIB(Shockwave, wpcolor, vector, '0.5 0.25 0');
-/* modelname */ ATTRIB(Shockwave, mdl, string, "shotgun");
-#ifdef GAMEQC
-/* model     */ ATTRIB(Shockwave, m_model, Model, MDL_SHOCKWAVE_ITEM);
-#endif
-/* crosshair */ ATTRIB(Shockwave, w_crosshair, string, "gfx/crosshairshotgun");
-/* crosshair */ ATTRIB(Shockwave, w_crosshair_size, float, 0.7);
-/* wepimg    */ ATTRIB(Shockwave, model2, string, "weaponshockwave");
-/* refname   */ ATTRIB(Shockwave, netname, string, "shockwave");
-/* wepname   */ ATTRIB(Shockwave, m_name, string, _("Shockwave"));
-
-#define X(BEGIN, P, END, class, prefix) \
-       BEGIN(class) \
-               P(class, prefix, blast_animtime, float, NONE) \
-               P(class, prefix, blast_damage, float, NONE) \
-               P(class, prefix, blast_distance, float, NONE) \
-               P(class, prefix, blast_edgedamage, float, NONE) \
-               P(class, prefix, blast_force, float, NONE) \
-               P(class, prefix, blast_force_forwardbias, float, NONE) \
-               P(class, prefix, blast_force_zscale, float, NONE) \
-               P(class, prefix, blast_jump_damage, float, NONE) \
-               P(class, prefix, blast_jump_edgedamage, float, NONE) \
-               P(class, prefix, blast_jump_force, float, NONE) \
-               P(class, prefix, blast_jump_force_velocitybias, float, NONE) \
-               P(class, prefix, blast_jump_force_zscale, float, NONE) \
-               P(class, prefix, blast_jump_multiplier_accuracy, float, NONE) \
-               P(class, prefix, blast_jump_multiplier_distance, float, NONE) \
-               P(class, prefix, blast_jump_multiplier_min, float, NONE) \
-               P(class, prefix, blast_jump_radius, float, NONE) \
-               P(class, prefix, blast_multiplier_accuracy, float, NONE) \
-               P(class, prefix, blast_multiplier_distance, float, NONE) \
-               P(class, prefix, blast_multiplier_min, float, NONE) \
-               P(class, prefix, blast_refire, float, NONE) \
-               P(class, prefix, blast_splash_damage, float, NONE) \
-               P(class, prefix, blast_splash_edgedamage, float, NONE) \
-               P(class, prefix, blast_splash_force, float, NONE) \
-               P(class, prefix, blast_splash_force_forwardbias, float, NONE) \
-               P(class, prefix, blast_splash_multiplier_accuracy, float, NONE) \
-               P(class, prefix, blast_splash_multiplier_distance, float, NONE) \
-               P(class, prefix, blast_splash_multiplier_min, float, NONE) \
-               P(class, prefix, blast_splash_radius, float, NONE) \
-               P(class, prefix, blast_spread_max, float, NONE) \
-               P(class, prefix, blast_spread_min, float, NONE) \
-               P(class, prefix, melee_animtime, float, NONE) \
-               P(class, prefix, melee_damage, float, NONE) \
-               P(class, prefix, melee_delay, float, NONE) \
-               P(class, prefix, melee_force, float, NONE) \
-               P(class, prefix, melee_multihit, float, NONE) \
-               P(class, prefix, melee_no_doubleslap, float, NONE) \
-               P(class, prefix, melee_nonplayerdamage, float, NONE) \
-               P(class, prefix, melee_range, float, NONE) \
-               P(class, prefix, melee_refire, float, NONE) \
-               P(class, prefix, melee_swing_side, float, NONE) \
-               P(class, prefix, melee_swing_up, float, NONE) \
-               P(class, prefix, melee_time, float, NONE) \
-               P(class, prefix, melee_traces, float, NONE) \
-               P(class, prefix, switchdelay_raise, float, NONE) \
-        P(class, prefix, switchdelay_drop, float, NONE) \
-        P(class, prefix, weaponreplace, string, NONE) \
-        P(class, prefix, weaponstart, float, NONE) \
-        P(class, prefix, weaponstartoverride, float, NONE) \
-        P(class, prefix, weaponthrowable, float, NONE) \
-       END()
-    W_PROPS(X, Shockwave, shockwave)
-#undef X
-
-ENDCLASS(Shockwave)
-REGISTER_WEAPON(SHOCKWAVE, shockwave, NEW(Shockwave));
-
-
-#ifdef CSQC
-void Net_ReadShockwaveParticle();
-.vector sw_shotorg;
-.vector sw_shotdir;
-.float sw_distance;
-.float sw_spread_max;
-.float sw_spread_min;
-.float sw_time;
-#endif
-#endif
-#ifdef IMPLEMENTATION
 
 REGISTER_NET_TEMP(TE_CSQC_SHOCKWAVEPARTICLE)
 
@@ -884,4 +797,3 @@ METHOD(Shockwave, wr_impacteffect, void(entity thiswep, entity actor))
 }
 
 #endif
-#endif
index 6f70f09beec2219624baeca92e2cd7deaa104fb4..f863094c00f54582d8cf7a088adb04f33c5e27a3 100644 (file)
@@ -1 +1,86 @@
 #pragma once
+
+CLASS(Shockwave, Weapon)
+/* ammotype  */ //ATTRIB(Shockwave, ammo_field, .int, ammo_none);
+/* impulse   */ ATTRIB(Shockwave, impulse, int, 2);
+/* flags     */ ATTRIB(Shockwave, spawnflags, int, WEP_TYPE_HITSCAN | WEP_FLAG_CANCLIMB | WEP_TYPE_MELEE_SEC);
+/* rating    */ ATTRIB(Shockwave, bot_pickupbasevalue, float, 3000);
+/* color     */ ATTRIB(Shockwave, wpcolor, vector, '0.5 0.25 0');
+/* modelname */ ATTRIB(Shockwave, mdl, string, "shotgun");
+#ifdef GAMEQC
+/* model     */ ATTRIB(Shockwave, m_model, Model, MDL_SHOCKWAVE_ITEM);
+#endif
+/* crosshair */ ATTRIB(Shockwave, w_crosshair, string, "gfx/crosshairshotgun");
+/* crosshair */ ATTRIB(Shockwave, w_crosshair_size, float, 0.7);
+/* wepimg    */ ATTRIB(Shockwave, model2, string, "weaponshockwave");
+/* refname   */ ATTRIB(Shockwave, netname, string, "shockwave");
+/* wepname   */ ATTRIB(Shockwave, m_name, string, _("Shockwave"));
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, blast_animtime, float, NONE) \
+               P(class, prefix, blast_damage, float, NONE) \
+               P(class, prefix, blast_distance, float, NONE) \
+               P(class, prefix, blast_edgedamage, float, NONE) \
+               P(class, prefix, blast_force, float, NONE) \
+               P(class, prefix, blast_force_forwardbias, float, NONE) \
+               P(class, prefix, blast_force_zscale, float, NONE) \
+               P(class, prefix, blast_jump_damage, float, NONE) \
+               P(class, prefix, blast_jump_edgedamage, float, NONE) \
+               P(class, prefix, blast_jump_force, float, NONE) \
+               P(class, prefix, blast_jump_force_velocitybias, float, NONE) \
+               P(class, prefix, blast_jump_force_zscale, float, NONE) \
+               P(class, prefix, blast_jump_multiplier_accuracy, float, NONE) \
+               P(class, prefix, blast_jump_multiplier_distance, float, NONE) \
+               P(class, prefix, blast_jump_multiplier_min, float, NONE) \
+               P(class, prefix, blast_jump_radius, float, NONE) \
+               P(class, prefix, blast_multiplier_accuracy, float, NONE) \
+               P(class, prefix, blast_multiplier_distance, float, NONE) \
+               P(class, prefix, blast_multiplier_min, float, NONE) \
+               P(class, prefix, blast_refire, float, NONE) \
+               P(class, prefix, blast_splash_damage, float, NONE) \
+               P(class, prefix, blast_splash_edgedamage, float, NONE) \
+               P(class, prefix, blast_splash_force, float, NONE) \
+               P(class, prefix, blast_splash_force_forwardbias, float, NONE) \
+               P(class, prefix, blast_splash_multiplier_accuracy, float, NONE) \
+               P(class, prefix, blast_splash_multiplier_distance, float, NONE) \
+               P(class, prefix, blast_splash_multiplier_min, float, NONE) \
+               P(class, prefix, blast_splash_radius, float, NONE) \
+               P(class, prefix, blast_spread_max, float, NONE) \
+               P(class, prefix, blast_spread_min, float, NONE) \
+               P(class, prefix, melee_animtime, float, NONE) \
+               P(class, prefix, melee_damage, float, NONE) \
+               P(class, prefix, melee_delay, float, NONE) \
+               P(class, prefix, melee_force, float, NONE) \
+               P(class, prefix, melee_multihit, float, NONE) \
+               P(class, prefix, melee_no_doubleslap, float, NONE) \
+               P(class, prefix, melee_nonplayerdamage, float, NONE) \
+               P(class, prefix, melee_range, float, NONE) \
+               P(class, prefix, melee_refire, float, NONE) \
+               P(class, prefix, melee_swing_side, float, NONE) \
+               P(class, prefix, melee_swing_up, float, NONE) \
+               P(class, prefix, melee_time, float, NONE) \
+               P(class, prefix, melee_traces, float, NONE) \
+               P(class, prefix, switchdelay_raise, float, NONE) \
+        P(class, prefix, switchdelay_drop, float, NONE) \
+        P(class, prefix, weaponreplace, string, NONE) \
+        P(class, prefix, weaponstart, float, NONE) \
+        P(class, prefix, weaponstartoverride, float, NONE) \
+        P(class, prefix, weaponthrowable, float, NONE) \
+       END()
+    W_PROPS(X, Shockwave, shockwave)
+#undef X
+
+ENDCLASS(Shockwave)
+REGISTER_WEAPON(SHOCKWAVE, shockwave, NEW(Shockwave));
+
+
+#ifdef CSQC
+void Net_ReadShockwaveParticle();
+.vector sw_shotorg;
+.vector sw_shotdir;
+.float sw_distance;
+.float sw_spread_max;
+.float sw_spread_min;
+.float sw_time;
+#endif
index 87a24d13a3a96a2d3985073f911f70212d13c956..3644c1357e3fa2517d7a6de28832c14f2de0c394 100644 (file)
@@ -1,61 +1,5 @@
 #include "shotgun.qh"
-#ifndef IMPLEMENTATION
-CLASS(Shotgun, Weapon)
-/* ammotype  */ ATTRIB(Shotgun, ammo_field, .int, ammo_shells);
-/* impulse   */ ATTRIB(Shotgun, impulse, int, 2);
-/* flags     */ ATTRIB(Shotgun, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN | WEP_TYPE_MELEE_SEC);
-/* rating    */ ATTRIB(Shotgun, bot_pickupbasevalue, float, 6000);
-/* color     */ ATTRIB(Shotgun, wpcolor, vector, '0.5 0.25 0');
-/* modelname */ ATTRIB(Shotgun, mdl, string, "shotgun");
-#ifdef GAMEQC
-/* model     */ ATTRIB(Shotgun, m_model, Model, MDL_SHOTGUN_ITEM);
-#endif
-/* crosshair */ ATTRIB(Shotgun, w_crosshair, string, "gfx/crosshairshotgun");
-/* crosshair */ ATTRIB(Shotgun, w_crosshair_size, float, 0.65);
-/* wepimg    */ ATTRIB(Shotgun, model2, string, "weaponshotgun");
-/* refname   */ ATTRIB(Shotgun, netname, string, "shotgun");
-/* wepname   */ ATTRIB(Shotgun, m_name, string, _("Shotgun"));
-
-#define X(BEGIN, P, END, class, prefix) \
-       BEGIN(class) \
-               P(class, prefix, alt_animtime, float, SEC) \
-               P(class, prefix, alt_refire, float, SEC) \
-               P(class, prefix, ammo, float, PRI) \
-               P(class, prefix, animtime, float, BOTH) \
-               P(class, prefix, bullets, float, PRI) \
-               P(class, prefix, damage, float, BOTH) \
-               P(class, prefix, force, float, BOTH) \
-               P(class, prefix, melee_delay, float, SEC) \
-               P(class, prefix, melee_multihit, float, SEC) \
-               P(class, prefix, melee_nonplayerdamage, float, SEC) \
-               P(class, prefix, melee_no_doubleslap, float, SEC) \
-               P(class, prefix, melee_range, float, SEC) \
-               P(class, prefix, melee_swing_side, float, SEC) \
-               P(class, prefix, melee_swing_up, float, SEC) \
-               P(class, prefix, melee_time, float, SEC) \
-               P(class, prefix, melee_traces, float, SEC) \
-               P(class, prefix, refire, float, BOTH) \
-               P(class, prefix, reload_ammo, float, NONE) \
-        P(class, prefix, reload_time, float, NONE) \
-               P(class, prefix, secondary, float, NONE) \
-               P(class, prefix, solidpenetration, float, PRI) \
-               P(class, prefix, spread, float, PRI) \
-        P(class, prefix, switchdelay_drop, float, NONE) \
-        P(class, prefix, switchdelay_raise, float, NONE) \
-        P(class, prefix, weaponreplace, string,NONE) \
-        P(class, prefix, weaponstartoverride, float, NONE) \
-        P(class, prefix, weaponstart, float, NONE) \
-        P(class, prefix, weaponthrowable, float, NONE) \
-       END()
-    W_PROPS(X, Shotgun, shotgun)
-#undef X
-
-ENDCLASS(Shotgun)
-REGISTER_WEAPON(SHOTGUN, shotgun, NEW(Shotgun));
-
 
-#endif
-#ifdef IMPLEMENTATION
 #ifdef SVQC
 spawnfunc(weapon_shotgun) { weapon_defaultspawnfunc(this, WEP_SHOTGUN); }
 
@@ -335,4 +279,3 @@ METHOD(Shotgun, wr_impacteffect, void(entity thiswep, entity actor))
 }
 
 #endif
-#endif
index 6f70f09beec2219624baeca92e2cd7deaa104fb4..2fd734d554b2ddb6dc43aa11042e41abbd02ae20 100644 (file)
@@ -1 +1,54 @@
 #pragma once
+
+CLASS(Shotgun, Weapon)
+/* ammotype  */ ATTRIB(Shotgun, ammo_field, .int, ammo_shells);
+/* impulse   */ ATTRIB(Shotgun, impulse, int, 2);
+/* flags     */ ATTRIB(Shotgun, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN | WEP_TYPE_MELEE_SEC);
+/* rating    */ ATTRIB(Shotgun, bot_pickupbasevalue, float, 6000);
+/* color     */ ATTRIB(Shotgun, wpcolor, vector, '0.5 0.25 0');
+/* modelname */ ATTRIB(Shotgun, mdl, string, "shotgun");
+#ifdef GAMEQC
+/* model     */ ATTRIB(Shotgun, m_model, Model, MDL_SHOTGUN_ITEM);
+#endif
+/* crosshair */ ATTRIB(Shotgun, w_crosshair, string, "gfx/crosshairshotgun");
+/* crosshair */ ATTRIB(Shotgun, w_crosshair_size, float, 0.65);
+/* wepimg    */ ATTRIB(Shotgun, model2, string, "weaponshotgun");
+/* refname   */ ATTRIB(Shotgun, netname, string, "shotgun");
+/* wepname   */ ATTRIB(Shotgun, m_name, string, _("Shotgun"));
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, alt_animtime, float, SEC) \
+               P(class, prefix, alt_refire, float, SEC) \
+               P(class, prefix, ammo, float, PRI) \
+               P(class, prefix, animtime, float, BOTH) \
+               P(class, prefix, bullets, float, PRI) \
+               P(class, prefix, damage, float, BOTH) \
+               P(class, prefix, force, float, BOTH) \
+               P(class, prefix, melee_delay, float, SEC) \
+               P(class, prefix, melee_multihit, float, SEC) \
+               P(class, prefix, melee_nonplayerdamage, float, SEC) \
+               P(class, prefix, melee_no_doubleslap, float, SEC) \
+               P(class, prefix, melee_range, float, SEC) \
+               P(class, prefix, melee_swing_side, float, SEC) \
+               P(class, prefix, melee_swing_up, float, SEC) \
+               P(class, prefix, melee_time, float, SEC) \
+               P(class, prefix, melee_traces, float, SEC) \
+               P(class, prefix, refire, float, BOTH) \
+               P(class, prefix, reload_ammo, float, NONE) \
+        P(class, prefix, reload_time, float, NONE) \
+               P(class, prefix, secondary, float, NONE) \
+               P(class, prefix, solidpenetration, float, PRI) \
+               P(class, prefix, spread, float, PRI) \
+        P(class, prefix, switchdelay_drop, float, NONE) \
+        P(class, prefix, switchdelay_raise, float, NONE) \
+        P(class, prefix, weaponreplace, string,NONE) \
+        P(class, prefix, weaponstartoverride, float, NONE) \
+        P(class, prefix, weaponstart, float, NONE) \
+        P(class, prefix, weaponthrowable, float, NONE) \
+       END()
+    W_PROPS(X, Shotgun, shotgun)
+#undef X
+
+ENDCLASS(Shotgun)
+REGISTER_WEAPON(SHOTGUN, shotgun, NEW(Shotgun));
index 0b43a24c15640c23b3b6e655b5c76b5c301db2bb..a5ae87c36b392256205cc47dd79aa879c628ae7a 100644 (file)
@@ -1,47 +1,4 @@
 #include "tuba.qh"
-#ifndef IMPLEMENTATION
-CLASS(Tuba, Weapon)
-/* impulse   */ ATTRIB(Tuba, impulse, int, 1);
-/* flags     */ ATTRIB(Tuba, spawnflags, int, WEP_FLAG_HIDDEN | WEP_TYPE_SPLASH | WEP_FLAG_NODUAL);
-/* rating    */ ATTRIB(Tuba, bot_pickupbasevalue, float, 2000);
-/* color     */ ATTRIB(Tuba, wpcolor, vector, '0 1 0');
-/* modelname */ ATTRIB(Tuba, mdl, string, "tuba");
-#ifdef GAMEQC
-/* model     */ ATTRIB(Tuba, m_model, Model, MDL_TUBA_ITEM);
-#endif
-/* crosshair */ ATTRIB(Tuba, w_crosshair, string, "gfx/crosshairtuba");
-/* crosshair */ //ATTRIB(Tuba, w_crosshair_size, float, 0.65);
-/* wepimg    */ ATTRIB(Tuba, model2, string, "weapontuba");
-/* refname   */ ATTRIB(Tuba, netname, string, "tuba");
-/* xgettext:no-c-format */
-/* wepname   */ ATTRIB(Tuba, m_name, string, _("@!#%'n Tuba"));
-
-#define X(BEGIN, P, END, class, prefix) \
-       BEGIN(class) \
-               P(class, prefix, animtime, float, NONE) \
-               P(class, prefix, attenuation, float, NONE) \
-               P(class, prefix, damage, float, NONE) \
-               P(class, prefix, edgedamage, float, NONE) \
-               P(class, prefix, fadetime, float, NONE) \
-               P(class, prefix, force, float, NONE) \
-               P(class, prefix, pitchstep, float, NONE) \
-               P(class, prefix, radius, float, NONE) \
-               P(class, prefix, refire, float, NONE) \
-               P(class, prefix, switchdelay_drop, float, NONE) \
-               P(class, prefix, switchdelay_raise, float, NONE) \
-               P(class, prefix, volume, float, NONE) \
-               P(class, prefix, weaponreplace, string, NONE) \
-               P(class, prefix, weaponstartoverride, float, NONE) \
-               P(class, prefix, weaponstart, float, NONE) \
-               P(class, prefix, weaponthrowable, float, NONE) \
-       END()
-    W_PROPS(X, Tuba, tuba)
-#undef X
-ENDCLASS(Tuba)
-REGISTER_WEAPON(TUBA, tuba, NEW(Tuba));
-#endif
-
-#ifdef IMPLEMENTATION
 
 #ifdef SVQC
 
@@ -634,4 +591,3 @@ PRECACHE(Tuba)
 }
 
 #endif
-#endif
index ce6b6ede739c76fd2dd2eed274912ffce10228a2..714a2b8b5853566a8175049433744f69dcdfc4c8 100644 (file)
@@ -1,5 +1,45 @@
 #pragma once
 
+CLASS(Tuba, Weapon)
+/* impulse   */ ATTRIB(Tuba, impulse, int, 1);
+/* flags     */ ATTRIB(Tuba, spawnflags, int, WEP_FLAG_HIDDEN | WEP_TYPE_SPLASH | WEP_FLAG_NODUAL);
+/* rating    */ ATTRIB(Tuba, bot_pickupbasevalue, float, 2000);
+/* color     */ ATTRIB(Tuba, wpcolor, vector, '0 1 0');
+/* modelname */ ATTRIB(Tuba, mdl, string, "tuba");
+#ifdef GAMEQC
+/* model     */ ATTRIB(Tuba, m_model, Model, MDL_TUBA_ITEM);
+#endif
+/* crosshair */ ATTRIB(Tuba, w_crosshair, string, "gfx/crosshairtuba");
+/* crosshair */ //ATTRIB(Tuba, w_crosshair_size, float, 0.65);
+/* wepimg    */ ATTRIB(Tuba, model2, string, "weapontuba");
+/* refname   */ ATTRIB(Tuba, netname, string, "tuba");
+/* xgettext:no-c-format */
+/* wepname   */ ATTRIB(Tuba, m_name, string, _("@!#%'n Tuba"));
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, animtime, float, NONE) \
+               P(class, prefix, attenuation, float, NONE) \
+               P(class, prefix, damage, float, NONE) \
+               P(class, prefix, edgedamage, float, NONE) \
+               P(class, prefix, fadetime, float, NONE) \
+               P(class, prefix, force, float, NONE) \
+               P(class, prefix, pitchstep, float, NONE) \
+               P(class, prefix, radius, float, NONE) \
+               P(class, prefix, refire, float, NONE) \
+               P(class, prefix, switchdelay_drop, float, NONE) \
+               P(class, prefix, switchdelay_raise, float, NONE) \
+               P(class, prefix, volume, float, NONE) \
+               P(class, prefix, weaponreplace, string, NONE) \
+               P(class, prefix, weaponstartoverride, float, NONE) \
+               P(class, prefix, weaponstart, float, NONE) \
+               P(class, prefix, weaponthrowable, float, NONE) \
+       END()
+    W_PROPS(X, Tuba, tuba)
+#undef X
+ENDCLASS(Tuba)
+REGISTER_WEAPON(TUBA, tuba, NEW(Tuba));
+
 #ifdef CSQC
 entityclass(Tuba);
 class(Tuba) .int note;
index 51ce8893d305c0bf262de7bfaedde8291fca12f5..e47f8fa909565a3734188c1f57d376cc1d1a5899 100644 (file)
@@ -1,67 +1,4 @@
 #include "vaporizer.qh"
-#ifndef IMPLEMENTATION
-CLASS(Vaporizer, Weapon)
-/* ammotype  */ ATTRIB(Vaporizer, ammo_field, .int, ammo_cells);
-/* impulse   */ ATTRIB(Vaporizer, impulse, int, 7);
-/* flags     */ ATTRIB(Vaporizer, spawnflags, int, WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_FLAG_SUPERWEAPON | WEP_TYPE_HITSCAN | WEP_FLAG_NODUAL);
-/* rating    */ ATTRIB(Vaporizer, bot_pickupbasevalue, float, 10000);
-/* color     */ ATTRIB(Vaporizer, wpcolor, vector, '0.5 1 1');
-/* modelname */ ATTRIB(Vaporizer, mdl, string, "minstanex");
-#ifdef GAMEQC
-/* model     */ ATTRIB(Vaporizer, m_model, Model, MDL_VAPORIZER_ITEM);
-#endif
-/* crosshair */ ATTRIB(Vaporizer, w_crosshair, string, "gfx/crosshairminstanex");
-/* crosshair */ ATTRIB(Vaporizer, w_crosshair_size, float, 0.6);
-/* reticle   */ ATTRIB(Vaporizer, w_reticle, string, "gfx/reticle_nex");
-/* wepimg    */ ATTRIB(Vaporizer, model2, string, "weaponminstanex");
-/* refname   */ ATTRIB(Vaporizer, netname, string, "vaporizer");
-/* wepname   */ ATTRIB(Vaporizer, m_name, string, _("Vaporizer"));
-
-#define X(BEGIN, P, END, class, prefix) \
-       BEGIN(class) \
-               P(class, prefix, ammo, float, PRI) \
-       P(class, prefix, animtime, float, PRI) \
-       P(class, prefix, damage, float, PRI) \
-       P(class, prefix, refire, float, PRI) \
-       P(class, prefix, ammo, float, SEC) \
-       P(class, prefix, animtime, float, SEC) \
-       P(class, prefix, damage, float, SEC) \
-       P(class, prefix, delay, float, SEC) \
-       P(class, prefix, edgedamage, float, SEC) \
-       P(class, prefix, force, float, SEC) \
-       P(class, prefix, lifetime, float, SEC) \
-       P(class, prefix, radius, float, SEC) \
-       P(class, prefix, refire, float, SEC) \
-       P(class, prefix, shotangle, float, SEC) \
-       P(class, prefix, speed, float, SEC) \
-       P(class, prefix, spread, float, SEC) \
-       P(class, prefix, reload_ammo, float, NONE) \
-        P(class, prefix, reload_time, float, NONE) \
-        P(class, prefix, switchdelay_raise, float, NONE) \
-        P(class, prefix, switchdelay_drop, float, NONE) \
-        P(class, prefix, weaponreplace, string, NONE) \
-        P(class, prefix, weaponstart, float, NONE) \
-        P(class, prefix, weaponstartoverride, float, NONE) \
-        P(class, prefix, weaponthrowable, float, NONE) \
-       END()
-    W_PROPS(X, Vaporizer, vaporizer)
-#undef X
-
-ENDCLASS(Vaporizer)
-REGISTER_WEAPON(VAPORIZER, vaporizer, NEW(Vaporizer));
-
-
-#ifdef SVQC
-.float vaporizer_lasthit;
-.float jump_interval;
-.float jump_interval2;
-.bool held_down;
-.float rm_force;
-.float rm_damage;
-.float rm_edmg;
-#endif
-#endif
-#ifdef IMPLEMENTATION
 
 REGISTER_NET_TEMP(TE_CSQC_VAPORBEAMPARTICLE)
 
@@ -515,4 +452,3 @@ METHOD(Vaporizer, wr_zoom, bool(entity thiswep, entity actor))
 }
 
 #endif
-#endif
index 6f70f09beec2219624baeca92e2cd7deaa104fb4..f0b144341d538d1f24d39f47a43990b4e1be5e98 100644 (file)
@@ -1 +1,62 @@
 #pragma once
+
+CLASS(Vaporizer, Weapon)
+/* ammotype  */ ATTRIB(Vaporizer, ammo_field, .int, ammo_cells);
+/* impulse   */ ATTRIB(Vaporizer, impulse, int, 7);
+/* flags     */ ATTRIB(Vaporizer, spawnflags, int, WEP_FLAG_RELOADABLE | WEP_FLAG_CANCLIMB | WEP_FLAG_SUPERWEAPON | WEP_TYPE_HITSCAN | WEP_FLAG_NODUAL);
+/* rating    */ ATTRIB(Vaporizer, bot_pickupbasevalue, float, 10000);
+/* color     */ ATTRIB(Vaporizer, wpcolor, vector, '0.5 1 1');
+/* modelname */ ATTRIB(Vaporizer, mdl, string, "minstanex");
+#ifdef GAMEQC
+/* model     */ ATTRIB(Vaporizer, m_model, Model, MDL_VAPORIZER_ITEM);
+#endif
+/* crosshair */ ATTRIB(Vaporizer, w_crosshair, string, "gfx/crosshairminstanex");
+/* crosshair */ ATTRIB(Vaporizer, w_crosshair_size, float, 0.6);
+/* reticle   */ ATTRIB(Vaporizer, w_reticle, string, "gfx/reticle_nex");
+/* wepimg    */ ATTRIB(Vaporizer, model2, string, "weaponminstanex");
+/* refname   */ ATTRIB(Vaporizer, netname, string, "vaporizer");
+/* wepname   */ ATTRIB(Vaporizer, m_name, string, _("Vaporizer"));
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, ammo, float, PRI) \
+       P(class, prefix, animtime, float, PRI) \
+       P(class, prefix, damage, float, PRI) \
+       P(class, prefix, refire, float, PRI) \
+       P(class, prefix, ammo, float, SEC) \
+       P(class, prefix, animtime, float, SEC) \
+       P(class, prefix, damage, float, SEC) \
+       P(class, prefix, delay, float, SEC) \
+       P(class, prefix, edgedamage, float, SEC) \
+       P(class, prefix, force, float, SEC) \
+       P(class, prefix, lifetime, float, SEC) \
+       P(class, prefix, radius, float, SEC) \
+       P(class, prefix, refire, float, SEC) \
+       P(class, prefix, shotangle, float, SEC) \
+       P(class, prefix, speed, float, SEC) \
+       P(class, prefix, spread, float, SEC) \
+       P(class, prefix, reload_ammo, float, NONE) \
+        P(class, prefix, reload_time, float, NONE) \
+        P(class, prefix, switchdelay_raise, float, NONE) \
+        P(class, prefix, switchdelay_drop, float, NONE) \
+        P(class, prefix, weaponreplace, string, NONE) \
+        P(class, prefix, weaponstart, float, NONE) \
+        P(class, prefix, weaponstartoverride, float, NONE) \
+        P(class, prefix, weaponthrowable, float, NONE) \
+       END()
+    W_PROPS(X, Vaporizer, vaporizer)
+#undef X
+
+ENDCLASS(Vaporizer)
+REGISTER_WEAPON(VAPORIZER, vaporizer, NEW(Vaporizer));
+
+
+#ifdef SVQC
+.float vaporizer_lasthit;
+.float jump_interval;
+.float jump_interval2;
+.bool held_down;
+.float rm_force;
+.float rm_damage;
+.float rm_edmg;
+#endif
index ee7bf22eadbc8b1e929b0a7bac29c9e340e1f43b..454cb8bfba1b3cb53d59bbb7ced9081fc265c5b5 100644 (file)
@@ -1,71 +1,4 @@
 #include "vortex.qh"
-#ifndef IMPLEMENTATION
-CLASS(Vortex, Weapon)
-/* ammotype  */ ATTRIB(Vortex, ammo_field, .int, ammo_cells);
-/* impulse   */ ATTRIB(Vortex, impulse, int, 7);
-/* flags     */ ATTRIB(Vortex, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN | WEP_FLAG_NODUAL);
-/* rating    */ ATTRIB(Vortex, bot_pickupbasevalue, float, 8000);
-/* color     */ ATTRIB(Vortex, wpcolor, vector, '0.5 1 1');
-/* modelname */ ATTRIB(Vortex, mdl, string, "nex");
-#ifdef GAMEQC
-/* model     */ ATTRIB(Vortex, m_model, Model, MDL_VORTEX_ITEM);
-#endif
-/* crosshair */ ATTRIB(Vortex, w_crosshair, string, "gfx/crosshairnex");
-/* crosshair */ ATTRIB(Vortex, w_crosshair_size, float, 0.65);
-/* reticle   */ ATTRIB(Vortex, w_reticle, string, "gfx/reticle_nex");
-/* wepimg    */ ATTRIB(Vortex, model2, string, "weaponnex");
-/* refname   */ ATTRIB(Vortex, netname, string, "vortex");
-/* wepname   */ ATTRIB(Vortex, m_name, string, _("Vortex"));
-
-#define X(BEGIN, P, END, class, prefix) \
-       BEGIN(class) \
-               P(class, prefix, ammo, float, BOTH) \
-               P(class, prefix, animtime, float, BOTH) \
-               P(class, prefix, chargepool, float, SEC) \
-               P(class, prefix, chargepool_pause_regen, float, SEC) \
-               P(class, prefix, chargepool_regen, float, SEC) \
-               P(class, prefix, charge, float, NONE) \
-               P(class, prefix, charge_animlimit, float, NONE) \
-               P(class, prefix, charge_limit, float, NONE) \
-               P(class, prefix, charge_maxspeed, float, NONE) \
-               P(class, prefix, charge_mindmg, float, NONE) \
-               P(class, prefix, charge_minspeed, float, NONE) \
-               P(class, prefix, charge_rate, float, NONE) \
-               P(class, prefix, charge_rot_pause, float, NONE) \
-               P(class, prefix, charge_rot_rate, float, NONE) \
-               P(class, prefix, charge_shot_multiplier, float, NONE) \
-               P(class, prefix, charge_start, float, NONE) \
-               P(class, prefix, charge_velocity_rate, float, NONE) \
-               P(class, prefix, damagefalloff_forcehalflife, float, BOTH) \
-               P(class, prefix, damagefalloff_halflife, float, BOTH) \
-               P(class, prefix, damagefalloff_maxdist, float, BOTH) \
-               P(class, prefix, damagefalloff_mindist, float, BOTH) \
-               P(class, prefix, damage, float, BOTH) \
-               P(class, prefix, force, float, BOTH) \
-               P(class, prefix, refire, float, BOTH) \
-               P(class, prefix, secondary, float, NONE) \
-               P(class, prefix, reload_ammo, float, NONE) \
-        P(class, prefix, reload_time, float, NONE) \
-        P(class, prefix, switchdelay_raise, float, NONE) \
-        P(class, prefix, switchdelay_drop, float, NONE) \
-        P(class, prefix, weaponreplace, string, NONE) \
-        P(class, prefix, weaponstart, float, NONE) \
-        P(class, prefix, weaponstartoverride, float, NONE) \
-        P(class, prefix, weaponthrowable, float, NONE) \
-       END()
-    W_PROPS(X, Vortex, vortex)
-#undef X
-
-ENDCLASS(Vortex)
-REGISTER_WEAPON(VORTEX, vortex, NEW(Vortex));
-
-
-#ifdef SVQC
-
-.float vortex_lasthit;
-#endif
-#endif
-#ifdef IMPLEMENTATION
 
 //REGISTER_STAT(WEP_CVAR_vortex_charge, bool, WEP_CVAR(vortex, charge))
 //REGISTER_STAT(WEP_CVAR_vortex_charge_animlimit, float, WEP_CVAR(vortex, charge_animlimit))
@@ -429,4 +362,3 @@ METHOD(Vortex, wr_zoom, bool(entity thiswep, entity actor))
 }
 
 #endif
-#endif
index 6f70f09beec2219624baeca92e2cd7deaa104fb4..81ab7e6209d4389d9f8eac7765866623ab51e7c6 100644 (file)
@@ -1 +1,66 @@
 #pragma once
+
+CLASS(Vortex, Weapon)
+/* ammotype  */ ATTRIB(Vortex, ammo_field, .int, ammo_cells);
+/* impulse   */ ATTRIB(Vortex, impulse, int, 7);
+/* flags     */ ATTRIB(Vortex, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN | WEP_FLAG_NODUAL);
+/* rating    */ ATTRIB(Vortex, bot_pickupbasevalue, float, 8000);
+/* color     */ ATTRIB(Vortex, wpcolor, vector, '0.5 1 1');
+/* modelname */ ATTRIB(Vortex, mdl, string, "nex");
+#ifdef GAMEQC
+/* model     */ ATTRIB(Vortex, m_model, Model, MDL_VORTEX_ITEM);
+#endif
+/* crosshair */ ATTRIB(Vortex, w_crosshair, string, "gfx/crosshairnex");
+/* crosshair */ ATTRIB(Vortex, w_crosshair_size, float, 0.65);
+/* reticle   */ ATTRIB(Vortex, w_reticle, string, "gfx/reticle_nex");
+/* wepimg    */ ATTRIB(Vortex, model2, string, "weaponnex");
+/* refname   */ ATTRIB(Vortex, netname, string, "vortex");
+/* wepname   */ ATTRIB(Vortex, m_name, string, _("Vortex"));
+
+#define X(BEGIN, P, END, class, prefix) \
+       BEGIN(class) \
+               P(class, prefix, ammo, float, BOTH) \
+               P(class, prefix, animtime, float, BOTH) \
+               P(class, prefix, chargepool, float, SEC) \
+               P(class, prefix, chargepool_pause_regen, float, SEC) \
+               P(class, prefix, chargepool_regen, float, SEC) \
+               P(class, prefix, charge, float, NONE) \
+               P(class, prefix, charge_animlimit, float, NONE) \
+               P(class, prefix, charge_limit, float, NONE) \
+               P(class, prefix, charge_maxspeed, float, NONE) \
+               P(class, prefix, charge_mindmg, float, NONE) \
+               P(class, prefix, charge_minspeed, float, NONE) \
+               P(class, prefix, charge_rate, float, NONE) \
+               P(class, prefix, charge_rot_pause, float, NONE) \
+               P(class, prefix, charge_rot_rate, float, NONE) \
+               P(class, prefix, charge_shot_multiplier, float, NONE) \
+               P(class, prefix, charge_start, float, NONE) \
+               P(class, prefix, charge_velocity_rate, float, NONE) \
+               P(class, prefix, damagefalloff_forcehalflife, float, BOTH) \
+               P(class, prefix, damagefalloff_halflife, float, BOTH) \
+               P(class, prefix, damagefalloff_maxdist, float, BOTH) \
+               P(class, prefix, damagefalloff_mindist, float, BOTH) \
+               P(class, prefix, damage, float, BOTH) \
+               P(class, prefix, force, float, BOTH) \
+               P(class, prefix, refire, float, BOTH) \
+               P(class, prefix, secondary, float, NONE) \
+               P(class, prefix, reload_ammo, float, NONE) \
+        P(class, prefix, reload_time, float, NONE) \
+        P(class, prefix, switchdelay_raise, float, NONE) \
+        P(class, prefix, switchdelay_drop, float, NONE) \
+        P(class, prefix, weaponreplace, string, NONE) \
+        P(class, prefix, weaponstart, float, NONE) \
+        P(class, prefix, weaponstartoverride, float, NONE) \
+        P(class, prefix, weaponthrowable, float, NONE) \
+       END()
+    W_PROPS(X, Vortex, vortex)
+#undef X
+
+ENDCLASS(Vortex)
+REGISTER_WEAPON(VORTEX, vortex, NEW(Vortex));
+
+
+#ifdef SVQC
+
+.float vortex_lasthit;
+#endif
index e2e7ae628b8099682c5434216707aa55bfc81567..1757c55b812a184c7f00f0e26c82eeb8704c303a 100644 (file)
@@ -1,4 +1,9 @@
 .vector origin;
+
+// angles of the player's model (as opposed to their view which uses `.vector v_angle;`) in degrees
+// x is pitch: positive means up (unlike .v_angle), usually is 0
+// y is yaw: between -180 and 180, increases when turning left
+// z is roll: positive means tilted clockwise, usually is 0
 .vector angles;
 
 /*
index 3ea385cbcd8b5e4918c1f88ed8b3c6eaed9508d4..94af8634003d471dc5529a860db91449c38d0c7a 100644 (file)
@@ -45,6 +45,3 @@ void InterpolateOrigin_Reset(entity this);
 
 // call this BEFORE drawing
 void InterpolateOrigin_Do(entity this);
-
-// in case we interpolate that:
-.vector v_angle;
index feb19afe1f921b25fec4c0422555482c70ff1b43..8f2abb3f824b5745448a5fb4c16ab21545e5451b 100644 (file)
@@ -307,7 +307,7 @@ float bot_aimdir(entity this, vector v, float maxfiredeviation)
        //dprint("e ", vtos(diffang), " < ", ftos(maxfiredeviation), "\n");
 
        // decide whether to fire this time
-       if ((normalize(v) * shotdir) >= cos(maxfiredeviation * DEG2RAD))
+       if (v * shotdir >= cos(maxfiredeviation * DEG2RAD))
        if(vdist(trace_endpos-shotorg, <, 500 + 500 * bound(0, skill + this.bot_aggresskill, 10)) || random()*random()>bound(0,(skill+this.bot_aggresskill)*0.05,1))
                this.bot_firetimer = time + bound(0.1, 0.5-(skill+this.bot_aggresskill)*0.05, 0.5);
        //traceline(shotorg,shotorg+shotdir*1000,false,NULL);
index 6cb24f0be03581e50e8f0fcb7d603b9376a2eb41..5bc86b84e14ca350c18d75493500cf7ca55da63a 100644 (file)
@@ -630,8 +630,7 @@ float bot_fixcount()
        // only add one bot per frame to avoid utter chaos
        if(time > botframe_nextthink)
        {
-               //dprint(ftos(bots), " ? ", ftos(currentbots), "\n");
-               while (currentbots < bots)
+               if (currentbots < bots)
                {
                        if (bot_spawn() == NULL)
                        {
index b0eb75ae41bd1c1954a3bdad671924a5133b947c..db0e478201de2df4385e257042a8c952019f8aca 100644 (file)
@@ -113,20 +113,18 @@ bool ClientData_Send(entity this, entity to, int sf)
        if (IS_SPEC(e)) e = e.enemy;
 
        sf = 0;
-       if (CS(e).race_completed)       sf |= 1; // forced scoreboard
-       if (CS(to).spectatee_status)    sf |= 2; // spectator ent number follows
-       if (CS(e).zoomstate)            sf |= 4; // zoomed
-       if (autocvar_sv_showspectators) sf |= 16; // show spectators
+       if (CS(e).race_completed)       sf |= BIT(0); // forced scoreboard
+       if (CS(to).spectatee_status)    sf |= BIT(1); // spectator ent number follows
+       if (CS(e).zoomstate)            sf |= BIT(2); // zoomed
+       if (autocvar_sv_showspectators) sf |= BIT(4); // show spectators
 
        WriteHeader(MSG_ENTITY, ENT_CLIENT_CLIENTDATA);
        WriteByte(MSG_ENTITY, sf);
 
-       if (sf & 2)
-       {
+       if (sf & BIT(1))
                WriteByte(MSG_ENTITY, CS(to).spectatee_status);
-       }
 
-       if(sf & 16)
+       if(sf & BIT(4))
        {
                float specs = CountSpectators(e, to);
                WriteByte(MSG_ENTITY, specs);
index 614916019f60c4c385851febb2d25c8e102d38ad..9674872c0faa42bd6bc0c1a466204a0c166d9b08 100644 (file)
@@ -141,6 +141,8 @@ CLASS(Client, Object)
     ATTRIB(Client, cvar_cl_multijump, bool, this.cvar_cl_multijump);
     ATTRIB(Client, cvar_cl_accuracy_data_share, bool, this.cvar_cl_accuracy_data_share);
     ATTRIB(Client, cvar_cl_accuracy_data_receive, bool, this.cvar_cl_accuracy_data_receive);
+    ATTRIBARRAY(Client, cvar_cl_weaponpriorities, string, 10);
+    ATTRIB(Client, cvar_cl_weaponpriority, string, this.cvar_cl_weaponpriority);
 
     METHOD(Client, m_unwind, bool(Client this));
 
index 50250f9a5c2974bfb246dc3eff04dd0f2b18d346..a2c037c5d2d198573a8c5eb63eb7e388560df8bf 100644 (file)
@@ -454,7 +454,7 @@ void ClientCommand_sentcvar(entity caller, float request, float argc, string com
                                        tokenize_console(s);
                                }
 
-                               GetCvars(caller, 1);
+                               GetCvars(caller, CS(caller), 1);
 
                                return;
                        }
index 532428dd08893eb39a78c033b51850f43f3904dd..2e2301d0bdec150704ae2b6f297beddbda5870a2 100644 (file)
@@ -118,35 +118,23 @@ void target_give_init(entity this)
        {
                if (it.classname == "weapon_rocketlauncher" || it.classname == "weapon_devastator") {
                        this.ammo_rockets += it.count * WEP_CVAR(devastator, ammo);
-                       this.netname = "devastator";
+                       this.netname = cons(this.netname, "devastator");
                }
                else if (it.classname == "weapon_lightning") {
                        this.ammo_cells += it.count * WEP_CVAR_PRI(electro, ammo); // WEAPONTODO
-                       if(this.netname == "")
-                               this.netname = "electro";
-                       else
-                               this.netname = strcat(this.netname, " electro");
+                       this.netname = cons(this.netname, "electro");
                }
                else if (it.classname == "weapon_plasmagun") {
                        this.ammo_rockets += it.count * WEP_CVAR_PRI(hagar, ammo); // WEAPONTODO
-                       if(this.netname == "")
-                               this.netname = "hagar";
-                       else
-                               this.netname = strcat(this.netname, " hagar");
+                       this.netname = cons(this.netname, "hagar");
                }
                else if (it.classname == "weapon_bfg") {
                        this.ammo_cells += it.count * WEP_CVAR_PRI(crylink, ammo);
-                       if(this.netname == "")
-                               this.netname = "crylink";
-                       else
-                               this.netname = strcat(this.netname, " crylink");
+                       this.netname = cons(this.netname, "crylink");
                }
                else if (it.classname == "weapon_grenadelauncher" || it.classname == "weapon_mortar") {
                        this.ammo_rockets += it.count * WEP_CVAR_PRI(mortar, ammo); // WEAPONTODO
-                       if(this.netname == "")
-                               this.netname = "mortar";
-                       else
-                               this.netname = strcat(this.netname, " mortar");
+                       this.netname = cons(this.netname, "mortar");
                }
                else if (it.classname == "item_armor_body")
                        this.armorvalue = 100;
index d9036dea519ac5ade2431f2d31be037625523676..a8b272f4c8a6cff8517c3eb5d2ffdbbd0e31113e 100644 (file)
@@ -97,7 +97,7 @@ X(0)
                for(int wepslot = 0; wepslot < MAX_WEAPONSLOTS; ++wepslot) \
                { \
                        .entity weaponentity = weaponentities[wepslot]; \
-                       W_CycleWeapon(this, this.cvar_cl_weaponpriorities[slot], dir, weaponentity); \
+                       W_CycleWeapon(this, CS(this).cvar_cl_weaponpriorities[slot], dir, weaponentity); \
                        if(wepslot == 0 && autocvar_g_weaponswitch_debug != 1) \
                                break; \
                } \
index 38d8926371282ba17882a2f623da0427673b29a9..78d290c81131bce368b9aa3711f32b9fc54b9516 100644 (file)
@@ -292,37 +292,37 @@ Called with:
   0:  sends the request
   >0: receives a cvar from name=argv(f) value=argv(f+1)
 */
-void GetCvars_handleString(entity this, string thisname, float f, .string field, string name)
+void GetCvars_handleString(entity this, entity store, string thisname, float f, .string field, string name)
 {
        if (f < 0)
        {
-               if (this.(field))
-                       strunzone(this.(field));
-               this.(field) = string_null;
+               if (store.(field))
+                       strunzone(store.(field));
+               store.(field) = string_null;
        }
        else if (f > 0)
        {
                if (thisname == name)
                {
-                       if (this.(field))
-                               strunzone(this.(field));
-                       this.(field) = strzone(argv(f + 1));
+                       if (store.(field))
+                               strunzone(store.(field));
+                       store.(field) = strzone(argv(f + 1));
                }
        }
        else
                stuffcmd(this, strcat("cl_cmd sendcvar ", name, "\n"));
 }
-void GetCvars_handleString_Fixup(entity this, string thisname, float f, .string field, string name, string(entity, string) func)
+void GetCvars_handleString_Fixup(entity this, entity store, string thisname, float f, .string field, string name, string(entity, string) func)
 {
-       GetCvars_handleString(this, thisname, f, field, name);
+       GetCvars_handleString(this, store, thisname, f, field, name);
        if (f >= 0) // also initialize to the fitting value for "" when sending cvars out
                if (thisname == name)
                {
-                       string s = func(this, strcat1(this.(field)));
-                       if (s != this.(field))
+                       string s = func(this, strcat1(store.(field)));
+                       if (s != store.(field))
                        {
-                               strunzone(this.(field));
-                               this.(field) = strzone(s);
+                               strunzone(store.(field));
+                               store.(field) = strzone(s);
                        }
                }
 }
@@ -339,7 +339,7 @@ void GetCvars_handleFloat(entity this, entity store, string thisname, float f, .
        else
                stuffcmd(this, strcat("cl_cmd sendcvar ", name, "\n"));
 }
-void GetCvars_handleFloatOnce(entity this, string thisname, float f, .float field, string name)
+void GetCvars_handleFloatOnce(entity this, entity store, string thisname, float f, .float field, string name)
 {
        if (f < 0)
        {
@@ -348,17 +348,17 @@ void GetCvars_handleFloatOnce(entity this, string thisname, float f, .float fiel
        {
                if (thisname == name)
                {
-                       if (!this.(field))
+                       if (!store.(field))
                        {
-                               this.(field) = stof(argv(f + 1));
-                               if (!this.(field))
-                                       this.(field) = -1;
+                               store.(field) = stof(argv(f + 1));
+                               if (!store.(field))
+                                       store.(field) = -1;
                        }
                }
        }
        else
        {
-               if (!this.(field))
+               if (!store.(field))
                        stuffcmd(this, strcat("cl_cmd sendcvar ", name, "\n"));
        }
 }
@@ -408,7 +408,7 @@ REPLICATE(cvar_g_xonoticversion, string, "g_xonoticversion");
 /**
  * @param f -1: cleanup, 0: request, 1: receive
  */
-void GetCvars(entity this, int f)
+void GetCvars(entity this, entity store, int f)
 {
        string s = string_null;
 
@@ -421,21 +421,21 @@ void GetCvars(entity this, int f)
 
        Notification_GetCvars(this);
 
-       ReplicateVars(this, CS(this), s, f);
-
-       GetCvars_handleString_Fixup(this, s, f, cvar_cl_weaponpriority, "cl_weaponpriority", W_FixWeaponOrder_ForceComplete_AndBuildImpulseList);
-       GetCvars_handleString_Fixup(this, s, f, cvar_cl_weaponpriorities[0], "cl_weaponpriority0", W_FixWeaponOrder_AllowIncomplete);
-       GetCvars_handleString_Fixup(this, s, f, cvar_cl_weaponpriorities[1], "cl_weaponpriority1", W_FixWeaponOrder_AllowIncomplete);
-       GetCvars_handleString_Fixup(this, s, f, cvar_cl_weaponpriorities[2], "cl_weaponpriority2", W_FixWeaponOrder_AllowIncomplete);
-       GetCvars_handleString_Fixup(this, s, f, cvar_cl_weaponpriorities[3], "cl_weaponpriority3", W_FixWeaponOrder_AllowIncomplete);
-       GetCvars_handleString_Fixup(this, s, f, cvar_cl_weaponpriorities[4], "cl_weaponpriority4", W_FixWeaponOrder_AllowIncomplete);
-       GetCvars_handleString_Fixup(this, s, f, cvar_cl_weaponpriorities[5], "cl_weaponpriority5", W_FixWeaponOrder_AllowIncomplete);
-       GetCvars_handleString_Fixup(this, s, f, cvar_cl_weaponpriorities[6], "cl_weaponpriority6", W_FixWeaponOrder_AllowIncomplete);
-       GetCvars_handleString_Fixup(this, s, f, cvar_cl_weaponpriorities[7], "cl_weaponpriority7", W_FixWeaponOrder_AllowIncomplete);
-       GetCvars_handleString_Fixup(this, s, f, cvar_cl_weaponpriorities[8], "cl_weaponpriority8", W_FixWeaponOrder_AllowIncomplete);
-       GetCvars_handleString_Fixup(this, s, f, cvar_cl_weaponpriorities[9], "cl_weaponpriority9", W_FixWeaponOrder_AllowIncomplete);
-
-       GetCvars_handleFloat(this, CS(this), s, f, cvar_cl_allow_uidtracking, "cl_allow_uidtracking");
+       ReplicateVars(this, store, s, f);
+
+       GetCvars_handleString_Fixup(this, store, s, f, cvar_cl_weaponpriority, "cl_weaponpriority", W_FixWeaponOrder_ForceComplete_AndBuildImpulseList);
+       GetCvars_handleString_Fixup(this, store, s, f, cvar_cl_weaponpriorities[0], "cl_weaponpriority0", W_FixWeaponOrder_AllowIncomplete);
+       GetCvars_handleString_Fixup(this, store, s, f, cvar_cl_weaponpriorities[1], "cl_weaponpriority1", W_FixWeaponOrder_AllowIncomplete);
+       GetCvars_handleString_Fixup(this, store, s, f, cvar_cl_weaponpriorities[2], "cl_weaponpriority2", W_FixWeaponOrder_AllowIncomplete);
+       GetCvars_handleString_Fixup(this, store, s, f, cvar_cl_weaponpriorities[3], "cl_weaponpriority3", W_FixWeaponOrder_AllowIncomplete);
+       GetCvars_handleString_Fixup(this, store, s, f, cvar_cl_weaponpriorities[4], "cl_weaponpriority4", W_FixWeaponOrder_AllowIncomplete);
+       GetCvars_handleString_Fixup(this, store, s, f, cvar_cl_weaponpriorities[5], "cl_weaponpriority5", W_FixWeaponOrder_AllowIncomplete);
+       GetCvars_handleString_Fixup(this, store, s, f, cvar_cl_weaponpriorities[6], "cl_weaponpriority6", W_FixWeaponOrder_AllowIncomplete);
+       GetCvars_handleString_Fixup(this, store, s, f, cvar_cl_weaponpriorities[7], "cl_weaponpriority7", W_FixWeaponOrder_AllowIncomplete);
+       GetCvars_handleString_Fixup(this, store, s, f, cvar_cl_weaponpriorities[8], "cl_weaponpriority8", W_FixWeaponOrder_AllowIncomplete);
+       GetCvars_handleString_Fixup(this, store, s, f, cvar_cl_weaponpriorities[9], "cl_weaponpriority9", W_FixWeaponOrder_AllowIncomplete);
+
+       GetCvars_handleFloat(this, store, s, f, cvar_cl_allow_uidtracking, "cl_allow_uidtracking");
 
        // fixup of switchweapon (needed for LMS or when spectating is disabled, as PutClientInServer comes too early)
        if (f > 0)
index abe8cd74a6c78c5aac70029d0acf971ce6e590a0..1c01a573797713c4fe39345da3f895e60717aad9 100644 (file)
@@ -44,7 +44,7 @@ void GetCvars_handleFloat(entity this, entity store, string thisname, float f, .
 
 float spamsound(entity e, float chan, Sound samp, float vol, float _atten);
 
-void GetCvars_handleString(entity this, string thisname, float f, .string field, string name);
+void GetCvars_handleString(entity this, entity store, string thisname, float f, .string field, string name);
 
 void precache_all_playermodels(string pattern);
 
@@ -75,7 +75,7 @@ void GameLogInit();
 
 void GameLogClose();
 
-void GetCvars(entity this, float f);
+void GetCvars(entity this, entity store, int f);
 
 string GetMapname();
 
index ac8746516ca516b0552d56f6a26a1f2eea633cdb..c6fdeb244148177b306989260bf1474244b60f5e 100644 (file)
@@ -91,7 +91,7 @@
 #include <server/weapons/weaponsystem.qh>
 
 #include <common/physics/player.qh>
-#include <common/effects/qc/all.qh>
+#include <common/effects/qc/_mod.qh>
 #include <common/deathtypes/all.qh>
 #include <common/notifications/all.qh>
 #include <common/triggers/teleporters.qh>
index 85801af52a8fc900db8fcff339c2b6b153c5226d..bd88131d31b2ddfa6e6e2a81aac0e55c63a7ec37 100644 (file)
@@ -429,8 +429,8 @@ void havocbot_goalrating_ast_targets(entity this, float ratingscale)
 
                        this.havocbot_attack_time = 0;
 
-                       if(checkpvs(this.view_ofs,it))
-                       if(checkpvs(this.view_ofs,best))
+                       if(checkpvs(this.origin + this.view_ofs, it))
+                       if(checkpvs(this.origin + this.view_ofs, best))
                        {
                        //      dprint("increasing attack time for this target\n");
                                this.havocbot_attack_time = time + 2;
index 9ac2249a234b50bd1bbf33dab9d2739dd433b1c3..931ef826d9931f8889855b54dc89265520a1a8c7 100644 (file)
@@ -22,7 +22,7 @@
 #include "../common/minigames/sv_minigames.qh"
 
 #include "../common/physics/player.qh"
-#include "../common/effects/qc/all.qh"
+#include "../common/effects/qc/_mod.qh"
 #include "../common/mutators/mutator/waypoints/waypointsprites.qh"
 #include "../common/triggers/include.qh"
 #include "../common/wepent.qh"
index f72ff8533f57555adc4e0a49526f59ab07b8b463..fd0b0c99e2d60dc5f382747a860548a706b12017 100644 (file)
@@ -5,7 +5,7 @@
 #include <server/_mod.inc>
 
 #include <common/_all.inc>
-#include <common/effects/qc/all.qc>
+#include <common/effects/qc/_mod.inc>
 
 #include <lib/csqcmodel/sv_model.qc>
 
index b94b2533f3441a1e5955a13f54214b142e94a398..f69faa03a324de3e93d3136610a2835d9bbc781e 100644 (file)
@@ -84,14 +84,14 @@ void W_PrepareExplosionByDamage(entity this, entity attacker, void(entity this)
        this.takedamage = DAMAGE_NO;
        this.event_damage = func_null;
 
+       MUTATOR_CALLHOOK(PrepareExplosionByDamage, this, attacker);
+
        if(IS_CLIENT(attacker) && !autocvar_g_projectiles_keep_owner)
        {
                this.owner = attacker;
                this.realowner = attacker;
        }
 
-       MUTATOR_CALLHOOK(PrepareExplosionByDamage, this, attacker);
-
        // do not explode NOW but in the NEXT FRAME!
        // because recursive calls to RadiusDamage are not allowed
        this.nextthink = time;
index 791d65915be989f9982b9d080024a860d13fab43..776d8d8d0f43800999a3b10829cb3c9c20cc2d93 100644 (file)
@@ -290,7 +290,7 @@ void W_CycleWeapon(entity this, string weaponorder, float dir, .entity weaponent
 void W_NextWeaponOnImpulse(entity this, float imp, .entity weaponentity)
 {
        float w;
-       w = W_GetCycleWeapon(this, this.cvar_cl_weaponpriority, +1, imp, 1, (CS(this).cvar_cl_weaponimpulsemode == 0), weaponentity);
+       w = W_GetCycleWeapon(this, CS(this).cvar_cl_weaponpriority, +1, imp, 1, (CS(this).cvar_cl_weaponimpulsemode == 0), weaponentity);
        if(w > 0)
                W_SwitchWeapon(this, Weapons_from(w), weaponentity);
 }
@@ -303,7 +303,7 @@ void W_NextWeapon(entity this, int list, .entity weaponentity)
        else if(list == 1)
                W_CycleWeapon(this, this.weaponorder_byimpulse, -1, weaponentity);
        else if(list == 2)
-               W_CycleWeapon(this, this.cvar_cl_weaponpriority, -1, weaponentity);
+               W_CycleWeapon(this, CS(this).cvar_cl_weaponpriority, -1, weaponentity);
 }
 
 // prev weapon
@@ -314,7 +314,7 @@ void W_PreviousWeapon(entity this, float list, .entity weaponentity)
        else if(list == 1)
                W_CycleWeapon(this, this.weaponorder_byimpulse, +1, weaponentity);
        else if(list == 2)
-               W_CycleWeapon(this, this.cvar_cl_weaponpriority, +1, weaponentity);
+               W_CycleWeapon(this, CS(this).cvar_cl_weaponpriority, +1, weaponentity);
 }
 
 // previously used if exists and has ammo, (second) best otherwise
index ea580e9118671e128bd03d45795e4dba6625e87c..eea33ddb7b98e71c762a7fc09f9d7f41856c7558 100644 (file)
@@ -12,7 +12,7 @@ bool client_hasweapon(entity this, Weapon wpn, .entity weaponentity, float andam
 .int weaponcomplainindex;
 float W_GetCycleWeapon(entity this, string weaponorder, float dir, float imp, float complain, float skipmissing, .entity weaponentity);
 
-#define w_getbestweapon(ent,wepent) Weapons_from(W_GetCycleWeapon(ent, ent.cvar_cl_weaponpriority, 0, -1, false, true, wepent))
+#define w_getbestweapon(ent,wepent) Weapons_from(W_GetCycleWeapon(ent, CS(ent).cvar_cl_weaponpriority, 0, -1, false, true, wepent))
 
 void W_SwitchWeapon_Force(Player this, Weapon w, .entity weaponentity);
 
index f657789f8cc5f8a920f2fb096b89b7476405dcf7..8eaa0280a7588fcee50c53a49e73fb23de79c2cc 100644 (file)
@@ -30,7 +30,7 @@ void W_SetupShot_Dir_ProjectileSize_Range(entity ent, .entity weaponentity, vect
        float oldsolid = ent.dphitcontentsmask;
        if(!IS_CLIENT(ent))
                antilag = false; // no antilag for non-clients!
-       if (IS_PLAYER(ent) && ent.(weaponentity).m_weapon == WEP_RIFLE)
+       if (IS_PLAYER(ent) && (ent.(weaponentity).m_weapon.spawnflags & WEP_FLAG_PENETRATEWALLS))
                ent.dphitcontentsmask = DPCONTENTS_BODY | DPCONTENTS_CORPSE;
        else
                ent.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE;