- fixed maphack loader.

The duplicate 'currentSprite' variable prevented it from doing anything.
Also cleaned up the interface a bit to avoid using a global variable for parameter passing.

Fixes #279
This commit is contained in:
Christoph Oelckers 2021-03-07 09:39:16 +01:00
parent 9104fba3ec
commit ad8654ed06
4 changed files with 11 additions and 10 deletions

View file

@ -439,7 +439,11 @@ void engineLoadBoard(const char* filename, int flags, vec3_t* pos, int16_t* ang,
//Must be last.
updatesector(pos->x, pos->y, cursectnum);
guniqhudid = 0;
G_LoadMapHack(filename);
fr.Seek(0, FileReader::SeekSet);
auto buffer = fr.Read();
unsigned char md4[16];
md4once(buffer.Data(), buffer.Size(), md4);
G_LoadMapHack(filename, md4);
memcpy(wallbackup, wall, sizeof(wallbackup));
memcpy(sectorbackup, sector, sizeof(sectorbackup));