[nexuiz-commits] r7587 - in trunk/data: . qcsrc/client qcsrc/common qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Tue Sep 1 16:06:54 EDT 2009
Author: div0
Date: 2009-09-01 16:06:50 -0400 (Tue, 01 Sep 2009)
New Revision: 7587
Added:
trunk/data/qcsrc/server/w_fireball.qc
Modified:
trunk/data/defaultNexuiz.cfg
trunk/data/effectinfo.txt
trunk/data/keybinds.txt
trunk/data/qcsrc/client/View.qc
trunk/data/qcsrc/client/damage.qc
trunk/data/qcsrc/client/projectile.qc
trunk/data/qcsrc/common/constants.qh
trunk/data/qcsrc/common/items.qc
trunk/data/qcsrc/common/items.qh
trunk/data/qcsrc/server/constants.qh
trunk/data/qcsrc/server/g_damage.qc
trunk/data/qcsrc/server/progs.src
trunk/data/qcsrc/server/t_items.qc
trunk/data/weapons.cfg
trunk/data/weaponsHavoc.cfg
Log:
[NOT FOR 2.5.2] fireball weapon: code changes, cfgs
Modified: trunk/data/defaultNexuiz.cfg
===================================================================
--- trunk/data/defaultNexuiz.cfg 2009-09-01 20:05:50 UTC (rev 7586)
+++ trunk/data/defaultNexuiz.cfg 2009-09-01 20:06:50 UTC (rev 7587)
@@ -26,7 +26,7 @@
seta g_configversion 0 "Configuration file version (used to upgrade settings) 0: first run, or previous start was <2.4.1 Later, it's overridden by config.cfg, version ranges are defined in config_update.cfg"
// default.cfg versioning (update using update-cvarcount.sh, run that every time after adding a new cvar)
-set cvar_check_default ff6f4ae047891b3b61ecfc5b3d3b38b4
+set cvar_check_default ba4f55ed0f5a00a082bfb12c80dd3f8e
// Nexuiz version (formatted for machines)
// used to determine if a client version is compatible
@@ -207,6 +207,12 @@
seta crosshair_tuba_color_blue 0.25 "crosshair color blue component to display when wielding the tuba"
seta crosshair_tuba_color_alpha 1 "crosshair alpha value to display when wielding the tuba"
seta crosshair_tuba_size 1 "crosshair size when wielding the tuba"
+seta crosshair_fireball "" "crosshair to display when wielding the fireball"
+seta crosshair_fireball_color_red 0.2 "crosshair color red component to display when wielding the fireball"
+seta crosshair_fireball_color_green 1.0 "crosshair color green component to display when wielding the fireball"
+seta crosshair_fireball_color_blue 0.2 "crosshair color blue component to display when wielding the fireball"
+seta crosshair_fireball_color_alpha 1 "crosshair alpha value to display when wielding the fireball"
+seta crosshair_fireball_size 1 "crosshair size when wielding the fireball"
fov 90
seta cl_zoomfactor 5 "how much +zoom will zoom (1-16)"
seta cl_zoomspeed 3.5 "how fast it will zoom (0.5-16), negative values mean instant zoom"
@@ -389,9 +395,9 @@
set bot_ai_aimskill_offset 0.3 "Amount of error induced to the bots aim"
set bot_ai_aimskill_think 1 "Aiming velocity. Use values below 1 for slower aiming"
set bot_ai_custom_weapon_priority_distances "300 850" "Define close and far distances in any order. Based on the distance to the enemy bots will choose different weapons"
-set bot_ai_custom_weapon_priority_far "11 7 15 14 4 5 8 13 6 1 3 9 2" "Desired weapons for far distances ordered by priority"
-set bot_ai_custom_weapon_priority_mid "11 9 4 5 3 7 15 14 6 13 8 2 1" "Desired weapons for middle distances ordered by priority"
-set bot_ai_custom_weapon_priority_close "11 7 3 13 14 8 6 4 2 5 15 1" "Desired weapons for close distances ordered by priority"
+set bot_ai_custom_weapon_priority_far "11 16 7 15 14 4 5 8 13 6 1 3 9 2" "Desired weapons for far distances ordered by priority"
+set bot_ai_custom_weapon_priority_mid "11 16 9 4 5 3 7 15 14 6 13 8 2 1" "Desired weapons for middle distances ordered by priority"
+set bot_ai_custom_weapon_priority_close "11 16 7 3 13 14 8 6 4 2 5 15 1" "Desired weapons for close distances ordered by priority"
set bot_ai_weapon_combo 1 "Enable bots to do weapon combos"
set bot_ai_weapon_combo_threshold 0.3 "Try to make a combo N seconds after the last attack"
set bot_ai_friends_aware_pickup_radius "500" "Bots will not pickup items if a team mate is this distance near the item"
@@ -775,6 +781,8 @@
set g_balance_health_start 150
set g_balance_selfdamagepercent 0.6
set g_balance_weaponswitchdelay 0.15
+set g_balance_firetransfer_time 0.9
+set g_balance_firetransfer_damage 0.8
// powerup balance settings
set g_balance_powerup_invincible_takedamage 0.2
set g_balance_powerup_invincible_time 30
Modified: trunk/data/effectinfo.txt
===================================================================
--- trunk/data/effectinfo.txt 2009-09-01 20:05:50 UTC (rev 7586)
+++ trunk/data/effectinfo.txt 2009-09-01 20:06:50 UTC (rev 7587)
@@ -4050,4 +4050,374 @@
bounce 1.5
liquidfriction 0.25
originjitter 16 16 16
-velocityjitter 96 96 96
\ No newline at end of file
+velocityjitter 96 96 96
+
+
+// used nowhere in code
+effect firemine
+trailspacing 0.5
+count 1
+type smoke
+tex 48 55
+color 0x8f0d00 0xff5a00
+size 1 1
+sizeincrease 5
+gravity -0.06
+alpha 50 256 250
+bounce 1.5
+velocityjitter 10 10 2
+airfriction 1.2
+//slowfire
+effect firemine
+trailspacing 0.5
+count 1
+type smoke
+tex 48 55
+color 0x8f0d00 0xff5a00
+size 1 1
+sizeincrease 5
+gravity -0.06
+alpha 50 256 200
+bounce 1.5
+velocityjitter 10 10 10
+airfriction 1.2
+// very slow and small fire
+effect firemine
+trailspacing 1
+count 1
+type smoke
+tex 48 55
+color 0x8f0d00 0xff5a00
+size 1 1
+sizeincrease 2
+gravity -0.06
+alpha 50 256 200
+bounce 1.5
+velocityjitter 8 8 8
+airfriction 0.3
+//decreasing fire
+effect firemine
+trailspacing 1
+count 1
+type smoke
+tex 48 55
+color 0x8f0d00 0xff5a00
+size 5 7
+sizeincrease -3
+gravity -0.06
+alpha 50 256 200
+bounce 1.5
+velocityjitter 3 3 3
+airfriction 0.3
+//smoke
+effect firemine
+trailspacing 2
+count 1
+type alphastatic
+tex 0 8
+size 1 4
+sizeincrease 1
+color 0x000000 0x111111
+alpha 256 256 90
+//gravity -0.2
+originjitter 2 2 2
+velocityoffset 0 0 3
+airfriction 1
+//fastfire
+effect firemine
+trailspacing 0.25
+count 1
+type smoke
+tex 48 55
+color 0x8f0d00 0xff5a00
+size 12 12
+sizeincrease 0
+gravity 0
+alpha 50 256 1600
+bounce 1.5
+velocityjitter 0 0 0
+airfriction 1.2
+// light only
+effect firemine
+trailspacing 4
+lightradius 50
+lightradiusfade 50000
+lightcolor 2.7 2.7 0.6
+
+// used nowhere in code
+effect fireball
+trailspacing 0.5
+count 1
+type smoke
+tex 48 55
+color 0x8f0d00 0xff5a00
+size 5 5
+sizeincrease 20
+gravity -0.06
+alpha 50 256 250
+bounce 1.5
+velocityjitter 40 40 11
+airfriction 1.2
+//slowfire
+effect fireball
+trailspacing 0.5
+count 1
+type smoke
+tex 48 55
+color 0x8f0d00 0xff5a00
+size 5 5
+sizeincrease 20
+gravity -0.06
+alpha 50 256 200
+bounce 1.5
+velocityjitter 40 40 40
+airfriction 1.2
+// very slow and small fire
+effect fireball
+trailspacing 1
+count 1
+type smoke
+tex 48 55
+color 0x8f0d00 0xff5a00
+size 5 5
+sizeincrease 10
+gravity -0.06
+alpha 50 256 200
+bounce 1.5
+velocityjitter 30 30 30
+airfriction 0.3
+//decreasing fire
+effect fireball
+trailspacing 1
+count 1
+type smoke
+tex 48 55
+color 0x8f0d00 0xff5a00
+size 20 30
+sizeincrease -10
+gravity -0.06
+alpha 50 256 200
+bounce 1.5
+velocityjitter 10 10 10
+airfriction 0.3
+//smoke
+effect fireball
+trailspacing 2
+count 1
+type alphastatic
+tex 0 8
+size 5 15
+sizeincrease 7
+color 0x000000 0x111111
+alpha 256 256 90
+//gravity -0.2
+originjitter 10 10 10
+velocityoffset 0 0 10
+airfriction 1
+//fastfire
+effect fireball
+trailspacing 0.25
+count 1
+type smoke
+tex 48 55
+color 0x8f0d00 0xff5a00
+size 48 48
+sizeincrease 0
+gravity 0
+alpha 50 256 1600
+bounce 1.5
+velocityjitter 0 0 0
+airfriction 1.2
+// light only
+effect fireball
+trailspacing 4
+lightradius 300
+lightradiusfade 50000
+lightcolor 2.7 2.7 0.6
+
+// fireball
+effect fireball_laser
+count 20
+type spark
+color 0x800000 0xFF8020
+alpha 192 256 2560
+size 1 1
+velocityjitter 1 1 1
+velocitymultiplier 10
+stretchfactor 0.7
+
+// rocket explosion (bigger than mortar and hagar)
+// decal
+// used nowhere in code
+effect fireball_explode
+countabsolute 1
+type decal
+tex 8 16
+size 72 72
+alpha 256 256 0
+originjitter 40 40 40
+lightradius 500
+lightradiusfade 500
+lightcolor 4 2 0.5
+// flare effect
+effect fireball_explode
+countabsolute 1
+type static
+tex 35 37
+color 0x404040 0x404040
+size 72 72
+alpha 192 192 64
+// fire effect
+effect fireball_explode
+notunderwater
+count 256
+type static
+tex 48 55
+color 0x902010 0xFFD080
+size 16 16
+alpha 128 128 256
+bounce 1.5
+airfriction 4
+liquidfriction 4
+originjitter 8 8 8
+velocityjitter 512 512 512
+// underwater bubbles
+effect fireball_explode
+underwater
+count 64
+type bubble
+tex 62 62
+color 0x404040 0x808080
+size 3 3
+alpha 128 256 64
+gravity -0.125
+bounce 1.5
+liquidfriction 0.25
+originjitter 16 16 16
+velocityjitter 144 144 144
+// bouncing sparks
+effect fireball_explode
+notunderwater
+count 128
+type spark
+color 0x903010 0xFFD030
+size 2 2
+alpha 256 256 384
+gravity 1
+airfriction 0.2
+bounce 1.5
+liquidfriction 0.8
+velocityoffset 0 0 80
+velocityjitter 384 384 384
+
+effect fireball_muzzleflash
+count 4
+type smoke
+color 0x202020 0x404040
+tex 0 8
+size 5 5
+alpha 256 256 512
+originjitter 1.5 1.5 1.5
+velocityjitter 6 6 6
+velocitymultiplier 0.01
+lightradius 200
+lightradiusfade 2000
+lightcolor 2 1.5 0.2
+effect fireball_muzzleflash
+count 30
+type spark
+tex 40 40
+color 0xFFFDD9 0xFFFDD9
+size 3 3
+alpha 0 128 1024
+originjitter 1 1 1
+velocityjitter 300 300 300
+velocitymultiplier 0.5
+airfriction 12
+
+effect fireball_preattack_muzzleflash
+count 4
+type smoke
+color 0x202020 0x404040
+tex 0 8
+size 5 5
+alpha 256 256 512
+originjitter 1.5 1.5 1.5
+velocityjitter 6 6 6
+velocitymultiplier 0.01
+lightradius 200
+lightradiusfade 2000
+lightcolor 2 1.5 0.2
+effect fireball_preattack_muzzleflash
+count 30
+type spark
+tex 40 40
+color 0xFFFDD9 0xFFFDD9
+size 3 3
+alpha 0 128 1024
+originjitter 1 1 1
+velocityjitter 300 300 300
+velocitymultiplier 0.5
+airfriction 12
+
+effect fireball_bfgdamage
+count 4
+type smoke
+color 0x202020 0x404040
+tex 0 8
+size 5 5
+alpha 256 256 512
+originjitter 1.5 1.5 1.5
+velocityjitter 6 6 6
+velocitymultiplier 0.01
+lightradius 200
+lightradiusfade 2000
+lightcolor 2 1.5 0.2
+effect fireball_bfgdamage
+count 30
+type spark
+tex 40 40
+color 0xFFFDD9 0xFFFDD9
+size 3 3
+alpha 0 128 1024
+originjitter 1 1 1
+velocityjitter 300 300 300
+velocitymultiplier 0.5
+airfriction 12
+
+//EF_FLAME
+//fire
+// used nowhere in code
+effect EF_FLAME
+//notunderwater
+count 200
+type smoke
+tex 48 55
+size 5 21
+alpha 200 356 512
+gravity -0.5
+color 0x8f0d00 0xff5a00
+bounce 2
+sizeincrease -1
+originoffset 0 0 10
+originjitter 12 12 34
+velocityjitter 22 22 50
+// smoke
+effect EF_FLAME
+type alphastatic
+count 100
+tex 0 8
+size 11 15
+sizeincrease 6
+alpha 200 256 200
+color 0x000000 0x111111
+gravity -0.3
+originoffset 0 0 10
+originjitter 12 12 34
+velocityjitter 11 11 50
+bounce 2
+effect EF_FLAME
+count 1
+lightradius 200
+lightradiusfade 10000
+lightcolor 0.9 0.9 0.2
Modified: trunk/data/keybinds.txt
===================================================================
--- trunk/data/keybinds.txt 2009-09-01 20:05:50 UTC (rev 7586)
+++ trunk/data/keybinds.txt 2009-09-01 20:06:50 UTC (rev 7587)
@@ -25,7 +25,7 @@
"impulse 6" "crylink / hlac"
"impulse 7" "nex / minstanex"
"impulse 8" "hagar"
-"impulse 9" "rocket launcher"
+"impulse 9" "rocket launcher / fireball"
"impulse 14" "porto / hook"
"" ""
"" "View"
Modified: trunk/data/qcsrc/client/View.qc
===================================================================
--- trunk/data/qcsrc/client/View.qc 2009-09-01 20:05:50 UTC (rev 7586)
+++ trunk/data/qcsrc/client/View.qc 2009-09-01 20:06:50 UTC (rev 7587)
@@ -267,6 +267,10 @@
mi = '-3 -3 -3';
ma = '3 3 3';
break;
+ case WEP_FIREBALL: // projectile has a size!
+ mi = '-8 -8 -8';
+ ma = '8 8 8';
+ break;
case WEP_ELECTRO: // projectile has a size!
mi = '0 0 -3';
ma = '0 0 -3';
Modified: trunk/data/qcsrc/client/damage.qc
===================================================================
--- trunk/data/qcsrc/client/damage.qc 2009-09-01 20:05:50 UTC (rev 7586)
+++ trunk/data/qcsrc/client/damage.qc 2009-09-01 20:06:50 UTC (rev 7587)
@@ -236,6 +236,19 @@
break;
case WEP_TUBA:
break;
+ case WEP_FIREBALL:
+ if(secondary)
+ {
+ org2 = org + backoff * 16;
+ pointparticles(particleeffectnum("fireball_explode"), org2, '0 0 0', 1);
+ if(!issilent)
+ sound(self, CHAN_PROJECTILE, "weapons/fireball_impact2.wav", VOL_BASE, ATTN_NORM * 0.25); // long range boom
+ }
+ else
+ {
+ // firemine goes out silently
+ }
+ break;
default:
dprint("Unhandled damage of weapon ", ftos(hitwep), "\n");
break;
@@ -253,6 +266,9 @@
precache_sound("weapons/hagexp1.wav");
precache_sound("weapons/hagexp2.wav");
precache_sound("weapons/hagexp3.wav");
+ precache_sound("weapons/flacexp1.wav");
+ precache_sound("weapons/flacexp2.wav");
+ precache_sound("weapons/flacexp3.wav");
precache_sound("weapons/hookbomb_impact.wav");
precache_sound("weapons/laserimpact.wav");
precache_sound("weapons/neximpact.wav");
@@ -260,4 +276,6 @@
precache_sound("weapons/ric2.wav");
precache_sound("weapons/ric3.wav");
precache_sound("weapons/rocket_impact.wav");
+ precache_sound("weapons/fireball_impact.wav");
+ precache_sound("weapons/fireball_impact2.wav");
}
Modified: trunk/data/qcsrc/client/projectile.qc
===================================================================
--- trunk/data/qcsrc/client/projectile.qc 2009-09-01 20:05:50 UTC (rev 7586)
+++ trunk/data/qcsrc/client/projectile.qc 2009-09-01 20:06:50 UTC (rev 7587)
@@ -31,6 +31,9 @@
{
switch(self.cnt)
{
+ case PROJECTILE_FIREMINE:
+ to_z += 1;
+ break;
default:
return;
}
@@ -75,6 +78,12 @@
case PROJECTILE_BULLET_GLOWING:
trailparticles(self, particleeffectnum("tr_bullet"), from, to);
break;
+ case PROJECTILE_FIREMINE:
+ trailparticles(self, particleeffectnum("firemine"), from, to);
+ break;
+ case PROJECTILE_FIREBALL:
+ trailparticles(self, particleeffectnum("fireball"), from, to);
+ break;
default:
break;
}
@@ -284,6 +293,8 @@
case PROJECTILE_HOOKBOMB: setmodel(self, "models/grenademodel.md3"); break;
case PROJECTILE_HAGAR: setmodel(self, "models/hagarmissile.mdl"); self.scale = 0.4; break;
case PROJECTILE_HAGAR_BOUNCING: setmodel(self, "models/hagarmissile.mdl"); self.scale = 0.4; break;
+ case PROJECTILE_FIREBALL: self.model = ""; self.modelindex = 0; break; // particle effect is good enough
+ case PROJECTILE_FIREMINE: self.model = ""; self.modelindex = 0; break; // particle effect is good enough
default:
error("Received invalid CSQC projectile, can't work with this!");
break;
@@ -340,6 +351,18 @@
self.move_movetype = MOVETYPE_BOUNCE;
self.move_touch = SUB_Null;
break;
+ case PROJECTILE_FIREBALL:
+ loopsound(self, CHAN_PROJECTILE, "weapons/fireball_fly2.wav", VOL_BASE, ATTN_NORM);
+ self.mins = '-16 -16 -16';
+ self.maxs = '16 16 16';
+ break;
+ case PROJECTILE_FIREMINE:
+ loopsound(self, CHAN_PROJECTILE, "weapons/fireball_fly.wav", VOL_BASE, ATTN_NORM);
+ self.move_movetype = MOVETYPE_BOUNCE;
+ self.move_touch = SUB_Null;
+ self.mins = '-4 -4 -4';
+ self.maxs = '4 4 4';
+ break;
default:
break;
}
@@ -380,4 +403,6 @@
precache_model("models/tracer.mdl");
precache_sound("weapons/electro_fly.wav");
precache_sound("weapons/rocket_fly.wav");
+ precache_sound("weapons/fireball_fly.wav");
+ precache_sound("weapons/fireball_fly2.wav");
}
Modified: trunk/data/qcsrc/common/constants.qh
===================================================================
--- trunk/data/qcsrc/common/constants.qh 2009-09-01 20:05:50 UTC (rev 7586)
+++ trunk/data/qcsrc/common/constants.qh 2009-09-01 20:06:50 UTC (rev 7587)
@@ -405,6 +405,8 @@
float PROJECTILE_HAGAR_BOUNCING = 17;
float PROJECTILE_BULLET_GLOWING = 18;
float PROJECTILE_CRYLINK_BOUNCING = 19;
+float PROJECTILE_FIREBALL = 20;
+float PROJECTILE_FIREMINE = 21;
float SPECIES_HUMAN = 0;
float SPECIES_ROBOT_SHINY = 1;
@@ -433,6 +435,7 @@
float DEATH_MIRRORDAMAGE = 10014;
float DEATH_TOUCHEXPLODE = 10015;
float DEATH_CHEAT = 10016;
+float DEATH_FIRE = 10017;
float DEATH_TURRET = 10100;
float DEATH_WEAPONMASK = 0xFF;
Modified: trunk/data/qcsrc/common/items.qc
===================================================================
--- trunk/data/qcsrc/common/items.qc 2009-09-01 20:05:50 UTC (rev 7586)
+++ trunk/data/qcsrc/common/items.qc 2009-09-01 20:06:50 UTC (rev 7587)
@@ -102,21 +102,22 @@
void RegisterWeapons()
{
// %weaponaddpoint
- register_weapon(WEP_LASER, w_laser, 0, 1, 1, 1, WEP_TYPE_SPLASH, 0, "laser", "laser", "Laser");
+ register_weapon(WEP_LASER, w_laser, 0, 1, 1, 1, WEP_TYPE_SPLASH, 0, "laser", "laser", "Laser");
register_weapon(WEP_SHOTGUN, w_shotgun, IT_SHELLS, 2, 1, 0, WEP_TYPE_HITSCAN, BOT_PICKUP_RATING_LOW, "shotgun", "shotgun", "Shotgun");
register_weapon(WEP_UZI, w_uzi, IT_NAILS, 3, 1, 0, WEP_TYPE_HITSCAN, BOT_PICKUP_RATING_MID, "uzi", "uzi", "Machine Gun");
- register_weapon(WEP_GRENADE_LAUNCHER, w_glauncher, IT_ROCKETS, 4, 1, 1, WEP_TYPE_SPLASH, BOT_PICKUP_RATING_MID, "gl", "grenadelauncher", "Mortar");
- register_weapon(WEP_ELECTRO, w_electro, IT_CELLS, 5, 1, 0, WEP_TYPE_SPLASH, BOT_PICKUP_RATING_MID, "electro", "electro", "Electro");
- register_weapon(WEP_CRYLINK, w_crylink, IT_CELLS, 6, 1, 0, WEP_TYPE_SPLASH, BOT_PICKUP_RATING_MID, "crylink", "crylink", "Crylink");
+ register_weapon(WEP_GRENADE_LAUNCHER, w_glauncher, IT_ROCKETS, 4, 1, 1, WEP_TYPE_SPLASH , BOT_PICKUP_RATING_MID, "gl", "grenadelauncher", "Mortar");
+ register_weapon(WEP_ELECTRO, w_electro, IT_CELLS, 5, 1, 0, WEP_TYPE_SPLASH , BOT_PICKUP_RATING_MID, "electro", "electro", "Electro");
+ register_weapon(WEP_CRYLINK, w_crylink, IT_CELLS, 6, 1, 0, WEP_TYPE_SPLASH , BOT_PICKUP_RATING_MID, "crylink", "crylink", "Crylink");
register_weapon(WEP_NEX, w_nex, IT_CELLS, 7, 1, 0, WEP_TYPE_HITSCAN, BOT_PICKUP_RATING_HIGH, "nex", "nex", "Nex");
- register_weapon(WEP_HAGAR, w_hagar, IT_ROCKETS, 8, 1, 1, WEP_TYPE_SPLASH, BOT_PICKUP_RATING_MID, "hagar", "hagar", "Hagar");
- register_weapon(WEP_ROCKET_LAUNCHER, w_rlauncher, IT_ROCKETS, 9, 1, 1, WEP_TYPE_SPLASH, BOT_PICKUP_RATING_HIGH, "rl", "rocketlauncher", "Rocket Launcher");
- register_weapon(WEP_PORTO, w_porto, 0, 0, 0, 0, WEP_TYPE_OTHER, 0, "porto" , "porto", "Port-O-Launch");
+ register_weapon(WEP_HAGAR, w_hagar, IT_ROCKETS, 8, 1, 1, WEP_TYPE_SPLASH , BOT_PICKUP_RATING_MID, "hagar", "hagar", "Hagar");
+ register_weapon(WEP_ROCKET_LAUNCHER, w_rlauncher, IT_ROCKETS, 9, 1, 1, WEP_TYPE_SPLASH , BOT_PICKUP_RATING_HIGH, "rl", "rocketlauncher", "Rocket Launcher");
+ register_weapon(WEP_PORTO, w_porto, 0, 0, 0, 0, WEP_TYPE_OTHER, 0, "porto" , "porto", "Port-O-Launch");
register_weapon(WEP_MINSTANEX, w_minstanex, IT_CELLS, 7, -1, 1, WEP_TYPE_HITSCAN, BOT_PICKUP_RATING_HIGH, "minstanex", "minstanex", "MinstaNex");
- register_weapon(WEP_HOOK, w_hook, IT_CELLS|IT_FUEL, 0, 0, 1, WEP_TYPE_SPLASH, 0, "hookgun", "hook", "Grappling Hook");
- register_weapon(WEP_HLAC, w_hlac, IT_CELLS, 6, 1, 0, WEP_TYPE_SPLASH, BOT_PICKUP_RATING_MID, "hlac", "hlac", "Heavy Laser Assault Cannon");
- register_weapon(WEP_TUBA, w_tuba, 0, 1, -1, 0, WEP_TYPE_SPLASH, BOT_PICKUP_RATING_MID, "tuba", "tuba", "@!#%'n Tuba");
+ register_weapon(WEP_HOOK, w_hook, IT_CELLS|IT_FUEL, 0, 0, 1, WEP_TYPE_SPLASH, 0, "hookgun", "hook", "Grappling Hook");
+ register_weapon(WEP_HLAC, w_hlac, IT_CELLS, 6, 1, 0, WEP_TYPE_SPLASH, BOT_PICKUP_RATING_MID, "hlac", "hlac", "Heavy Laser Assault Cannon");
+ register_weapon(WEP_TUBA, w_tuba, 0, 1, -1, 0, WEP_TYPE_SPLASH, BOT_PICKUP_RATING_MID, "tuba", "tuba", "@!#%'n Tuba");
register_weapon(WEP_CAMPINGRIFLE, w_campingrifle, IT_NAILS, 3, 1, 0, WEP_TYPE_HITSCAN, BOT_PICKUP_RATING_MID, "campingrifle", "campingrifle", "Rifle");
+ register_weapon(WEP_FIREBALL, w_fireball, IT_ROCKETS, 9, 1, 0, WEP_TYPE_SPLASH, BOT_PICKUP_RATING_MID, "fireball", "fireball", "Fireball");
register_weapons_done();
}
Modified: trunk/data/qcsrc/common/items.qh
===================================================================
--- trunk/data/qcsrc/common/items.qh 2009-09-01 20:05:50 UTC (rev 7586)
+++ trunk/data/qcsrc/common/items.qh 2009-09-01 20:06:50 UTC (rev 7587)
@@ -16,8 +16,9 @@
float WEP_HLAC = 13; float WEPBIT_HLAC = 4096;
float WEP_TUBA = 14; float WEPBIT_TUBA = 8192;
float WEP_CAMPINGRIFLE = 15; float WEPBIT_CAMPINGRIFLE = 16384;
-float WEP_LAST = 15; float WEPBIT_ALL = 32767;
-float WEP_COUNT = 16;
+float WEP_FIREBALL = 16; float WEPBIT_FIREBALL = 32768;
+float WEP_LAST = 16; float WEPBIT_ALL = 65535;
+float WEP_COUNT = 17;
float BOT_PICKUP_RATING_LOW = 2500;
float BOT_PICKUP_RATING_MID = 5000;
Modified: trunk/data/qcsrc/server/constants.qh
===================================================================
--- trunk/data/qcsrc/server/constants.qh 2009-09-01 20:05:50 UTC (rev 7586)
+++ trunk/data/qcsrc/server/constants.qh 2009-09-01 20:06:50 UTC (rev 7587)
@@ -1,5 +1,5 @@
string CVAR_CHECK_DEFAULT = "ba4f55ed0f5a00a082bfb12c80dd3f8e";
-string CVAR_CHECK_WEAPONS = "6a27beecdcab1d3128a1f0f909257e0d";
+string CVAR_CHECK_WEAPONS = "d8c27ad261a5506934d70968b6a47244";
float FALSE = 0;
float TRUE = 1;
Modified: trunk/data/qcsrc/server/g_damage.qc
===================================================================
--- trunk/data/qcsrc/server/g_damage.qc 2009-09-01 20:05:50 UTC (rev 7586)
+++ trunk/data/qcsrc/server/g_damage.qc 2009-09-01 20:06:50 UTC (rev 7587)
@@ -285,6 +285,8 @@
bprint ("^1",s, "^1 didn't become friends with the Lord of Teamplay\n");
else if (deathtype == DEATH_CHEAT)
bprint ("^1",s, "^1 unfairly eliminated himself\n");
+ else if (deathtype == DEATH_FIRE)
+ bprint ("^1",s, "^1 burned to death\n");
else if (deathtype != DEATH_TEAMCHANGE)
bprint ("^1",s, "^1 couldn't resist the urge to self-destruct\n");
@@ -397,6 +399,8 @@
bprint ("^1",s, "^1 was pushed into an accident by ^1", a, "\n");
else if(deathtype == DEATH_CHEAT)
bprint ("^1",s, "^1 was unfairly eliminated by ^1", a, "\n");
+ else if (deathtype == DEATH_FIRE)
+ bprint ("^1",s, "^1 was burnt to death by ^1", a, "\n");
else
bprint ("^1",s, "^1 was fragged by ", a, "\n");
}
@@ -528,6 +532,11 @@
bprint ("^1",s, "^1 died in an accident\n");
else if(deathtype == DEATH_CHEAT)
bprint ("^1",s, "^1 was unfairly eliminated\n");
+ else if(deathtype == DEATH_FIRE)
+ if(sv_gentle)
+ bprint ("^1",s, "^1 felt a little hot\n");
+ else
+ bprint ("^1",s, "^1 burnt to death\n");
else
if(sv_gentle)
bprint ("^1",s, "^1 needs a restart\n");
@@ -825,7 +834,8 @@
}
else
{
- attacker.typehitsound += 1;
+ if(deathtype != DEATH_FIRE)
+ attacker.typehitsound += 1;
if(mirrordamage > 0)
if(time > attacker.teamkill_complain)
{
@@ -1083,56 +1093,92 @@
.float fire_endtime;
.float fire_deathtype;
.entity fire_owner;
+.float fire_hitsound;
+
+float Fire_IsBurning(entity e)
+{
+ return (time < e.fire_endtime);
+}
+
float Fire_AddDamage(entity e, entity o, float d, float t, float dt)
{
float dps;
+ t = max(t, 0.1);
dps = d / t;
- if(time >= e.fire_endtime)
+ if(Fire_IsBurning(e))
{
- e.fire_damagepersec = dps;
- e.fire_endtime = time + t;
- e.fire_deathtype = dt;
- e.fire_owner = o;
- return d;
- }
- else
- {
float totaldamage, totaltime, maxdps, olddamage, oldtime;
oldtime = e.fire_endtime - time;
olddamage = e.fire_damagepersec * oldtime;
- if(t > oldtime || d > olddamage || dps > e.fire_damagepersec)
+ if(t > oldtime + 0.1 || d > olddamage + 1 || dps > e.fire_damagepersec + 1) // some thresholds to prevent toggling due to roundoff errors
{
maxdps = max(dps, e.fire_damagepersec);
totaltime = max(oldtime, t);
- totaldamage = max(maxdps * totaltime, olddamage + d);
+ totaldamage = min(maxdps * totaltime, olddamage + d);
e.fire_damagepersec = totaldamage / totaltime;
e.fire_endtime = time + totaltime;
e.fire_deathtype = dt;
- e.fire_owner = e;
+ e.fire_owner = o;
+ e.fire_hitsound = FALSE;
return totaldamage - olddamage; // can never be negative
}
else
return 0;
}
+ else
+ {
+ e.fire_damagepersec = dps;
+ e.fire_endtime = time + t;
+ e.fire_deathtype = dt;
+ e.fire_owner = o;
+ e.fire_hitsound = FALSE;
+ return d;
+ }
}
+
void Fire_ApplyDamage(entity e)
{
- float t, d;
+ float t, d, hi, ty;
+ if not(Fire_IsBurning(e))
+ return;
+
// water and slime stop fire
if(e.waterlevel)
if(e.watertype != CONTENT_LAVA)
e.fire_endtime = 0;
- if(time >= e.fire_endtime)
- return;
t = min(frametime, e.fire_endtime - time);
d = e.fire_damagepersec * t;
+
+ hi = e.fire_owner.hitsound;
+ ty = e.fire_owner.typehitsound;
Damage(e, e, e.fire_owner, d, e.fire_deathtype, e.origin, '0 0 0');
+ if(e.fire_hitsound && e.fire_owner)
+ {
+ e.fire_owner.hitsound = hi;
+ e.fire_owner.typehitsound = ty;
+ }
+ e.fire_hitsound = TRUE;
+
+ if not(IS_INDEPENDENT_PLAYER(e))
+ FOR_EACH_PLAYER(other) if(e != other)
+ {
+ if(other.classname == "player")
+ if(other.deadflag == DEAD_NO)
+ if not(IS_INDEPENDENT_PLAYER(other))
+ if(boxesoverlap(e.absmin, e.absmax, other.absmin, other.absmax))
+ {
+ t = cvar("g_balance_firetransfer_time") * (e.fire_endtime - time);
+ d = cvar("g_balance_firetransfer_damage") * e.fire_damagepersec * t;
+ Fire_AddDamage(other, e, d, t, DEATH_FIRE);
+ }
+ }
}
+
void Fire_ApplyEffect(entity e)
{
- if(time < e.fire_endtime)
+ if(Fire_IsBurning(e))
e.effects |= EF_FLAME;
else
e.effects &~= EF_FLAME;
Modified: trunk/data/qcsrc/server/progs.src
===================================================================
--- trunk/data/qcsrc/server/progs.src 2009-09-01 20:05:50 UTC (rev 7586)
+++ trunk/data/qcsrc/server/progs.src 2009-09-01 20:06:50 UTC (rev 7587)
@@ -107,6 +107,7 @@
w_hlac.qc
w_campingrifle.qc
w_tuba.qc
+w_fireball.qc
t_items.qc
cl_weapons.qc
Modified: trunk/data/qcsrc/server/t_items.qc
===================================================================
--- trunk/data/qcsrc/server/t_items.qc 2009-09-01 20:05:50 UTC (rev 7586)
+++ trunk/data/qcsrc/server/t_items.qc 2009-09-01 20:06:50 UTC (rev 7587)
@@ -1582,5 +1582,5 @@
// we no longer have the seeker
void spawnfunc_weapon_seeker()
{
- spawnfunc_weapon_rocketlauncher();
+ spawnfunc_weapon_fireball();
}
Added: trunk/data/qcsrc/server/w_fireball.qc
===================================================================
--- trunk/data/qcsrc/server/w_fireball.qc (rev 0)
+++ trunk/data/qcsrc/server/w_fireball.qc 2009-09-01 20:06:50 UTC (rev 7587)
@@ -0,0 +1,371 @@
+.float bot_secondary_fireballmooth; // whatever a mooth is
+.vector fireball_impactvec;
+
+void W_Fireball_Explode (void)
+{
+ entity e;
+ float dist;
+ float points;
+ vector dir;
+ float d;
+
+ self.event_damage = SUB_Null;
+
+ // 1. dist damage
+ d = (self.owner.health + self.owner.armorvalue);
+ RadiusDamage (self, self.realowner, cvar("g_balance_fireball_secondary_damage"), cvar("g_balance_fireball_secondary_edgedamage"), cvar("g_balance_fireball_secondary_radius"), world, cvar("g_balance_fireball_secondary_force"), self.projectiledeathtype, other);
+ if(self.realowner.health + self.realowner.armorvalue >= d)
+ if(!self.cnt)
+ {
+ shockwave_spawn("models/sphere/sphere.md3", self.origin, cvar("g_balance_fireball_secondary_bfgradius"), 0.1, 0.4);
+
+ // 2. bfg effect
+ FOR_EACH_PLAYER(e) if(e != self.owner) if(e.takedamage) if(!self.owner || IsDifferentTeam(e, self))
+ {
+ // can we see fireball?
+ traceline(e.origin + e.view_ofs, self.origin, MOVE_NORMAL, e);
+ if(trace_startsolid || trace_fraction != 1)
+ continue;
+ // can we see player who shot fireball?
+ traceline(e.origin + e.view_ofs, self.realowner.origin + self.realowner.view_ofs, MOVE_NORMAL, e);
+ if(trace_ent != self.realowner)
+ if(trace_startsolid || trace_fraction != 1)
+ continue;
+ dist = vlen(self.origin - e.origin - e.view_ofs);
+ points = (1 - sqrt(dist / cvar("g_balance_fireball_secondary_bfgradius")));
+ if(points <= 0)
+ continue;
+ dir = normalize(e.origin + e.view_ofs - self.origin);
+ Damage(e, self, self.realowner, cvar("g_balance_fireball_secondary_bfgdamage") * points, self.projectiledeathtype | HITTYPE_BOUNCE | HITTYPE_SPLASH, e.origin + e.view_ofs, cvar("g_balance_fireball_secondary_bfgforce") * dir);
+ pointparticles(particleeffectnum("fireball_bfgdamage"), e.origin, -1 * dir, 1);
+ }
+ }
+
+ remove (self);
+}
+
+void W_Fireball_TouchExplode (void)
+{
+ PROJECTILE_TOUCH;
+ W_Fireball_Explode ();
+}
+
+void W_Fireball_LaserPlay(float dt, float dist, float damage, float edgedamage, float burntime)
+{
+ entity e;
+ float d;
+ vector p;
+
+ RandomSelection_Init();
+ FOR_EACH_PLAYER(e) if(e != self.owner) if(e.takedamage) if(!self.owner || IsDifferentTeam(e, self))
+ {
+ p = e.origin;
+ p_x += e.mins_x + random() * (e.maxs_x - e.mins_x);
+ p_y += e.mins_y + random() * (e.maxs_y - e.mins_y);
+ p_z += e.mins_z + random() * (e.maxs_z - e.mins_z);
+ d = vlen(self.origin - p);
+ if(d < dist)
+ {
+ traceline(p, self.origin, MOVE_NORMAL, e);
+ if(trace_startsolid || trace_fraction != 1)
+ continue;
+ e.fireball_impactvec = p;
+ RandomSelection_Add(e, 0, string_null, 1 / (1 + d), !Fire_IsBurning(e));
+ }
+ }
+ if(RandomSelection_chosen_ent)
+ {
+ d = vlen(self.origin - RandomSelection_chosen_ent.fireball_impactvec);
+ d = damage + (edgedamage - damage) * (d / dist);
+ //Fire_AddDamage(RandomSelection_chosen_ent, self.realowner, d * burntime, burntime, self.projectiledeathtype | HITTYPE_BOUNCE);
+ //trailparticles(self, particleeffectnum("fireball_laser"), self.origin, RandomSelection_chosen_ent.fireball_impactvec);
+ pointparticles(particleeffectnum("fireball_laser"), self.origin, RandomSelection_chosen_ent.fireball_impactvec - self.origin, 1);
+ }
+}
+
+void W_Fireball_Think()
+{
+ if(time > self.pushltime)
+ {
+ self.cnt = 1;
+ W_Fireball_Explode();
+ return;
+ }
+
+ W_Fireball_LaserPlay(0.1, cvar("g_balance_fireball_secondary_laserradius"), cvar("g_balance_fireball_secondary_laserdamage"), cvar("g_balance_fireball_secondary_laseredgedamage"), cvar("g_balance_fireball_secondary_laserburntime"));
+
+ self.nextthink = time + 0.1;
+}
+
+void W_Fireball_Damage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+{
+ if(self.health <= 0)
+ return;
+ self.health = self.health - damage;
+ if (self.health <= 0)
+ {
+ self.cnt = 1;
+ W_PrepareExplosionByDamage(attacker, W_Fireball_Explode);
+ }
+}
+
+void W_Fireball_Attack2()
+{
+ local entity proj;
+
+ W_SetupShot_ProjectileSize (self, '-16 -16 -16', '16 16 16', FALSE, 2, "weapons/fireball_fire2.wav", cvar("g_balance_fireball_secondary_damage"));
+
+ pointparticles(particleeffectnum("fireball_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+
+ proj = spawn ();
+ proj.classname = "plasma_prim";
+ proj.owner = proj.realowner = self;
+ proj.bot_dodge = TRUE;
+ proj.bot_dodgerating = cvar("g_balance_fireball_secondary_damage");
+ proj.pushltime = time + cvar("g_balance_fireball_secondary_lifetime");
+ proj.use = W_Fireball_Explode;
+ proj.think = W_Fireball_Think;
+ proj.nextthink = time;
+ proj.health = cvar("g_balance_fireball_secondary_health");
+ proj.team = self.team;
+ proj.event_damage = W_Fireball_Damage;
+ proj.damageforcescale = cvar("g_balance_fireball_secondary_damageforcescale");
+ PROJECTILE_MAKETRIGGER(proj);
+ proj.projectiledeathtype = WEP_FIREBALL | HITTYPE_SECONDARY;
+ setorigin(proj, w_shotorg);
+
+ proj.movetype = MOVETYPE_FLY;
+ proj.velocity = w_shotdir * cvar("g_balance_fireball_secondary_speed");
+ W_SetupProjectileVelocity(proj);
+ proj.angles = vectoangles(proj.velocity);
+ proj.touch = W_Fireball_TouchExplode;
+ setsize(proj, '-16 -16 -16', '16 16 16');
+ proj.flags = FL_PROJECTILE;
+
+ CSQCProjectile(proj, TRUE, PROJECTILE_FIREBALL, TRUE);
+}
+
+void W_Fireball_AttackEffect(float i, vector f_diff)
+{
+ W_SetupShot_ProjectileSize (self, '-16 -16 -16', '16 16 16', FALSE, 0, "", 0);
+ w_shotorg += f_diff_x * v_up + f_diff_y * v_right;
+ pointparticles(particleeffectnum("fireball_preattack_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+}
+
+void W_Fireball_Attack2_Frame4()
+{
+ W_Fireball_Attack2();
+ weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_fireball_secondary_animtime"), w_ready);
+}
+
+void W_Fireball_Attack2_Frame3()
+{
+ W_Fireball_AttackEffect(0, '+1.25 +3.75 0');
+ weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_fireball_secondary_animtime"), W_Fireball_Attack2_Frame4);
+}
+
+void W_Fireball_Attack2_Frame2()
+{
+ W_Fireball_AttackEffect(0, '-1.25 +3.75 0');
+ weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_fireball_secondary_animtime"), W_Fireball_Attack2_Frame3);
+}
+
+void W_Fireball_Attack2_Frame1()
+{
+ W_Fireball_AttackEffect(1, '+1.25 -3.75 0');
+ weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_fireball_secondary_animtime"), W_Fireball_Attack2_Frame2);
+}
+
+void W_Fireball_Attack2_Frame0()
+{
+ if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+ self.ammo_rockets = self.ammo_rockets - cvar("g_balance_fireball_secondary_ammo");
+
+ W_Fireball_AttackEffect(0, '-1.25 -3.75 0');
+ sound (self, CHAN_WEAPON, "weapons/fireball_prefire2.wav", VOL_BASE, ATTN_NORM);
+ weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_fireball_secondary_animtime"), W_Fireball_Attack2_Frame1);
+}
+
+void W_Firemine_Think()
+{
+ if(time > self.pushltime)
+ {
+ remove(self);
+ return;
+ }
+
+ // make it "hot" once it leaves its owner
+ if(self.owner)
+ if(vlen(self.origin - self.owner.origin - self.owner.view_ofs) > cvar("g_balance_fireball_primary_laserradius"))
+ self.owner = world;
+
+ W_Fireball_LaserPlay(0.1, cvar("g_balance_fireball_primary_laserradius"), cvar("g_balance_fireball_primary_laserdamage"), cvar("g_balance_fireball_primary_laseredgedamage"), cvar("g_balance_fireball_primary_laserburntime"));
+
+ self.nextthink = time + 0.1;
+}
+
+void W_Firemine_Touch (void)
+{
+ PROJECTILE_TOUCH;
+ if (other.takedamage == DAMAGE_AIM)
+ {
+ Fire_AddDamage(other, self.realowner, cvar("g_balance_fireball_primary_damage"), cvar("g_balance_fireball_primary_damagetime"), self.projectiledeathtype | HITTYPE_HEADSHOT);
+ remove(self);
+ }
+ else
+ {
+ self.projectiledeathtype |= HITTYPE_BOUNCE;
+ }
+}
+
+void W_Fireball_Attack1()
+{
+ local entity proj;
+ vector f_diff;
+ float c;
+
+ if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+ self.ammo_rockets = self.ammo_rockets - cvar("g_balance_fireball_primary_ammo");
+
+ c = mod(self.bulletcounter, 4);
+ switch(c)
+ {
+ case 0:
+ f_diff = '-1.25 -3.75 0';
+ break;
+ case 1:
+ f_diff = '+1.25 -3.75 0';
+ break;
+ case 2:
+ f_diff = '-1.25 +3.75 0';
+ break;
+ case 3:
+ default:
+ f_diff = '+1.25 +3.75 0';
+ break;
+ }
+ W_SetupShot_ProjectileSize(self, '-4 -4 -4', '4 4 4', FALSE, 2, "weapons/fireball_fire.wav", cvar("g_balance_fireball_primary_damage"));
+ traceline(w_shotorg, w_shotorg + f_diff_x * v_up + f_diff_y * v_right, MOVE_NORMAL, self);
+ w_shotorg = trace_endpos;
+
+ pointparticles(particleeffectnum("fireball_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+
+ proj = spawn ();
+ proj.owner = proj.realowner = self;
+ proj.classname = "grenade";
+ proj.bot_dodge = TRUE;
+ proj.bot_dodgerating = cvar("g_balance_fireball_primary_damage");
+ proj.movetype = MOVETYPE_BOUNCE;
+ proj.projectiledeathtype = WEP_FIREBALL;
+ proj.touch = W_Firemine_Touch;
+ PROJECTILE_MAKETRIGGER(proj);
+ setsize(proj, '-4 -4 -4', '4 4 4');
+ setorigin(proj, w_shotorg);
+ proj.think = W_Firemine_Think;
+ proj.nextthink = time;
+ proj.damageforcescale = cvar("g_balance_fireball_primary_damageforcescale");
+ proj.velocity = w_shotdir * cvar("g_balance_fireball_primary_speed") + v_up * cvar("g_balance_fireball_primary_speed_up");
+ proj.pushltime = time + cvar("g_balance_fireball_primary_lifetime");
+ W_SetupProjectileVelocity(proj);
+
+ proj.angles = vectoangles(proj.velocity);
+ proj.flags = FL_PROJECTILE;
+
+ CSQCProjectile(proj, TRUE, PROJECTILE_FIREMINE, TRUE);
+}
+
+void spawnfunc_weapon_fireball (void)
+{
+ weapon_defaultspawnfunc(WEP_FIREBALL);
+}
+
+float w_fireball(float req)
+{
+ if (req == WR_AIM)
+ {
+ self.BUTTON_ATCK = FALSE;
+ self.BUTTON_ATCK2 = FALSE;
+ if (self.bot_secondary_fireballmooth == 0)
+ {
+ if(bot_aim(cvar("g_balance_fireball_primary_speed"), cvar("g_balance_fireball_primary_speed_up"), cvar("g_balance_fireball_primary_lifetime"), TRUE))
+ {
+ self.BUTTON_ATCK = TRUE;
+ if(random() < 0.01) self.bot_secondary_fireballmooth = 1;
+ }
+ }
+ else
+ {
+ if(bot_aim(cvar("g_balance_fireball_secondary_speed"), 0, cvar("g_balance_fireball_secondary_lifetime"), FALSE))
+ {
+ self.BUTTON_ATCK2 = TRUE;
+ if(random() < 0.02) self.bot_secondary_fireballmooth = 0;
+ }
+ }
+ }
+ else if (req == WR_THINK)
+ {
+ if (self.BUTTON_ATCK)
+ if (weapon_prepareattack(0, cvar("g_balance_fireball_primary_refire")))
+ {
+ W_Fireball_Attack1();
+ weapon_thinkf(WFRAME_FIRE2, cvar("g_balance_fireball_primary_animtime"), w_ready);
+ }
+ if (self.BUTTON_ATCK2)
+ if (weapon_prepareattack(1, cvar("g_balance_fireball_secondary_refire")))
+ {
+ W_Fireball_Attack2_Frame0();
+ }
+ }
+ else if (req == WR_PRECACHE)
+ {
+ precache_model ("models/weapons/g_fireball.md3");
+ precache_model ("models/weapons/v_fireball.md3");
+ precache_model ("models/weapons/h_fireball.dpm");
+ precache_model ("models/sphere/sphere.md3");
+ precache_sound ("weapons/fireball_fire.wav");
+ precache_sound ("weapons/fireball_fire2.wav");
+ precache_sound ("weapons/fireball_prefire2.wav");
+ }
+ else if (req == WR_SETUP)
+ weapon_setup(WEP_FIREBALL);
+ else if (req == WR_CHECKAMMO1)
+ return self.ammo_rockets >= cvar("g_balance_fireball_primary_ammo");
+ else if (req == WR_CHECKAMMO2)
+ return self.ammo_rockets >= cvar("g_balance_fireball_secondary_ammo");
+ else if (req == WR_SUICIDEMESSAGE)
+ {
+ if(w_deathtype & HITTYPE_SECONDARY)
+ w_deathtypestring = "should have used a smaller gun";
+ else
+ w_deathtypestring = "forgot about some firemine";
+ }
+ else if (req == WR_KILLMESSAGE)
+ {
+ if(w_deathtype & HITTYPE_SECONDARY)
+ {
+ if(w_deathtype & HITTYPE_BOUNCE)
+ {
+ if(w_deathtype & HITTYPE_SPLASH) // BFG effect
+ {
+ w_deathtypestring = "could not hide from #'s fireball";
+ }
+ else // laser
+ {
+ w_deathtypestring = "saw the pretty lights of #'s fireball";
+ }
+ }
+ else if(w_deathtype & HITTYPE_SPLASH)
+ w_deathtypestring = "got too close to #'s fireball";
+ else
+ w_deathtypestring = "tasted #'s fireball";
+ }
+ else
+ {
+ if(w_deathtype & HITTYPE_HEADSHOT)
+ w_deathtypestring = "tried to catch #'s firemine";
+ else
+ w_deathtypestring = "fatefully ignored #'s firemine";
+ }
+ }
+ return TRUE;
+};
Modified: trunk/data/weapons.cfg
===================================================================
--- trunk/data/weapons.cfg 2009-09-01 20:05:50 UTC (rev 7586)
+++ trunk/data/weapons.cfg 2009-09-01 20:06:50 UTC (rev 7587)
@@ -3,7 +3,7 @@
//
// And... don't forget to edit weaponsHavoc.cfg too.
-set cvar_check_weapons a7ca57b891d66754b856e24e5c1745e3
+set cvar_check_weapons d8c27ad261a5506934d70968b6a47244
// NOTE: this only replaces weapons on the map
// use g_start_weapon_* to also replace the on-startup weapons!
@@ -24,6 +24,7 @@
set g_weaponreplace_hlac ""
set g_weaponreplace_campingrifle ""
set g_weaponreplace_tuba ""
+set g_weaponreplace_fireball ""
set g_start_weapon_laser -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
@@ -41,6 +42,7 @@
set g_start_weapon_hlac -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
set g_start_weapon_campingrifle -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
set g_start_weapon_tuba -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_fireball -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
set g_start_ammo_shells 40
set g_start_ammo_nails 0
set g_start_ammo_rockets 0
@@ -367,3 +369,36 @@
set g_balance_tuba_edgedamage 0
set g_balance_tuba_radius 200
set g_balance_tuba_force 200
+
+set g_balance_fireball_primary_ammo 5
+set g_balance_fireball_primary_animtime 0.3
+set g_balance_fireball_primary_damage 100
+set g_balance_fireball_primary_damageforcescale 4
+set g_balance_fireball_primary_damagetime 5
+set g_balance_fireball_primary_force 100
+set g_balance_fireball_primary_laserburntime 0.5
+set g_balance_fireball_primary_laserdamage 80
+set g_balance_fireball_primary_laseredgedamage 20
+set g_balance_fireball_primary_laserradius 128
+set g_balance_fireball_primary_lifetime 7
+set g_balance_fireball_primary_refire 1.5
+set g_balance_fireball_primary_speed 700
+set g_balance_fireball_primary_speed_up 100
+set g_balance_fireball_secondary_ammo 15
+set g_balance_fireball_secondary_animtime 0.15
+set g_balance_fireball_secondary_bfgdamage 300
+set g_balance_fireball_secondary_bfgforce 0
+set g_balance_fireball_secondary_bfgradius 1000
+set g_balance_fireball_secondary_damage 150
+set g_balance_fireball_secondary_damageforcescale 4
+set g_balance_fireball_secondary_edgedamage 0
+set g_balance_fireball_secondary_force 700
+set g_balance_fireball_secondary_health 50
+set g_balance_fireball_secondary_laserburntime 0.5
+set g_balance_fireball_secondary_laserdamage 80
+set g_balance_fireball_secondary_laseredgedamage 20
+set g_balance_fireball_secondary_laserradius 256
+set g_balance_fireball_secondary_lifetime 15
+set g_balance_fireball_secondary_radius 200
+set g_balance_fireball_secondary_refire 5
+set g_balance_fireball_secondary_speed 600
Modified: trunk/data/weaponsHavoc.cfg
===================================================================
--- trunk/data/weaponsHavoc.cfg 2009-09-01 20:05:50 UTC (rev 7586)
+++ trunk/data/weaponsHavoc.cfg 2009-09-01 20:06:50 UTC (rev 7587)
@@ -1,4 +1,4 @@
-set cvar_check_weapons a7ca57b891d66754b856e24e5c1745e3
+set cvar_check_weapons d8c27ad261a5506934d70968b6a47244
// NOTE: this only replaces weapons on the map
// use g_start_weapon_* to also replace the on-startup weapons!
@@ -19,6 +19,7 @@
set g_weaponreplace_hlac ""
set g_weaponreplace_campingrifle ""
set g_weaponreplace_tuba ""
+set g_weaponreplace_fireball ""
set g_start_weapon_laser -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
@@ -36,6 +37,7 @@
set g_start_weapon_hlac -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
set g_start_weapon_campingrifle -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
set g_start_weapon_tuba -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
+set g_start_weapon_fireball -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
set g_start_ammo_shells 45
set g_start_ammo_nails 0
set g_start_ammo_rockets 0
@@ -362,3 +364,36 @@
set g_balance_tuba_edgedamage 0
set g_balance_tuba_radius 200
set g_balance_tuba_force 200
+
+set g_balance_fireball_primary_ammo 5
+set g_balance_fireball_primary_animtime 0.3
+set g_balance_fireball_primary_damage 100
+set g_balance_fireball_primary_damageforcescale 4
+set g_balance_fireball_primary_damagetime 5
+set g_balance_fireball_primary_force 100
+set g_balance_fireball_primary_laserburntime 0.5
+set g_balance_fireball_primary_laserdamage 80
+set g_balance_fireball_primary_laseredgedamage 20
+set g_balance_fireball_primary_laserradius 128
+set g_balance_fireball_primary_lifetime 7
+set g_balance_fireball_primary_refire 1.5
+set g_balance_fireball_primary_speed 700
+set g_balance_fireball_primary_speed_up 100
+set g_balance_fireball_secondary_ammo 15
+set g_balance_fireball_secondary_animtime 0.15
+set g_balance_fireball_secondary_bfgdamage 300
+set g_balance_fireball_secondary_bfgforce 0
+set g_balance_fireball_secondary_bfgradius 1000
+set g_balance_fireball_secondary_damage 150
+set g_balance_fireball_secondary_damageforcescale 4
+set g_balance_fireball_secondary_edgedamage 0
+set g_balance_fireball_secondary_force 700
+set g_balance_fireball_secondary_health 50
+set g_balance_fireball_secondary_laserburntime 0.5
+set g_balance_fireball_secondary_laserdamage 80
+set g_balance_fireball_secondary_laseredgedamage 20
+set g_balance_fireball_secondary_laserradius 256
+set g_balance_fireball_secondary_lifetime 15
+set g_balance_fireball_secondary_radius 200
+set g_balance_fireball_secondary_refire 5
+set g_balance_fireball_secondary_speed 600
More information about the nexuiz-commits
mailing list