cubemaps
[carveJwlIkooP6JGAAIwe30JlM.git] / world_routes.c
index 26261a1ed72cc56e4658827dbf83af118e24b1c6..bd91b3c441bb41392593300ae87cb5f03c67aadf 100644 (file)
@@ -1109,12 +1109,15 @@ VG_STATIC void world_routes_update_timer_texts( world_instance *world )
             positions[0][1] = h1;
          }
 
-         m3x3_copy( gate->to_world, text->transform );
+         m4x3f mmdl;
+         ent_gate_get_mdl_mtx( gate, mmdl );
+
+         m3x3_copy( mmdl, text->transform );
          float ratio = v3_length(text->transform[0]) / 
                         v3_length(text->transform[1]);
 
          m3x3_scale( text->transform, (v3f){ size, size*ratio, 0.1f } );
-         m4x3_mulv( gate->to_world, positions[j], text->transform[3] );
+         m4x3_mulv( mmdl, positions[j], text->transform[3] );
       }
    }
 }
@@ -1304,7 +1307,10 @@ VG_STATIC void render_world_routes( world_instance *world, camera *cam,
 
          ent_checkpoint *cp = mdl_arritm( &world->ent_checkpoint, next );
          ent_gate *gate = mdl_arritm( &world->ent_gate, cp->gate_index );
-         shader_model_gate_uMdl( gate->to_world );
+
+         m4x3f mmdl;
+         ent_gate_get_mdl_mtx( gate, mmdl );
+         shader_model_gate_uMdl( mmdl );
 
          for( u32 j=0; j<4; j++ ){
             if( gate->routes[j] == i ){