]> git.lizzy.rs Git - minetest.git/blob - src/constants.h
e91ded0eb72f6760f29bc9ca71774abb99f068d1
[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 SERVERMAP_DELETE_UNUSED_SECTORS_TIMEOUT (5)
27 //#define SERVER_MAP_SAVE_INTERVAL (5)
28
29 #define FOV_ANGLE (PI/2.5)
30
31 // The absolute working limit is (2^15 - viewing_range).
32 #define MAP_GENERATION_LIMIT (31000)
33
34 //#define MAX_SIMULTANEOUS_BLOCK_SENDS 7
35 //#define MAX_SIMULTANEOUS_BLOCK_SENDS 3
36 #define MAX_SIMULTANEOUS_BLOCK_SENDS 2
37 //#define MAX_SIMULTANEOUS_BLOCK_SENDS 1
38
39 #define FULL_BLOCK_SEND_ENABLE_MIN_TIME_FROM_BUILDING 2.0
40 #define LIMITED_MAX_SIMULTANEOUS_BLOCK_SENDS 1
41
42 // Viewing range stuff
43
44 #define FPS_DEFAULT_WANTED 30
45 #define FPS_DEFAULT_MAX 60
46
47 #define FORCEDFETCH_RANGE 80
48
49 #define HEIGHTMAP_RANGE_NODES 300
50
51 // The freetime ratio is dynamically kept high enough to make this
52 // dtime jitter possible
53 // Allow 50% = 0.1
54 /*#define DTIME_JITTER_MAX_FRACTION 0.5
55 #define FREETIME_RATIO_MIN 0.05
56 #define FREETIME_RATIO_MAX 0.4*/
57
58 //#define FREETIME_RATIO 0.2
59 #define FREETIME_RATIO 0.15
60
61 #define SECTOR_HEIGHTMAP_SPLIT 2
62
63 #define PLAYER_INVENTORY_SIZE (8*4)
64
65 #define SIGN_TEXT_MAX_LENGTH 50
66
67 #define ACTIVE_OBJECT_D_BLOCKS 2
68
69 #define CATCH_UNJANDLED_EXCEPTIONS 1
70
71 #endif
72