Client is saying that he's entering the game Server only
| 2805 | // Client is saying that he's entering the game |
| 2806 | // Server only |
| 2807 | void MultiDoEnteringGame(uint8_t *data) { |
| 2808 | int count = 0; |
| 2809 | |
| 2810 | // Skip header stuff |
| 2811 | SKIP_HEADER(data, &count); |
| 2812 | |
| 2813 | uint8_t slot = MultiGetByte(data, &count); |
| 2814 | |
| 2815 | if (!(NetPlayers[slot].flags & NPF_CONNECTED)) { |
| 2816 | Int3(); // Get Jason |
| 2817 | return; |
| 2818 | } |
| 2819 | |
| 2820 | mprintf(0, "Client %d (%s) entering game.\n", slot, Players[slot].callsign); |
| 2821 | |
| 2822 | MultiSendPlayerEnteredGame(slot); |
| 2823 | |
| 2824 | // send the player the audio taunt delay time |
| 2825 | MultiSetAudioTauntTime(taunt_DelayTime(), slot); |
| 2826 | |
| 2827 | Level_goals.MultiSendChangedGoals(slot); |
| 2828 | |
| 2829 | // add his guidebot (if it is a guidebot game) |
| 2830 | // NOTE: It is possible that DMFC may InitPlayerNewShip after this |
| 2831 | // so it is placed as a precaution in their also |
| 2832 | if (Netgame.flags & NF_ALLOWGUIDEBOT) { |
| 2833 | if ((!Players[slot].inventory.CheckItem(OBJ_ROBOT, ROBOT_GUIDEBOT)) && |
| 2834 | (ObjGet(Buddy_handle[slot])->type != OBJ_ROBOT)) |
| 2835 | Players[slot].inventory.Add(OBJ_ROBOT, ROBOT_GUIDEBOT); |
| 2836 | } |
| 2837 | |
| 2838 | DLLInfo.me_handle = Objects[Players[slot].objnum].handle; |
| 2839 | DLLInfo.it_handle = Objects[Players[slot].objnum].handle; |
| 2840 | CallGameDLL(EVT_GAMEPLAYERENTERSGAME, &DLLInfo); |
| 2841 | |
| 2842 | // Clear vis info |
| 2843 | for (int i = 0; i < MAX_OBJECTS; i++) { |
| 2844 | Objects[i].generic_nonvis_flags &= ~(1 << slot); |
| 2845 | Objects[i].generic_sent_nonvis &= ~(1 << slot); |
| 2846 | } |
| 2847 | } |
| 2848 | |
| 2849 | // Tell the server I'm entering the game |
| 2850 | void MultiSendEnteringGame() { |
no test coverage detected