r4403 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sun Sep 7 12:12:53 EDT 2008
Author: div0
Date: 2008-09-07 12:12:53 -0400 (Sun, 07 Sep 2008)
New Revision: 4403
Modified:
trunk/data/qcsrc/server/portals.qc
Log:
portal: better error handling
Modified: trunk/data/qcsrc/server/portals.qc
===================================================================
--- trunk/data/qcsrc/server/portals.qc 2008-09-07 15:43:59 UTC (rev 4402)
+++ trunk/data/qcsrc/server/portals.qc 2008-09-07 16:12:53 UTC (rev 4403)
@@ -222,6 +222,15 @@
void Portal_Touch()
{
+ // portal is being removed?
+ if(self.solid != SOLID_TRIGGER)
+ return; // possibly engine bug
+
+ if(!self.enemy)
+ {
+ error("Portal_Touch called for a broken portal\n");
+ }
+
if(trace_fraction < 1)
return; // only handle TouchAreaGrid ones (only these can teleport)
// for some unknown reason, this also gets collisions from SV_Impact sometimes
@@ -409,9 +418,15 @@
{
entity e, o;
+ // portal is being removed?
if(self.solid != SOLID_TRIGGER)
- error("Portal_Think called for a portal that should not be thinking");
+ return; // possibly engine bug
+ if(!self.enemy)
+ {
+ error("Portal_Think called for a broken portal\n");
+ }
+
o = self.owner;
self.solid = SOLID_BBOX;
self.owner = world;
More information about the nexuiz-commits
mailing list