-XWALL::references is not needed anymore.

This commit is contained in:
Christoph Oelckers 2021-11-19 16:59:37 +01:00
parent db9d12d19f
commit 576a473ec8
4 changed files with 2 additions and 10 deletions

View file

@ -260,7 +260,6 @@ unsigned short dbInsertXWall(int nWall)
I_Error("Out of free XWalls"); I_Error("Out of free XWalls");
} }
memset(&xwall[nXWall], 0, sizeof(XWALL)); memset(&xwall[nXWall], 0, sizeof(XWALL));
xwall[nXWall].reference = nWall;
wall[nWall].extra = nXWall; wall[nWall].extra = nXWall;
return nXWall; return nXWall;
} }
@ -281,10 +280,6 @@ unsigned short dbInsertXSector(int nSector)
void dbInit(void) void dbInit(void)
{ {
XWallsUsed = XSectorsUsed = 1; // 0 is not usable because it's the default for 'extra' and some code actually uses it to clobber the contents in here. :( XWallsUsed = XSectorsUsed = 1; // 0 is not usable because it's the default for 'extra' and some code actually uses it to clobber the contents in here. :(
for (int i = 1; i < kMaxXWalls; i++)
{
xwall[i].reference = -1;
}
for (int i = 1; i < kMaxXSectors; i++) for (int i = 1; i < kMaxXSectors; i++)
{ {
xsector[i].reference = -1; xsector[i].reference = -1;
@ -744,7 +739,7 @@ void dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, int
assert(nCount <= nXWallSize); assert(nCount <= nXWallSize);
fr.Read(pBuffer, nCount); fr.Read(pBuffer, nCount);
BitReader bitReader(pBuffer, nCount); BitReader bitReader(pBuffer, nCount);
pXWall->reference = bitReader.readSigned(14); /*pXWall->reference =*/ bitReader.readSigned(14);
pXWall->state = bitReader.readUnsigned(1); pXWall->state = bitReader.readUnsigned(1);
pXWall->busy = bitReader.readUnsigned(17); pXWall->busy = bitReader.readUnsigned(17);
pXWall->data = bitReader.readSigned(16); pXWall->data = bitReader.readSigned(16);
@ -775,7 +770,6 @@ void dbLoadMap(const char *pPath, int *pX, int *pY, int *pZ, short *pAngle, int
pXWall->dudeLockout = bitReader.readUnsigned(1); pXWall->dudeLockout = bitReader.readUnsigned(1);
bitReader.readUnsigned(4); bitReader.readUnsigned(4);
bitReader.readUnsigned(32); bitReader.readUnsigned(32);
xwall[wall[i].extra].reference = i;
xwall[wall[i].extra].busy = IntToFixed(xwall[wall[i].extra].state); xwall[wall[i].extra].busy = IntToFixed(xwall[wall[i].extra].state);
} }

View file

@ -244,7 +244,6 @@ struct XWALL {
}; };
uint32_t busy; uint32_t busy;
int16_t reference;
int16_t data; // Data int16_t data; // Data
uint16_t txID; // TX ID uint16_t txID; // TX ID
uint16_t rxID; // RX ID uint16_t rxID; // RX ID

View file

@ -533,7 +533,6 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, XWALL& w, XWALL* d
{ {
arc("flags", w.flags, def->flags) arc("flags", w.flags, def->flags)
("busy", w.busy, def->busy) ("busy", w.busy, def->busy)
("reference", w.reference, def->reference)
("data", w.data, def->data) ("data", w.data, def->data)
("txid", w.txID, def->txID) ("txid", w.txID, def->txID)
("rxid", w.rxID, def->rxID) ("rxid", w.rxID, def->rxID)

View file

@ -371,7 +371,7 @@ bool condCmp(int val, int arg1, int arg2, int comOp);
bool condCmpne(int arg1, int arg2, int comOp); bool condCmpne(int arg1, int arg2, int comOp);
void condError(DBloodActor* pXCond, const char* pzFormat, ...); void condError(DBloodActor* pXCond, const char* pzFormat, ...);
void condUpdateObjectIndex(DBloodActor* oldplayer, DBloodActor* newplayer); void condUpdateObjectIndex(DBloodActor* oldplayer, DBloodActor* newplayer);
DBloodActor* evrListRedirectors(int objType, int objXIndex, DBloodActor* objActor, DBloodActor* pXRedir, int* tx); DBloodActor* evrListRedirectors(int objType, int objIndex, DBloodActor* objActor, DBloodActor* pXRedir, int* tx);
void seqSpawnerOffSameTx(DBloodActor* actor); void seqSpawnerOffSameTx(DBloodActor* actor);
// ------------------------------------------------------------------------- // // ------------------------------------------------------------------------- //
void aiPatrolSetMarker(DBloodActor* actor); void aiPatrolSetMarker(DBloodActor* actor);