mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Ctrl+C handling on POSIX, some commands for server and other tweaking
This commit is contained in:
parent
be7391c2b1
commit
d065bae323
13 changed files with 384 additions and 111 deletions
|
@ -1771,11 +1771,11 @@ void MapBlock::serialize(std::ostream &os, u8 version)
|
|||
// First byte
|
||||
u8 flags = 0;
|
||||
if(is_underground)
|
||||
flags |= 1;
|
||||
flags |= 0x01;
|
||||
if(m_day_night_differs)
|
||||
flags |= 2;
|
||||
flags |= 0x02;
|
||||
if(m_lighting_expired)
|
||||
flags |= 3;
|
||||
flags |= 0x04;
|
||||
os.write((char*)&flags, 1);
|
||||
|
||||
u32 nodecount = MAP_BLOCKSIZE*MAP_BLOCKSIZE*MAP_BLOCKSIZE;
|
||||
|
@ -1895,9 +1895,9 @@ void MapBlock::deSerialize(std::istream &is, u8 version)
|
|||
|
||||
u8 flags;
|
||||
is.read((char*)&flags, 1);
|
||||
is_underground = (flags & 1) ? true : false;
|
||||
m_day_night_differs = (flags & 2) ? true : false;
|
||||
m_lighting_expired = (flags & 3) ? true : false;
|
||||
is_underground = (flags & 0x01) ? true : false;
|
||||
m_day_night_differs = (flags & 0x02) ? true : false;
|
||||
m_lighting_expired = (flags & 0x04) ? true : false;
|
||||
|
||||
// Uncompress data
|
||||
std::ostringstream os(std::ios_base::binary);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue