This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to annotated tag 1.42d
in repository iortcw.

commit 89b226d56f24c55e7703ba841bfe92c9799fc77d
Author: Zack Middleton <zturtle...@gmail.com>
Date:   Thu May 7 19:45:17 2015 -0500

    Rend2: Fog brush models (fixes spikes in crypt1)
---
 MP/code/rend2/tr_world.c | 7 +++++++
 SP/code/rend2/tr_world.c | 7 +++++++
 2 files changed, 14 insertions(+)

diff --git a/MP/code/rend2/tr_world.c b/MP/code/rend2/tr_world.c
index 7779566..d77ebd6 100644
--- a/MP/code/rend2/tr_world.c
+++ b/MP/code/rend2/tr_world.c
@@ -454,6 +454,7 @@ void R_AddBrushModelSurfaces ( trRefEntity_t *ent ) {
        int                     clip;
        model_t         *pModel;
        int                     i;
+       int fognum;
 
        pModel = R_GetModelByHandle( ent->e.hModel );
 
@@ -467,15 +468,21 @@ void R_AddBrushModelSurfaces ( trRefEntity_t *ent ) {
        R_SetupEntityLighting( &tr.refdef, ent );
        R_DlightBmodel( bmodel );
 
+//----(SA) modified
+       // determine if in fog
+       fognum = R_BmodelFogNum( ent, bmodel );
+
        for ( i = 0 ; i < bmodel->numSurfaces ; i++ ) {
                int surf = bmodel->firstSurface + i;
 
                if (tr.world->surfacesViewCount[surf] != tr.viewCount)
                {
                        tr.world->surfacesViewCount[surf] = tr.viewCount;
+                       tr.world->surfaces[surf].fogIndex = fognum;
                        R_AddWorldSurface( tr.world->surfaces + surf, 
tr.currentEntity->needDlights, 0 );
                }
        }
+//----(SA) end
 }
 
 /*
diff --git a/SP/code/rend2/tr_world.c b/SP/code/rend2/tr_world.c
index b8910da..6b65bcc 100644
--- a/SP/code/rend2/tr_world.c
+++ b/SP/code/rend2/tr_world.c
@@ -455,6 +455,7 @@ void R_AddBrushModelSurfaces ( trRefEntity_t *ent ) {
        int                     clip;
        model_t         *pModel;
        int                     i;
+       int fognum;
 
        pModel = R_GetModelByHandle( ent->e.hModel );
 
@@ -468,15 +469,21 @@ void R_AddBrushModelSurfaces ( trRefEntity_t *ent ) {
        R_SetupEntityLighting( &tr.refdef, ent );
        R_DlightBmodel( bmodel );
 
+//----(SA) modified
+       // determine if in fog
+       fognum = R_BmodelFogNum( ent, bmodel );
+
        for ( i = 0 ; i < bmodel->numSurfaces ; i++ ) {
                int surf = bmodel->firstSurface + i;
 
                if (tr.world->surfacesViewCount[surf] != tr.viewCount)
                {
                        tr.world->surfacesViewCount[surf] = tr.viewCount;
+                       tr.world->surfaces[surf].fogIndex = fognum;
                        R_AddWorldSurface( tr.world->surfaces + surf, 
tr.currentEntity->needDlights, 0 );
                }
        }
+//----(SA) end
 }
 
 /*

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/iortcw.git

_______________________________________________
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to