l *= f;
}
- if(cvar("developer"))
+ if(cvar("developer") > 0)
{
LOG_TRACE("Verifying vector compression table...");
for(i = 0x0F00; i < 0xFFFF; ++i)
void print_assertfailed_fatal(string expr);
#define assert(expr, ...) _assert(print_assertfailed_severe, expr, __VA_ARGS__)
-#define devassert(...) MACRO_BEGIN if (autocvar_developer) assert(__VA_ARGS__); MACRO_END
+#define devassert(...) MACRO_BEGIN if (autocvar_developer > 0) assert(__VA_ARGS__); MACRO_END
#define assert_once(expr, ...) \
MACRO_BEGIN \
__once = true; \
} \
MACRO_END
-#define devassert_once(...) MACRO_BEGIN if (autocvar_developer) assert_once(__VA_ARGS__); MACRO_END
+#define devassert_once(...) MACRO_BEGIN if (autocvar_developer > 0) assert_once(__VA_ARGS__); MACRO_END
#define demand(expr, ...) _assert(print_assertfailed_fatal, expr, __VA_ARGS__)
-#define devdemand(...) MACRO_BEGIN if (autocvar_developer) demand(__VA_ARGS__); MACRO_END
+#define devdemand(...) MACRO_BEGIN if (autocvar_developer > 0) demand(__VA_ARGS__); MACRO_END
#define _assert(f, expr, then) \
MACRO_BEGIN \
{
TC(Object, this);
string s = _("No description");
- if (cvar("developer"))
+ if (cvar("developer") > 0)
{
for (int i = 0, n = numentityfields(); i < n; ++i)
{
gamestatus = 0;
if (isserver()) gamestatus |= GAME_ISSERVER;
if (clientstate() == CS_CONNECTED || isdemo()) gamestatus |= GAME_CONNECTED;
- if (cvar("developer")) gamestatus |= GAME_DEVELOPER;
+ if (cvar("developer") > 0) gamestatus |= GAME_DEVELOPER;
}
void m_init()
#endif
// list all game dirs (TEST)
- if (cvar("developer"))
+ if (cvar("developer") > 0)
{
for (int i = 0; ; ++i)
{
e.sendCvars = true;
me.TR(me);
me.TR(me);
- if(cvar("developer"))
+ if(cvar("developer") > 0)
me.TD(me, 1, 3, makeXonoticCheckBox(0, "showsound", _("Debug info about sounds")));
me.gotoRC(me, me.rows - 1, 0);
float n;
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Quality preset:")));
- n = 5 + 2 * boolean(cvar("developer"));
- if(cvar("developer"))
+ n = 5 + 2 * boolean(cvar("developer") > 0);
+ if(cvar("developer") > 0)
{
me.TD(me, 1, 5 / n, e = makeXonoticCommandButton(ZCTX(_("PRE^OMG!")), '1 0 1', "exec effects-omg.cfg", 0));
e.applyButton = effectsApplyButton;
e.applyButton = effectsApplyButton;
me.TD(me, 1, 5 / n, e = makeXonoticCommandButton(ZCTX(_("PRE^Ultra")), '0 0 0', "exec effects-ultra.cfg", 0));
e.applyButton = effectsApplyButton;
- if(cvar("developer"))
+ if(cvar("developer") > 0)
{
me.TD(me, 1, 5 / n, e = makeXonoticCommandButton(ZCTX(_("PRE^Ultimate")), '0.5 0 0', "exec effects-ultimate.cfg", 0));
e.applyButton = effectsApplyButton;
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Texture resolution:")));
setDependent(e, "r_showsurfaces", 0, 0);
me.TD(me, 1, 2, e = makeXonoticPicmipSlider());
- if(cvar("developer"))
+ if(cvar("developer") > 0)
e.addValue(e, ZCTX(_("RES^Leet")), "1337");
e.addValue(e, ZCTX(_("RES^Lowest")), "3");
e.addValue(e, ZCTX(_("RES^Very low")), "2");
}
}
me.TR(me);
- if(cvar("developer"))
+ if(cvar("developer") > 0)
{
me.TDempty(me, 0.2);
me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx_T(3, 0, "r_showsurfaces", _("Show surfaces"),
e.addValue(e, strzone(_("Unlimited")), "0");
e.configureXonoticTextSliderValues(e);
me.TR(me);
- if(cvar("developer"))
+ if(cvar("developer") > 0)
{
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Local latency:")));
me.TD(me, 1, 2, e = makeXonoticSlider(0, 1000, 25, "cl_netlocalping"));
_("Enable vertical synchronization to prevent tearing, will cap your fps to the screen refresh rate")));
me.TR(me);
- if(cvar("developer"))
+ if(cvar("developer") > 0)
{
me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "v_flipped", _("Flip view horizontally"),
_("Poor man's left handed mode")));
me.TD(me, 1, 2.8, e = makeXonoticCheckBox_T(0, "v_glslgamma", _("Use GLSL to handle color control"),
_("Enable use of GLSL to apply gamma correction, note that it might decrease performance by a lot")));
setDependent(e, "vid_gl20", 1, 1);
- if(cvar("developer"))
+ if(cvar("developer") > 0)
{
me.TR(me);
me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "v_psycho", _("Psycho coloring (easter egg)")));
{
me.configureXonoticTextSlider(me, "cl_particles_quality",
_("Multiplier for amount of particles. Less means less particles, which in turn gives for better performance"));
- if(cvar("developer")) { me.addValue(me, ZCTX(_("PART^OMG")), "0.25 250 0"); }
+ if(cvar("developer") > 0) { me.addValue(me, ZCTX(_("PART^OMG")), "0.25 250 0"); }
me.addValue(me, ZCTX(_("PART^Low")), "0.5 500 0");
me.addValue(me, ZCTX(_("PART^Medium")), "0.75 750 0");
me.addValue(me, ZCTX(_("PART^Normal")), "1.0 1000 1");
me.addValue(me, ZCTX(_("PART^High")), "1.5 1500 1");
me.addValue(me, ZCTX(_("PART^Ultra")), "2.0 2000 2");
- if(cvar("developer")) { me.addValue(me, ZCTX(_("PART^Ultimate")), "3.0 3000 2"); }
+ if(cvar("developer") > 0) { me.addValue(me, ZCTX(_("PART^Ultimate")), "3.0 3000 2"); }
me.configureXonoticTextSliderValues(me);
}
void XonoticParticlesSlider_loadCvars(entity me)
#define GAMETYPE(id) ++i;
GAMETYPES
#undef GAMETYPE
- #define GAMETYPE(it) { if (dev) ++i; }
+ #define GAMETYPE(it) { if (dev > 0) ++i; }
HIDDEN_GAMETYPES
#undef GAMETYPE
return i;
}
else
{
- if(autocvar_developer)
+ if(autocvar_developer > 0)
{
LOG_INFO("A generated waypoint is stuck in solid at ", vtos(w.origin));
backtrace("Waypoint stuck");
ERASEABLE
void DebugPrintToChat(entity client, string text)
{
- if (autocvar_developer)
+ if (autocvar_developer > 0)
{
PrintToChat(client, text);
}
ERASEABLE
void DebugPrintToChatAll(string text)
{
- if (autocvar_developer)
+ if (autocvar_developer > 0)
{
PrintToChatAll(text);
}
ERASEABLE
void DebugPrintToChatTeam(int team_num, string text)
{
- if (autocvar_developer)
+ if (autocvar_developer > 0)
{
PrintToChatTeam(team_num, text);
}
else
db_save(ServerProgsDB, strcat("server.db", autocvar_sessionid));
}
- if(autocvar_developer)
+ if(autocvar_developer > 0)
{
if(autocvar_sv_db_saveasdump)
db_dump(TemporaryDB, "server-temp.db");