last small hack for 4D effects... still does not work correctly and never will

This commit is contained in:
zicodxx 2006-10-14 12:43:50 +00:00
parent 92cc2a38a8
commit 194640c3c7
2 changed files with 4 additions and 25 deletions

View file

@ -1325,10 +1325,6 @@ int find_seg_side(segment *seg,short *verts,int notside)
}
}
#ifdef OGL
extern int wall_maybe_4d;
#endif
//find the two segments that join a given seg though two sides, and
//the sides of those segments the abut.
int find_joining_side_norms(vms_vector *norm0_0,vms_vector *norm0_1,vms_vector *norm1_0,vms_vector *norm1_1,vms_vector **pnt0,vms_vector **pnt1,segment *seg,int s0,int s1)
@ -1409,12 +1405,9 @@ int find_joining_side_norms(vms_vector *norm0_0,vms_vector *norm0_1,vms_vector *
#ifdef OGL
/* ZICO - experimental HACK
If edge_verts differ +/- 100 it's mostly an indication of overlapping rooms using the 4D effect. So we don't want GL_LEQUAL. So we set wall_maybe_4d causes GL_ALWAYS in wall.c if WALL_ILLUSION */
if (((edge_verts[0] - edge_verts[1] >= 100) || (edge_verts[0] - edge_verts[1] <= -100)))
{
wall_maybe_4d=1;
}
If edge_verts differ +/- 100 it's *mostly* an indication of overlapping rooms using the 4D effect. So we don't want GL_LEQUAL. Won't work always... */
if (((edge_verts[0] - edge_verts[1] >= 100) || (edge_verts[0] - edge_verts[1] <= -100)) && (seg0->sides[edgeside0].type==3))
glDepthFunc(GL_ALWAYS);
#endif
return 1;

View file

@ -147,9 +147,6 @@ static char rcsid[] = "$Id: wall.c,v 1.1.1.1 2006/03/17 19:44:01 zicodxx Exp $";
#include "newdemo.h"
#include "multi.h"
#include "gameseq.h"
#ifdef OGL
#include "ogl_init.h"
#endif
void kill_stuck_objects(int wallnum);
@ -174,9 +171,6 @@ int Num_open_doors; // Number of open doors
//#define BM_FLAG_TRANSPARENT 1
//#define BM_FLAG_SUPER_TRANSPARENT 2
#ifdef OGL
int wall_maybe_4d = 0;
#endif
#ifdef EDITOR
char Wall_names[7][10] = {
@ -247,10 +241,6 @@ int wall_is_doorway ( segment * seg, int side )
return WID_NO_WALL;
if (type == WALL_ILLUSION) {
#ifdef OGL
if(wall_maybe_4d)
glDepthFunc(GL_ALWAYS);
#endif
if (Walls[seg->sides[side].wall_num].flags & WALL_ILLUSION_OFF)
return WID_NO_WALL;
else {
@ -260,10 +250,6 @@ int wall_is_doorway ( segment * seg, int side )
return WID_ILLUSORY_WALL;
}
}
#ifdef OGL
else
wall_maybe_4d=0;
#endif
if (type == WALL_BLASTABLE) {
if (flags & WALL_BLASTED)
@ -525,7 +511,7 @@ void wall_open_door(segment *seg, int side)
w2 = &Walls[w->linked_wall];
seg2 = &Segments[w2->segnum];
Assert(w2->linked_wall == seg->sides[side].wall_num);
//Assert(w2->linked_wall == seg->sides[side].wall_num);
//Assert(!(w2->flags & WALL_DOOR_OPENING || w2->flags & WALL_DOOR_OPENED));
w2->state = WALL_DOOR_OPENING;