]> git.lizzy.rs Git - dragonfireclient.git/blob - src/constants.h
grass edges workin'
[dragonfireclient.git] / src / constants.h
1 /*
2 Minetest-c55
3 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 /*
21 (c) 2010 Perttu Ahola <celeron55@gmail.com>
22 */
23
24 #ifndef CONSTANTS_HEADER
25 #define CONSTANTS_HEADER
26
27 #define DEBUGFILE "debug.txt"
28
29 // Define for simulating the quirks of sending through internet
30 // WARNING: This disables unit testing of socket and connection
31 #define INTERNET_SIMULATOR 0
32
33 #define CONNECTION_TIMEOUT 30
34
35 #define RESEND_TIMEOUT_MIN 0.333
36 #define RESEND_TIMEOUT_MAX 3.0
37 // resend_timeout = avg_rtt * this
38 #define RESEND_TIMEOUT_FACTOR 4
39
40 #define PI 3.14159
41
42 #define SERVERMAP_DELETE_UNUSED_SECTORS_TIMEOUT (60*10)
43 #define SERVER_MAP_SAVE_INTERVAL (60)
44 /*#define SERVERMAP_DELETE_UNUSED_SECTORS_TIMEOUT (10)
45 #define SERVER_MAP_SAVE_INTERVAL (10)*/
46
47 #define FOV_ANGLE (PI/2.5)
48
49 // The absolute working limit is (2^15 - viewing_range).
50 #define MAP_GENERATION_LIMIT (31000)
51
52 //#define MAX_SIMULTANEOUS_BLOCK_SENDS 2
53
54 #define FULL_BLOCK_SEND_ENABLE_MIN_TIME_FROM_BUILDING 2.0
55 //#define LIMITED_MAX_SIMULTANEOUS_BLOCK_SENDS 1
56 #define LIMITED_MAX_SIMULTANEOUS_BLOCK_SENDS 0
57
58 // Override for the previous one when distance is low
59 #define BLOCK_SEND_DISABLE_LIMITS_MAX_D 1
60
61 //#define MAX_SIMULTANEOUS_BLOCK_SENDS_SERVER_TOTAL 4
62
63 // Viewing range stuff
64
65 //#define HEIGHTMAP_RANGE_NODES 300
66
67 //#define FREETIME_RATIO 0.2
68 #define FREETIME_RATIO 0.15
69
70 // Sectors are split to SECTOR_HEIGHTMAP_SPLIT^2 heightmaps
71 #define SECTOR_HEIGHTMAP_SPLIT 2
72
73 #define PLAYER_INVENTORY_SIZE (8*4)
74
75 #define SIGN_TEXT_MAX_LENGTH 50
76
77 // The distance of how far objects will be sent to client
78 //#define ACTIVE_OBJECT_D_BLOCKS 2
79
80 // Wether to catch all std::exceptions.
81 // Assert will be called on such an event.
82 #define CATCH_UNHANDLED_EXCEPTIONS 1
83
84 /*
85         Collecting active blocks is stopped after object data
86         size reaches this
87 */
88 #define MAX_OBJECTDATA_SIZE 450
89
90 //#define WATER_LEVEL (-5)
91 #define WATER_LEVEL (0)
92
93 #endif
94