mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-23 20:42:30 +00:00
Fixed showing number of qvm jump table targets (r2180 caused it to show 0 on alloc).
This commit is contained in:
parent
5e7e61a648
commit
9064a13409
1 changed files with 5 additions and 3 deletions
|
@ -481,18 +481,20 @@ vmHeader_t *VM_LoadQVM( vm_t *vm, qboolean alloc, qboolean unpure)
|
||||||
|
|
||||||
if(header.h->vmMagic == VM_MAGIC_VER2)
|
if(header.h->vmMagic == VM_MAGIC_VER2)
|
||||||
{
|
{
|
||||||
Com_Printf("Loading %d jump table targets\n", vm->numJumpTableTargets);
|
int previousNumJumpTableTargets = vm->numJumpTableTargets;
|
||||||
|
|
||||||
header.h->jtrgLength &= ~0x03;
|
header.h->jtrgLength &= ~0x03;
|
||||||
|
|
||||||
|
vm->numJumpTableTargets = header.h->jtrgLength >> 2;
|
||||||
|
Com_Printf("Loading %d jump table targets\n", vm->numJumpTableTargets);
|
||||||
|
|
||||||
if(alloc)
|
if(alloc)
|
||||||
{
|
{
|
||||||
vm->jumpTableTargets = Hunk_Alloc(header.h->jtrgLength, h_high);
|
vm->jumpTableTargets = Hunk_Alloc(header.h->jtrgLength, h_high);
|
||||||
vm->numJumpTableTargets = header.h->jtrgLength >> 2;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if((header.h->jtrgLength >> 2) != vm->numJumpTableTargets)
|
if(vm->numJumpTableTargets != previousNumJumpTableTargets)
|
||||||
{
|
{
|
||||||
VM_Free(vm);
|
VM_Free(vm);
|
||||||
FS_FreeFile(header.v);
|
FS_FreeFile(header.v);
|
||||||
|
|
Loading…
Reference in a new issue