]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - svvm_cmds.c
new option -capturedemo to capture a demo to an AVI file;
[xonotic/darkplaces.git] / svvm_cmds.c
index 6a32a38ab4ff92fce4abb3c543b1c767f65d910f..23a7524e0a4e9a583e5d9856e0d75673474dcbbf 100644 (file)
@@ -3,7 +3,6 @@
 //============================================================================
 // Server
 
-cvar_t sv_aim = {CVAR_SAVE, "sv_aim", "2", "maximum cosine angle for quake's vertical autoaim, a value above 1 completely disables the autoaim, quake used 0.93"};
 
 
 char *vm_sv_extensions =
@@ -68,6 +67,7 @@ char *vm_sv_extensions =
 "DP_QC_RANDOMVEC "
 "DP_QC_SINCOSSQRTPOW "
 "DP_QC_STRFTIME "
+"DP_QC_STRING_CASE_FUNCTIONS "
 "DP_QC_STRINGBUFFERS "
 "DP_QC_STRINGCOLORFUNCTIONS "
 "DP_QC_TOKENIZEBYSEPARATOR "
@@ -96,6 +96,7 @@ char *vm_sv_extensions =
 "DP_SV_DROPCLIENT "
 "DP_SV_EFFECT "
 "DP_SV_ENTITYCONTENTSTRANSITION "
+"DP_SV_MODELFLAGS_AS_EFFECTS "
 "DP_SV_NETADDRESS "
 "DP_SV_NODRAWTOCLIENT "
 "DP_SV_PING "
@@ -434,13 +435,18 @@ static void VM_SV_sound (void)
        int             volume;
        float attenuation;
 
-       VM_SAFEPARMCOUNT(5, VM_SV_sound);
+       VM_SAFEPARMCOUNTRANGE(4, 5, VM_SV_sound);
 
        entity = PRVM_G_EDICT(OFS_PARM0);
        channel = (int)PRVM_G_FLOAT(OFS_PARM1);
        sample = PRVM_G_STRING(OFS_PARM2);
        volume = (int)(PRVM_G_FLOAT(OFS_PARM3) * 255);
        attenuation = PRVM_G_FLOAT(OFS_PARM4);
+       if (prog->argc < 5)
+       {
+               Con_DPrintf("VM_SV_sound: given only 4 parameters, expected 5, assuming attenuation = ATTN_NORMAL\n");
+               attenuation = 1;
+       }
 
        if (volume < 0 || volume > 255)
        {
@@ -1107,7 +1113,6 @@ sizebuf_t *WriteDest (void)
        int             entnum;
        int             dest;
        prvm_edict_t    *ent;
-       extern sizebuf_t *sv2csqcbuf;
 
        dest = (int)PRVM_G_FLOAT(OFS_PARM0);
        switch (dest)
@@ -1135,7 +1140,7 @@ sizebuf_t *WriteDest (void)
                return &sv.signon;
 
        case MSG_ENTITY:
-               return sv2csqcbuf;
+               return sv.writeentitiestoclient_msg;
        }
 
        return NULL;
@@ -3138,8 +3143,8 @@ VM_strlennocol,                                   // #476 float(string s) : DRESK - String Length (not countin
 VM_strdecolorize,                              // #477 string(string s) : DRESK - Decolorized String (DP_SV_STRINGCOLORFUNCTIONS)
 VM_strftime,                                   // #478 string(float uselocaltime, string format, ...) (DP_QC_STRFTIME)
 VM_tokenizebyseparator,                        // #479 float(string s) tokenizebyseparator (DP_QC_TOKENIZEBYSEPARATOR)
-NULL,                                                  // #480
-NULL,                                                  // #481
+VM_strtolower,                                 // #480 string(string s) VM_strtolower : DRESK - Return string as lowercase
+VM_strtoupper,                                 // #481 string(string s) VM_strtoupper : DRESK - Return string as uppercase
 NULL,                                                  // #482
 NULL,                                                  // #483
 NULL,                                                  // #484