]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Added DP_SV_WRITEUNTERMINATEDSTRING extension
authorsajt <sajt@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 23 Aug 2005 05:39:12 +0000 (05:39 +0000)
committersajt <sajt@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 23 Aug 2005 05:39:12 +0000 (05:39 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5635 d7cf8633-e32d-0410-b094-e92efae38249

common.c
common.h
svvm_cmds.c
todo

index 86d448b0b1ba9b50e4553557613422618ee56bf6..df8bbcc9a333ee98de579b63b3523389c5a2f81d 100644 (file)
--- a/common.c
+++ b/common.c
@@ -252,6 +252,12 @@ void MSG_WriteString (sizebuf_t *sb, const char *s)
                SZ_Write (sb, s, (int)strlen(s)+1);
 }
 
+void MSG_WriteUnterminatedString (sizebuf_t *sb, const char *s)
+{
+       if (s)
+               SZ_Write (sb, s, (int)strlen(s));
+}
+
 void MSG_WriteCoord13i (sizebuf_t *sb, float f)
 {
        if (f >= 0)
index 507d3f7dceb86fb80d4833e88eef0bfc044baf6a..f87a0607c72fd07352fe50fb93de360f1adc6b38 100644 (file)
--- a/common.h
+++ b/common.h
@@ -148,6 +148,7 @@ void MSG_WriteShort (sizebuf_t *sb, int c);
 void MSG_WriteLong (sizebuf_t *sb, int c);
 void MSG_WriteFloat (sizebuf_t *sb, float f);
 void MSG_WriteString (sizebuf_t *sb, const char *s);
+void MSG_WriteUnterminatedString (sizebuf_t *sb, const char *s);
 void MSG_WriteAngle8i (sizebuf_t *sb, float f);
 void MSG_WriteAngle16i (sizebuf_t *sb, float f);
 void MSG_WriteAngle32f (sizebuf_t *sb, float f);
index 746ea3316e29cebd785aaa24f8712b37957a0d4f..c6def35f1826bd486f7511fea09781b026ed471d 100644 (file)
@@ -94,6 +94,7 @@ char *vm_sv_extensions =
 "DP_SV_ROTATINGBMODEL "
 "DP_SV_SETCOLOR "
 "DP_SV_SLOWMO "
+"DP_SV_WRITEUNTERMINATEDSTRING "
 "DP_TE_BLOOD "
 "DP_TE_BLOODSHOWER "
 "DP_TE_CUSTOMFLASH "
@@ -1186,6 +1187,11 @@ void PF_WriteString (void)
        MSG_WriteString (WriteDest(), PRVM_G_STRING(OFS_PARM1));
 }
 
+void PF_WriteUnterminatedString (void)
+{
+       MSG_WriteUnterminatedString (WriteDest(), PRVM_G_STRING(OFS_PARM1));
+}
+
 
 void PF_WriteEntity (void)
 {
@@ -2470,7 +2476,7 @@ PF_gettaginfo,                            // #452 vector(entity ent, float tagindex) gettaginfo (DP_QC_G
 PF_dropclient,                         // #453 void(entity clent) dropclient (DP_SV_DROPCLIENT)
 PF_spawnclient,                                // #454 entity() spawnclient (DP_SV_BOTCLIENT)
 PF_clienttype,                         // #455 float(entity clent) clienttype (DP_SV_BOTCLIENT)
-NULL,                                          // #456
+PF_WriteUnterminatedString,    // #456
 NULL,                                          // #457
 NULL,                                          // #458
 NULL,                                          // #459
diff --git a/todo b/todo
index 84c51baa443625ef0c23594f9ac944d8c6cdce51..a28dbebcbf63a0d5520da2aa7583c4a2f329a1d2 100644 (file)
--- a/todo
+++ b/todo
@@ -6,6 +6,7 @@
 -d (Mabus) bug darkplaces loading: test zlib support with entirely pk3'd id1 data (should crash because of zlib not being setup early enough - fix this) (Mabus)
 d bug darkplaces renderer: fix q3bsp fogging (Sajt)
 d feature darkplaces client: v_deathtilt cvar (Sajt, MauveBib)
+-d (shadowalker) feature darkplaces server: add DP_QC_WRITEUNTERMINATEDSTRING extension (shadowalker)
 -d (Speedy) feature darkplaces init: add -demolooponly option which makes escape key quit, and disables all other keys (Speedy)
 -d (Spike) bug darkplaces console: inserting characters in the commandline is not adding a nul terminator to the commandline, resulting in lots of trash from older commandlines suddenly showing up (Spike)
 -d (Spike) feature darkplaces server: add filename/line number reporting to progs stack and opcode printouts (Spike)
@@ -156,7 +157,6 @@ d feature darkplaces client: v_deathtilt cvar (Sajt, MauveBib)
 0 feature darkplaces renderer: add rtlight "avelocity" parameter to make lights that spin, useful with cubemaps (romi)
 0 feature darkplaces renderer: save r_shadow_glsl* cvars (and possibly a few others) to config because they are useful user settings (SavageX)
 0 feature darkplaces server: add DP_QC_STRTOKEN extension with these functions: float strtokens(string s, string separator) = #;string strtoken(string s, string separator, float index) = #; (FrikaC)
-0 feature darkplaces server: add DP_QC_WRITESTRING2 extension, same as writestring but does not write trailing 0 (shadowalker)
 0 feature darkplaces server: add DP_SV_DRAWONLYTOTEAM extension (Supajoe)
 0 feature darkplaces server: add PF_tokenizeseparator function and DP_QC_TOKENIZESEPARATOR extension
 0 feature darkplaces server: add a .collision_cancollide QC function call to decide if an entity should collide with another, or pass through it (Uffe)