]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Move weapon load floats in defs.qh, rather than in each weapon file. Necessary to...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 22 Jan 2011 18:27:25 +0000 (20:27 +0200)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 22 Jan 2011 18:27:25 +0000 (20:27 +0200)
16 files changed:
qcsrc/server/defs.qh
qcsrc/server/w_crylink.qc
qcsrc/server/w_electro.qc
qcsrc/server/w_fireball.qc
qcsrc/server/w_grenadelauncher.qc
qcsrc/server/w_hagar.qc
qcsrc/server/w_hlac.qc
qcsrc/server/w_laser.qc
qcsrc/server/w_minelayer.qc
qcsrc/server/w_minstanex.qc
qcsrc/server/w_nex.qc
qcsrc/server/w_rocketlauncher.qc
qcsrc/server/w_seeker.qc
qcsrc/server/w_shotgun.qc
qcsrc/server/w_sniperrifle.qc
qcsrc/server/w_uzi.qc

index 82b53fcad50720e74ab37ce83ad09bf9a15c5759..06d0a3bf5714459a5518c5b90d6c3a12d48e8d45 100644 (file)
@@ -617,6 +617,23 @@ float client_cefc_accumulatortime;
 .float clip_size;
 .float wish_reload;
 
+// weapon load persistence, for weapons that support reloading
+.float laser_load;
+.float shotgun_load;
+.float uzi_load;
+.float grenadelauncher_load;
+.float minelayer_load;
+.float electro_load;
+.float crylink_load;
+.float hlac_load;
+.float nex_load;
+.float minstanex_load;
+.float sniperrifle_load;
+.float seeker_load;
+.float hagar_load;
+.float fireball_load;
+.float rocketlauncher_load;
+
 #define PROJECTILE_MAKETRIGGER(e) (e).solid = SOLID_CORPSE; (e).dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE
 // when doing this, hagar can go through clones
 // #define PROJECTILE_MAKETRIGGER(e) (e).solid = SOLID_BBOX
