File: const.h

package info (click to toggle)
cyphesis-cpp 0.5.16-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 5,084 kB
  • ctags: 3,627
  • sloc: cpp: 30,418; python: 4,812; xml: 4,674; sh: 4,118; makefile: 902; ansic: 617
file content (81 lines) | stat: -rw-r--r-- 3,394 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// Cyphesis Online RPG Server and AI Engine
// Copyright (C) 2000-2004 Alistair Riddoch
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software Foundation,
// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

// $Id: const.h,v 1.55 2007-10-01 03:40:05 alriddoch Exp $

#ifndef COMMON_CONST_H
#define COMMON_CONST_H

namespace consts {

  /// \defgroup Constants Global Configuration Constants
  ///
  /// These constants defined in common/config.h control the configuration
  /// of some aspects of the server which cannot be changed at runtime.
  /// Most commonly they are made constant for performance reasons, though
  /// sometimes it is because a change in the value at runtime could give
  /// confusing or undefined results.

  // @{

  /// \brief Should python code emit thinking ops
  static const int debug_thinking = 0;
  /// \brief Debug level for python code
  static const int debug_level = 0;

  /// \brief Scale factor for time. The may become non-constant
  static const float time_multiplier = 1.0;
  /// \brief In Real time how many seconds between ticks
  static const float basic_tick = time_multiplier * 3.0;
  /// \brief In Real time how many seconds between movement updates
  static const float move_tick = time_multiplier * 2.0;
  /// \brief Highest possible person velocity
  static const float base_velocity_coefficient = 5.0;
  static const float base_velocity = base_velocity_coefficient/time_multiplier;
  /// \brief Square versions of above, to avoid square roots in calculations
  static const float square_basic_tick = basic_tick * basic_tick;
  static const float square_base_velocity = base_velocity * base_velocity;

  /// \brief sin() of minimum angle subtended by visible object
  static const float sight_factor = 0.06;
  static const float square_sight_factor = (sight_factor * sight_factor);
  /// \brief What is the minimum size of an object when calculating visibility
  static const float minSqrBoxSize = 0.25f;
  /// \brief What is the minimum size of an object when calculating visibility
  static const float minBoxSize = 0.5f;
  /// \brief Should world state be persistent
  static const bool enable_persistence = false;

  /// \brief Admin password used by admin account
  extern const char * defaultAdminPasswordHash;
  /// \brief Id of root world entity
  extern const char * rootWorldId;
  /// \brief Integer id of root world entity
  extern const long rootWorldIntId;
  /// \brief Version of the software we are running
  extern const char * version;
  /// \brief Time this server was built
  extern const char * buildTime;
  /// \brief Date this server was built
  extern const char * buildDate;
  /// \brief Build number of this build, derived from ChangeLog RCS revision
  extern const int buildId;

  // @}
}

#endif // COMMON_CONST_H