Code: Show/Hide game.c
======= local void PAttach(Player *p, byte *pkt2, int len) { int pid2 = ((struct SimplePacket*)pkt2)->d1; Arena *arena = p->arena; if (len != 3) { lm->LogP(L_MALICIOUS, "game", p, "bad attach req packet len=%i", len); return; } if (p->status != S_PLAYING || !arena) return; if (pid2 == -1) { Player *to = pd->PidToPlayer(pid2); if (!to || to->status != S_PLAYING || to == p || p->arena != to->arena || p->p_freq != to->p_freq) { lm->LogP(L_MALICIOUS, "game", p, "tried to attach to bad pid %d", pid2); return; } <snip> } |
Quote: |
if (pid2 == -1) |
Quote: |
if (pid2 == -1 && p->p_attached != -1) |
CypherJF wrote: |
table is farked up :/ |