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("exec config.cfg\n");
Cbuf_AddText("exec frontend.cfg\n");
Cbuf_AddText("exec autoexec.cfg\n");
Cbuf_AddText ("cl_warncmd 1\n");
}
}

View file

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