[nexuiz-commits] r8707 - in trunk/data/qcsrc: server warpzonelib
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sun Feb 28 14:44:02 EST 2010
Author: div0
Date: 2010-02-28 14:44:01 -0500 (Sun, 28 Feb 2010)
New Revision: 8707
Modified:
trunk/data/qcsrc/server/w_electro.qc
trunk/data/qcsrc/warpzonelib/TODO
Log:
fix electro combos through warpzones
Modified: trunk/data/qcsrc/server/w_electro.qc
===================================================================
--- trunk/data/qcsrc/server/w_electro.qc 2010-02-28 19:43:54 UTC (rev 8706)
+++ trunk/data/qcsrc/server/w_electro.qc 2010-02-28 19:44:01 UTC (rev 8707)
@@ -9,22 +9,17 @@
void W_Plasma_TriggerCombo(vector org, float rad, entity own)
{
local entity e;
- e = findradius(org, rad);
+ e = WarpZone_FindRadius(org, rad, TRUE);
while (e)
{
if (e.classname == "plasma")
{
- // see if there is line of sight to the combo ball
- traceline(org, e.origin, MOVE_NOMONSTERS, e);
- if (trace_fraction == 1 || trace_ent == e)
- {
- // change owner to whoever caused the combo explosion
- e.owner = own;
- e.takedamage = DAMAGE_NO;
- e.classname = "plasma_chain";
- e.think = W_Plasma_Explode_Combo;
- e.nextthink = time + vlen(e.origin - org) / cvar("g_balance_electro_combo_speed"); // delay combo chains, looks cooler
- }
+ // change owner to whoever caused the combo explosion
+ e.owner = own;
+ e.takedamage = DAMAGE_NO;
+ e.classname = "plasma_chain";
+ e.think = W_Plasma_Explode_Combo;
+ e.nextthink = time + vlen(e.WarpZone_findradius_dist) / cvar("g_balance_electro_combo_speed"); // delay combo chains, looks cooler
}
e = e.chain;
}
@@ -97,7 +92,8 @@
self.owner = inflictor.owner;
self.classname = "plasma_chain";
self.think = W_Plasma_Explode_Combo;
- self.nextthink = time + vlen(self.origin - inflictor.origin) / cvar("g_balance_electro_combo_speed"); // delay combo chains, looks cooler
+ self.nextthink = time + min(cvar("g_balance_electro_combo_radius"), vlen(self.origin - inflictor.origin)) / cvar("g_balance_electro_combo_speed"); // delay combo chains, looks cooler
+ // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bounding the length, because inflictor may be in a galaxy far far away (warpzones)
}
else
{
Modified: trunk/data/qcsrc/warpzonelib/TODO
===================================================================
--- trunk/data/qcsrc/warpzonelib/TODO 2010-02-28 19:43:54 UTC (rev 8706)
+++ trunk/data/qcsrc/warpzonelib/TODO 2010-02-28 19:44:01 UTC (rev 8707)
@@ -10,6 +10,7 @@
- shotgun: YES
- uzi: YES
- grenadelauncher: YES
+- electro: YES
- crylink: YES
- nex: YES
- hagar: YES
@@ -18,7 +19,6 @@
- minstanex: YES
- rifle: YES
-- electro: PARTIAL (no combo detonation)
- fireball: PARTIAL (no radius damage, laser damage)
- rocketlauncher: NO (guiding not working, trail bug)
More information about the nexuiz-commits
mailing list