Resolves a powerup that the server is telling us about
| 1123 | |
| 1124 | // Resolves a powerup that the server is telling us about |
| 1125 | void MultiDoMSafePowerup(uint8_t *data) { |
| 1126 | int count = 0; |
| 1127 | msafe_struct base_mstruct; |
| 1128 | msafe_struct *mstruct = &base_mstruct; |
| 1129 | |
| 1130 | SKIP_HEADER(data, &count); |
| 1131 | int objnum = MultiGetUshort(data, &count); |
| 1132 | |
| 1133 | mstruct->objhandle = VerifyMSafeObject(objnum); |
| 1134 | |
| 1135 | objnum = MultiGetUshort(data, &count); |
| 1136 | mstruct->ithandle = VerifyMSafeObject(objnum); |
| 1137 | |
| 1138 | ASSERT(mstruct->objhandle != -1 && mstruct->ithandle != -1); |
| 1139 | if (mstruct->objhandle == -1 || mstruct->ithandle == -1) |
| 1140 | return; |
| 1141 | object *op = ObjGet(mstruct->objhandle); |
| 1142 | ASSERT(op); |
| 1143 | if (op && (op->type != OBJ_NONE)) |
| 1144 | msafe_DoPowerup(mstruct); |
| 1145 | } |
| 1146 | |
| 1147 | // Sends a powerup over to be evaluated on the client machine |
| 1148 | void MultiSendMSafePowerup(msafe_struct *mstruct) { |
no test coverage detected