return;
}
}
+
+void WarpZone_PostInitialize_Callback(void)
+{
+ // create waypoint links for warpzones
+ entity e;
+ for(e = world; (e = find(e, classname, "trigger_warpzone")); )
+ {
+ vector src, dst;
+ src = (e.absmin + e.absmax) * 0.5;
+ makevectors(e.warpzone_angles);
+ src = src + ((e.warpzone_origin - src) * v_forward) * v_forward + 16 * v_right;
+ dst = (e.enemy.absmin + e.enemy.absmax) * 0.5;
+ makevectors(e.enemy.warpzone_angles);
+ dst = dst + ((e.enemy.warpzone_origin - dst) * v_forward) * v_forward - 16 * v_right;
+ waypoint_spawnforteleporter_v(e, src, dst, 0);
+ }
+}
entity e;
float n;
- RandomSelection_Init();
n = 0;
for(e = world; (e = find(e, targetname, self.target)); )
{
++n;
- waypoint_spawnforteleporter(self, e.origin, 0);
if(e.movetype == MOVETYPE_NONE)
- RandomSelection_Add(e, 0, string_null, 1, 1);
+ waypoint_spawnforteleporter(self, e.origin, 0);
if(e.classname != "info_teleport_destination")
print("^3MAPPER ERROR: teleporter does target an invalid teleport destination entity. Angles will not work.\n");
}
{
// exactly one dest - bots love that
self.enemy = find(e, targetname, self.target);
- self.dest = self.enemy.origin;
}
else
{
WarpZone_InitStep_UpdateTransform();
self = e;
WarpZones_Reconnect();
+ WarpZone_PostInitialize_Callback();
}
if(warpzone_warpzones_exist)
const float ENT_CLIENT_WARPZONE_CAMERA;
void WarpZone_PlayerPhysics_FixVAngle(void);
+
+void WarpZone_PostInitialize_Callback(void);