| 6772 | } |
| 6773 | |
| 6774 | void MultiDoRobotExplode(uint8_t *data) { |
| 6775 | int count = 0; |
| 6776 | float damage, delay; |
| 6777 | uint16_t hit_objnum, killer_objnum, seed; |
| 6778 | int death_flags; |
| 6779 | |
| 6780 | MULTI_ASSERT_NOMESSAGE(Netgame.local_role != LR_SERVER); |
| 6781 | |
| 6782 | SKIP_HEADER(data, &count); |
| 6783 | hit_objnum = Server_object_list[MultiGetUshort(data, &count)]; |
| 6784 | |
| 6785 | if (hit_objnum == 65535) { |
| 6786 | mprintf(0, "Bad hit_objnum(%d) MultiDoRobotExplode\n", hit_objnum); |
| 6787 | ASSERT(1); |
| 6788 | return; |
| 6789 | } |
| 6790 | |
| 6791 | killer_objnum = MultiGetUshort(data, &count); |
| 6792 | |
| 6793 | if (killer_objnum != 65535) { |
| 6794 | killer_objnum = Server_object_list[killer_objnum]; |
| 6795 | |
| 6796 | if (killer_objnum == 65535) { |
| 6797 | mprintf(0, "Bad killer_objnum(%d) in MultiDoRobotExplode()\n", killer_objnum); |
| 6798 | } |
| 6799 | } |
| 6800 | |
| 6801 | damage = MultiGetFloat(data, &count); |
| 6802 | death_flags = MultiGetInt(data, &count); |
| 6803 | delay = MultiGetFloat(data, &count); |
| 6804 | seed = MultiGetUshort(data, &count); |
| 6805 | if (killer_objnum != 65535) { |
| 6806 | if ((Objects[killer_objnum].type != OBJ_NONE) && (Objects[hit_objnum].type != OBJ_NONE)) { |
| 6807 | Objects[hit_objnum].flags |= OF_SERVER_SAYS_DELETE; |
| 6808 | ps_srand(seed); |
| 6809 | KillObject(&Objects[hit_objnum], &Objects[killer_objnum], damage, death_flags, delay); |
| 6810 | } |
| 6811 | } else { |
| 6812 | if ((Objects[hit_objnum].type != OBJ_NONE)) { |
| 6813 | Objects[hit_objnum].flags |= OF_SERVER_SAYS_DELETE; |
| 6814 | ps_srand(seed); |
| 6815 | KillObject(&Objects[hit_objnum], NULL, damage, death_flags, delay); |
| 6816 | } |
| 6817 | } |
| 6818 | } |
| 6819 | |
| 6820 | void MultiSendDamageObject(object *hit_obj, object *killer, float damage, int weaponid) { |
| 6821 | int size; |
no test coverage detected