Sends a powerup over to be evaluated on the client machine
| 1146 | |
| 1147 | // Sends a powerup over to be evaluated on the client machine |
| 1148 | void MultiSendMSafePowerup(msafe_struct *mstruct) { |
| 1149 | int sequence = -1; |
| 1150 | int to_slot = -1; |
| 1151 | |
| 1152 | // ASSERT (Netgame.local_role==LR_SERVER); |
| 1153 | |
| 1154 | uint8_t data[MAX_GAME_DATA_SIZE]; |
| 1155 | int count = 0; |
| 1156 | int size_offset; |
| 1157 | |
| 1158 | size_offset = START_DATA(MP_MSAFE_POWERUP, data, &count); |
| 1159 | |
| 1160 | mprintf(0, "Sending powerup objnum of %d\n", mstruct->objhandle & HANDLE_OBJNUM_MASK); |
| 1161 | MultiAddUshort(mstruct->objhandle & HANDLE_OBJNUM_MASK, data, &count); |
| 1162 | MultiAddUshort(mstruct->ithandle & HANDLE_OBJNUM_MASK, data, &count); |
| 1163 | |
| 1164 | // Close the packet |
| 1165 | END_DATA(count, data, size_offset); |
| 1166 | |
| 1167 | if (Demo_flags == DF_RECORDING) { |
| 1168 | DemoWritePowerup(data, count); |
| 1169 | } |
| 1170 | |
| 1171 | // Ok, send this out to our clients |
| 1172 | if ((Game_mode & GM_MULTI) && (Netgame.local_role == LR_SERVER)) |
| 1173 | MultiSendReliablyToAllExcept(Player_num, data, count, NETSEQ_OBJECTS, false); |
| 1174 | } |
no test coverage detected