-Thu Dec 19 07:25:06 CET 2019
+Sat Dec 28 07:24:50 CET 2019
# MasterWord, 2016
# Mensious Mensious <ektoras@tutanota.com>, 2018-2019
# Vindex <kon14.inside@gmail.com>, 2014
-# Γιάννης Ανθυμίδης, 2011-2012
+# Yannis Anthymidis, 2011-2012
msgid ""
msgstr ""
"Project-Id-Version: Xonotic\n"
alias sv_hook_gamestart_ft
alias sv_hook_gamestart_inv
alias sv_hook_gamestart_duel
-alias sv_hook_gamerestart
+// there is currently no hook for when the match is restarted
+// see sv_hook_readyrestart for previous uses of this hook
+//alias sv_hook_gamerestart
alias sv_hook_gameend
bool autocvar_cl_spawn_event_sound = 1;
// float autocvar_cl_spawn_point_model;
bool autocvar_cl_spawn_point_particles;
-float autocvar_cl_spawn_point_dist_min = 1200;
-float autocvar_cl_spawn_point_dist_max = 1600;
+float autocvar_cl_spawn_point_dist_min = 800;
+float autocvar_cl_spawn_point_dist_max = 1200;
bool autocvar_cl_spawnzoom = 1;
float autocvar_cl_spawnzoom_speed = 1;
float autocvar_cl_spawnzoom_factor = 2;
bool SetTeam(entity o, int Team)
{
TC(int, Team);
- devassert_once(Team);
+ //devassert_once(Team);
entity tm;
if(teamplay)
{
if (damage_dealt_time != damage_dealt_time_prev)
{
unaccounted_damage += unaccounted_damage_new;
- LOG_TRACE("dmg total: ", ftos(unaccounted_damage), " (+", ftos(unaccounted_damage_new), ")");
+ //LOG_TRACE("dmg total: ", ftos(unaccounted_damage), " (+", ftos(unaccounted_damage_new), ")");
}
damage_dealt_time_prev = damage_dealt_time;
pitch_shift = mirror_value + (mirror_value - pitch_shift);
}
- LOG_TRACE("dmg total (dmg): ", ftos(unaccounted_damage), " , pitch shift: ", ftos(pitch_shift));
+ //LOG_TRACE("dmg total (dmg): ", ftos(unaccounted_damage), " , pitch shift: ", ftos(pitch_shift));
// todo: avoid very long and very short sounds from wave stretching using different sound files? seems unnecessary
// todo: normalize sound pressure levels? seems unnecessary
}
}
-GENERIC_COMMAND(dumpcommands, "Dump all commands on the program to <program>_cmd_dump.txt")
+GENERIC_COMMAND(dumpcommands, "Dump all commands on the program to <program>_cmd_dump.txt", false)
{
switch(request)
{
*/
// Do not hard code aliases for these, instead create them in commands.cfg... also: keep in alphabetical order, please ;)
-GENERIC_COMMAND(addtolist, "Add a string to a cvar") { GenericCommand_addtolist(request, arguments); }
-GENERIC_COMMAND(maplist, "Automatic control of maplist") { GenericCommand_maplist(request, arguments); }
-GENERIC_COMMAND(nextframe, "Execute the given command next frame of this VM") { GenericCommand_nextframe(request, command); }
-GENERIC_COMMAND(qc_curl, "Queries a URL") { GenericCommand_qc_curl(request, arguments); }
-GENERIC_COMMAND(removefromlist, "Remove a string from a cvar") { GenericCommand_removefromlist(request, arguments); }
-GENERIC_COMMAND(restartnotifs, "Re-initialize all notifications") { GenericCommand_restartnotifs(request); }
-GENERIC_COMMAND(rpn, "RPN calculator") { GenericCommand_rpn(request, arguments, command); }
-GENERIC_COMMAND(settemp, "Temporarily set a value to a cvar which is restored later") { GenericCommand_settemp(request, arguments); }
-GENERIC_COMMAND(settemp_restore, "Restore all cvars set by settemp command") { GenericCommand_settemp_restore(request); }
-GENERIC_COMMAND(runtest, "Run unit tests") { GenericCommand_runtest(request, arguments); }
+GENERIC_COMMAND(addtolist, "Add a string to a cvar", true) { GenericCommand_addtolist(request, arguments); }
+GENERIC_COMMAND(maplist, "Automatic control of maplist", true) { GenericCommand_maplist(request, arguments); }
+GENERIC_COMMAND(nextframe, "Execute the given command next frame of this VM", true) { GenericCommand_nextframe(request, command); }
+GENERIC_COMMAND(qc_curl, "Queries a URL", true) { GenericCommand_qc_curl(request, arguments); }
+GENERIC_COMMAND(removefromlist, "Remove a string from a cvar", true) { GenericCommand_removefromlist(request, arguments); }
+GENERIC_COMMAND(restartnotifs, "Re-initialize all notifications", false) { GenericCommand_restartnotifs(request); }
+GENERIC_COMMAND(rpn, "RPN calculator", true) { GenericCommand_rpn(request, arguments, command); }
+GENERIC_COMMAND(settemp, "Temporarily set a value to a cvar which is restored later", false) { GenericCommand_settemp(request, arguments); }
+GENERIC_COMMAND(settemp_restore, "Restore all cvars set by settemp command", false) { GenericCommand_settemp_restore(request); }
+GENERIC_COMMAND(runtest, "Run unit tests", false) { GenericCommand_runtest(request, arguments); }
void GenericCommand_macro_help()
{
REGISTER_REGISTRY(GENERIC_COMMANDS)
REGISTRY_SORT(GENERIC_COMMANDS)
-#define GENERIC_COMMAND(id, description) \
+.bool m_menubased; // switch to tell whether this alias should be registered as a menu or client based command
+
+#define GENERIC_COMMAND(id, description, menubased) \
CLASS(genericcommand_##id, Command) \
ATTRIB(genericcommand_##id, m_name, string, #id); \
ATTRIB(genericcommand_##id, m_description, string, description); \
+ ATTRIB(genericcommand_##id, m_menubased, bool, menubased); \
ENDCLASS(genericcommand_##id) \
REGISTER(GENERIC_COMMANDS, CMD_G, id, m_id, NEW(genericcommand_##id)); \
METHOD(genericcommand_##id, m_invokecmd, void(genericcommand_##id this, int request, entity caller, int arguments, string command))
STATIC_INIT(GENERIC_COMMANDS_aliases) {
- FOREACH(GENERIC_COMMANDS, true, localcmd(sprintf("alias %1$s \"%2$s %1$s ${* ?}\"\n", it.m_name, "qc_cmd_svmenu")));
+ FOREACH(GENERIC_COMMANDS, true, localcmd(sprintf("alias %1$s \"%2$s %1$s ${* ?}\"\n", it.m_name, ((it.m_menubased) ? "qc_cmd_svmenu" : "qc_cmd_svcl"))));
}
void rpn_pushf(float f) { return rpn_push(sprintf("%.9g", f)); }
void rpn_setf(float f) { return rpn_set(sprintf("%.9g", f)); }
+SHUTDOWN(_rpndb)
+{
+ if(rpn_db)
+ db_close(rpn_db);
+}
+
void GenericCommand_rpn(int request, int argc, string command)
{
switch(request)
#endif
-GENERIC_COMMAND(bufstr_get, "Examine a string buffer object")
+GENERIC_COMMAND(bufstr_get, "Examine a string buffer object", false)
{
switch (request)
{
}
-GENERIC_COMMAND(version, "Print the current version")
+GENERIC_COMMAND(version, "Print the current version", false)
{
switch (request)
{
#ifdef CSQC
void(float bufhandle, string pattern, string antipattern) buf_cvarlist = #517;
#endif
-GENERIC_COMMAND(cvar_localchanges, "Print locally changed cvars")
+GENERIC_COMMAND(cvar_localchanges, "Print locally changed cvars", false)
{
switch (request)
{
#endif
-GENERIC_COMMAND(find, "Search through entities for matching classname")
+GENERIC_COMMAND(find, "Search through entities for matching classname", false)
{
switch (request)
{
}
-GENERIC_COMMAND(findat, "Search through entities for matching origin")
+GENERIC_COMMAND(findat, "Search through entities for matching origin", false)
{
switch (request)
{
#undef WRITE
}
-GENERIC_COMMAND(dumpeffectinfo, "Dump all effectinfo to effectinfo_dump.txt")
+GENERIC_COMMAND(dumpeffectinfo, "Dump all effectinfo to effectinfo_dump.txt", false)
{
switch (request) {
case CMD_REQUEST_COMMAND: {
if (GetPlayerSoundSampleField_notFound) field = GetVoiceMessageSampleField(key);
if (GetPlayerSoundSampleField_notFound)
{
- LOG_TRACEF("Invalid sound info field: %s", key);
+ LOG_TRACEF("Invalid sound info field in player sound file '%s': %s", f, key);
continue;
}
string file = argv(1);
.bool instanceOfVoiceMessage;
.int m_playersoundvt;
-#define REGISTER_VOICEMSG(id, vt) \
+#define REGISTER_VOICEMSG(id, vt, listed) \
.string _playersound_##id; \
REGISTER(PlayerSounds, playersound, id, m_id, new_pure(VoiceMessage)) \
{ \
- this.instanceOfVoiceMessage = true; \
+ this.instanceOfVoiceMessage = listed; \
this.m_playersoundstr = #id; \
this.m_playersoundfld = _playersound_##id; \
this.m_playersoundvt = vt; \
const int VOICETYPE_AUTOTAUNT = 14;
const int VOICETYPE_TAUNT = 15;
-REGISTER_VOICEMSG(attack, VOICETYPE_TEAMRADIO)
-REGISTER_VOICEMSG(attackinfive, VOICETYPE_TEAMRADIO)
-REGISTER_VOICEMSG(coverme, VOICETYPE_TEAMRADIO)
-REGISTER_VOICEMSG(defend, VOICETYPE_TEAMRADIO)
-REGISTER_VOICEMSG(freelance, VOICETYPE_TEAMRADIO)
-REGISTER_VOICEMSG(incoming, VOICETYPE_TEAMRADIO)
-REGISTER_VOICEMSG(meet, VOICETYPE_TEAMRADIO)
-REGISTER_VOICEMSG(needhelp, VOICETYPE_TEAMRADIO)
-REGISTER_VOICEMSG(seenflag, VOICETYPE_TEAMRADIO)
-REGISTER_VOICEMSG(taunt, VOICETYPE_TAUNT)
-REGISTER_VOICEMSG(teamshoot, VOICETYPE_LASTATTACKER)
-
-// reserved sound names for the future (some models lack sounds for them):
-// _VOICEMSG(flagcarriertakingdamage)
-// _VOICEMSG(getflag)
-// reserved sound names for the future (ALL models lack sounds for them):
-// _VOICEMSG(affirmative)
-// _VOICEMSG(attacking)
-// _VOICEMSG(defending)
-// _VOICEMSG(roaming)
-// _VOICEMSG(onmyway)
-// _VOICEMSG(droppedflag)
-// _VOICEMSG(negative)
-// _VOICEMSG(seenenemy)
+REGISTER_VOICEMSG(attack, VOICETYPE_TEAMRADIO, true)
+REGISTER_VOICEMSG(attackinfive, VOICETYPE_TEAMRADIO, true)
+REGISTER_VOICEMSG(coverme, VOICETYPE_TEAMRADIO, true)
+REGISTER_VOICEMSG(defend, VOICETYPE_TEAMRADIO, true)
+REGISTER_VOICEMSG(freelance, VOICETYPE_TEAMRADIO, true)
+REGISTER_VOICEMSG(incoming, VOICETYPE_TEAMRADIO, true)
+REGISTER_VOICEMSG(meet, VOICETYPE_TEAMRADIO, true)
+REGISTER_VOICEMSG(needhelp, VOICETYPE_TEAMRADIO, true)
+REGISTER_VOICEMSG(seenflag, VOICETYPE_TEAMRADIO, true)
+REGISTER_VOICEMSG(taunt, VOICETYPE_TAUNT, true)
+REGISTER_VOICEMSG(teamshoot, VOICETYPE_LASTATTACKER, true)
+
+//NOTE: some models lack sounds for these:
+REGISTER_VOICEMSG(flagcarriertakingdamage, VOICETYPE_TEAMRADIO, false)
+REGISTER_VOICEMSG(getflag, VOICETYPE_TEAMRADIO, false)
+//NOTE: ALL models lack sounds for these (only available in default sounds currently):
+REGISTER_VOICEMSG(affirmative, VOICETYPE_TEAMRADIO, false)
+REGISTER_VOICEMSG(attacking, VOICETYPE_TEAMRADIO, false)
+REGISTER_VOICEMSG(defending, VOICETYPE_TEAMRADIO, false)
+REGISTER_VOICEMSG(roaming, VOICETYPE_TEAMRADIO, false)
+REGISTER_VOICEMSG(onmyway, VOICETYPE_TEAMRADIO, false)
+REGISTER_VOICEMSG(droppedflag, VOICETYPE_TEAMRADIO, false)
+REGISTER_VOICEMSG(negative, VOICETYPE_TEAMRADIO, false)
+REGISTER_VOICEMSG(seenenemy, VOICETYPE_TEAMRADIO, false)
.string m_globalsoundstr;
REGISTRY(GlobalSounds, BITS(8) - 1)
void Dump_Items();
-GENERIC_COMMAND(dumpitems, "Dump all items to the console") {
+GENERIC_COMMAND(dumpitems, "Dump all items to the console", false) {
switch (request) {
case CMD_REQUEST_COMMAND: {
Dump_Items();
.int fld = inv_items[it.m_id];
int prev = this.(fld);
int next = this.(fld) = ReadByte();
- LOG_TRACEF("%s: %.0f -> %.0f", it.m_name, prev, next);
+ LOG_DEBUGF("%s: %.0f -> %.0f", it.m_name, prev, next);
}
}
return true;
actor.anim_finished = time + 1;
}
if (isPlayer) actor.enemy = Monster_FindTarget(actor);
+ monster_makevectors(actor, actor.enemy);
W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_SpiderAttack_FIRE, CH_WEAPON_B, 0, DEATH_MONSTER_SPIDER.m_id);
if (!isPlayer) w_shotdir = normalize((actor.enemy.origin + '0 0 10') - actor.origin);
M_Spider_Attack_Web(actor);
TC(WyvernAttack, thiswep);
if (fire & 1)
if (time > actor.attack_finished_single[0] || weapon_prepareattack(thiswep, actor, weaponentity, false, 1.2)) {
+ monster_makevectors(actor, actor.enemy);
if (IS_PLAYER(actor)) W_SetupShot_Dir(actor, weaponentity, v_forward, false, 0, SND_WyvernAttack_FIRE, CH_WEAPON_B, 0, DEATH_MONSTER_WYVERN.m_id);
if (IS_MONSTER(actor)) {
actor.attack_finished_single[0] = time + 1.2;
if (!(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)) \
return trace_plane_normal;
+ vector forward, right, up;
+ MAKE_VECTORS(this.angles, forward, right, up);
+
float dist = 10, max_normal = 0.2, scaler = 100;
vector start = this.origin;
- TRACE(start + v_forward * scaler)
- TRACE(start - v_forward * scaler)
- TRACE(start + v_right * scaler)
- TRACE(start - v_right * scaler)
+ TRACE(start + forward * scaler)
+ TRACE(start - forward * scaler)
+ TRACE(start + right * scaler)
+ TRACE(start - right * scaler)
#undef TRACE
return '0 0 0';
}
void Dump_Notifications(int fh, bool alsoprint);
-GENERIC_COMMAND(dumpnotifs, "Dump all notifications into notifications_dump.txt")
+GENERIC_COMMAND(dumpnotifs, "Dump all notifications into notifications_dump.txt", false)
{
switch (request)
{
void ReplicateVars(bool would_destroy)
{
if (!would_destroy)
- FOREACH(Notifications, it.nent_type == MSG_CHOICE, {
- string cvarname = sprintf("notification_%s", Get_Notif_CvarName(it));
+ FOREACH(Notifications, it.nent_type == MSG_CHOICE && (!it.nent_teamnum || it.nent_teamnum == NUM_TEAM_1), {
+ string cvarname = strcat("notification_", Get_Notif_CvarName(it));
// NOTE: REPLICATE_SIMPLE can return;
REPLICATE_SIMPLE(it.cvar_value, cvarname);
});
}
}
+SHUTDOWN(PlayerStats_PlayerBasic_Shutdown)
+{
+ if(PS_B_IN_DB >= 0)
+ {
+ db_close(PS_B_IN_DB);
+ PS_B_IN_DB = -1;
+ }
+
+ if(PS_GR_OUT_DB >= 0)
+ {
+ db_close(PS_GR_OUT_DB);
+ PS_GR_OUT_DB = -1;
+ }
+}
+
void PlayerStats_PlayerBasic_CheckUpdate(entity joiningplayer)
{
// determine whether we should retrieve playerbasic information again
//float PS_PM_IN_DB = -1; // playerstats_prematch_in_db // db for info COLLECTED at the beginning of a match
int PS_GR_OUT_DB = -1; // playerstats_gamereport_out_db // db of info SENT at the end of a match
//float PS_GR_IN_DB = -1; // playerstats_gamereport_in_db // db for info COLLECTED at the end of a match
-int PS_B_IN_DB = -1; // playerstats_playerbasic_in_db // db for info COLLECTED for basic player info (ELO)
+float PS_B_IN_DB = -1; // playerstats_playerbasic_in_db // db for info COLLECTED for basic player info (ELO)
#endif
#ifdef MENUQC
#define TR_CONFIG_END()
#endif
-GENERIC_COMMAND(dumpturrets, "Dump all turrets into turrets_dump.txt")
+GENERIC_COMMAND(dumpturrets, "Dump all turrets into turrets_dump.txt", false)
{
switch(request)
{
l *= f;
}
- if(cvar("developer"))
+ if(cvar("developer") > 0)
{
LOG_TRACE("Verifying vector compression table...");
for(i = 0x0F00; i < 0xFFFF; ++i)
#define WepSet_FromWeapon(it) ((it).m_wepset)
WepSet _WepSet_FromWeapon(int i);
-GENERIC_COMMAND(dumpweapons, "Dump all weapons into weapons_dump.txt") // WEAPONTODO: make this work with other progs than just server
+GENERIC_COMMAND(dumpweapons, "Dump all weapons into weapons_dump.txt", false) // WEAPONTODO: make this work with other progs than just server
{
switch(request)
{
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 \
#include <common/command/_mod.qh>
-GENERIC_COMMAND(mx, "Send a matrix command") {
+GENERIC_COMMAND(mx, "Send a matrix command", false) {
switch (argv(1)) {
case "user":
strcpy(matrix_user, substring(command, argv_start_index(2), -1));
{
TC(Object, this);
string s = _("No description");
- if (cvar("developer"))
+ if (cvar("developer") > 0)
{
for (int i = 0, n = numentityfields(); i < n; ++i)
{
}
#define REPLICATE_SIMPLE(field, cvarname) MACRO_BEGIN \
- if (ReplicateVars_NOT_SENDING() && field != cvar(cvarname)) \
+ if (ReplicateVars_NOT_SENDING()) \
{ \
- localcmd(strcat("cl_cmd sendcvar ", cvarname, "\n")); \
- ReplicateVars_DELAY_1FRAME(); \
- field = cvar(cvarname); \
- return; \
+ float thecvar = cvar(cvarname); \
+ if(field != thecvar) \
+ { \
+ localcmd(strcat("cl_cmd sendcvar ", cvarname, "\n")); \
+ ReplicateVars_DELAY_1FRAME(); \
+ field = thecvar; \
+ return; \
+ } \
} \
MACRO_END
#endif
}
#define _STATIC_INIT(func, where) \
- ACCUMULATE void _static_##func##profile() { profile(#func); } \
- ACCUMULATE_FUNCTION(where, _static_##func##profile) \
+ /* ACCUMULATE void _static_##func##profile() { profile(#func); } */ \
+ /* ACCUMULATE_FUNCTION(where, _static_##func##profile) */ \
ACCUMULATE void _static_##func(); \
ACCUMULATE_FUNCTION(where, _static_##func) \
void _static_##func()
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)
{
me.TD(me, 1, 2, makeXonoticTextLabel(0.5, _("Are you sure you want to quit?")));
me.TR(me);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticCommandButton_T(_("Yes"), '1 0 0', "echo ]quit\nquit", 0,
+ me.TD(me, 1, 1, e = makeXonoticCommandButton_T(_("Yes"), '1 0 0', "echo ]quit; quit", 0,
_("Back to work...")));
me.TD(me, 1, 1, e = makeXonoticButton_T(_("No"), '0 1 0',
_("I got some more fragging to do!")));
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);
}
void ReadyRestart()
{
if (MUTATOR_CALLHOOK(ReadyRestart_Deny) || game_stopped || race_completing) localcmd("restart\n");
- else localcmd("\nsv_hook_gamerestart\n");
+ else localcmd("\nsv_hook_readyrestart\n");
// Reset ALL scores, but only do that at the beginning of the countdown if sv_ready_restart_after_countdown is off!
// Otherwise scores could be manipulated during the countdown.
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");
seta cl_spawn_event_sound 1 "sound effect whenever a player spawns"
//seta cl_spawn_point_model 0 "place a model at all spawn points" // still needs a model
seta cl_spawn_point_particles 1 "pointparticles effect at all spawn points" // managed by effects-.cfg files
-seta cl_spawn_point_dist_min 1200
-seta cl_spawn_point_dist_max 1600
+seta cl_spawn_point_dist_min 800
+seta cl_spawn_point_dist_max 1200
freelook 1
sensitivity 6
set sv_ready_restart_after_countdown 0 "reset players and map items after the countdown ended, instead of at the beginning of the countdown"
set sv_ready_restart_repeatable 0 "allows the players to restart the game as often as needed"
+alias sv_hook_readyrestart
+
//nifreks lockonrestart feature, used in team-based game modes, if set to 1 and all players readied up no other player can then join the game anymore, useful to block spectators from joining
set teamplay_lockonrestart 0 "lock teams once all players readied up and the game restarted (no new players can join after restart unless using the server-command unlockteams)"