Today ive made quite a few changes to the engine, the collision detection now works great, and ALOT faster, the new version showed a 40% - 50% increase in frame rate on my comp just coz I changed the collision. I'll upload the new version tonight.
Basiror: The texture has an alpha channel when I draw the crosshair I use alpha testing. Like this:
glPushMatrix(); glEnable(GL_ALPHA_TEST); glAlphaFunc(GL_LESS, 0.3f); glColor3f(1, 1, 1); OrthoMode(0, 0, width, height); glDisable(GL_DEPTH_TEST); glBindTexture(GL_TEXTURE_2D, crosshair.texID); glBegin(GL_QUADS); glTexCoord2f(0.0f, 1.0f); glVertex2i(0, 0); glTexCoord2f(0.0f, 0.0f); glVertex2i(0, height); glTexCoord2f(1.0f, 0.0f); glVertex2i(width, height); glTexCoord2f(1.0f, 1.0f); glVertex2i(width, 0); glEnd(); glEnable(GL_DEPTH_TEST); PerspectiveMode(); glColor3f(1, 1, 1); glDisable(GL_ALPHA_TEST); glPopMatrix();
The quad really covers the whole screen, from corner to corner but only the crosshair is drawn.
BGCJR: If you mean the bullets dont always kill the enemy, I know what the problem was, and it SHOULD be better. It was just the demon guys collision radius was too small. If thats not what you mean let me know.
CWIZO: Check "Program Log.txt" let me know what the last 3 or 4 lines say.
The crosshair doesnt move left or right on the screen yet. Im gonna add that when I change from MD2 models to MD3 and I can have the torso rotating without the legs doing the same.
Thanks guys. Let me know if you find any other bugs.
EDIT: The new version is uploading as I type.
Hyperdev
"To err is human, to really mess up requires a computer"
[edited by - Lukerd on July 4, 2003 8:06:05 PM]