Ejemplo n.º 1
0
void CLNQ_SignonReply (void)
{
	extern cvar_t name, topcolor, bottomcolor;

	Com_DPrintf ("CL_SignonReply: %i\n", nq_signon);

	switch (nq_signon)
	{
	case 1:
		MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
		MSG_WriteString (&cls.netchan.message, "prespawn");
		break;

	case 2:
		MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
		MSG_WriteString (&cls.netchan.message, va("name \"%s\"\n", name.string));
	
		MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
		MSG_WriteString (&cls.netchan.message, va("color %i %i\n", (int)topcolor.value, (int)bottomcolor.value));
	
		MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
		MSG_WriteString (&cls.netchan.message, "spawn");
		break;

	case 3:
		MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
		MSG_WriteString (&cls.netchan.message, "begin");
		Cache_Report ();		// print remaining memory
		break;

	case 4:
		//SCR_EndLoadingPlaque ();		// allow normal screen updates
		break;
	}
}
Ejemplo n.º 2
0
void MEM_PrintCache( void )
{
	Con_Printf( "\n\nCache:\n\n" ); 
	Cache_Print(); 

	Cache_Print_Sounds_And_Totals();
	Cache_Print_Models_And_Totals();
	Cache_Report();
}
Ejemplo n.º 3
0
/*
=================
Skin_NextDownload
=================
*/
void Skin_NextDownload (void)
{
	player_info_t	*sc;
	int			i;

	if (cls.downloadnumber == 0)
		Con_Printf ("Checking skins...\n");
	cls.downloadtype = dl_skin;

	for ( 
		; cls.downloadnumber != MAX_CLIENTS
		; cls.downloadnumber++)
	{
		sc = &cl.players[cls.downloadnumber];
		if (!sc->name[0])
			continue;
		Skin_Find (sc);
		if (noskins.value)
			continue;
		if (!CL_CheckOrDownloadFile(va("skins/%s.pcx", sc->skin->name)))
			return;		// started a download
	}

	cls.downloadtype = dl_none;

	// now load them in for real
	for (i=0 ; i<MAX_CLIENTS ; i++)
	{
		sc = &cl.players[i];
		if (!sc->name[0])
			continue;
		Skin_Cache (sc->skin);
// >>> FIX: For Nintendo Wii using devkitPPC / libogc
// Support for GX hardware:
//#ifdef GLQUAKE
#if defined(GXQUAKE) || defined(GLQUAKE)
// <<< FIX
		sc->skin = NULL;
#endif
	}

	if (cls.state != ca_active)
	{	// get next signon phase
		MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
		MSG_WriteString (&cls.netchan.message,
			va("begin %i", cl.servercount));
		Cache_Report ();		// print remaining memory
	}
}
Ejemplo n.º 4
0
/*
=================
Skin_NextDownload
=================
*/
void
Skin_NextDownload ( void )
{
	player_info_t	*sc;
	int			i;

	if (cls.downloadnumber == 0)
		Con_Printf ("Checking skins...\n");
	cls.downloadtype = dl_skin;

	for (
		; cls.downloadnumber != MAX_CLIENTS
		; cls.downloadnumber++)
	{
		sc = &cl.players[cls.downloadnumber];
		if (!sc->name[0])
			continue;
		Skin_Find (sc);
		if (noskins->value)
			continue;
#ifndef UQUAKE
		if (!CL_CheckOrDownloadFile(va("skins/%s.pcx", sc->skin->name)))
			return;		// started a download
#endif
	}

	cls.downloadtype = dl_none;

	// now load them in for real
	for (i=0 ; i<MAX_CLIENTS ; i++)
	{
		sc = &cl.players[i];
		if (!sc->name[0])
			continue;
		Skin_Cache (sc->skin);
		sc->skin = NULL;
	}

	if (cls.state != ca_active)
	{	// get next signon phase
		MSG_WriteByte (&cls.netchan.message, clc_stringcmd);
		MSG_WriteString (&cls.netchan.message,
			va("begin %i", cl.servercount));
		Cache_Report ();		// print remaining memory
	}
}
Ejemplo n.º 5
0
/*
=====================
CL_SignonReply

An svc_signonnum has been received, perform a client side setup
=====================
*/
void
CL_SignonReply(void)
{
    char str[8192];

    Con_DPrintf("CL_SignonReply: %i\n", cls.signon);

    switch (cls.signon) {
    case 1:
	MSG_WriteByte(&cls.message, clc_stringcmd);
	MSG_WriteString(&cls.message, "prespawn");
	break;

    case 2:
	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));

	MSG_WriteByte(&cls.message, clc_stringcmd);
	sprintf(str, "spawn %s", cls.spawnparms);
	MSG_WriteString(&cls.message, str);
	break;

    case 3:
	MSG_WriteByte(&cls.message, clc_stringcmd);
	MSG_WriteString(&cls.message, "begin");
	Cache_Report();		// print remaining memory

	// FIXME - this the right place for it?
	cls.state = ca_firstupdate;
	break;

    case 4:
	SCR_EndLoadingPlaque();	// allow normal screen updates

	// FIXME - this the right place for it?
	cls.state = ca_active;
	break;
    }
}