]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - clvm_cmds.c
fix compile error
[xonotic/darkplaces.git] / clvm_cmds.c
index 9815a9d220a3498bad700f3f4f737e72e4ae4759..393531ea7069628c5f1d11ea568e35d9d1543cec 100644 (file)
@@ -357,7 +357,7 @@ static void VM_CL_tracetoss (void)
        trace_t trace;
        prvm_edict_t    *ent;
        prvm_edict_t    *ignore;
-       int svent;
+       int svent = 0;
 
        prog->xfunction->builtinsprofile += 600;
 
@@ -936,7 +936,7 @@ void VM_CL_R_AddDynamicLight (void)
        Matrix4x4_FromVectors(&matrix, forward, left, up, org);
 
        R_RTLight_Update(&r_refdef.scene.templights[r_refdef.scene.numlights], false, &matrix, col, style, cubemapname, castshadow, coronaintensity, coronasizescale, ambientscale, diffusescale, specularscale, LIGHTFLAG_NORMALMODE | LIGHTFLAG_REALTIMEMODE);
-       r_refdef.scene.lights[r_refdef.scene.numlights] = &r_refdef.scene.templights[r_refdef.scene.numlights++];
+       r_refdef.scene.lights[r_refdef.scene.numlights] = &r_refdef.scene.templights[r_refdef.scene.numlights];r_refdef.scene.numlights++;
        prog->functions[prog->funcoffsets.CSQC_UpdateView].totaltime -= Sys_DoubleTime() - t;
 }
 
@@ -1246,6 +1246,9 @@ static void VM_CL_getplayerkey (void)
        else
                if(!strcasecmp(c, "pl"))
                        dpsnprintf(t, sizeof(t), "%i", cl.scores[i].qw_packetloss);
+       else
+               if(!strcasecmp(c, "movementloss"))
+                       dpsnprintf(t, sizeof(t), "%i", cl.scores[i].qw_movementloss);
        else
                if(!strcasecmp(c, "entertime"))
                        dpsnprintf(t, sizeof(t), "%f", cl.scores[i].qw_entertime);
@@ -3031,12 +3034,11 @@ static void VM_DrawPolygonCallback (const entity_render_t *ent, const rtlight_t
        if(polys->progstarttime != prog->starttime) // from other progs? won't draw these (this can cause crashes!)
                return;
        R_Mesh_ResetTextureState();
-       R_Mesh_Matrix(&identitymatrix);
+       R_EntityMatrix(&identitymatrix);
        GL_CullFace(GL_NONE);
        R_Mesh_VertexPointer(polys->data_vertex3f, 0, 0);
        R_Mesh_ColorPointer(polys->data_color4f, 0, 0);
        R_Mesh_TexCoordPointer(0, 2, polys->data_texcoord2f, 0, 0);
-       R_SetupGenericShader(true);
 
        for (surfacelistindex = 0;surfacelistindex < numsurfaces;)
        {
@@ -3055,7 +3057,7 @@ static void VM_DrawPolygonCallback (const entity_render_t *ent, const rtlight_t
                        GL_BlendFunc(GL_ONE_MINUS_DST_COLOR,GL_ONE);
                else
                        GL_BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-               R_Mesh_TexBind(0, R_GetTexture(tex));
+               R_SetupShader_Generic(tex, NULL, GL_MODULATE, 1);
                numtriangles = 0;
                for (;surfacelistindex < numsurfaces;surfacelistindex++)
                {
@@ -3174,7 +3176,7 @@ void VM_CL_R_PolygonBegin (void)
        sf = NULL;
        if(*picname)
        {
-               tf = TEXF_PRECACHE | TEXF_ALPHA;
+               tf = TEXF_ALPHA;
                if((int)PRVM_G_FLOAT(OFS_PARM1) & DRAWFLAG_MIPMAP)
                        tf |= TEXF_MIPMAP;
 
@@ -3695,7 +3697,7 @@ static void VM_CL_skel_build(void)
                Matrix4x4_Accumulate(&blendedmatrix, &skeleton->relativetransforms[bonenum], retainfrac);
                for (blendindex = 0;blendindex < numblends;blendindex++)
                {
-                       Matrix4x4_FromArray12FloatD3D(&matrix, model->data_poses + 12 * (frameblend[blendindex].subframe * model->num_bones + bonenum));
+                       Matrix4x4_FromBonePose6s(&matrix, model->num_posescale, model->data_poses6s + 6 * (frameblend[blendindex].subframe * model->num_bones + bonenum));
                        Matrix4x4_Accumulate(&blendedmatrix, &matrix, frameblend[blendindex].lerp);
                }
                skeleton->relativetransforms[bonenum] = blendedmatrix;
@@ -4583,6 +4585,9 @@ NULL,                                                     // #622
 NULL,                                                  // #623
 VM_CL_getextresponse,                  // #624 string getextresponse(void)
 NULL,                                                  // #625
+NULL,                                                  // #626
+VM_sprintf,                     // #627 string sprintf(string format, ...)
+NULL,                                                  // #628
 };
 
 const int vm_cl_numbuiltins = sizeof(vm_cl_builtins) / sizeof(prvm_builtin_t);