Changeset 694c3d2 in network-game for server


Ignore:
Timestamp:
Jun 23, 2013, 5:45:05 PM (11 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
f3cf1a5
Parents:
147f662
Message:

The server now does bounds checking on player movement based on the actual map size instead of hard-coded values

File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/server.cpp

    r147f662 r694c3d2  
    710710         {
    711711            // we need to make sure the player can move here
    712             if (0 <= x && x < 300 && 0 <= y && y < 300 &&
     712            if (0 <= x && x < gameMap->width*25 && 0 <= y && y < gameMap->height*25 &&
    713713               gameMap->getElement(x/25, y/25) == WorldMap::TERRAIN_GRASS)
    714714            {
Note: See TracChangeset for help on using the changeset viewer.