1 #ifndef T_TELEPORTERS_H
2 #define T_TELEPORTERS_H
6 void trigger_teleport_use();
8 #define TDEATHLOOP(o) \
13 deathmin = (o) + player.mins; \
14 deathmax = (o) + player.maxs; \
15 if(telefragmin != telefragmax) \
17 if(deathmin.x > telefragmin.x) deathmin.x = telefragmin.x; \
18 if(deathmin.y > telefragmin.y) deathmin.y = telefragmin.y; \
19 if(deathmin.z > telefragmin.z) deathmin.z = telefragmin.z; \
20 if(deathmax.x < telefragmax.x) deathmax.x = telefragmax.x; \
21 if(deathmax.y < telefragmax.y) deathmax.y = telefragmax.y; \
22 if(deathmax.z < telefragmax.z) deathmax.z = telefragmax.z; \
24 deathradius = max(vlen(deathmin), vlen(deathmax)); \
25 for(head = findradius(o, deathradius); head; head = head.chain) \
28 if(boxesoverlap(deathmin, deathmax, head.absmin, head.absmax))
31 float check_tdeath(entity player, vector org, vector telefragmin, vector telefragmax);
33 void tdeath(entity player, entity teleporter, entity telefragger, vector telefragmin, vector telefragmax);
35 void spawn_tdeath(vector v0, entity e, vector v);
38 const float TELEPORT_FLAG_SOUND = 1;
39 const float TELEPORT_FLAG_PARTICLES = 2;
40 const float TELEPORT_FLAG_TDEATH = 4;
41 const float TELEPORT_FLAG_FORCE_TDEATH = 8;
43 #define TELEPORT_FLAGS_WARPZONE 0
44 #define TELEPORT_FLAGS_PORTAL (TELEPORT_FLAG_SOUND | TELEPORT_FLAG_PARTICLES | TELEPORT_FLAG_TDEATH | TELEPORT_FLAG_FORCE_TDEATH)
45 #define TELEPORT_FLAGS_TELEPORTER (TELEPORT_FLAG_SOUND | TELEPORT_FLAG_PARTICLES | TELEPORT_FLAG_TDEATH)
47 // types for .teleportable entity setting
48 const float TELEPORT_NORMAL = 1; // play sounds/effects etc
49 const float TELEPORT_SIMPLE = 2; // only do teleport, nothing special
51 void Reset_ArcBeam(entity player, vector forward);
52 void TeleportPlayer(entity teleporter, entity player, vector to, vector to_angles, vector to_velocity, vector telefragmin, vector telefragmax, float tflags);
54 entity Simple_TeleportPlayer(entity teleporter, entity player);
56 void Teleport_Touch (void);
58 void teleport_findtarget (void);
60 entity Teleport_Find(vector mi, vector ma);
62 entity teleport_first;
63 .entity teleport_next;
65 void WarpZone_PostTeleportPlayer_Callback(entity pl);