1
0
Fork 0
forked from fte/fteqw

Fix bug with previous commit.

Fix loading legacy saved games.
Hide the misaligned lumps warning under the developer cvar.


git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5289 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2018-08-09 15:50:07 +00:00
parent c33c8a97a4
commit c97fa33879
3 changed files with 11 additions and 5 deletions

View file

@ -5224,13 +5224,19 @@ static void CL_ParseSetInfo (void)
if (cls.fteprotocolextensions2 & PEXT2_INFOBLOBS)
key = InfoBuf_DecodeString(temp, temp+strlen(temp), &keysize);
else
{
keysize = strlen(temp);
key = Z_StrDup(temp);
}
temp = MSG_ReadString();
if (cls.fteprotocolextensions2 & PEXT2_INFOBLOBS)
val = InfoBuf_DecodeString(temp, temp+strlen(temp), &valsize);
else
{
valsize = strlen(temp);
val = Z_StrDup(temp);
}
if (slot == 255)
InfoBuf_SyncReceive(&cl.serverinfo, key, keysize, val, valsize, offset, final);

View file

@ -5184,7 +5184,7 @@ static qboolean QDECL Mod_LoadBrushModel (model_t *mod, void *buffer, size_t fsi
{ //pre-phong versions of tyrutils wrote misaligned lumps. These crash on arm/etc.
char *tmp;
int ofs = 0;
Con_Printf(CON_WARNING"%s: Misaligned lumps detected\n", mod->name);
Con_DPrintf(CON_WARNING"%s: Misaligned lumps detected\n", mod->name);
tmp = BZ_Malloc(fsize);
memcpy(tmp, mod_base, fsize);
for (i = 0; i < HEADER_LUMPS; i++)

View file

@ -1801,9 +1801,11 @@ char *PDECL PR_SaveEnts(pubprogfuncs_t *ppf, char *buf, size_t *bufofs, size_t b
//write the ents
for (a = 0; a < sv_num_edicts; a++)
{
char head[64];
edictrun_t *ed = (edictrun_t *)EDICT_NUM(progfuncs, a);
AddS ("{\n");
QC_snprintfz(head, sizeof(head), "{//%i\n", a);
AddS (head);
if (ed->ereftype == ER_ENTITY) //free entities write a {} with no data. the loader detects this specifically.
ED_WriteEdict(progfuncs, ed, buf, bufofs, bufmax, true);
@ -2207,8 +2209,6 @@ int PDECL PR_LoadEnts(pubprogfuncs_t *ppf, const char *file, void *ctx, void (PD
}
else
{
ed = (edictrun_t *)EDICT_NUM(progfuncs, numents);
if (!ed)
ed = ED_AllocIntoTable(progfuncs, numents, false, prinst.fields_size);
if (externs->entspawn)