1 #ifndef T_TELEPORTERS_H
2 #define T_TELEPORTERS_H
4 void trigger_teleport_use();
6 #define TDEATHLOOP(o) \
11 deathmin = (o) + player.mins; \
12 deathmax = (o) + player.maxs; \
13 if(telefragmin != telefragmax) \
15 if(deathmin.x > telefragmin.x) deathmin.x = telefragmin.x; \
16 if(deathmin.y > telefragmin.y) deathmin.y = telefragmin.y; \
17 if(deathmin.z > telefragmin.z) deathmin.z = telefragmin.z; \
18 if(deathmax.x < telefragmax.x) deathmax.x = telefragmax.x; \
19 if(deathmax.y < telefragmax.y) deathmax.y = telefragmax.y; \
20 if(deathmax.z < telefragmax.z) deathmax.z = telefragmax.z; \
22 deathradius = max(vlen(deathmin), vlen(deathmax)); \
23 for(head = findradius(o, deathradius); head; head = head.chain) \
26 if(boxesoverlap(deathmin, deathmax, head.absmin, head.absmax))
29 float check_tdeath(entity player, vector org, vector telefragmin, vector telefragmax);
31 void tdeath(entity player, entity teleporter, entity telefragger, vector telefragmin, vector telefragmax);
33 void spawn_tdeath(vector v0, entity e, vector v);
36 const float TELEPORT_FLAG_SOUND = 1;
37 const float TELEPORT_FLAG_PARTICLES = 2;
38 const float TELEPORT_FLAG_TDEATH = 4;
39 const float TELEPORT_FLAG_FORCE_TDEATH = 8;
41 #define TELEPORT_FLAGS_WARPZONE 0
42 #define TELEPORT_FLAGS_PORTAL (TELEPORT_FLAG_SOUND | TELEPORT_FLAG_PARTICLES | TELEPORT_FLAG_TDEATH | TELEPORT_FLAG_FORCE_TDEATH)
43 #define TELEPORT_FLAGS_TELEPORTER (TELEPORT_FLAG_SOUND | TELEPORT_FLAG_PARTICLES | TELEPORT_FLAG_TDEATH)
45 // types for .teleportable entity setting
46 const float TELEPORT_NORMAL = 1; // play sounds/effects etc
47 const float TELEPORT_SIMPLE = 2; // only do teleport, nothing special
49 void Reset_ArcBeam(entity player, vector forward);
50 void TeleportPlayer(entity teleporter, entity player, vector to, vector to_angles, vector to_velocity, vector telefragmin, vector telefragmax, float tflags);
52 entity Simple_TeleportPlayer(entity teleporter, entity player);
54 void Teleport_Touch (void);
56 void spawnfunc_info_teleport_destination (void);
58 void spawnfunc_misc_teleporter_dest (void);
60 void spawnfunc_target_teleporter (void);
62 void teleport_findtarget (void);
64 entity Teleport_Find(vector mi, vector ma);
66 entity teleport_first;
67 .entity teleport_next;
68 void spawnfunc_trigger_teleport (void);
70 void WarpZone_PostTeleportPlayer_Callback(entity pl);