BITXOR_ASSIGN(player.effects, EF_TELEPORT_BIT);
- if(player.classname == "player")
+ if(IS_PLAYER(player))
BITCLR_ASSIGN(player.flags, FL_ONGROUND);
WarpZone_PostTeleportPlayer_Callback(player);
o10 = o1 = WarpZone_TransformOrigin(wz, o0);
v1 = WarpZone_TransformVelocity(wz, v0);
- if(clienttype(player) != CLIENTTYPE_NOTACLIENT)
+ if not(IS_NOT_A_CLIENT(player))
a1 = WarpZone_TransformVAngles(wz, player.v_angle);
else
a1 = WarpZone_TransformAngles(wz, a0);
player.warpzone_teleport_finishtime += sys_frametime - dt;
#ifndef WARPZONE_USE_FIXANGLE
- if(player.classname == "player")
+ if(IS_PLAYER(player))
{
// instead of fixangle, send the transform to the client for smoother operation
player.fixangle = FALSE;
// 96*frametime
float d;
d = 24 + max(vlen(other.mins), vlen(other.maxs));
- if(clienttype(other) == CLIENTTYPE_NOTACLIENT)
+ if(IS_NOT_A_CLIENT(other))
f = -d / bound(frametime * d * 1, frametime * vlen(other.velocity), d);
else
f = -1;
float WarpZone_Camera_Send(entity to, float sendflags)
{
- float f;
+ float f = 0;
WriteByte(MSG_ENTITY, ENT_CLIENT_WARPZONE_CAMERA);
if(self.warpzone_fadestart)
float WarpZone_Projectile_Touch()
{
- float f;
if(other.classname == "trigger_warpzone")
return TRUE;
if(time == self.warpzone_teleport_time)
return TRUE;
-#ifndef WARPZONELIB_KEEPDEBUG
+#ifdef WARPZONELIB_KEEPDEBUG
// this SEEMS to not happen at the moment, but if it did, it would be more reliable
{
float save_dpstartcontents;
save_ent = trace_ent;
save_inopen = trace_inopen;
save_inwater = trace_inwater;
+ float f;
if((f = WarpZone_CheckProjectileImpact(self)) != 0)
return (f > 0);
trace_dpstartcontents = save_dpstartcontents;
norm = normalize(norm);
}
+#ifdef GMQCC
+ ang = '0 0 0';
+#endif
if(self.aiment)
{
org = self.aiment.origin;
{
if(warpzone_warpzones_exist) { WarpZone_StoreProjectileData(e); }
- float f = clienttype(e);
- if(f == CLIENTTYPE_REAL)
+ if(IS_REAL_CLIENT(e))
{
if(e.solid == SOLID_NOT) // not spectating?
if(e.movetype == MOVETYPE_NOCLIP || e.movetype == MOVETYPE_FLY || e.movetype == MOVETYPE_FLY_WORLDONLY) // not spectating? (this is to catch observers)
}
}
- if(f == CLIENTTYPE_NOTACLIENT)
+ if(IS_NOT_A_CLIENT(e))
{
if(warpzone_warpzones_exist)
for(; (e = nextent(e)); )
float visible_to_some_client(entity ent)
{
entity e;
- for(e = nextent(world); clienttype(e) != CLIENTTYPE_NOTACLIENT; e = nextent(e))
- if(e.classname == "player" && clienttype(e) == CLIENTTYPE_REAL)
+ for(e = nextent(world); !IS_NOT_A_CLIENT(e); e = nextent(e))
+ if(IS_PLAYER(e) && IS_REAL_CLIENT(e))
if(checkpvs(e.origin + e.view_ofs, ent))
return 1;
return 0;
void WarpZone_PlayerPhysics_FixVAngle(void)
{
#ifndef WARPZONE_DONT_FIX_VANGLE
- if(clienttype(self) == CLIENTTYPE_REAL)
+ if(IS_REAL_CLIENT(self))
if(self.v_angle_z <= 360) // if not already adjusted
if(time - self.ping * 0.001 < self.warpzone_teleport_time)
{