mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 12:30:46 +00:00
- sector portals in RRRA are working.
This commit is contained in:
parent
dbbdfaa4ba
commit
13bbf0a4f9
4 changed files with 9 additions and 3 deletions
|
@ -375,6 +375,9 @@ static void insertAllSprites(const char* filename, const vec3_t* pos, int16_t* c
|
||||||
void engineLoadBoard(const char* filename, int flags, vec3_t* pos, int16_t* ang, int16_t* cursectnum)
|
void engineLoadBoard(const char* filename, int flags, vec3_t* pos, int16_t* ang, int16_t* cursectnum)
|
||||||
{
|
{
|
||||||
inputState.ClearAllInput();
|
inputState.ClearAllInput();
|
||||||
|
memset(sector, 0, sizeof(*sector) * MAXSECTORS);
|
||||||
|
memset(wall, 0, sizeof(*wall) * MAXWALLS);
|
||||||
|
memset(sprite, 0, sizeof(*sector) * MAXSPRITES);
|
||||||
|
|
||||||
FileReader fr = fileSystem.OpenFileReader(filename);
|
FileReader fr = fileSystem.OpenFileReader(filename);
|
||||||
if (!fr.isOpen()) I_Error("Unable to open map %s", filename);
|
if (!fr.isOpen()) I_Error("Unable to open map %s", filename);
|
||||||
|
|
|
@ -112,7 +112,6 @@ void StartLevel(MapRecord* level)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
memset(xsprite, 0, sizeof(xsprite));
|
memset(xsprite, 0, sizeof(xsprite));
|
||||||
memset(sprite, 0, kMaxSprites * sizeof(spritetype));
|
|
||||||
//drawLoadingScreen();
|
//drawLoadingScreen();
|
||||||
dbLoadMap(currentLevel->fileName, (int*)&startpos.x, (int*)&startpos.y, (int*)&startpos.z, &startang, &startsectnum, nullptr);
|
dbLoadMap(currentLevel->fileName, (int*)&startpos.x, (int*)&startpos.y, (int*)&startpos.z, &startang, &startsectnum, nullptr);
|
||||||
SECRET_SetMapName(currentLevel->DisplayName(), currentLevel->name);
|
SECRET_SetMapName(currentLevel->DisplayName(), currentLevel->name);
|
||||||
|
|
|
@ -512,6 +512,10 @@ void dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, shor
|
||||||
gModernMap = false;
|
gModernMap = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
memset(sector, 0, sizeof(*sector) * MAXSECTORS);
|
||||||
|
memset(wall, 0, sizeof(*wall) * MAXWALLS);
|
||||||
|
memset(sprite, 0, sizeof(*sector) * MAXSPRITES);
|
||||||
|
|
||||||
#ifdef USE_OPENGL
|
#ifdef USE_OPENGL
|
||||||
Polymost::Polymost_prepare_loadboard();
|
Polymost::Polymost_prepare_loadboard();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -924,7 +924,7 @@ static void SpawnPortals()
|
||||||
if (findwallbetweensectors(i, t) >= 0)
|
if (findwallbetweensectors(i, t) >= 0)
|
||||||
{
|
{
|
||||||
sector[i].portalflags = PORTAL_SECTOR_FLOOR;
|
sector[i].portalflags = PORTAL_SECTOR_FLOOR;
|
||||||
sector[i].portalnum = uint8_t(&pt - allPortals.Data());
|
sector[i].portalnum = uint8_t(1 ^ (&pt - allPortals.Data()));
|
||||||
pt.targets.Push(i);
|
pt.targets.Push(i);
|
||||||
goto nexti;
|
goto nexti;
|
||||||
}
|
}
|
||||||
|
@ -943,7 +943,7 @@ static void SpawnPortals()
|
||||||
if (findwallbetweensectors(i, t) >= 0)
|
if (findwallbetweensectors(i, t) >= 0)
|
||||||
{
|
{
|
||||||
sector[i].portalflags = PORTAL_SECTOR_CEILING;
|
sector[i].portalflags = PORTAL_SECTOR_CEILING;
|
||||||
sector[i].portalnum = uint8_t(&pt - allPortals.Data());
|
sector[i].portalnum = uint8_t(1 ^ (&pt - allPortals.Data()));
|
||||||
pt.targets.Push(i);
|
pt.targets.Push(i);
|
||||||
goto nexti;
|
goto nexti;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue