]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - csprogs.c
Fix setinfo.
[xonotic/darkplaces.git] / csprogs.c
index 8d54fc0fabc0007f8eb72139ab645cb61a4b24bb..68dbd8394cabd71119ad0dcf2df71ed339b1efa1 100644 (file)
--- a/csprogs.c
+++ b/csprogs.c
@@ -295,6 +295,7 @@ qboolean CSQC_AddRenderEdict(prvm_edict_t *ed, int edictnum)
        float scale;
        entity_render_t *entrender;
        dp_model_t *model;
+       prvm_vec3_t modellight_origin;
 
        model = CL_GetModelFromEdict(ed);
        if (!model)
@@ -348,7 +349,8 @@ qboolean CSQC_AddRenderEdict(prvm_edict_t *ed, int edictnum)
 
        // LadyHavoc: use the CL_GetTagMatrix function on self to ensure consistent behavior (duplicate code would be bad)
        // this also sets the custommodellight_origin for us
-       CL_GetTagMatrix(prog, &entrender->matrix, ed, 0, entrender->custommodellight_origin);
+       CL_GetTagMatrix(prog, &entrender->matrix, ed, 0, modellight_origin);
+       VectorCopy(modellight_origin, entrender->custommodellight_origin);
 
        // set up the animation data
        VM_GenerateFrameGroupBlend(prog, ed->priv.server->framegroupblend, ed);
@@ -474,7 +476,6 @@ qboolean CL_VM_UpdateView (double frametime)
                return false;
        R_TimeReport("pre-UpdateView");
        CSQC_BEGIN
-               r_refdef.view.ismain = true;
                csqc_original_r_refdef_view = r_refdef.view;
                csqc_main_r_refdef_view = r_refdef.view;
                //VectorCopy(cl.viewangles, oldangles);
@@ -485,6 +486,8 @@ qboolean CL_VM_UpdateView (double frametime)
                // CSQC_UpdateView function does not call R_ClearScene as it should
                r_refdef.scene.numentities = 0;
                r_refdef.scene.numlights = 0;
+               // polygonbegin without draw2d arg has to guess
+               prog->polygonbegin_guess2d = false;
                // pass in width and height as parameters (EXT_CSQC_1)
                PRVM_G_FLOAT(OFS_PARM0) = vid.width;
                PRVM_G_FLOAT(OFS_PARM1) = vid.height;