diff options
author | megamage <none@none> | 2008-12-09 12:24:53 -0600 |
---|---|---|
committer | megamage <none@none> | 2008-12-09 12:24:53 -0600 |
commit | 2f1b3f48c71b62bfbc8cf5b499be8b8456190789 (patch) | |
tree | 73ed51bee434f8d9be819479ef3caded6b3928a9 /src | |
parent | a8a3d38cbb30b0e8f3974834947a4a8a43236859 (diff) |
*Allow user to choose cell size. If there are many players, or the hardware of server is not good enough, you should comment the line "#define LARGE_CELL" in GridDefines.h otherwise you may experience high CPU usage and high lag.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/GridDefines.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/game/GridDefines.h b/src/game/GridDefines.h index 54dd2d02920..6001e366212 100644 --- a/src/game/GridDefines.h +++ b/src/game/GridDefines.h @@ -33,6 +33,17 @@ class GameObject; class Pet; class Player; +//comment the next line if CPU usage is too high +#define LARGE_CELL + +#ifdef LARGE_CELL +#define MAX_NUMBER_OF_CELLS 4 +#define CENTER_GRID_CELL_ID 128 +#else +#define MAX_NUMBER_OF_CELLS 8 +#define CENTER_GRID_CELL_ID 256 +#endif + #define MAX_NUMBER_OF_GRIDS 64 #define SIZE_OF_GRIDS 533.33333f @@ -43,10 +54,8 @@ class Player; #define MIN_GRID_DELAY MINUTE*1000 #define MIN_MAP_UPDATE_DELAY 50 -#define MAX_NUMBER_OF_CELLS 4 #define SIZE_OF_GRID_CELL (SIZE_OF_GRIDS/MAX_NUMBER_OF_CELLS) -#define CENTER_GRID_CELL_ID 128 #define CENTER_GRID_CELL_OFFSET (SIZE_OF_GRID_CELL/2) #define TOTAL_NUMBER_OF_CELLS_PER_MAP (MAX_NUMBER_OF_GRIDS*MAX_NUMBER_OF_CELLS) |