- floatified the variables.

This commit is contained in:
Christoph Oelckers 2022-09-27 20:26:53 +02:00
parent 4114f21323
commit 3b88f7db3e
4 changed files with 18 additions and 18 deletions

View file

@ -348,10 +348,10 @@ void dbLoadMap(const char* pPath, DVector3& pos, short* pAngle, sectortype** cur
pXSector->stopOn = bitReader.readUnsigned(1);
pXSector->stopOff = bitReader.readUnsigned(1);
pXSector->ceilpal = bitReader.readUnsigned(4);
pXSector->_offCeilZ = bitReader.readSigned(32);
pXSector->_onCeilZ = bitReader.readSigned(32);
pXSector->_offFloorZ = bitReader.readSigned(32);
pXSector->_onFloorZ = bitReader.readSigned(32);
pXSector->offCeilZ = bitReader.readSigned(32) * zmaptoworld;
pXSector->onCeilZ = bitReader.readSigned(32) * zmaptoworld;
pXSector->offFloorZ = bitReader.readSigned(32) * zmaptoworld;
pXSector->onFloorZ = bitReader.readSigned(32) * zmaptoworld;
/*pXSector->marker0 =*/ bitReader.readUnsigned(16);
/*pXSector->marker1 =*/ bitReader.readUnsigned(16);
pXSector->Crush = bitReader.readUnsigned(1);

View file

@ -559,10 +559,10 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, XSECTOR& w, XSECTO
("data", w.data, def->data)
("txid", w.txID, def->txID)
("rxid", w.rxID, def->rxID)
("offceilz", w._offCeilZ, def->_offCeilZ)
("onceilz", w._onCeilZ, def->_onCeilZ)
("offloorz", w._offFloorZ, def->_offFloorZ)
("onloorz", w._onFloorZ, def->_onFloorZ)
("offceilz", w.offCeilZ, def->offCeilZ)
("onceilz", w.onCeilZ, def->onCeilZ)
("offloorz", w.offFloorZ, def->offFloorZ)
("onloorz", w.onFloorZ, def->onFloorZ)
("windvel", w.windVel, def->windVel)
("busytimea", w.busyTimeA, def->busyTimeA)
("busytimeb", w.busyTimeB, def->busyTimeB)

View file

@ -190,15 +190,15 @@ struct XSECTOR {
DBloodActor* actordata;
uint32_t busy;
int32_t _offCeilZ;
int32_t _onCeilZ;
int32_t _offFloorZ;
int32_t _onFloorZ;
double offCeilZ;
double onCeilZ;
double offFloorZ;
double onFloorZ;
int int_offCeilZ() const { return _offCeilZ; }
int int_onCeilZ() const { return _onCeilZ; }
int int_offFloorZ() const { return _offFloorZ; }
int int_onFloorZ() const { return _onFloorZ; }
int int_offCeilZ() const { return offCeilZ * zworldtoint; }
int int_onCeilZ() const { return onCeilZ * zworldtoint; }
int int_offFloorZ() const { return offFloorZ * zworldtoint; }
int int_onFloorZ() const { return onFloorZ * zworldtoint; }
uint32_t windVel; // Wind vel (changed from 10 bit to use higher velocity values)

View file

@ -1678,8 +1678,8 @@ void OperatePath(sectortype* pSector, EVENT event)
}
pXSector->marker1 = actor;
pXSector->_offFloorZ = marker0->int_pos().Z;
pXSector->_onFloorZ = actor->int_pos().Z;
pXSector->offFloorZ = marker0->spr.pos.Z;
pXSector->onFloorZ = actor->spr.pos.Z;
switch (event.cmd) {
case kCmdOn:
pXSector->state = 0;