Lots of work on printbuffers

This commit is contained in:
2021-11-14 15:57:18 -05:00
parent c1c0b02926
commit f933f451ad
10 changed files with 229 additions and 108 deletions

View File

@@ -14,9 +14,11 @@ int64_t World::patch_actor(StreamBuffer *sb) {
s_actor = tangible_make(nullptr, actor_id, "", false);
s_actor->id_player_pool_.deserialize(sb);
s_actor->anim_queue_.deserialize(sb);
s_actor->print_buffer_.deserialize(sb);
} else {
s_actor->id_player_pool_.patch(sb);
s_actor->anim_queue_.patch(sb);
s_actor->print_buffer_.patch(sb);
}
s_actor->update_plane_item();
return actor_id;
@@ -35,9 +37,11 @@ void World::diff_actor(int64_t actor_id, World *master, StreamBuffer *xsb) {
if (s_actor == nullptr) {
m_actor->id_player_pool_.serialize(&tsb);
m_actor->anim_queue_.serialize(&tsb);
m_actor->print_buffer_.serialize(&tsb);
} else {
s_actor->id_player_pool_.diff(m_actor->id_player_pool_, &tsb);
s_actor->anim_queue_.diff(m_actor->anim_queue_, &tsb);
s_actor->print_buffer_.diff(m_actor->print_buffer_, &tsb);
}
// Forward to client, and apply to server-synchronous.