More conversion
This commit is contained in:
+36
-36
@@ -44,13 +44,13 @@ void SV_Protocol_f (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
switch (Cmd_Argc())
|
||||
switch (command::argc())
|
||||
{
|
||||
case 1:
|
||||
Con_Printf ("\"sv_protocol\" is \"%i\"\n", sv_protocol);
|
||||
break;
|
||||
case 2:
|
||||
i = atoi(Cmd_Argv(1));
|
||||
case 2:
|
||||
i = atoi(command::argv(1)->c_str());
|
||||
if (i != PROTOCOL_NETQUAKE && i != PROTOCOL_FITZQUAKE && i != PROTOCOL_RMQ)
|
||||
Con_Printf ("sv_protocol must be %i or %i or %i\n", PROTOCOL_NETQUAKE, PROTOCOL_FITZQUAKE, PROTOCOL_RMQ);
|
||||
else
|
||||
@@ -75,38 +75,38 @@ void SV_Init (void)
|
||||
{
|
||||
int i;
|
||||
const char *p;
|
||||
extern cvar_t sv_maxvelocity;
|
||||
extern cvar_t sv_gravity;
|
||||
extern cvar_t sv_nostep;
|
||||
extern cvar_t sv_freezenonclients;
|
||||
extern cvar_t sv_friction;
|
||||
extern cvar_t sv_edgefriction;
|
||||
extern cvar_t sv_stopspeed;
|
||||
extern cvar_t sv_maxspeed;
|
||||
extern cvar_t sv_accelerate;
|
||||
extern cvar_t sv_idealpitchscale;
|
||||
extern cvar_t sv_aim;
|
||||
extern cvar_t sv_altnoclip; //johnfitz
|
||||
extern convar sv_maxvelocity;
|
||||
extern convar sv_gravity;
|
||||
extern convar sv_nostep;
|
||||
extern convar sv_freezenonclients;
|
||||
extern convar sv_friction;
|
||||
extern convar sv_edgefriction;
|
||||
extern convar sv_stopspeed;
|
||||
extern convar sv_maxspeed;
|
||||
extern convar sv_accelerate;
|
||||
extern convar sv_idealpitchscale;
|
||||
extern convar sv_aim;
|
||||
extern convar sv_altnoclip; //johnfitz
|
||||
|
||||
sv.edicts = NULL; // ericw -- sv.edicts switched to use malloc()
|
||||
|
||||
Cvar_RegisterVariable (&sv_maxvelocity);
|
||||
Cvar_RegisterVariable (&sv_gravity);
|
||||
Cvar_RegisterVariable (&sv_friction);
|
||||
Cvar_SetCallback (&sv_gravity, Host_Callback_Notify);
|
||||
Cvar_SetCallback (&sv_friction, Host_Callback_Notify);
|
||||
Cvar_RegisterVariable (&sv_edgefriction);
|
||||
Cvar_RegisterVariable (&sv_stopspeed);
|
||||
Cvar_RegisterVariable (&sv_maxspeed);
|
||||
Cvar_SetCallback (&sv_maxspeed, Host_Callback_Notify);
|
||||
Cvar_RegisterVariable (&sv_accelerate);
|
||||
Cvar_RegisterVariable (&sv_idealpitchscale);
|
||||
Cvar_RegisterVariable (&sv_aim);
|
||||
Cvar_RegisterVariable (&sv_nostep);
|
||||
Cvar_RegisterVariable (&sv_freezenonclients);
|
||||
Cvar_RegisterVariable (&sv_altnoclip); //johnfitz
|
||||
sv_maxvelocity.inscribe();
|
||||
sv_gravity.inscribe();
|
||||
sv_friction.inscribe();
|
||||
sv_gravity.set_callback(Host_Callback_Notify);
|
||||
sv_friction.set_callback(Host_Callback_Notify);
|
||||
sv_edgefriction.inscribe();
|
||||
sv_stopspeed.inscribe();
|
||||
sv_maxspeed.inscribe();
|
||||
sv_maxspeed.set_callback(Host_Callback_Notify);
|
||||
sv_accelerate.inscribe();
|
||||
sv_idealpitchscale.inscribe();
|
||||
sv_aim.inscribe();
|
||||
sv_nostep.inscribe();
|
||||
sv_freezenonclients.inscribe();
|
||||
sv_altnoclip.inscribe(); //johnfitz
|
||||
|
||||
Cmd_AddCommand ("sv_protocol", &SV_Protocol_f); //johnfitz
|
||||
command::add ("sv_protocol", &SV_Protocol_f); //johnfitz
|
||||
|
||||
for (i=0 ; i<MAX_MODELS ; i++)
|
||||
sprintf (localmodels[i], "*%i", i);
|
||||
@@ -799,7 +799,7 @@ stats:
|
||||
if (msg->cursize > 1024 && dev_peakstats.packetsize <= 1024)
|
||||
Con_DWarning ("%i byte packet exceeds standard limit of 1024 (max = %d).\n", msg->cursize, msg->maxsize);
|
||||
dev_stats.packetsize = msg->cursize;
|
||||
dev_peakstats.packetsize = q_max(msg->cursize, dev_peakstats.packetsize);
|
||||
dev_peakstats.packetsize = std::max(msg->cursize, dev_peakstats.packetsize);
|
||||
//johnfitz
|
||||
}
|
||||
|
||||
@@ -1415,7 +1415,7 @@ void SV_SendReconnect (void)
|
||||
NET_SendToAll (&msg, 5.0);
|
||||
|
||||
if (!isDedicated)
|
||||
Cmd_ExecuteString ("reconnect\n", src_command);
|
||||
command::execute_string ("reconnect\n", command::source::command);
|
||||
}
|
||||
|
||||
|
||||
@@ -1463,7 +1463,7 @@ void SV_SpawnServer (const char *server)
|
||||
|
||||
// let's not have any servers with no name
|
||||
if (hostname.string[0] == 0)
|
||||
Cvar_Set ("hostname", "UNNAMED");
|
||||
convar::set ("hostname", "UNNAMED");
|
||||
scr_centertime_off = 0;
|
||||
|
||||
Con_DPrintf ("SpawnServer: %s\n",server);
|
||||
@@ -1481,14 +1481,14 @@ void SV_SpawnServer (const char *server)
|
||||
// make cvars consistant
|
||||
//
|
||||
if (coop.value)
|
||||
Cvar_Set ("deathmatch", "0");
|
||||
convar::set ("deathmatch", "0");
|
||||
current_skill = (int)(skill.value + 0.5);
|
||||
if (current_skill < 0)
|
||||
current_skill = 0;
|
||||
if (current_skill > 3)
|
||||
current_skill = 3;
|
||||
|
||||
Cvar_SetValue ("skill", (float)current_skill);
|
||||
convar::set_value ("skill", (float)current_skill);
|
||||
|
||||
//
|
||||
// set up the new server
|
||||
|
||||
Reference in New Issue
Block a user