A few unnecessary ifdef's killed

This commit is contained in:
Joseph Carter 2000-03-06 17:53:17 +00:00
parent 46de54d92d
commit b9797600ff
3 changed files with 48 additions and 55 deletions

View file

@ -503,6 +503,54 @@ void CL_SendCmd (void)
Netchan_Transmit (&cls.netchan, buf.cursize, buf.data);
}
#else
/*
=================
CL_SendCmd
=================
*/
void CL_SendCmd (void)
{
usercmd_t cmd;
if (cls.state < ca_connected)
return;
if (cls.signon == SIGNONS)
{
// get basic movement from keyboard
CL_BaseMove (&cmd);
// allow mice or other external controllers to add to the move
//(*IN_Move) (&cmd);
IN_Move(&cmd);
// send the unreliable message
CL_SendMove (&cmd);
}
if (cls.demoplayback)
{
SZ_Clear (&cls.netchan.message);
return;
}
// send the reliable message
if (!cls.netchan.message.cursize)
return; // no message at all
if (!NET_CanSendMessage (cls.netcon))
{
Con_DPrintf ("CL_WriteToServer: can't send\n");
return;
}
if (NET_SendMessage (cls.netcon, &cls.netchan.message) == -1)
Host_Error ("CL_WriteToServer: lost server connection");
SZ_Clear (&cls.netchan.message);
}
/*
==============
CL_SendMove

View file

@ -1380,56 +1380,6 @@ void CL_SendConnectPacket (void)
}
#endif
#ifdef UQUAKE
/*
=================
CL_SendCmd
=================
*/
void CL_SendCmd (void)
{
usercmd_t cmd;
if (cls.state < ca_connected)
return;
if (cls.signon == SIGNONS)
{
// get basic movement from keyboard
CL_BaseMove (&cmd);
// allow mice or other external controllers to add to the move
//(*IN_Move) (&cmd);
IN_Move(&cmd);
// send the unreliable message
CL_SendMove (&cmd);
}
if (cls.demoplayback)
{
SZ_Clear (&cls.netchan.message);
return;
}
// send the reliable message
if (!cls.netchan.message.cursize)
return; // no message at all
if (!NET_CanSendMessage (cls.netcon))
{
Con_DPrintf ("CL_WriteToServer: can't send\n");
return;
}
if (NET_SendMessage (cls.netcon, &cls.netchan.message) == -1)
Host_Error ("CL_WriteToServer: lost server connection");
SZ_Clear (&cls.netchan.message);
}
#endif
#ifdef QUAKEWORLD
/*
==================

View file

@ -557,10 +557,8 @@ void Con_DrawConsole (int lines)
int rows;
char *text;
int row;
#ifdef QUAKEWORLD
int j, n;
char dlbar[1024];
#endif
if (lines <= 0)
return;
@ -601,7 +599,6 @@ void Con_DrawConsole (int lines)
Draw_Character ( (x+1)<<3, y, text[x]);
}
#ifdef QUAKEWORLD
// draw the download bar
// figure out width
if (cls.download) {
@ -644,8 +641,6 @@ void Con_DrawConsole (int lines)
for (i = 0; i < strlen(dlbar); i++)
Draw_Character ( (i+1)<<3, y, dlbar[i]);
}
#endif
// draw the input prompt, user text, and cursor if desired
Con_DrawInput ();