gbersac / zappy_42

Multiplayer game in c.
0 stars 0 forks source link

serveur->gfx commands #6

Closed gbersac closed 8 years ago

gbersac commented 8 years ago
mdebelle commented 8 years ago

suggestion pour la commande "sst nb"

int     gfx_sst(t_env *env, t_fd *fd, char *cmd)
{
    char    *to_send;

    env->map.time_d = ft_atoi(ft_strrchr(cmd, ' '));
    to_send = (char*)malloc(4);
    asprintf(&to_send, "sgt %d\n", env->map.time_d);
    send_cmd_to_client(fd, to_send);
    return (1);
}