~ubuntu-branches/ubuntu/quantal/warzone2100/quantal

« back to all changes in this revision

Viewing changes to src/map.c

  • Committer: Bazaar Package Importer
  • Author(s): Paul Wise
  • Date: 2011-05-21 16:31:49 UTC
  • mfrom: (1.1.18 upstream) (2.1.17 sid)
  • Revision ID: james.westby@ubuntu.com-20110521163149-oj2qkd97z0b14lqz
Tags: 2.3.8-1
* New upstream release
  - Refresh miniupnpc removal patch
  - Build and install new upstream docs
* Complies with latest policy, bump Standards-Version

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
        This file is part of Warzone 2100.
3
3
        Copyright (C) 1999-2004  Eidos Interactive
4
 
        Copyright (C) 2005-2010  Warzone 2100 Project
 
4
        Copyright (C) 2005-2011  Warzone 2100 Project
5
5
 
6
6
        Warzone 2100 is free software; you can redistribute it and/or modify
7
7
        it under the terms of the GNU General Public License as published by
587
587
                        tileY = map_coord(psObj->pos.y),
588
588
                        tileYOffset1 = (tileY * mapWidth),
589
589
                        tileYOffset2 = ((tileY+1) * mapWidth),
590
 
                        h1 = psMapTiles[MIN(mapWidth * mapHeight, tileYOffset1 + tileX)    ].height * ELEVATION_SCALE,
591
 
                        h2 = psMapTiles[MIN(mapWidth * mapHeight, tileYOffset1 + tileX + 1)].height * ELEVATION_SCALE,
592
 
                        h3 = psMapTiles[MIN(mapWidth * mapHeight, tileYOffset2 + tileX)    ].height * ELEVATION_SCALE,
593
 
                        h4 = psMapTiles[MIN(mapWidth * mapHeight, tileYOffset2 + tileX + 1)].height * ELEVATION_SCALE;
 
590
                        h1 = psMapTiles[MIN(mapWidth * mapHeight, tileYOffset1 + tileX)    ].height,
 
591
                        h2 = psMapTiles[MIN(mapWidth * mapHeight, tileYOffset1 + tileX + 1)].height,
 
592
                        h3 = psMapTiles[MIN(mapWidth * mapHeight, tileYOffset2 + tileX)    ].height,
 
593
                        h4 = psMapTiles[MIN(mapWidth * mapHeight, tileYOffset2 + tileX + 1)].height;
594
594
 
595
595
        /* trivial test above */
596
596
        if ( (psObj->pos.z > h1) && (psObj->pos.z > h2) &&