Tells the clients to ghost or unghost an object
| 8135 | |
| 8136 | // Tells the clients to ghost or unghost an object |
| 8137 | void MultiSendGhostObject(object *obj, bool ghost) { |
| 8138 | MULTI_ASSERT_NOMESSAGE(obj); |
| 8139 | |
| 8140 | int count = 0; |
| 8141 | uint16_t objnum; |
| 8142 | uint8_t data[MAX_GAME_DATA_SIZE]; |
| 8143 | int size_offset; |
| 8144 | |
| 8145 | size_offset = START_DATA(MP_GHOST_OBJECT, data, &count, 1); |
| 8146 | |
| 8147 | objnum = obj - Objects; |
| 8148 | |
| 8149 | MultiAddUshort(objnum, data, &count); |
| 8150 | MultiAddByte((ghost) ? 1 : 0, data, &count); |
| 8151 | |
| 8152 | END_DATA(count, data, size_offset); |
| 8153 | |
| 8154 | if (Netgame.local_role == LR_SERVER) |
| 8155 | MultiSendReliablyToAllExcept(Player_num, data, count, NETSEQ_OBJECTS, false); |
| 8156 | } |
| 8157 | |
| 8158 | void MultiDoGhostObject(uint8_t *data) { |
| 8159 | int count = 0; |
no test coverage detected