Convert map checksums to little endian format - now QW client works on big endian machines.

This commit is contained in:
Marcus Sundberg 2000-01-08 05:47:55 +00:00
parent dfbfbb6711
commit 64e8e448e1
2 changed files with 8 additions and 8 deletions

View file

@ -1352,13 +1352,13 @@ void Mod_LoadBrushModel (model_t *mod, void *buffer)
for (i = 0; i < HEADER_LUMPS; i++) {
if (i == LUMP_ENTITIES)
continue;
mod->checksum ^= Com_BlockChecksum(mod_base + header->lumps[i].fileofs,
header->lumps[i].filelen);
mod->checksum ^= LittleLong(Com_BlockChecksum(mod_base + header->lumps[i].fileofs,
header->lumps[i].filelen));
if (i == LUMP_VISIBILITY || i == LUMP_LEAFS || i == LUMP_NODES)
continue;
mod->checksum2 ^= Com_BlockChecksum(mod_base + header->lumps[i].fileofs,
header->lumps[i].filelen);
mod->checksum2 ^= LittleLong(Com_BlockChecksum(mod_base + header->lumps[i].fileofs,
header->lumps[i].filelen));
}

View file

@ -1150,13 +1150,13 @@ void Mod_LoadBrushModel (model_t *mod, void *buffer)
for (i = 0; i < HEADER_LUMPS; i++) {
if (i == LUMP_ENTITIES)
continue;
mod->checksum ^= Com_BlockChecksum(mod_base + header->lumps[i].fileofs,
header->lumps[i].filelen);
mod->checksum ^= LittleLong(Com_BlockChecksum(mod_base + header->lumps[i].fileofs,
header->lumps[i].filelen));
if (i == LUMP_VISIBILITY || i == LUMP_LEAFS || i == LUMP_NODES)
continue;
mod->checksum2 ^= Com_BlockChecksum(mod_base + header->lumps[i].fileofs,
header->lumps[i].filelen);
mod->checksum2 ^= LittleLong(Com_BlockChecksum(mod_base + header->lumps[i].fileofs,
header->lumps[i].filelen));
}
// load into heap