The server says to damage a player, so do it!
| 2882 | |
| 2883 | // The server says to damage a player, so do it! |
| 2884 | void MultiDoDamagePlayer(uint8_t *data) { |
| 2885 | |
| 2886 | if (Netgame.local_role != LR_CLIENT) { |
| 2887 | Int3(); |
| 2888 | return; |
| 2889 | } |
| 2890 | |
| 2891 | int count = 0; |
| 2892 | |
| 2893 | SKIP_HEADER(data, &count); |
| 2894 | uint8_t slot = MultiGetByte(data, &count); |
| 2895 | uint8_t weapon_id = MultiGetByte(data, &count); |
| 2896 | uint8_t type = MultiGetByte(data, &count); |
| 2897 | float amount = MultiGetFloat(data, &count); |
| 2898 | |
| 2899 | ApplyDamageToPlayer(&Objects[Players[slot].objnum], NULL, type, amount, 1, weapon_id); |
| 2900 | } |
| 2901 | |
| 2902 | // Makes the passed in player a ghost |
| 2903 | void MultiMakePlayerGhost(int slot) { |
no test coverage detected