]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cgamevm.c
added CGVM_Stain function
[xonotic/darkplaces.git] / cgamevm.c
index d11642ecb31b7abcca73841b693ccd350d93a1fc..9dd567e27ce5b27ebfc5049d81ebd91522691e2a 100644 (file)
--- a/cgamevm.c
+++ b/cgamevm.c
@@ -56,7 +56,7 @@ void CL_CGVM_ParseNetwork(byte *netbuffer, int length)
        {
                num = CGVM_MSG_ReadByte();
                if (cgvm_networkcode[num])
-                       cgvm_networkcode[num](num);
+                       cgvm_networkcode[num]((byte)num);
                else
                        Host_Error("CL_CGVM_ParseNetwork: unregistered network code %i", num);
        }
@@ -183,7 +183,7 @@ void *CGVM_Malloc(const int size)
 
 void CGVM_Free(void *mem)
 {
-       return Mem_Free(mem);
+       Mem_Free(mem);
 }
 
 float CGVM_RandomRange(const float r1, const float r2)
@@ -267,3 +267,8 @@ int CGVM_Model(const char *name)
        cgvm_model[i] = model;
        return i;
 }
+
+void CGVM_Stain(const float *origin, float radius, int cr1, int cg1, int cb1, int ca1, int cr2, int cg2, int cb2, int ca2)
+{
+       R_Stain((float *)origin, radius, cr1, cg1, cb1, ca1, cr2, cg2, cb2, ca2);
+}