index adfe3e25ba6347ebefa4ff5d3eef929e0d0b22fb..73f9f5864bba1eae047001469e12ba997d2e8d73 100644 (file)
@@ -9,8 +9,6 @@ REGISTER_WEAPON(CRYLINK, w_crylink, IT_CELLS, 6, WEP_FLAG_NORMAL | WEP_TYPE_SPLA
 .entity queuenext;
 .entity queueprev;
 
-.float crylink_load;
-
 void W_Crylink_SetAmmoCounter()
 {
        // set clip_load to the weapon we have switched to, if the gun uses reloading
index 4e12ffda3db30cd9707c42d4f72370e50a1f789d..cd03bdcebe2f74fc3c6409b50117f3b67e22d802 100644 (file)
@@ -5,8 +5,6 @@ REGISTER_WEAPON(ELECTRO, w_electro, IT_CELLS, 5, WEP_FLAG_NORMAL | WEP_TYPE_SPLA
 .float electro_count;
 .float electro_secondarytime;
 
-.float electro_load;
-
 void W_Electro_SetAmmoCounter()
 {
        // set clip_load to the weapon we have switched to, if the gun uses reloading
index 3130a930397627c5dba1aa5e03e09f81f39ce87f..ea34c80afcdaade523aa24ddbf0c3638271f8729 100644 (file)
@@ -6,8 +6,6 @@ REGISTER_WEAPON(FIREBALL, w_fireball, IT_FUEL, 9, WEP_TYPE_SPLASH, BOT_PICKUP_RA
 .vector fireball_impactvec;
 .float fireball_primarytime;
 
-.float fireball_load;
-
 void W_Fireball_SetAmmoCounter()
 {
        // set clip_load to the weapon we have switched to, if the gun uses reloading
index 56991620684e673d775eee7d133beaa66dfbb77a..77bf031b3fb25935bba210a3abbe754b57125985 100644 (file)
@@ -5,8 +5,6 @@ REGISTER_WEAPON(GRENADE_LAUNCHER, w_glauncher, IT_ROCKETS, 4, WEP_FLAG_NORMAL |
 .float gl_detonate_later;
 .float gl_bouncecnt;
 
-.float grenadelauncher_load;
-
 void W_GrenadeLauncher_SetAmmoCounter()
 {
        // set clip_load to the weapon we have switched to, if the gun uses reloading
index be2b0241bc28eec963632d6ccff698edb77e66e1..2a8e4d7f47b0c35e0b9d8a8b2efc8d8ae08fb68a 100644 (file)
@@ -4,8 +4,6 @@ REGISTER_WEAPON(HAGAR, w_hagar, IT_ROCKETS, 8, WEP_FLAG_NORMAL | WEP_FLAG_CANCLI
 #ifdef SVQC
 // NO bounce protection, as bounces are limited!
 
-.float hagar_load;
-
 void W_Hagar_SetAmmoCounter()
 {
        // set clip_load to the weapon we have switched to, if the gun uses reloading
index 006c4d3ba260a120b4e96cd69e7a36166eed3105..bdbb88bc67337b0b86ac05bae959360e00761749 100644 (file)
@@ -3,8 +3,6 @@ REGISTER_WEAPON(HLAC, w_hlac, IT_CELLS, 6, WEP_FLAG_NORMAL | WEP_TYPE_SPLASH, BO
 #else
 #ifdef SVQC
 
-.float hlac_load;
-
 void W_HLAC_SetAmmoCounter()
 {
        // set clip_load to the weapon we have switched to, if the gun uses reloading
index 0e23c6b401999c73f9b77bad417bc2c1afc6fa2e..33a9c164d42793fc16d15be54b8b933b44c553a5 100644 (file)
@@ -4,8 +4,6 @@ REGISTER_WEAPON(LASER, w_laser, 0, 1, WEP_FLAG_NORMAL | WEP_FLAG_CANCLIMB | WEP_
 #ifdef SVQC
 void(float imp) W_SwitchWeapon;
 
-.float laser_load;
-
 void W_Laser_SetAmmoCounter()
 {
        // set clip_load to the weapon we have switched to, if the gun uses reloading
index 362e9355687de4d1c8b5190fb5ccd8bed808cd03..6d307bb2f971d777f36b5dc540c34240c9027d45 100644 (file)
@@ -6,8 +6,6 @@ void W_Mine_Think (void);
 .float minelayer_detonate, minelayer_mines;
 .float mine_time;
 
-.float minelayer_load;
-
 void W_MineLayer_SetAmmoCounter()
 {
        // set clip_load to the weapon we have switched to, if the gun uses reloading
index 3a5d6f5e680813fe31a80ec5025d988a917981b5..8b01ceee849ff4cf48605b17ac8bb77809e73db0 100644 (file)
@@ -4,8 +4,6 @@ REGISTER_WEAPON(MINSTANEX, w_minstanex, IT_CELLS, 7, WEP_FLAG_HIDDEN | WEP_FLAG_
 #ifdef SVQC
 .float minstanex_lasthit;
 
-.float minstanex_load;
-
 void W_Minstanex_SetAmmoCounter()
 {
        // set clip_load to the weapon we have switched to, if the gun uses reloading
index 7abde095f299c7946ce0a64bff3d0cce9bd65c53..e93262e92b471109a39423cf8843b2da21e6fe94 100644 (file)
@@ -3,8 +3,6 @@ REGISTER_WEAPON(NEX, w_nex, IT_CELLS, 7, WEP_FLAG_NORMAL | WEP_TYPE_HITSCAN, BOT
 #else
 #ifdef SVQC
 
-.float nex_load;
-
 void W_Nex_SetAmmoCounter()
 {
        // set clip_load to the weapon we have switched to, if the gun uses reloading
index 96a4f0b15f4ee8caa3734759e912f86f6e6cdbf6..ab30b0712d5851070bdebffbfc66e3a852723961 100644 (file)
@@ -5,8 +5,6 @@ REGISTER_WEAPON(ROCKET_LAUNCHER, w_rlauncher, IT_ROCKETS, 9, WEP_FLAG_NORMAL | W
 .float rl_release;
 .float rl_detonate_later;
 
-.float rocketlauncher_load;
-
 void W_RocketLauncher_SetAmmoCounter()
 {
        // set clip_load to the weapon we have switched to, if the gun uses reloading
index f69a38cbcda16ce347c8b34ad1f5c16d8402d8b2..b1cde626a0e74218028075eb035439e72cb8f5d2 100644 (file)
@@ -5,8 +5,6 @@ REGISTER_WEAPON(SEEKER, w_seeker, IT_ROCKETS, 8, WEP_FLAG_NORMAL | WEP_TYPE_SPLA
 //.float proxytime; = autoswitch
 //.float tl; = wait
 
-.float seeker_load;
-
 void W_Seeker_SetAmmoCounter()
 {
        // set clip_load to the weapon we have switched to, if the gun uses reloading
index acf65a1f98dbb71582f0b71f8597293dc998a970..50ad77bde336ae3636f19b4109c5325aa0668915 100644 (file)
@@ -3,8 +3,6 @@ REGISTER_WEAPON(SHOTGUN, w_shotgun, IT_SHELLS, 2, WEP_FLAG_NORMAL | WEP_TYPE_HIT
 #else
 #ifdef SVQC
 
-.float shotgun_load;
-
 void W_Shotgun_SetAmmoCounter()
 {
        // set clip_load to the weapon we have switched to, if the gun uses reloading
index 7577495f816ffdc50aca31200d2f02d2f2c60f4a..359ab4dfad553994d34709516abddaf6075b487d 100644 (file)
@@ -7,7 +7,6 @@ REGISTER_WEAPON(SNIPERRIFLE, w_sniperrifle, IT_NAILS, 7, WEP_FLAG_NORMAL | WEP_T
 //** In fully automatic mode some of the gas is used to extract and reload the next cartrige, thus there is less power and range.
 
 .float sniperrifle_accumulator;
-.float sniperrifle_load;
 
 void W_SniperRifle_SetAmmoCounter()
 {
index ab6e43580426d29e55f4f51bc1118a02378bb207..d841283433f359a696466e420529754d2883bfd8 100644 (file)
@@ -3,8 +3,6 @@ REGISTER_WEAPON(UZI, w_uzi, IT_NAILS, 3, WEP_FLAG_NORMAL | WEP_TYPE_HITSCAN, BOT
 #else
 #ifdef SVQC
 
-.float uzi_load;
-
 void W_UZI_SetAmmoCounter()
 {
        // set clip_load to the weapon we have switched to, if the gun uses reloading