projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
imgui stuff
[carveJwlIkooP6JGAAIwe30JlM.git]
/
world_gate.h
diff --git
a/world_gate.h
b/world_gate.h
index ad87ed1d106cdf8c484071c3fc1603805ddc8a55..469f73695e7da46489e08a2f3b6dc8a93e67b306 100644
(file)
--- a/
world_gate.h
+++ b/
world_gate.h
@@
-27,8
+27,8
@@
VG_STATIC void gate_transform_update( ent_gate *gate )
v3_copy( gate->co[1], recv_to_world[3] );
m4x3_mul( recv_to_world, to_local, gate->transport );
v3_copy( gate->co[1], recv_to_world[3] );
m4x3_mul( recv_to_world, to_local, gate->transport );
- m
4x3_scalev
( gate->to_world, (v3f){ gate->dimensions[0],
-
gate->dimensions[1], 1.0f } );
+ m
3x3_scale
( gate->to_world, (v3f){ gate->dimensions[0],
+ gate->dimensions[1], 1.0f } );
}
VG_STATIC void world_gates_init(void)
}
VG_STATIC void world_gates_init(void)
@@
-42,7
+42,6
@@
VG_STATIC void world_gates_init(void)
mdl_context mgate;
mdl_open( &mgate, "models/rs_gate.mdl", vg_mem.scratch );
mdl_load_metadata_block( &mgate, vg_mem.scratch );
mdl_context mgate;
mdl_open( &mgate, "models/rs_gate.mdl", vg_mem.scratch );
mdl_load_metadata_block( &mgate, vg_mem.scratch );
- mdl_load_mesh_block( &mgate, vg_mem.scratch );
mdl_mesh *surface = mdl_find_mesh( &mgate, "rs_gate" );
mdl_submesh *sm = mdl_arritm(&mgate.submeshs,surface->submesh_start);
mdl_mesh *surface = mdl_find_mesh( &mgate, "rs_gate" );
mdl_submesh *sm = mdl_arritm(&mgate.submeshs,surface->submesh_start);
@@
-57,13
+56,8
@@
VG_STATIC void world_gates_init(void)
world_global.sm_gate_marker[i] = *sm;
}
world_global.sm_gate_marker[i] = *sm;
}
+ mdl_async_load_glmesh( &mgate, &world_global.mesh_gate );
mdl_close( &mgate );
mdl_close( &mgate );
-
- vg_acquire_thread_sync();
- {
- mdl_unpack_glmesh( &mgate, &world_global.mesh_gate );
- }
- vg_release_thread_sync();
}
VG_STATIC int render_gate( world_instance *world_inside,
}
VG_STATIC int render_gate( world_instance *world_inside,
@@
-231,7
+225,8
@@
VG_STATIC ent_gate *world_intersect_gates( world_instance *world,
{
for( u32 i=0; i<mdl_arrcount(&world->ent_gate); i++ ){
ent_gate *gate = mdl_arritm( &world->ent_gate, i );
{
for( u32 i=0; i<mdl_arrcount(&world->ent_gate); i++ ){
ent_gate *gate = mdl_arritm( &world->ent_gate, i );
- if( gate->type == k_gate_type_unlinked )
+ if( gate->type == k_gate_type_unlinked ||
+ gate->type == k_gate_type_nonlocal_unlinked )
continue;
if( gate_intersect( gate, pos, last ) ){
continue;
if( gate_intersect( gate, pos, last ) ){