2 (c) 2010 Perttu Ahola <celeron55@gmail.com>
5 #ifndef CONSTANTS_HEADER
6 #define CONSTANTS_HEADER
8 #define DEBUGFILE "debug.txt"
10 // Define for simulating the quirks of sending through internet
11 // WARNING: This disables unit testing of socket and connection
12 #define INTERNET_SIMULATOR 0
14 #define CONNECTION_TIMEOUT 30
16 #define RESEND_TIMEOUT_MIN 0.333
17 #define RESEND_TIMEOUT_MAX 3.0
18 // resend_timeout = avg_rtt * this
19 #define RESEND_TIMEOUT_FACTOR 4
23 #define SERVERMAP_DELETE_UNUSED_SECTORS_TIMEOUT (60*10)
24 #define SERVER_MAP_SAVE_INTERVAL (60)
26 #define FOV_ANGLE (PI/2.5)
28 // The absolute working limit is (2^15 - viewing_range).
29 #define MAP_GENERATION_LIMIT (31000)
31 //#define MAX_SIMULTANEOUS_BLOCK_SENDS 2
33 #define FULL_BLOCK_SEND_ENABLE_MIN_TIME_FROM_BUILDING 2.0
34 //#define LIMITED_MAX_SIMULTANEOUS_BLOCK_SENDS 1
35 #define LIMITED_MAX_SIMULTANEOUS_BLOCK_SENDS 0
37 // Override for the previous one when distance is low
38 #define BLOCK_SEND_DISABLE_LIMITS_MAX_D 1
40 //#define MAX_SIMULTANEOUS_BLOCK_SENDS_SERVER_TOTAL 4
42 // Viewing range stuff
44 //#define HEIGHTMAP_RANGE_NODES 300
46 //#define FREETIME_RATIO 0.2
47 #define FREETIME_RATIO 0.15
49 // Sectors are split to SECTOR_HEIGHTMAP_SPLIT^2 heightmaps
50 #define SECTOR_HEIGHTMAP_SPLIT 2
52 #define PLAYER_INVENTORY_SIZE (8*4)
54 #define SIGN_TEXT_MAX_LENGTH 50
56 // The distance of how far objects will be sent to client
57 //#define ACTIVE_OBJECT_D_BLOCKS 2
59 // Wether to catch all std::exceptions.
60 // Assert will be called on such an event.
61 #define CATCH_UNHANDLED_EXCEPTIONS 1
64 Collecting active blocks is stopped after object data
67 #define MAX_OBJECTDATA_SIZE 450