ZIPEXCLUDE ?= -x\!*.pk3 -xr\!\.svn -x\!qcsrc
DIFF ?= diff
-FTEQCCFLAGS_WATERMARK ?= -DWATERMARK='"^1$(shell git describe) TEST BUILD"' -DCVAR_POPCON
+FTEQCCFLAGS_WATERMARK ?= -DWATERMARK='"$(shell git describe)"' -DCVAR_POPCON
FTEQCCFLAGS ?= -Werror -Wno-Q302 -O3 -Ono-c -Ono-cs $(FTEQCCFLAGS_EXTRA) $(FTEQCCFLAGS_WATERMARK)
FTEQCCFLAGS_PROGS ?=
FTEQCCFLAGS_MENU ?=
check_unacceptable_compiler_bugs();
#ifdef WATERMARK
- print(sprintf(_("^4CSQC Build information: %s\n"), WATERMARK()));
+ print(sprintf(_("^4CSQC Build information: ^1%s\n"), WATERMARK()));
#endif
float i;
case ENT_CLIENT_TUBANOTE: Ent_TubaNote(bIsNewEntity); break;
case ENT_CLIENT_WARPZONE: WarpZone_Read(bIsNewEntity); break;
case ENT_CLIENT_WARPZONE_CAMERA: WarpZone_Camera_Read(bIsNewEntity); break;
+ case ENT_CLIENT_WARPZONE_TELEPORTED: WarpZone_Teleported_Read(bIsNewEntity); break;
case ENT_CLIENT_TRIGGER_MUSIC: Ent_ReadTriggerMusic(); break;
case ENT_CLIENT_HOOK: Ent_ReadHook(bIsNewEntity, ENT_CLIENT_HOOK); break;
case ENT_CLIENT_LGBEAM: Ent_ReadHook(bIsNewEntity, ENT_CLIENT_LGBEAM); break;
const float ENT_CLIENT_LGBEAM = 28;
const float ENT_CLIENT_GAUNTLET = 29;
const float ENT_CLIENT_ACCURACY = 30;
+const float ENT_CLIENT_WARPZONE_TELEPORTED = 31;
const float ENT_CLIENT_TURRET = 40;
check_unacceptable_compiler_bugs();
#ifdef WATERMARK
- print(sprintf(_("^4MQC Build information: %s\n"), WATERMARK()));
+ print(sprintf(_("^4MQC Build information: ^1%s\n"), WATERMARK()));
#endif
// list all game dirs (TEST)
if(autocvar_menu_watermark != "")
{
vector fs = '48 48 0';
- draw_CenterText('0.5 0.1 0', autocvar_menu_watermark, globalToBoxSize('32 32 0', draw_scale), '1 1 1', 0.05, 1);
+ draw_CenterText('0.5 0.1 0', sprintf(_("^1%s TEST BUILD"), autocvar_menu_watermark), globalToBoxSize('32 32 0', draw_scale), '1 1 1', 0.05, 1);
}
}
void preMenuDraw()
DecodeLevelParms();
#ifdef WATERMARK
- sprint(self, strcat("^4SVQC Build information: ", WATERMARK(), "\n"));
+ sprint(self, strcat("^4SVQC Build information: ^1", WATERMARK(), "\n"));
#endif
self.classname = "player_joining";
.float items_added;
void PlayerPreThink (void)
{
+ WarpZone_PlayerPhysics_FixVAngle();
+
self.stat_game_starttime = game_starttime;
self.stat_allow_oldnexbeam = autocvar_g_allow_oldnexbeam;
self.stat_leadlimit = autocvar_leadlimit;
float buttons_prev;
float not_allowed_to_move;
string c;
+
+ WarpZone_PlayerPhysics_FixVAngle();
maxspd_mod = 1;
if(g_minstagib && (self.items & IT_INVINCIBLE))
self.drawmask = MASK_NORMAL;
}
+void CL_RotateMoves(vector ang) = #638;
+void WarpZone_Teleported_Read(float isnew)
+{
+ vector v;
+ self.classname = "warpzone_teleported";
+ v_x = ReadCoord();
+ v_y = ReadCoord();
+ v_z = ReadCoord();
+ if(!isnew)
+ return;
+ self.warpzone_transform = v;
+ R_SetView3fv(VF_CL_VIEWANGLES, WarpZone_TransformVAngles(self, R_SetView3fv(VF_CL_VIEWANGLES)));
+ if(checkextension("DP_CSQC_ROTATEMOVES"))
+ CL_RotateMoves(v);
+ //CL_RotateMoves('0 90 0');
+}
+
float warpzone_fixingview;
float warpzone_fixingview_drawexteriormodel;
//float warpzone_fixingview_sidespeed;
void WarpZone_Read(float bIsNewEntity);
void WarpZone_Camera_Read(float bIsNewEntity);
+void WarpZone_Teleported_Read(float bIsNewEntity);
vector warpzone_fixview_origin;
vector warpzone_fixview_angles;
.vector warpzone_oldorigin, warpzone_oldvelocity, warpzone_oldangles;
.float warpzone_teleport_time;
+.entity warpzone_teleport_zone;
void WarpZone_StoreProjectileData(entity e)
{
WarpZone_PostTeleportPlayer_Callback(player);
}
+float WarpZone_Teleported_Send(entity to, float sf)
+{
+ WriteByte(MSG_ENTITY, ENT_CLIENT_WARPZONE_TELEPORTED);
+ WriteCoord(MSG_ENTITY, self.angles_x);
+ WriteCoord(MSG_ENTITY, self.angles_y);
+ WriteCoord(MSG_ENTITY, self.angles_z);
+ return TRUE;
+}
+
float WarpZone_Teleport(entity player)
{
vector o0, a0, v0, o1, a1, v1;
WarpZone_TeleportPlayer(self, player, o1 - player.view_ofs, a1, v1);
WarpZone_StoreProjectileData(player);
player.warpzone_teleport_time = time;
+ player.warpzone_teleport_zone = self;
+#ifndef WARPZONE_USE_FIXANGLE
+ // instead of fixangle, send the transform to the client for smoother operation
+ player.fixangle = FALSE;
+
+ entity ts = spawn();
+ setmodel(ts, "null");
+ ts.SendEntity = WarpZone_Teleported_Send;
+ ts.SendFlags = 0xFFFFFF;
+ ts.drawonlytoclient = player;
+ ts.think = SUB_Remove;
+ ts.nextthink = time + 1;
+ ts.owner = player;
+ ts.enemy = self;
+ ts.effects = EF_NODEPTHTEST;
+ ts.classname = "warpzone_teleported";
+ ts.angles = self.warpzone_transform;
+#endif
return 1;
}
{
spawnfunc_trigger_warpzone_reconnect(); // both names make sense here :(
}
+
+void WarpZone_PlayerPhysics_FixVAngle(void)
+{
+#ifndef WARPZONE_DONT_FIX_VANGLE
+ if(clienttype(self) == CLIENTTYPE_REAL)
+ if(self.v_angle_z <= 360) // if not already adjusted
+ if(time - self.ping * 0.001 < self.warpzone_teleport_time)
+ {
+ self.v_angle = WarpZone_TransformVAngles(self.warpzone_teleport_zone, self.v_angle);
+ self.v_angle_z += 720; // mark as adjusted
+ }
+#endif
+}
// server must also define a float called ENT_CLIENT_WARPZONE for the initial byte of WarpZone entities
const float ENT_CLIENT_WARPZONE;
const float ENT_CLIENT_WARPZONE_CAMERA;
+
+void WarpZone_PlayerPhysics_FixVAngle(void);