Replaced the runtime endien check with #ifndef WORDS_BIGENDIEN. It may need some more work. Also, it will now exec autoexec.cfg when you connect to a server.

This commit is contained in:
Brian Koropoff 2000-05-16 20:24:26 +00:00
parent df7af60578
commit 55fbc12c3d
2 changed files with 4 additions and 9 deletions

View file

@ -578,6 +578,7 @@ void CL_ParseServerData (void)
Cbuf_AddText ("cl_warncmd 0\n"); Cbuf_AddText ("cl_warncmd 0\n");
Cbuf_AddText("exec config.cfg\n"); Cbuf_AddText("exec config.cfg\n");
Cbuf_AddText("exec frontend.cfg\n"); Cbuf_AddText("exec frontend.cfg\n");
Cbuf_AddText("exec autoexec.cfg\n");
Cbuf_AddText ("cl_warncmd 1\n"); Cbuf_AddText ("cl_warncmd 1\n");
} }
} }

View file

@ -1171,11 +1171,7 @@ COM_Init
*/ */
void COM_Init (void) void COM_Init (void)
{ {
byte swaptest[2] = {1,0}; #ifndef WORDS_BIGENDIEN
// set the byte swapping variables in a portable manner
if ( *(short *)swaptest == 1)
{
bigendien = false; bigendien = false;
BigShort = ShortSwap; BigShort = ShortSwap;
LittleShort = ShortNoSwap; LittleShort = ShortNoSwap;
@ -1183,9 +1179,7 @@ void COM_Init (void)
LittleLong = LongNoSwap; LittleLong = LongNoSwap;
BigFloat = FloatSwap; BigFloat = FloatSwap;
LittleFloat = FloatNoSwap; LittleFloat = FloatNoSwap;
} #else
else
{
bigendien = true; bigendien = true;
BigShort = ShortNoSwap; BigShort = ShortNoSwap;
LittleShort = ShortSwap; LittleShort = ShortSwap;
@ -1193,7 +1187,7 @@ void COM_Init (void)
LittleLong = LongSwap; LittleLong = LongSwap;
BigFloat = FloatNoSwap; BigFloat = FloatNoSwap;
LittleFloat = FloatSwap; LittleFloat = FloatSwap;
} #endif
/* Cvar_RegisterVariable (&registered); /* Cvar_RegisterVariable (&registered);
CVAR_FIXME */ CVAR_FIXME */