mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
use new config interface
This commit is contained in:
parent
84bcfefc13
commit
ef75b6751a
@ -26,16 +26,23 @@ ConfigureFn(config_distributed) {
|
||||
init_libdistributed();
|
||||
}
|
||||
|
||||
// This represents the amount of time to block waiting for the TCP
|
||||
// connection to the game server. It is only used when the connection
|
||||
// method is NSPR.
|
||||
const int game_server_timeout_ms = config_distributed.GetInt("game-server-timeout-ms", 20000);
|
||||
ConfigVariableInt game_server_timeout_ms
|
||||
("game-server-timeout-ms", 20000,
|
||||
PRC_DESC("This represents the amount of time to block waiting for the TCP "
|
||||
"connection to the game server. It is only used when the connection "
|
||||
"method is NSPR."));
|
||||
|
||||
// These represent the time in seconds by which to artificially lag
|
||||
// inbound messages. It is only used when the connection method is
|
||||
// NSPR.
|
||||
const double min_lag = config_distributed.GetDouble("min-lag", 0.0);
|
||||
const double max_lag = config_distributed.GetDouble("max-lag", 0.0);
|
||||
ConfigVariableDouble min_lag
|
||||
("min-lag", 0.0,
|
||||
PRC_DESC("This represents the time in seconds by which to artificially lag "
|
||||
"inbound messages. It is only used when the connection method is "
|
||||
"NSPR."));
|
||||
|
||||
ConfigVariableDouble max_lag
|
||||
("max-lag", 0.0,
|
||||
PRC_DESC("This represents the time in seconds by which to artificially lag "
|
||||
"inbound messages. It is only used when the connection method is "
|
||||
"NSPR."));
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: init_libdistributed
|
||||
|
@ -22,12 +22,14 @@
|
||||
#include "directbase.h"
|
||||
#include "notifyCategoryProxy.h"
|
||||
#include "dconfig.h"
|
||||
#include "configVariableInt.h"
|
||||
#include "configVariableDouble.h"
|
||||
|
||||
NotifyCategoryDecl(distributed, EXPCL_DIRECT, EXPTP_DIRECT);
|
||||
|
||||
extern const int game_server_timeout_ms;
|
||||
extern const double min_lag;
|
||||
extern const double max_lag;
|
||||
extern ConfigVariableInt game_server_timeout_ms;
|
||||
extern ConfigVariableDouble min_lag;
|
||||
extern ConfigVariableDouble max_lag;
|
||||
|
||||
extern EXPCL_DIRECT void init_libdistributed();
|
||||
|
||||
|
@ -35,13 +35,16 @@ ConfigureFn(config_interval) {
|
||||
init_libinterval();
|
||||
}
|
||||
|
||||
// Set this to the default value for set_precision() for each
|
||||
// CMetaInterval created.
|
||||
const double interval_precision = config_interval.GetDouble("interval-precision", 1000.0);
|
||||
ConfigVariableDouble interval_precision
|
||||
("interval-precision", 1000.0,
|
||||
PRC_DESC("Set this to the default value for set_precision() for each "
|
||||
"CMetaInterval created."));
|
||||
|
||||
ConfigVariableBool verify_intervals
|
||||
("verify-intervals", false,
|
||||
PRC_DESC("Set this true to generate an assertion failure if interval "
|
||||
"functions are called out-of-order."));
|
||||
|
||||
// Set this true to generate an assertion failure if interval
|
||||
// functions are called out-of-order.
|
||||
const bool verify_intervals = config_interval.GetBool("verify-intervals", false);
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: init_libinterval
|
||||
|
@ -22,11 +22,13 @@
|
||||
#include "directbase.h"
|
||||
#include "notifyCategoryProxy.h"
|
||||
#include "dconfig.h"
|
||||
#include "configVariableDouble.h"
|
||||
#include "configVariableBool.h"
|
||||
|
||||
NotifyCategoryDecl(interval, EXPCL_DIRECT, EXPTP_DIRECT);
|
||||
|
||||
extern const double interval_precision;
|
||||
extern const bool verify_intervals;
|
||||
extern ConfigVariableDouble interval_precision;
|
||||
extern ConfigVariableBool verify_intervals;
|
||||
|
||||
extern EXPCL_DIRECT void init_libinterval();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user