void TraceLine (vec3_t start, vec3_t end, vec3_t impact)
{
+ /*
trace_t trace;
memset (&trace, 0, sizeof(trace));
SV_RecursiveHullCheck (cl.worldmodel->hulls, 0, 0, 1, start, end, &trace);
- if (trace.fraction < 1)
- {
- VectorCopy (trace.endpos, impact);
- }
- else
- {
- VectorCopy (end, impact);
- }
+ VectorCopy (trace.endpos, impact);
+ */
+ VectorCopy (end, impact);
}
void Chase_Update (void)
upmove += cmd->upmove;
total++;
// LordHavoc: cap outgoing movement messages to sys_ticrate
- if (realtime - lastmovetime < sys_ticrate.value)
+ if (cl.maxclients > 1 && realtime - lastmovetime < sys_ticrate.value)
return;
lastmovetime = realtime;
// average what has happened during this time
break;
case 2:
- if (cl_pmodel.value)
- {
- MSG_WriteByte (&cls.message, clc_stringcmd);
- MSG_WriteString (&cls.message, va("pmodel %f\n", cl_pmodel.value));
- }
-
MSG_WriteByte (&cls.message, clc_stringcmd);
MSG_WriteString (&cls.message, va("name \"%s\"\n", cl_name.string));
MSG_WriteByte (&cls.message, clc_stringcmd);
MSG_WriteString (&cls.message, va("color %i %i\n", ((int)cl_color.value)>>4, ((int)cl_color.value)&15));
+ if (cl_pmodel.value)
+ {
+ MSG_WriteByte (&cls.message, clc_stringcmd);
+ MSG_WriteString (&cls.message, va("pmodel %f\n", cl_pmodel.value));
+ }
+
MSG_WriteByte (&cls.message, clc_stringcmd);
sprintf (str, "spawn %s", cls.spawnparms);
MSG_WriteString (&cls.message, str);
Con_Printf("Demo unpaused\n");
}
+/*
+======================
+CL_PModel_f
+LordHavoc: Intended for Nehahra, I personally think this is dumb, but Mindcrime won't listen.
+======================
+*/
+void CL_PModel_f (void)
+{
+ int i;
+ eval_t *val;
+
+ if (Cmd_Argc () == 1)
+ {
+ Con_Printf ("\"pmodel\" is \"%s\"\n", cl_pmodel.string);
+ return;
+ }
+ i = atoi(Cmd_Argv(1));
+
+ if (cmd_source == src_command)
+ {
+ if (cl_pmodel.value == i)
+ return;
+ Cvar_SetValue ("_cl_pmodel", i);
+ if (cls.state == ca_connected)
+ Cmd_ForwardToServer ();
+ return;
+ }
+
+ host_client->pmodel = i;
+ if (val = GETEDICTFIELDVALUE(host_client->edict, eval_pmodel))
+ val->_float = i;
+}
+
cvar_t demo_nehahra = {"demo_nehahra", "0"};
/*
// LordHavoc: added pausedemo
Cmd_AddCommand ("pausedemo", CL_PauseDemo_f);
+ // LordHavoc: added pmodel command (like name, etc, only intended for Nehahra)
+ Cmd_AddCommand ("pmodel", CL_PModel_f);
// LordHavoc: added demo_nehahra cvar
Cvar_RegisterVariable (&demo_nehahra);
if (nehahra)
{
frametimetotal += host_frametime;
// LordHavoc: cap server at sys_ticrate in listen games
- if (!isDedicated && ((realtime - lastservertime) < sys_ticrate.value))
+ if (!isDedicated && svs.maxclients > 1 && ((realtime - lastservertime) < sys_ticrate.value))
return;
// run the world state
pr_global_struct->frametime = frametimetotal;
}
else
{
+ eval_t *val;
// set up the edict
ent = host_client->edict;
ent->v.colormap = NUM_FOR_EDICT(ent);
ent->v.team = (host_client->colors & 15) + 1;
ent->v.netname = host_client->name - pr_strings;
+ if (val = GETEDICTFIELDVALUE(host_client->edict, eval_pmodel))
+ val->_float = host_client->pmodel;
// copy spawn parms out of the client_t
CL_Disconnect ();
}
-/*
-======================
-Host_PModel_f
-LordHavoc: Intended for Nehahra, I personally think this is dumb, but Mindcrime won't listen.
-======================
-*/
-void Host_PModel_f (void)
-{
- int i;
- eval_t *val;
-
- if (Cmd_Argc () == 1)
- {
- Con_Printf ("\"pmodel\" is \"%s\"\n", cl_pmodel.string);
- return;
- }
- i = atoi(Cmd_Argv(1));
-
- if (cmd_source == src_command)
- {
- if (cl_pmodel.value == i)
- return;
- Cvar_SetValue ("_cl_pmodel", i);
- if (cls.state == ca_connected)
- Cmd_ForwardToServer ();
- return;
- }
-
- if (val = GETEDICTFIELDVALUE(host_client->edict, eval_pmodel))
- val->_float = i;
-}
-
//=============================================================================
/*
Cmd_AddCommand ("ping", Host_Ping_f);
Cmd_AddCommand ("load", Host_Loadgame_f);
Cmd_AddCommand ("save", Host_Savegame_f);
- Cmd_AddCommand ("pmodel", Host_PModel_f);
Cmd_AddCommand ("startdemos", Host_Startdemos_f);
Cmd_AddCommand ("demos", Host_Demos_f);
// client known data for deltas
int old_frags;
+ int pmodel;
} client_t;