mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- initsect
This commit is contained in:
parent
f09e7ed32f
commit
80f80ed5e5
7 changed files with 13 additions and 11 deletions
|
@ -57,7 +57,7 @@ extern int initx;
|
|||
extern int inity;
|
||||
extern int initz;
|
||||
extern int16_t inita;
|
||||
extern int initsect;
|
||||
extern sectortype* initsectp;
|
||||
|
||||
extern int nCurChunkNum;
|
||||
extern DExhumedActor* nBodyGunSprite[50];
|
||||
|
|
|
@ -913,7 +913,7 @@ void DrawWeapons(double smooth)
|
|||
|
||||
int var_28 = var_30 + WeaponInfo[nWeapon].b[var_34];
|
||||
|
||||
int8_t nShade = sector[initsect].ceilingshade;
|
||||
int8_t nShade = initsectp->ceilingshade;
|
||||
|
||||
int nDouble = PlayerList[nLocalPlayer].nDouble;
|
||||
int nPal = kPalNormal;
|
||||
|
|
|
@ -41,7 +41,7 @@ enum
|
|||
|
||||
int initx, inity, initz;
|
||||
int16_t inita;
|
||||
int initsect;
|
||||
sectortype* initsectp;
|
||||
|
||||
int nCurChunkNum = 0;
|
||||
|
||||
|
@ -117,10 +117,12 @@ uint8_t LoadLevel(MapRecord* map)
|
|||
}
|
||||
|
||||
vec3_t startPos;
|
||||
int initsect;
|
||||
engineLoadBoard(currentLevel->fileName, 0, &startPos, &inita, &initsect);
|
||||
initx = startPos.x;
|
||||
inity = startPos.y;
|
||||
initz = startPos.z;
|
||||
initsectp = §or[initsect];
|
||||
|
||||
int i;
|
||||
|
||||
|
@ -159,7 +161,7 @@ void InitLevel(MapRecord* map)
|
|||
|
||||
for (int i = 0; i < nTotalPlayers; i++)
|
||||
{
|
||||
SetSavePoint(i, initx, inity, initz, §or[initsect], inita);
|
||||
SetSavePoint(i, initx, inity, initz, initsectp, inita);
|
||||
RestartPlayer(i);
|
||||
InitPlayerKeys(i);
|
||||
}
|
||||
|
@ -735,7 +737,7 @@ void ExamineSprites()
|
|||
|
||||
if (nNetPlayerCount)
|
||||
{
|
||||
auto pActor = insertActor(initsect, 0);
|
||||
auto pActor = insertActor(initsectp, 0);
|
||||
auto pSprite = &pActor->s();
|
||||
|
||||
pSprite->x = initx;
|
||||
|
@ -816,7 +818,7 @@ void SerializeInit(FSerializer& arc)
|
|||
("inity", inity)
|
||||
("initz", initz)
|
||||
("inita", inita)
|
||||
("initsect", initsect)
|
||||
("initsect", initsectp)
|
||||
("curchunk", nCurChunkNum)
|
||||
.Array("bodygunsprite", nBodyGunSprite, countof(nBodyGunSprite))
|
||||
("curbodygun", nCurBodyGunNum)
|
||||
|
|
|
@ -40,8 +40,8 @@ void GrabMap()
|
|||
|
||||
void UpdateMap()
|
||||
{
|
||||
if (sector[initsect].ceilingpal != 3 || (PlayerList[nLocalPlayer].nTorch != 0)) {
|
||||
MarkSectorSeen(initsect);
|
||||
if (initsectp->ceilingpal != 3 || (PlayerList[nLocalPlayer].nTorch != 0)) {
|
||||
MarkSectorSeen(sectnum(initsectp));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1090,7 +1090,7 @@ void MoveSector(sectortype* pSector, int nAngle, int *nXVel, int *nYVel)
|
|||
inity = pSprite->y;
|
||||
initz = pSprite->z;
|
||||
inita = pSprite->ang;
|
||||
initsect = pSprite->sectnum;
|
||||
initsectp = pSprite->sector();
|
||||
}
|
||||
|
||||
void SetQuake(DExhumedActor* pActor, int nVal)
|
||||
|
|
|
@ -72,7 +72,7 @@ static int osdcmd_spawn(CCmdFuncPtr parm)
|
|||
{
|
||||
if (parm->numparms != 1) return CCMD_SHOWHELP;
|
||||
auto c = parm->parms[0];
|
||||
auto sectp = §or[initsect];
|
||||
auto sectp = initsectp;
|
||||
if (!stricmp(c, "anubis")) BuildAnubis(nullptr, initx, inity, sectp->floorz, sectp, inita, false);
|
||||
else if (!stricmp(c, "spider")) BuildSpider(nullptr, initx, inity, sectp->floorz, sectp, inita);
|
||||
else if (!stricmp(c, "mummy")) BuildMummy(nullptr, initx, inity, sectp->floorz, sectp, inita);
|
||||
|
|
|
@ -2553,7 +2553,7 @@ sectdone:
|
|||
initx = pPlayerSprite->x;
|
||||
inity = pPlayerSprite->y;
|
||||
initz = pPlayerSprite->z;
|
||||
initsect = pPlayerSprite->sectnum;
|
||||
initsectp = pPlayerSprite->sector();
|
||||
inita = pPlayerSprite->ang;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue