mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
[gamecode] Respect the @float_promoted@ magic string
Rather than relying on progs code version, use the string to determine whether PR_Sprintf should behave as if floats have been promoted through ... I imagine I'll get to the rest of the server code at some stage. With these two changes, nq-x11 works again (teleporters were the symptom).
This commit is contained in:
parent
89ec86f77f
commit
c726d77e7d
2 changed files with 7 additions and 2 deletions
|
@ -202,8 +202,6 @@ PR_LoadProgsFile (progs_t *pr, QFile *file, int size)
|
|||
base -= sizeof (progs); // offsets are from file start
|
||||
heap = ((byte *) pr->progs + pr->progs_size + pr->pr_edictareasize);
|
||||
|
||||
pr->float_promoted = progs.version == PROG_VERSION;
|
||||
|
||||
if (pr->edicts) {
|
||||
*pr->edicts = (edict_t *)((byte *) pr->progs + pr->progs_size);
|
||||
}
|
||||
|
|
|
@ -238,8 +238,15 @@ PR_LoadStrings (progs_t *pr)
|
|||
char *str = pr->pr_strings;
|
||||
int count = 0;
|
||||
|
||||
pr->float_promoted = 0;
|
||||
|
||||
while (str < end) {
|
||||
count++;
|
||||
if (*str == '@' && pr->progs->version == PROG_VERSION) {
|
||||
if (!strcmp (str, "@float_promoted@")) {
|
||||
pr->float_promoted = 1;
|
||||
}
|
||||
}
|
||||
str += strlen (str) + 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue