| Line | 
                Branch | 
                Exec | 
                Source | 
            
            
                | 1 | 
                
                 | 
                 | 
                /* | 
            
            
                | 2 | 
                
                 | 
                 | 
                ** EPITECH PROJECT, 2024 | 
            
            
                | 3 | 
                
                 | 
                 | 
                ** zappy | 
            
            
                | 4 | 
                
                 | 
                 | 
                ** File description: | 
            
            
                | 5 | 
                
                 | 
                 | 
                ** ppo.c | 
            
            
                | 6 | 
                
                 | 
                 | 
                */ | 
            
            
                | 7 | 
                
                 | 
                 | 
                 | 
            
            
                | 8 | 
                
                 | 
                 | 
                #include "server.h" | 
            
            
                | 9 | 
                
                 | 
                 | 
                 | 
            
            
                | 10 | 
                
                 | 
                1 | 
                void ppo(client_t *client, server_t *server) | 
            
            
                | 11 | 
                
                 | 
                 | 
                { | 
            
            
                | 12 | 
                
                 | 
                 | 
                    client_list_t *player; | 
            
            
                | 13 | 
                
                 | 
                 | 
                 | 
            
            
                | 14 | 
                
                    
                        1/2
                        
                            ✗ Branch 0 not taken. 
                            ✓ Branch 1 taken 1 times. 
                         
                     
                 | 
                1 | 
                    if (!client->commands[1]) { | 
            
            
                | 15 | 
                
                 | 
                ✗ | 
                        dprintf(client->fd, "sbp\n"); | 
            
            
                | 16 | 
                
                 | 
                ✗ | 
                        return; | 
            
            
                | 17 | 
                
                 | 
                 | 
                    } | 
            
            
                | 18 | 
                
                    
                        1/2
                        
                            ✓ Branch 0 taken 1 times. 
                            ✗ Branch 1 not taken. 
                         
                     
                 | 
                1 | 
                    TAILQ_FOREACH(player, &server->clients, entries) { | 
            
            
                | 19 | 
                
                    
                        1/2
                        
                            ✓ Branch 1 taken 1 times. 
                            ✗ Branch 2 not taken. 
                         
                     
                 | 
                1 | 
                        if (player->client->id == atoi(client->commands[1])) { | 
            
            
                | 20 | 
                
                 | 
                1 | 
                            dprintf(client->fd, "ppo %d %u %u %u\n", player->client->id, | 
            
            
                | 21 | 
                
                 | 
                1 | 
                                player->client->x, player->client->y, | 
            
            
                | 22 | 
                
                 | 
                1 | 
                                player->client->orientation); | 
            
            
                | 23 | 
                
                 | 
                1 | 
                            return; | 
            
            
                | 24 | 
                
                 | 
                 | 
                        } | 
            
            
                | 25 | 
                
                 | 
                 | 
                    } | 
            
            
                | 26 | 
                
                 | 
                ✗ | 
                    dprintf(client->fd, "sbp\n"); | 
            
            
                | 27 | 
                
                 | 
                 | 
                } | 
            
            
                | 28 | 
                
                 | 
                 | 
                 |