Changeset 278


Ignore:
Timestamp:
Jan 24, 2011, 10:38:58 AM (10 years ago)
Author:
sam
Message:

Don't start the mash if the monster's X coordinate isn't right.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/monsterz/mash.cpp

    r274 r278  
    7878    case MashData::WAIT:
    7979    {
    80         int inplace = 1;
    81         for (int n = 0; n < data->npieces && inplace; n++)
     80        int allready = 1;
     81        for (int n = 0; n < data->npieces && allready; n++)
    8282        {
    8383            Int2 dest = data->pieces[n]->GetCell() * 48;
     
    8585
    8686            /* If piece is still too high, don't start the animation */
    87             if (cur.y - dest.y > 2)
    88                 inplace = 0;
     87            if (cur.y - dest.y > 2 || abs(cur.x - dest.x) > 2)
     88                allready = 0;
    8989        }
    9090
    91         if (inplace)
     91        if (allready)
    9292        {
    9393            for (int n = 0; n < data->npieces; n++)
Note: See TracChangeset for help on using the changeset viewer.