[nexuiz-commits] r7283 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Thu Jul 30 02:27:57 EDT 2009
Author: div0
Date: 2009-07-30 02:27:57 -0400 (Thu, 30 Jul 2009)
New Revision: 7283
Modified:
trunk/data/qcsrc/server/constants.qh
trunk/data/qcsrc/server/defs.qh
trunk/data/qcsrc/server/miscfunctions.qc
trunk/data/qcsrc/server/w_laser.qc
Log:
next attempt: make projectiles SOLID_CORPSE so they reliably hit anything, but
cannot be hit by player/spectator movement. SOLID_TRIGGER failed at this
because these move with a only-bmodels trace. SOLID_BBOX failed because a
SOLID_NOT moving into a SOLID_BBOX causes a hit, and also blocks the
SOLID_BBOX. SOLID_CORPSE is chosen because players have a hit contents mask
that allows them to move into SOLID_CORPSE.
Due to an override hit contents mask, the SOLID_CORPSE projectiles still
detonate on impact to "other" corpses (including other projectiles, although
this is unlikely).
Modified: trunk/data/qcsrc/server/constants.qh
===================================================================
--- trunk/data/qcsrc/server/constants.qh 2009-07-29 19:30:42 UTC (rev 7282)
+++ trunk/data/qcsrc/server/constants.qh 2009-07-30 06:27:57 UTC (rev 7283)
@@ -42,7 +42,6 @@
float SOLID_BBOX = 2;
float SOLID_SLIDEBOX = 3;
float SOLID_BSP = 4;
-//float SOLID_CORPSE = 5; // Unobstructed by CORPSE or SLIDEBOX
float DEAD_NO = 0;
float DEAD_DYING = 1;
Modified: trunk/data/qcsrc/server/defs.qh
===================================================================
--- trunk/data/qcsrc/server/defs.qh 2009-07-29 19:30:42 UTC (rev 7282)
+++ trunk/data/qcsrc/server/defs.qh 2009-07-30 06:27:57 UTC (rev 7283)
@@ -610,6 +610,6 @@
.float campingrifle_bulletcounter;
-// #define PROJECTILE_MAKETRIGGER(e) (e).solid = SOLID_TRIGGER; (e).dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE
+#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
+// #define PROJECTILE_MAKETRIGGER(e) (e).solid = SOLID_BBOX
Modified: trunk/data/qcsrc/server/miscfunctions.qc
===================================================================
--- trunk/data/qcsrc/server/miscfunctions.qc 2009-07-29 19:30:42 UTC (rev 7282)
+++ trunk/data/qcsrc/server/miscfunctions.qc 2009-07-30 06:27:57 UTC (rev 7283)
@@ -1875,6 +1875,15 @@
float SUB_NoImpactCheck()
{
+ // zero hitcontents = this is not the real impact, but either the
+ // mirror-impact of something hitting the projectile instead of the
+ // projectile hitting the something, or a touchareagrid one. Neither of
+ // these stop the projectile from moving, so...
+ if(trace_dphitcontents == 0)
+ {
+ dprint("A hit happened with zero hit contents... DEBUG THIS, this should never happen for projectiles! Projectile will self-destruct.\n");
+ checkclient();
+ }
if (trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
return 1;
if (other == world && self.size != '0 0 0')
Modified: trunk/data/qcsrc/server/w_laser.qc
===================================================================
--- trunk/data/qcsrc/server/w_laser.qc 2009-07-29 19:30:42 UTC (rev 7282)
+++ trunk/data/qcsrc/server/w_laser.qc 2009-07-30 06:27:57 UTC (rev 7283)
@@ -4,9 +4,6 @@
{
PROJECTILE_TOUCH;
- if(other.classname == "spectator")
- checkclient(); // TODO put a breakpoint on this, and wait till it hits!
-
self.event_damage = SUB_Null;
if (self.dmg)
RadiusDamage (self, self.owner, cvar("g_balance_laser_secondary_damage"), cvar("g_balance_laser_secondary_edgedamage"), cvar("g_balance_laser_secondary_radius"), world, cvar("g_balance_laser_secondary_force"), self.projectiledeathtype, other);
More information about the nexuiz-commits
mailing list