Blowup a building because the server told us so
| 4143 | |
| 4144 | // Blowup a building because the server told us so |
| 4145 | void MultiDoBlowupBuilding(uint8_t *data) { |
| 4146 | int count = 0; |
| 4147 | |
| 4148 | SKIP_HEADER(data, &count); |
| 4149 | |
| 4150 | uint16_t hit_objnum = MultiGetUshort(data, &count); |
| 4151 | uint16_t killer_objnum = MultiGetUshort(data, &count); |
| 4152 | uint16_t damage = MultiGetUshort(data, &count); |
| 4153 | uint16_t seed = MultiGetUshort(data, &count); |
| 4154 | |
| 4155 | if (Objects[hit_objnum].type != OBJ_BUILDING) { |
| 4156 | Int3(); // Get Jason, trying to blowup a non-building |
| 4157 | return; |
| 4158 | } |
| 4159 | |
| 4160 | ps_srand(seed); |
| 4161 | KillObject(&Objects[hit_objnum], &Objects[killer_objnum], damage); |
| 4162 | |
| 4163 | if (!Multi_building_states[hit_objnum]) { |
| 4164 | Multi_building_states[hit_objnum] = 1; |
| 4165 | Multi_num_buildings_changed++; |
| 4166 | } |
| 4167 | } |
| 4168 | |
| 4169 | // Server is telling us about buildings to get rid of |
| 4170 | void MultiDoBuilding(uint8_t *data) { |
no test coverage detected