… | |
… | |
336 | memcpy (p->socket.faces_sent, ns->faces_sent, p->socket.faces_sent_len * sizeof (*p->socket.faces_sent)); |
336 | memcpy (p->socket.faces_sent, ns->faces_sent, p->socket.faces_sent_len * sizeof (*p->socket.faces_sent)); |
337 | /* Needed because the socket we just copied over needs to be cleared. |
337 | /* Needed because the socket we just copied over needs to be cleared. |
338 | * Note that this can result in a client reset if there is partial data |
338 | * Note that this can result in a client reset if there is partial data |
339 | * on the uncoming socket. |
339 | * on the uncoming socket. |
340 | */ |
340 | */ |
|
|
341 | //TODO socket copying is EVIL, do not do this |
341 | p->socket.inbuf.len = 0; |
342 | p->socket.inbuf_len = 0; |
342 | set_first_map (p->ob); |
343 | set_first_map (p->ob); |
343 | |
344 | |
344 | CLEAR_FLAG (p->ob, FLAG_FRIENDLY); |
345 | CLEAR_FLAG (p->ob, FLAG_FRIENDLY); |
345 | add_friendly_object (p->ob); |
346 | add_friendly_object (p->ob); |
346 | send_rules (p->ob); |
347 | send_rules (p->ob); |