r4305 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Wed Sep 3 04:13:54 EDT 2008
Author: div0
Date: 2008-09-03 04:13:39 -0400 (Wed, 03 Sep 2008)
New Revision: 4305
Modified:
trunk/data/qcsrc/server/portals.qc
Log:
minor fix: after failed portal pair creation, vanish the in-portal
Modified: trunk/data/qcsrc/server/portals.qc
===================================================================
--- trunk/data/qcsrc/server/portals.qc 2008-09-03 07:51:13 UTC (rev 4304)
+++ trunk/data/qcsrc/server/portals.qc 2008-09-03 08:13:39 UTC (rev 4305)
@@ -347,13 +347,18 @@
float Portal_SpawnOutPortalAtTrace(entity own, vector dir, float portal_id_val)
{
if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
+ {
+ if(own.portal_in.portal_id == portal_id_val)
+ Portal_RequestVanish(own.portal_in);
return 0;
+ }
if(trace_ent.classname == "player")
{
print("hit a player, adjusting...\n");
trace_endpos = trace_ent.origin + '0 0 1' * PL_MIN_z;
trace_plane_normal = '0 0 1';
+ dir = -1 * dir; // fix orientation
}
if(!own.portal_in)
@@ -371,7 +376,10 @@
own.portal_out = Portal_Spawn(own, trace_endpos + trace_plane_normal, fixedvectoangles2(trace_plane_normal, -1 * dir));
if(!own.portal_out)
+ {
+ Portal_RequestVanish(own.portal_in);
return 0;
+ }
own.portal_out.portal_id = portal_id_val;
Portal_Connect(own.portal_in, own.portal_out);
More information about the nexuiz-commits
mailing list