Ignore:
Timestamp:
Jan 24, 2011, 2:45:36 AM (10 years ago)
Author:
sam
Message:

Implement above/below pieces.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/monsterz/mash.cpp

    r266 r274  
    106106        {
    107107            for (int n = 0; n < data->npieces; n++)
     108            {
     109                /* Remove links for this piece */
     110                Piece *above = data->pieces[n]->GetAbove();
     111                Piece *below = data->pieces[n]->GetBelow();
     112                data->pieces[n]->SetAbove(NULL);
     113                data->pieces[n]->SetBelow(NULL);
     114                /* If there is a new link to create, create it */
     115                if (above && below)
     116                    above->SetBelow(below);
     117                /* Give away references to this piece */
    108118                Ticker::Unref(data->pieces[n]);
     119            }
    109120            data->npieces = 0;
    110121            data->state = MashData::DEAD;
Note: See TracChangeset for help on using the changeset viewer.