Add drv_get_aniamtion_queue hashes

This commit is contained in:
2023-07-24 17:20:45 -04:00
parent 87aa47b96d
commit 5db04b3abc
6 changed files with 53 additions and 13 deletions

View File

@@ -414,6 +414,7 @@ uint64_t DrivenEngine::drv_get_actor_id() const {
}
void DrivenEngine::drv_get_tangibles_near(uint64_t tanid, double rx, double ry, double rz, uint32_t *count, int64_t **ids) {
uint32_t hash1 = eng::memhash();
scan_result_.clear();
if ((visible_world_ != 0) && (tanid != 0)) {
PlaneScan scan;
@@ -430,8 +431,19 @@ void DrivenEngine::drv_get_tangibles_near(uint64_t tanid, double rx, double ry,
} else {
*ids = nullptr;
}
uint32_t hash2 = eng::memhash();
assert(hash1 == hash2);
}
void DrivenEngine::drv_get_animation_queue_hashes(uint32_t count, const int64_t *ids, uint64_t *hashes) {
if (visible_world_ == 0) {
for (int i = 0; i < int(count); i++) {
hashes[i] = 0;
}
} else {
visible_world_->get_animation_queue_hashes(count, ids, hashes);
}
}
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
@@ -562,6 +574,9 @@ static void drv_get_tangibles_near(EngineWrapper *w, uint64_t tanid, double rx,
return w->engine->drv_get_tangibles_near(tanid, rx, ry, rz, count, ids);
}
static void drv_get_animation_queue_hashes(EngineWrapper *w, uint32_t count, const int64_t *ids, uint64_t *hashes) {
return w->engine->drv_get_animation_queue_hashes(count, ids, hashes);
}
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
@@ -959,6 +974,7 @@ static void init_engine_wrapper_helper(EngineWrapper *w) {
w->get_stop_driver = drv_get_stop_driver;
w->get_actor_id = drv_get_actor_id;
w->get_tangibles_near = drv_get_tangibles_near;
w->get_animation_queue_hashes = drv_get_animation_queue_hashes;
w->play_initialize = play_initialize;
w->play_clear_new_outgoing = play_clear_new_outgoing;