#ifndef WORLD_GATE_H
#define WORLD_GATE_H
+#include "skaterift.h"
#include "common.h"
#include "model.h"
#include "entity.h"
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);
world_global.sm_gate_marker[i] = *sm;
}
+ mdl_async_load_glmesh( &mgate, &world_global.mesh_gate );
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,
{
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->type == k_gate_type_nonlocel ){
+ if( skaterift.async_op == k_async_op_world_loading ||
+ skaterift.async_op == k_async_op_world_preloading ){
+ continue;
+ }
+ }
+
if( gate_intersect( gate, pos, last ) ){
return gate;
}