Fix blank animqueues, and add facing=math.auto to animate

This commit is contained in:
2024-03-12 11:46:48 -04:00
parent 044bb89edf
commit 357e3766fb
9 changed files with 147 additions and 42 deletions

View File

@@ -234,12 +234,11 @@ void World::get_near(int64_t player_id, float radius, bool exclude_nowhere, bool
}
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 == nullptr) {
into[i] = empty;
into[i] = AnimQueue::get_encoded_blank_queue();
} else {
into[i] = tan->anim_queue_.get_encoded_queue();
}
@@ -1191,6 +1190,7 @@ void World::rollback() {
//
void engine_initialization() {
SourceDB::register_lua_builtins();
AnimQueue::initialize_module();
}
static DrivenEngineInitializerReg eireg(engine_initialization);