projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
loadsa work
[carveJwlIkooP6JGAAIwe30JlM.git]
/
gate.h
diff --git
a/gate.h
b/gate.h
index 3151878f25a4f7625c41bb0fe7d7bbe357effdf4..eb0f335782b0ff367c2d1685548a4263e24cf494 100644
(file)
--- a/
gate.h
+++ b/
gate.h
@@
-62,8
+62,8
@@
static void gate_init(void)
{
fb_init( &grender.fb );
{
fb_init( &grender.fb );
- m
odel *mgate = vg_asset_re
ad( "models/rs_gate.mdl" );
- m
odel_unpack
( mgate, &grender.mdl );
+ m
dl_header *mgate = mdl_lo
ad( "models/rs_gate.mdl" );
+ m
dl_unpack_glmesh
( mgate, &grender.mdl );
free( mgate );
}
free( mgate );
}
@@
-72,7
+72,7
@@
static void gate_fb_resize(void)
fb_resize( &grender.fb );
}
fb_resize( &grender.fb );
}
-static
void
render_gate( teleport_gate *gate, m4x3f camera )
+static
int
render_gate( teleport_gate *gate, m4x3f camera )
{
v3f viewpos, viewdir, gatedir;
v3_copy( camera[3], viewpos );
{
v3f viewpos, viewdir, gatedir;
v3_copy( camera[3], viewpos );
@@
-82,10
+82,10
@@
static void render_gate( teleport_gate *gate, m4x3f camera )
v3f v0;
v3_sub( viewpos, gate->co[0], v0 );
if( v3_dot(v0, gatedir) >= 0.0f )
v3f v0;
v3_sub( viewpos, gate->co[0], v0 );
if( v3_dot(v0, gatedir) >= 0.0f )
- return;
+ return
0
;
if( v3_dist( viewpos, gate->co[0] ) > 100.0f )
if( v3_dist( viewpos, gate->co[0] ) > 100.0f )
- return;
+ return
0
;
v3f a,b,c,d;
v3f a,b,c,d;
@@
-214,6
+214,8
@@
static void render_gate( teleport_gate *gate, m4x3f camera )
glStencilFunc( GL_ALWAYS, 1, 0xFF );
glDisable( GL_STENCIL_TEST );
}
glStencilFunc( GL_ALWAYS, 1, 0xFF );
glDisable( GL_STENCIL_TEST );
}
+
+ return 1;
}
static int gate_intersect( teleport_gate *gate, v3f pos, v3f last )
}
static int gate_intersect( teleport_gate *gate, v3f pos, v3f last )