Overhaul animation queues so the queue is stored as a single encoded string.
This commit is contained in:
@@ -227,24 +227,19 @@ void World::get_near(int64_t player_id, float radius, bool exclude_nowhere, bool
|
||||
get_near(scan, into);
|
||||
}
|
||||
|
||||
void World::get_animation_queue_hashes(uint32_t count, const int64_t *ids, uint64_t *hashes) {
|
||||
void World::get_encoded_animation_queues(uint32_t count, const int64_t *ids, util::SharedStdStringVec &into) {
|
||||
util::SharedStdString empty = std::make_shared<std::string>("");
|
||||
into.resize(count);
|
||||
for (int i = 0; i < int(count); i++) {
|
||||
Tangible *tan = tangible_get(ids[i]);
|
||||
if (tan == 0) {
|
||||
hashes[i] = 0;
|
||||
if (tan == nullptr) {
|
||||
into[i] = empty;
|
||||
} else {
|
||||
hashes[i] = tan->anim_queue_.get_final_hash();
|
||||
into[i] = tan->anim_queue_.get_encoded_queue();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void World::get_animation_queue(int64_t tanid, std::vector<EngineWrapper::AnimEntry> *into) {
|
||||
Tangible *tan = tangible_get(tanid);
|
||||
if (tan != nullptr) {
|
||||
tan->anim_queue_.get_for_engine_wrapper(into);
|
||||
}
|
||||
}
|
||||
|
||||
World::Redirects World::fetch_redirects() {
|
||||
World::Redirects result = std::move(redirects_);
|
||||
redirects_.clear();
|
||||
|
||||
Reference in New Issue
Block a user