r4443 - in trunk/data/qcsrc: client server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Wed Sep 10 11:00:58 EDT 2008
Author: div0
Date: 2008-09-10 11:00:57 -0400 (Wed, 10 Sep 2008)
New Revision: 4443
Modified:
trunk/data/qcsrc/client/Main.qc
trunk/data/qcsrc/client/View.qc
trunk/data/qcsrc/server/w_porto.qc
Log:
make portal shot REFLECT off playerclip
Modified: trunk/data/qcsrc/client/Main.qc
===================================================================
--- trunk/data/qcsrc/client/Main.qc 2008-09-10 10:00:48 UTC (rev 4442)
+++ trunk/data/qcsrc/client/Main.qc 2008-09-10 15:00:57 UTC (rev 4443)
@@ -4,18 +4,18 @@
#define DP_CSQC_ENTITY_REMOVE_IS_B0RKED
-void cvar_settemp(string cvar, string val)
+void cvar_settemp(string cv, string val)
{
entity e;
for(e = world; (e = find(e, classname, "saved_cvar_value")); )
- if(e.netname == cvar)
+ if(e.netname == cv)
goto saved;
e = spawn();
e.classname = "saved_cvar_value";
- e.netname = strzone(cvar);
- e.message = strzone(cvar_string(cvar));
+ e.netname = strzone(cv);
+ e.message = strzone(cvar_string(cv));
:saved
- cvar_set(cvar, val);
+ cvar_set(cv, val);
}
void cvar_settemp_restore()
Modified: trunk/data/qcsrc/client/View.qc
===================================================================
--- trunk/data/qcsrc/client/View.qc 2008-09-10 10:00:48 UTC (rev 4442)
+++ trunk/data/qcsrc/client/View.qc 2008-09-10 15:00:57 UTC (rev 4443)
@@ -17,7 +17,9 @@
entity porto;
vector polyline[16];
+float trace_dphitcontents;
float Q3SURFACEFLAG_SLICK = 2; // low friction surface
+float DPCONTENTS_PLAYERCLIP = 256; // blocks player movement
void Porto_Draw()
{
vector p, dir, ang, q, nextdir;
@@ -53,7 +55,7 @@
++idx;
if(idx >= 16)
return;
- if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_SLICK)
+ if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_SLICK || trace_dphitcontents & DPCONTENTS_PLAYERCLIP)
continue;
++portal_number;
ang = vectoangles(trace_plane_normal, dir);
@@ -87,7 +89,6 @@
float DPCONTENTS_SOLID = 1; // hit a bmodel, not a bounding box
float DPCONTENTS_BODY = 32; // hit a bounding box, not a bmodel
-float DPCONTENTS_PLAYERCLIP = 256; // blocks player movement
void Porto_Init()
{
porto = spawn();
Modified: trunk/data/qcsrc/server/w_porto.qc
===================================================================
--- trunk/data/qcsrc/server/w_porto.qc 2008-09-10 10:00:48 UTC (rev 4442)
+++ trunk/data/qcsrc/server/w_porto.qc 2008-09-10 15:00:57 UTC (rev 4443)
@@ -70,7 +70,7 @@
traceline(trace_ent.origin, trace_ent.origin + '0 0 2' * PL_MIN_z, MOVE_NORMAL, self);
if(trace_fraction >= 1)
return;
- if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_SLICK)
+ if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_SLICK || trace_dphitcontents & DPCONTENTS_PLAYERCLIP)
return;
if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
return;
@@ -80,7 +80,7 @@
{
remove(self);
}
- else if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_SLICK)
+ else if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_SLICK || trace_dphitcontents & DPCONTENTS_PLAYERCLIP)
{
// just reflect
self.right_vector = self.right_vector - 2 * trace_plane_normal * (self.right_vector * trace_plane_normal);
More information about the nexuiz-commits
mailing list