dhewm / dhewm3

dhewm 3 main repository
https://dhewm3.org/
GNU General Public License v3.0
1.81k stars 351 forks source link

Many boxes a black (or very dark?) in the game when they shouldn't be #13

Closed chungy closed 12 years ago

chungy commented 12 years ago

Quite simply some boxes just are completely black when they shouldn't be. Couple of examples by screenshot: https://dl.dropbox.com/u/13513277/dhewm3_alpha_box.png https://dl.dropbox.com/u/13513277/dhewm3_cdoom.png

running on Arch Linux x86_64.

andre-d commented 12 years ago

Does this bug exist in the official (retail) linux or windows build?

dhewg commented 12 years ago

No, I don't think on neither. Might be a bug in my tree. I can't atm verify if this happens with ttimo's original tree. Can someone check?

andre-d commented 12 years ago

I have been playing our dhewm3 build for months (constantly updating) now and have not experienced this. I meant does HE experience it on the official one. (could be some kind of graphics driver bug). Unless someone else can (OR, dhewg did you mean you did experience it in dhwem3?) confirm this bug?

chungy commented 12 years ago

The official Linux build doesn't have this particular issue (though it has plenty of others that make me prefer dhewm3 anyway...).

I'm running with a GeForce GTX 460 and the nvidia drivers version 302.17, if it helps any.

dhewg commented 12 years ago

andre-d: I see those black boxes too with my tree. Just the first level, on the desk where you pick up your pda, there's a black box on the desk. That one isn't all black with the vanilla d3 binary from id on linux on the same box/driver.

andre-d commented 12 years ago

Ah, alrighty, thanks :)

DanielGibson commented 12 years ago

I just tried with the original doom3.gpl code from ttimo and the box is not dark and the flashlight makes a difference: http://imgur.com/a/D8ZKl

Has anybody tried with dhewm3/x86 (32bit)?

DanielGibson commented 12 years ago

It's 09ea2ca819402094bb1ae20d70b3afdd536259e0 's fault. The following "fixes" it, but it's obvious that this has always been buggy and one bug has just compensated for another:

diff --git a/neo/renderer/Model_ase.cpp b/neo/renderer/Model_ase.cpp
index ac74dea..68bc9d3 100644
--- a/neo/renderer/Model_ase.cpp
+++ b/neo/renderer/Model_ase.cpp
@@ -729,7 +729,8 @@ static void ASE_KeyGEOMOBJECT( const char *token )
        else if ( !strcmp( token, "*MESH" ) )
        {
                ase.currentMesh = &ase.currentObject->mesh;
-               memset( ase.currentMesh, 0, sizeof( aseMesh_t ) );
+               // memset( ase.currentMesh, 0, sizeof( aseMesh_t ) );
+               memset( ase.currentMesh, 0, sizeof( ase.currentMesh ) );

                ASE_ParseBracedBlock( ASE_KeyMESH );
        }
andre-d commented 12 years ago

Does it work if that memset call it removed all together?

andre-d commented 12 years ago

I say this because I don’t understand why just the start being set to 0 makes it work as expected, but the whole thing not. Is the value defined before the memset?