Windows bug fixes
[oweals/minetest.git] / src / constants.h
1 /*
2 (c) 2010 Perttu Ahola <celeron55@gmail.com>
3 */
4
5 #ifndef CONSTANTS_HEADER
6 #define CONSTANTS_HEADER
7
8 #define DEBUGFILE "debug.txt"
9
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
13
14 #define CONNECTION_TIMEOUT 30
15
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
20
21 #define PI 3.14159
22
23 #define SERVERMAP_DELETE_UNUSED_SECTORS_TIMEOUT (60*10)
24 #define SERVER_MAP_SAVE_INTERVAL (60)
25
26 #define FOV_ANGLE (PI/2.5)
27
28 // The absolute working limit is (2^15 - viewing_range).
29 #define MAP_GENERATION_LIMIT (31000)
30
31 //#define MAX_SIMULTANEOUS_BLOCK_SENDS 2
32
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
36
37 // Override for the previous one when distance is low
38 #define BLOCK_SEND_DISABLE_LIMITS_MAX_D 1
39
40 //#define MAX_SIMULTANEOUS_BLOCK_SENDS_SERVER_TOTAL 4
41
42 // Viewing range stuff
43
44 //#define HEIGHTMAP_RANGE_NODES 300
45
46 //#define FREETIME_RATIO 0.2
47 #define FREETIME_RATIO 0.15
48
49 // Sectors are split to SECTOR_HEIGHTMAP_SPLIT^2 heightmaps
50 #define SECTOR_HEIGHTMAP_SPLIT 2
51
52 #define PLAYER_INVENTORY_SIZE (8*4)
53
54 #define SIGN_TEXT_MAX_LENGTH 50
55
56 // The distance of how far objects will be sent to client
57 //#define ACTIVE_OBJECT_D_BLOCKS 2
58
59 // Wether to catch all std::exceptions.
60 // Assert will be called on such an event.
61 #define CATCH_UNHANDLED_EXCEPTIONS 1
62
63 /*
64         Collecting active blocks is stopped after object data
65         size reaches this
66 */
67 #define MAX_OBJECTDATA_SIZE 450
68
69 #endif
70