From: hgn Date: Tue, 11 Apr 2023 19:39:11 +0000 (+0100) Subject: small bugs X-Git-Url: https://harrygodden.com/git/?a=commitdiff_plain;h=249fe329869e43961d4e1d4e44f08c6225e195c7;p=carveJwlIkooP6JGAAIwe30JlM.git small bugs --- diff --git a/blender_export.py b/blender_export.py index f9b225d..eed99af 100644 --- a/blender_export.py +++ b/blender_export.py @@ -2041,7 +2041,7 @@ class SR_OT_ROUTE_LIST_DEL_ITEM(bpy.types.Operator): @classmethod def poll(cls, context):#{ active_object = context.active_object - if obj_ent_type(active_object) == 'ent_gate':#{ + if obj_ent_type(active_object) == 'ent_route':#{ return active_object.SR_data.ent_route[0].gates #} else: return False diff --git a/maps_src/mp_mtzero.mdl b/maps_src/mp_mtzero.mdl index 29b4aff..4eb90fc 100644 Binary files a/maps_src/mp_mtzero.mdl and b/maps_src/mp_mtzero.mdl differ diff --git a/skaterift.c b/skaterift.c index 8b909d2..1d8e564 100644 --- a/skaterift.c +++ b/skaterift.c @@ -246,8 +246,8 @@ VG_STATIC void vg_load(void) /* 'systems' are completely loaded now */ /* load home world */ - world_load( &world_global.worlds[0], "maps/mp_gridmap.mdl" ); - //world_load( &world_global.worlds[0], "maps/mp_mtzero.mdl" ); + //world_load( &world_global.worlds[0], "maps/mp_gridmap.mdl" ); + world_load( &world_global.worlds[0], "maps/mp_mtzero.mdl" ); #if 0 world_load( &world_global.worlds[1], "maps/mp_gridmap.mdl" ); diff --git a/world_routes.h b/world_routes.h index e47ebe2..df758da 100644 --- a/world_routes.h +++ b/world_routes.h @@ -84,13 +84,17 @@ VG_STATIC void world_routes_time_lap( world_instance *world, ent_route *route ) u32 valid_count=0; for( u32 i=0; icheckpoints_count; i++ ){ - u32 cpid = route->checkpoints_start+(i+route->active_checkpoint); - cpid = cpid % route->checkpoints_count; + u32 cpid = (i+route->active_checkpoint) % route->checkpoints_count; + cpid += route->checkpoints_start; ent_checkpoint *cp = mdl_arritm( &world->ent_checkpoint, cpid ); ent_gate *rg = mdl_arritm( &world->ent_gate, cp->gate_index ); rg = mdl_arritm( &world->ent_gate, rg->target ); + if( i == 1 ){ + route->timing_base = rg->timing_time; + } + if( i == 0 ) start_time = rg->timing_time; else{ @@ -99,10 +103,16 @@ VG_STATIC void world_routes_time_lap( world_instance *world, ent_route *route ) } last_version = rg->timing_version; - vg_info( "%u %f\n", rg->timing_version, rg->timing_time ); + vg_info( "%u %f\n", rg, rg->timing_version, rg->timing_time ); } - if( world_global.current_run_version == last_version+1 ) valid_count ++; + if( world_global.current_run_version == last_version+1 ){ + valid_count ++; + + if( route->checkpoints_count == 1 ){ + route->timing_base = world_global.time; + } + } else valid_count = 0; vg_info( "%u %f\n", world_global.current_run_version, world_global.time ); @@ -113,7 +123,6 @@ VG_STATIC void world_routes_time_lap( world_instance *world, ent_route *route ) } route->valid_checkpoints = valid_count+1; - route->timing_base = start_time; vg_info( "valid: %u\n", valid_count ); vg_info( "----------------------------\n" );