Code: Show/Hide local void PlayerAction (Player *p, int action, Arena *arena) { if (action == PA_ENTERGAME) //Also crashes with PA_ENTERARENA { playerData* pdata = PPDATA(p, playerKey); //No crash if commented out pdata->blah = -1; } } |
Code: Show/Hide local void PlayerAction (Player *p, int action, Arena *arena)
{ if (p->action == PA_ENTERGAME) { playerData* pdata = PPDATA(p, playerKey); //No crash if commented out pdata->blah = -1; } } |
Code: Show/Hide local void PlayerAction (Player *p, int action, Arena *arena) { if (!p->arena || p->arena != arena || playerKey == -1) return; //Added, kind of an overkill if (action == PA_ENTERGAME) { playerData* pdata = PPDATA(p, playerKey); if (!pdata) return; //Added pdata->oldShip = -1; } } |