SQC-15_online #1

Merged
memartel merged 349 commits from SQC-15_online into master 2023-12-10 17:41:26 -05:00
Showing only changes of commit 312542857a - Show all commits

View File

@@ -90,14 +90,14 @@ void netprot::Serialize(Output* out, char* buf[], uint32_t* buflen) {
States states = out->states; States states = out->states;
uint8_t states8 = uint8_t states8 =
states.jumping & 0b10000000 | (states.jumping? 0b10000000: 0) |
states.shooting & 0b01000000 | (states.shooting? 0b01000000: 0) |
states.hit & 0b00100000 | (states.hit? 0b00100000: 0) |
states.powerup & 0b00010000 | (states.powerup? 0b00010000: 0) |
states.dead & 0b00001000 | (states.dead? 0b00001000: 0) |
states.still & 0b00000100 | (states.still? 0b00000100: 0) |
states.jumpshot & 0b00000010 | (states.jumpshot? 0b00000010: 0) |
states.running & 0b00000001; (states.running? 0b00000001: 0);
memcpy(*buf + sizeof(uint64_t) * 2 + 1, &states8, sizeof(uint8_t)); memcpy(*buf + sizeof(uint64_t) * 2 + 1, &states8, sizeof(uint8_t));