cvar_t sv_airaccel_sideways_friction = {0, "sv_airaccel_sideways_friction", "", "anti-sideways movement stabilization (reduces speed gain when zigzagging); when < 0, only so much friction is applied that braking (by accelerating backwards) cannot be stronger"};
cvar_t sv_airaccelerate = {0, "sv_airaccelerate", "-1", "rate at which a player accelerates to sv_maxairspeed while in the air, if less than 0 the sv_accelerate variable is used instead"};
cvar_t sv_airstopaccelerate = {0, "sv_airstopaccelerate", "0", "when set, replacement for sv_airaccelerate when moving backwards"};
+cvar_t sv_airspeedlimit_nonqw = {0, "sv_airspeedlimit_nonqw", "0", "when set, this is a soft speed limit while in air when using airaccel_qw not equal to 1"};
cvar_t sv_airstrafeaccelerate = {0, "sv_airstrafeaccelerate", "0", "when set, replacement for sv_airaccelerate when just strafing"};
cvar_t sv_maxairstrafespeed = {0, "sv_maxairstrafespeed", "0", "when set, replacement for sv_maxairspeed when just strafing"};
+cvar_t sv_airstrafeaccel_qw = {0, "sv_airstrafeaccel_qw", "0", "when set, replacement for sv_airaccel_qw when just strafing"};
cvar_t sv_aircontrol = {0, "sv_aircontrol", "0", "CPMA-style air control"};
cvar_t sv_aircontrol_power = {0, "sv_aircontrol_power", "2", "CPMA-style air control exponent"};
+cvar_t sv_aircontrol_penalty = {0, "sv_aircontrol_penalty", "0", "deceleration while using CPMA-style air control"};
cvar_t sv_allowdownloads = {0, "sv_allowdownloads", "1", "whether to allow clients to download files from the server (does not affect http downloads)"};
cvar_t sv_allowdownloads_archive = {0, "sv_allowdownloads_archive", "0", "whether to allow downloads of archives (pak/pk3)"};
cvar_t sv_allowdownloads_config = {0, "sv_allowdownloads_config", "0", "whether to allow downloads of config files (cfg)"};
Cvar_RegisterVariable (&sv_airstopaccelerate);
Cvar_RegisterVariable (&sv_airstrafeaccelerate);
Cvar_RegisterVariable (&sv_maxairstrafespeed);
+ Cvar_RegisterVariable (&sv_airstrafeaccel_qw);
+ Cvar_RegisterVariable (&sv_airspeedlimit_nonqw);
Cvar_RegisterVariable (&sv_aircontrol);
Cvar_RegisterVariable (&sv_aircontrol_power);
+ Cvar_RegisterVariable (&sv_aircontrol_penalty);
Cvar_RegisterVariable (&sv_allowdownloads);
Cvar_RegisterVariable (&sv_allowdownloads_archive);
Cvar_RegisterVariable (&sv_allowdownloads_config);
{
client_t *client;
int i;
- float spawn_parms[NUM_SPAWN_PARMS];
client = svs.clients + clientnum;
// set up the client_t
if (sv.loadgame)
- memcpy (spawn_parms, client->spawn_parms, sizeof(spawn_parms));
- memset (client, 0, sizeof(*client));
+ {
+ float backupparms[NUM_SPAWN_PARMS];
+ memcpy(backupparms, client->spawn_parms, sizeof(backupparms));
+ memset(client, 0, sizeof(*client));
+ memcpy(client->spawn_parms, backupparms, sizeof(backupparms));
+ }
+ else
+ memset(client, 0, sizeof(*client));
client->active = true;
client->netconnection = netconnection;
client->rate = 1000000000;
client->connecttime = realtime;
- if (sv.loadgame)
- memcpy (client->spawn_parms, spawn_parms, sizeof(spawn_parms));
- else
+ if (!sv.loadgame)
{
// call the progs to get default spawn parms for the new client
// set self to world to intentionally cause errors with broken SetNewParms code in some mods
statsf[STAT_MOVEVARS_AIRSTOPACCELERATE] = sv_airstopaccelerate.value;
statsf[STAT_MOVEVARS_AIRSTRAFEACCELERATE] = sv_airstrafeaccelerate.value;
statsf[STAT_MOVEVARS_MAXAIRSTRAFESPEED] = sv_maxairstrafespeed.value;
+ statsf[STAT_MOVEVARS_AIRSTRAFEACCEL_QW] = sv_airstrafeaccel_qw.value;
statsf[STAT_MOVEVARS_AIRCONTROL] = sv_aircontrol.value;
statsf[STAT_MOVEVARS_AIRCONTROL_POWER] = sv_aircontrol_power.value;
+ statsf[STAT_MOVEVARS_AIRCONTROL_PENALTY] = sv_aircontrol_penalty.value;
statsf[STAT_MOVEVARS_WARSOWBUNNY_AIRFORWARDACCEL] = sv_warsowbunny_airforwardaccel.value;
statsf[STAT_MOVEVARS_WARSOWBUNNY_ACCEL] = sv_warsowbunny_accel.value;
statsf[STAT_MOVEVARS_WARSOWBUNNY_TOPSPEED] = sv_warsowbunny_topspeed.value;
statsf[STAT_MOVEVARS_WARSOWBUNNY_TURNACCEL] = sv_warsowbunny_turnaccel.value;
statsf[STAT_MOVEVARS_WARSOWBUNNY_BACKTOSIDERATIO] = sv_warsowbunny_backtosideratio.value;
+ statsf[STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW] = sv_airspeedlimit_nonqw.value;
statsf[STAT_FRAGLIMIT] = fraglimit.value;
statsf[STAT_TIMELIMIT] = timelimit.value;
if (!FS_FileExists(modelname))
{
- Con_Printf("SpawnServer: no map file named %s\n", modelname);
- return;
+ dpsnprintf (modelname, sizeof(modelname), "maps/%s", server);
+ if (!FS_FileExists(modelname))
+ {
+ Con_Printf("SpawnServer: no map file named maps/%s.bsp\n", server);
+ return;
+ }
}
if (cls.state != ca_dedicated)
strlcpy (sv.name, server, sizeof (sv.name));
strlcpy(sv.worldname, modelname, sizeof(sv.worldname));
FS_StripExtension(sv.worldname, sv.worldnamenoextension, sizeof(sv.worldnamenoextension));
- strlcpy(sv.worldbasename, !strncmp(sv.worldnamenoextension, "maps/", 5) ? sv.worldnamenoextension + 4 : sv.worldnamenoextension, sizeof(sv.worldbasename));
+ strlcpy(sv.worldbasename, !strncmp(sv.worldnamenoextension, "maps/", 5) ? sv.worldnamenoextension + 5 : sv.worldnamenoextension, sizeof(sv.worldbasename));
//Cvar_SetQuick(&sv_worldmessage, sv.worldmessage); // set later after QC is spawned
Cvar_SetQuick(&sv_worldname, sv.worldname);
Cvar_SetQuick(&sv_worldnamenoextension, sv.worldnamenoextension);