]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote-tracking branch 'origin/divVerent/relics-media-v2'
authorRudolf Polzer <divverent@alientrap.org>
Fri, 29 Apr 2011 21:42:36 +0000 (23:42 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Fri, 29 Apr 2011 21:42:36 +0000 (23:42 +0200)
Makefile
qcsrc/client/Main.qc
qcsrc/common/constants.qh
qcsrc/menu/menu.qc
qcsrc/menu/xonotic/util.qc
qcsrc/server/cl_client.qc
qcsrc/server/cl_physics.qc
qcsrc/warpzonelib/client.qc
qcsrc/warpzonelib/client.qh
qcsrc/warpzonelib/server.qc
qcsrc/warpzonelib/server.qh

index caab47a809b19cdc078626da15943e619515b5a8..53c5cf5b70d42fb993cfb065d6ba26de28d6c301 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ ZIP ?= 7za a -tzip -mx=9
 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 ?=
index 91ce464793bcbc0f33879a90222c2934165fdb3a..2ec193b8416bc2308da66a25209d8ca2b41a83ae 100644 (file)
@@ -63,7 +63,7 @@ void CSQC_Init(void)
        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;
@@ -962,6 +962,7 @@ void(float bIsNewEntity) CSQC_Ent_Update =
                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;
index 419ab73e8fa1b8e14d21f44afca79f7775e0936b..64dcaa44e1fb25f1fdb12c3c08767d1286632aad 100644 (file)
@@ -113,6 +113,7 @@ const float ENT_CLIENT_HOOK = 27;
 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;
 
index 0894856f1f9e27f0b72334a23940dcd86e88252c..3e45e416492ce6eab51eb631c85d4554f6adf746 100644 (file)
@@ -26,7 +26,7 @@ void() m_init =
        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)
index 1d21ba4910a7a391b8d3a87b40bc27f988fe5353..4a9255a47cbfb10162c57ddaf31c75f9ff3db250 100644 (file)
@@ -364,7 +364,7 @@ void postMenuDraw()
        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()
index 9e704b882486ad3cdadb5eb2c2834c282f2e8a7c..b3d326264e0a2a702843ae0b874714d6eb11f0cf 100644 (file)
@@ -1539,7 +1539,7 @@ void ClientConnect (void)
        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";
@@ -2629,6 +2629,8 @@ void() nexball_setstatus;
 .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;
index 9662e0ae61035dbe402bfec093c71f0753a99644..08368676d0055791a10e7d6a9c7135a5ff568ceb 100644 (file)
@@ -667,6 +667,8 @@ void SV_PlayerPhysics()
        float buttons_prev;
        float not_allowed_to_move;
        string c;
+
+       WarpZone_PlayerPhysics_FixVAngle();
        
        maxspd_mod = 1;
        if(g_minstagib && (self.items & IT_INVINCIBLE))
index f02fa4a30266d097b9c595d413829300999eeb4d..4b36b4651dc75efa463357b8f7d2405caaffcd05 100644 (file)
@@ -141,6 +141,23 @@ void WarpZone_Camera_Read(float isnew)
                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;
index e8f44be136d4effa8c4cf5102554fdab48c77eec..d5b3ac2fc097887b0a6181b059033fc214b3e2b8 100644 (file)
@@ -1,5 +1,6 @@
 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;
index e0dfc6675342eb9282283f6f6599398896370e4a..29f5dc8db11aaf218354895ed5bba94f53e76397 100644 (file)
@@ -1,5 +1,6 @@
 .vector warpzone_oldorigin, warpzone_oldvelocity, warpzone_oldangles;
 .float warpzone_teleport_time;
+.entity warpzone_teleport_zone;
 
 void WarpZone_StoreProjectileData(entity e)
 {
@@ -32,6 +33,15 @@ void WarpZone_TeleportPlayer(entity teleporter, entity player, vector to, vector
        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;
@@ -90,6 +100,24 @@ float WarpZone_Teleport(entity player)
        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;
 }
@@ -685,3 +713,16 @@ void spawnfunc_target_warpzone_reconnect()
 {
        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
+}
index 392e6f39d13ff41e454ac61fdb69cab789cf96e5..621e0f9517169e3d9ea22a8329baad9347decbfb 100644 (file)
@@ -8,3 +8,5 @@ float WarpZone_Projectile_Touch_ImpactFilter_Callback();
 // 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);