mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Load old ObjectData correctly (#553)
* Load old ObjectData correctly ITS changed ObjectDataStructs::OBJECT_BOMBS_AND_OTHER::ubBombOwner data size from 1 byte to 2 bytes, and it was not taken into account when loading ObjectData
This commit is contained in:
@@ -1179,6 +1179,34 @@ ObjectData& ObjectData::operator =(const ObjectData& src)
|
||||
return *this;
|
||||
}
|
||||
|
||||
ObjectData& ObjectData::operator =(const ObjectData_PRE_ITS& src)
|
||||
{
|
||||
if ((void*)this != (void*)&src)
|
||||
{
|
||||
//copy over the data
|
||||
this->bTrap = src.bTrap;
|
||||
this->fUsed = src.fUsed;
|
||||
this->ubImprintID = src.ubImprintID;
|
||||
|
||||
this->bTemperature = src.bTemperature;
|
||||
this->ubDirection = src.ubDirection;
|
||||
this->ubWireNetworkFlag = src.ubWireNetworkFlag;
|
||||
this->bDefuseFrequency = src.bDefuseFrequency;
|
||||
this->sRepairThreshold = src.sRepairThreshold;
|
||||
this->sObjectFlag = src.sObjectFlag;
|
||||
|
||||
//copy over the union
|
||||
this->misc.bBombStatus = src.misc.bBombStatus;
|
||||
this->misc.bDetonatorType = src.misc.bDetonatorType;
|
||||
this->misc.usBombItem = src.misc.usBombItem;
|
||||
this->misc.bDelay = src.misc.bDelay;
|
||||
this->misc.ubBombOwner = static_cast<UINT16>(src.misc.ubBombOwner);
|
||||
this->misc.bActionValue = src.misc.bActionValue;
|
||||
this->misc.ubTolerance = src.misc.ubTolerance;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
ObjectData::~ObjectData()
|
||||
{
|
||||
DeleteLBE();
|
||||
|
||||
Reference in New Issue
Block a user