MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / entitySectorKey

Method entitySectorKey

source/game/StarWorldStorage.cpp:464–470  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

462}
463
464ByteArray WorldStorage::entitySectorKey(Sector const& sector) {
465 DataStreamBuffer ds(5);
466 ds.write(StoreType::EntitySector);
467 ds.cwrite<uint16_t>(sector[0]);
468 ds.cwrite<uint16_t>(sector[1]);
469 return ds.takeData();
470}
471
472WorldStorage::EntitySectorStore WorldStorage::readEntitySector(ByteArray const& data) {
473 return DataStreamBuffer::deserialize<EntitySectorStore>(uncompressData(data));

Callers

nothing calls this directly

Calls 2

writeMethod · 0.45
takeDataMethod · 0.45

Tested by

no test coverage detected