]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - csprogs.c
make getsurface* not animate vertices if the model is not animated
[xonotic/darkplaces.git] / csprogs.c
index 92a8872057427c86248739ea591706d6b33a34dd..33f2987f5b1f72cea8a45ee3d26d2f43affc787e 100644 (file)
--- a/csprogs.c
+++ b/csprogs.c
@@ -123,6 +123,10 @@ static void CSQC_SetGlobals (void)
 
                if ((val = PRVM_GLOBALFIELDVALUE(prog->globaloffsets.view_angles)))
                        VectorCopy(cl.viewangles, val->vector);
+               if ((val = PRVM_GLOBALFIELDVALUE(prog->globaloffsets.view_punchangle)))
+                       VectorCopy(cl.punchangle, val->vector);
+               if ((val = PRVM_GLOBALFIELDVALUE(prog->globaloffsets.view_punchvector)))
+                       VectorCopy(cl.punchvector, val->vector);
                prog->globals.client->maxclients = cl.maxclients;
        CSQC_END
 }
@@ -205,7 +209,7 @@ qboolean CSQC_AddRenderEdict(prvm_edict_t *ed, int edictnum)
        if((val = PRVM_EDICTFIELDVALUE(ed, prog->fieldoffsets.scale)) && val->_float)           entrender->scale = scale = val->_float;
        if((val = PRVM_EDICTFIELDVALUE(ed, prog->fieldoffsets.colormod)) && VectorLength2(val->vector)) VectorCopy(val->vector, entrender->colormod);
        if((val = PRVM_EDICTFIELDVALUE(ed, prog->fieldoffsets.glowmod)) && VectorLength2(val->vector))  VectorCopy(val->vector, entrender->glowmod);
-       if((val = PRVM_EDICTFIELDVALUE(ed, prog->fieldoffsets.effects)) && val->_float) entrender->effects |= (int)val->_float;
+       if(ed->fields.client->effects)  entrender->effects |= (int)ed->fields.client->effects;
        if((val = PRVM_EDICTFIELDVALUE(ed, prog->fieldoffsets.tag_entity)) && val->edict)
        {
                int tagentity;