r5086 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sun Nov 23 15:13:34 EST 2008
Author: div0
Date: 2008-11-23 15:13:34 -0500 (Sun, 23 Nov 2008)
New Revision: 5086
Modified:
trunk/data/qcsrc/server/cl_client.qc
Log:
touchexplode: fix for noclip
Modified: trunk/data/qcsrc/server/cl_client.qc
===================================================================
--- trunk/data/qcsrc/server/cl_client.qc 2008-11-23 19:50:16 UTC (rev 5085)
+++ trunk/data/qcsrc/server/cl_client.qc 2008-11-23 20:13:34 UTC (rev 5086)
@@ -470,7 +470,6 @@
self.angles_z = 0;
self.fixangle = TRUE;
self.crouch = FALSE;
- self.touch = SUB_Null;
self.view_ofs = PL_VIEW_OFS;
setorigin (self, spot.origin);
@@ -608,30 +607,6 @@
remove(self);
}
-void PlayerTouch()
-{
- if(g_touchexplode && time > self.touchexplode_time && time > other.touchexplode_time)
- {
- if(self.classname == "player")
- if(self.deadflag == DEAD_NO)
- if(other.classname == "player")
- if(other.deadflag == DEAD_NO)
- if not(IS_INDEPENDENT_PLAYER(self))
- if not(IS_INDEPENDENT_PLAYER(other))
- {
- entity e;
- e = spawn();
- e.classname = "touchexplode";
- e.think = PlayerTouchExplode;
- e.nextthink = time;
- e.owner = self;
- e.enemy = other;
-
- self.touchexplode_time = other.touchexplode_time = time + 0.2;
- }
- }
-}
-
/*
=============
PutClientInServer
@@ -776,7 +751,6 @@
FixPlayermodel();
self.crouch = FALSE;
- self.touch = PlayerTouch;
self.view_ofs = PL_VIEW_OFS;
setsize (self, PL_MIN, PL_MAX);
self.spawnorigin = spot.origin;
@@ -2187,6 +2161,30 @@
return;
}
+ if(time > self.touchexplode_time)
+ if(self.classname == "player")
+ if(self.deadflag == DEAD_NO)
+ if not(IS_INDEPENDENT_PLAYER(self))
+ FOR_EACH_PLAYER(other) if(self != other)
+ {
+ if(time > other.touchexplode_time)
+ if(other.classname == "player")
+ if(other.deadflag == DEAD_NO)
+ if not(IS_INDEPENDENT_PLAYER(other))
+ if(boxesoverlap(self.absmin, self.absmax, other.absmin, other.absmax))
+ {
+ entity e;
+ e = spawn();
+ e.classname = "touchexplode";
+ e.think = PlayerTouchExplode;
+ e.nextthink = time;
+ e.owner = self;
+ e.enemy = other;
+
+ self.touchexplode_time = other.touchexplode_time = time + 0.2;
+ }
+ }
+
if(g_lms && !self.deadflag && cvar("g_lms_campcheck_interval"))
{
vector dist;
More information about the nexuiz-commits
mailing list