Changed vec4_t down to vec3_t, got the server browser integrated with the menu.dat. csqc is having fun, and nexuiz should work better. Enjoy.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1011 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2005-05-13 10:42:48 +00:00
parent a366a4d90a
commit e348dc30a2
44 changed files with 2031 additions and 1159 deletions

View file

@ -2695,10 +2695,7 @@ static void PF_traceboxh2 (progfuncs_t *prinst, struct globalvars_s *pr_globals)
pr_global_struct->trace_fraction = trace.fraction;
pr_global_struct->trace_inwater = trace.inwater;
pr_global_struct->trace_inopen = trace.inopen;
// if (trace.fraction != 1)
// VectorMA (trace.endpos, 4, trace.plane.normal, P_VEC(trace_endpos));
// else
VectorCopy (trace.endpos, P_VEC(trace_endpos));
VectorCopy (trace.endpos, P_VEC(trace_endpos));
VectorCopy (trace.plane.normal, P_VEC(trace_plane_normal));
pr_global_struct->trace_plane_dist = trace.plane.dist;
if (trace.ent)
@ -3053,9 +3050,7 @@ static void PF_cvar (progfuncs_t *prinst, struct globalvars_s *pr_globals)
void PF_cvar_string (progfuncs_t *prinst, struct globalvars_s *pr_globals)
{
char *str;
str = PR_GetStringOfs(prinst, OFS_PARM0);
RETURN_CSTRING(Cvar_VariableString (str));
}
@ -3373,13 +3368,14 @@ void PF_precache_sound (progfuncs_t *prinst, struct globalvars_s *pr_globals)
char *s;
int i;
s = PR_GetStringOfs(prinst, OFS_PARM0);
/*
if (sv.state != ss_loading)
{
PR_BIError (prinst, "PF_Precache_*: Precache can only be done in spawn functions");
PR_BIError (prinst, "PF_Precache_*: Precache can only be done in spawn functions (%s)", s);
return;
}
s = PR_GetStringOfs(prinst, OFS_PARM0);
*/
G_INT(OFS_RETURN) = G_INT(OFS_PARM0);
if (s[0] <= ' ')
@ -3405,15 +3401,16 @@ void PF_precache_model (progfuncs_t *prinst, struct globalvars_s *pr_globals)
{
char *s;
int i;
s = PR_GetStringOfs(prinst, OFS_PARM0);
/*
if (sv.state != ss_loading)
{
PR_BIError (prinst, "PF_Precache_*: Precache can only be done in spawn functions");
PR_BIError (prinst, "PF_Precache_*: Precache can only be done in spawn functions (%s)", s);
G_FLOAT(OFS_RETURN) = 1;
return;
}
s = PR_GetStringOfs(prinst, OFS_PARM0);
*/
G_INT(OFS_RETURN) = G_INT(OFS_PARM0);
if (s[0] <= ' ')
@ -8260,7 +8257,7 @@ BuiltinList_t BuiltinList[] = { //nq qw h2 ebfs
//FIXME: distinguish between qw and nq parameters here?
{"sprint", PF_sprint, 24, 24, 24}, // void(entity client, string s) sprint = #24;
{"dprint", PF_dprint, 25, 0, 25}, // void(string s) dprint = #25;
{"print", PF_print, 0, 25, 25}, // void(string s) print = #25;
{"print", PF_print, 0, 25, 0}, // void(string s) print = #25;
{"ftos", PF_ftos, 26, 26, 26}, // void(string s) ftos = #26;
{"vtos", PF_vtos, 27, 27, 27}, // void(string s) vtos = #27;
{"coredump", PF_coredump, 28, 28, 28}, //28

View file

@ -698,6 +698,8 @@ void SV_SaveLevelCache(qboolean dontharmgame)
sprintf (name, "%s/saves/%s", com_gamedir, cache->mapname);
COM_DefaultExtension (name, ".lvc");
COM_CreatePath(name);
if (!dontharmgame) //save game in progress
Con_TPrintf (STL_SAVEGAMETO, name);
@ -713,7 +715,6 @@ void SV_SaveLevelCache(qboolean dontharmgame)
}
#endif
f = fopen (name, "wb");
if (!f)
{

View file

@ -432,6 +432,7 @@ void SV_Map_f (void)
qboolean issamelevel = false;
qboolean newunit = false;
qboolean cinematic = false;
qboolean waschangelevel = false;
int i;
char *startspot;
@ -444,6 +445,8 @@ void SV_Map_f (void)
strcpy (level, Cmd_Argv(1));
startspot = ((Cmd_Argc() == 2)?NULL:Cmd_Argv(2));
waschangelevel = !strcmp(Cmd_Argv(0), "changelevel");
nextserver = strchr(level, '+');
if (nextserver)
{
@ -545,7 +548,11 @@ void SV_Map_f (void)
#endif
if (newunit || !startspot || !SV_LoadLevelCache(level, startspot, false))
{
if (waschangelevel && !startspot)
startspot = "";
SV_SpawnServer (level, startspot, false, cinematic);
}
SV_BroadcastCommand ("reconnect\n");

View file

@ -2145,7 +2145,7 @@ void SV_WriteEntitiesToClient (client_t *client, sizebuf_t *msg, qboolean ignore
}
}
if (!ignorepvs)
/* if (!ignorepvs)
{
//branch out to the pvs testing.
if (ent->tagent)
@ -2165,7 +2165,7 @@ void SV_WriteEntitiesToClient (client_t *client, sizebuf_t *msg, qboolean ignore
continue;
}
}
*/

View file

@ -1010,14 +1010,25 @@ void SV_PreSpawn_f (void)
else
{
if (sv.democausesreconnect)
SZ_Write (&host_client->netchan.message,
sv.demosignon_buffers[buf],
sv.demosignon_buffer_size[buf]);
{
if (host_client->netchan.message.cursize+sv.signon_buffer_size[buf] < host_client->netchan.message.maxsize)
{
SZ_Write (&host_client->netchan.message,
sv.demosignon_buffers[buf],
sv.demosignon_buffer_size[buf]);
buf++;
}
}
else
SZ_Write (&host_client->netchan.message,
sv.signon_buffers[buf],
sv.signon_buffer_size[buf]);
buf++;
{
if (host_client->netchan.message.cursize+sv.signon_buffer_size[buf] < host_client->netchan.message.maxsize)
{
SZ_Write (&host_client->netchan.message,
sv.signon_buffers[buf],
sv.signon_buffer_size[buf]);
buf++;
}
}
}
if (buf == bufs+sv.numextrastatics+sv.num_edicts+255)
{ // all done prespawning