Skip to content

Commit

Permalink
fix #84
Browse files Browse the repository at this point in the history
  • Loading branch information
tmori committed Dec 28, 2024
1 parent d5e948e commit 411aa42
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/assets/src/hako_asset_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,15 +317,16 @@ static bool hako_asset_impl_execute(void)
return false;
}
hako_time_t world_time = hako_asset_instance.hako_asset->get_worldtime();
if (hako_asset_instance.current_usec >= world_time) {
hako_time_t next_time = hako_asset_instance.current_usec + hako_asset_instance.delta_usec;
if (next_time > world_time) {
return false;
}
if (hako_asset_instance.callback != NULL) {
if (hako_asset_instance.callback->on_simulation_step != NULL) {
hako_asset_instance.callback->on_simulation_step(nullptr);
}
}
hako_asset_instance.current_usec += hako_asset_instance.delta_usec;
hako_asset_instance.current_usec = next_time;
//std::cout << "# current_usec = " << hako_asset_instance.current_usec << std::endl;
#ifdef ENABLE_HAKO_TIME_MEASURE
//write csv
Expand Down

0 comments on commit 411aa42

Please sign in to comment.