diff --git a/dtool/Config.pp b/dtool/Config.pp index 12ab59aa5d..560eacf7f1 100644 --- a/dtool/Config.pp +++ b/dtool/Config.pp @@ -520,6 +520,10 @@ // possible. #defer DO_PSTATS $[or $[and $[HAVE_NET],$[< $[OPTIMIZE], 4]], $[DO_PSTATS]] +// Do you want to type-check downcasts? This is a good idea during +// development, but does impose some run-time overhead. +#defer DO_DCAST $[< $[OPTIMIZE], 4] + // Do you want to build the debugging tools for recording and // visualizing intersection tests by the collision system? Enabling // this increases runtime collision overhead just a tiny bit. diff --git a/dtool/LocalSetup.pp b/dtool/LocalSetup.pp index e5b555e306..b4cc60caa2 100644 --- a/dtool/LocalSetup.pp +++ b/dtool/LocalSetup.pp @@ -210,6 +210,9 @@ $[cdefine HAVE_BISON] /* Define if we want to use PStats. */ $[cdefine DO_PSTATS] +/* Define if we want to type-check downcasts. */ +$[cdefine DO_DCAST] + /* Define if we want to provide collision system recording and visualization tools. */ $[cdefine DO_COLLISION_RECORDING]