]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_rmain.c
weapon models were not being lit in maps using .lights
[xonotic/darkplaces.git] / gl_rmain.c
index d0a46fa24af4c1ed6422a427904fdfcf8020b728..4306818f58948466ef885b8d691320b4f38d6867 100644 (file)
@@ -502,9 +502,10 @@ void R_DrawViewModel (void)
 
        ent = &cl.viewent.render;
        Mod_CheckLoaded(ent->model);
-
        R_LerpAnimation(ent);
-
+       Matrix4x4_CreateFromQuakeEntity(&ent->matrix, ent->origin[0], ent->origin[1], ent->origin[2], -ent->angles[0], ent->angles[1], ent->angles[2], ent->scale);
+       Matrix4x4_Invert_Simple(&ent->inversematrix, &ent->matrix);
+       R_UpdateEntLights(ent);
        ent->model->Draw(ent);
 }