Migrates AreaEffectSimulation to generated rtiddsgen API
Converts accessor calls to plain member access across aes service and plugin.
This commit is contained in:
102 files changed
+3307
-3313
No files matched your search
+23
-23
@@ -164,22 +164,22 @@ void ObjectBoobyTrap::publishAiv()
|
||||
const QRectF bounds(poly.boundingRect());
|
||||
|
||||
AesItemView aiv(m_aiv);
|
||||
aiv.aesItemId(m_data.id);
|
||||
aiv.effectStart(toMSec(m_data.effectStart));
|
||||
aiv.chargeStruct().chargeTypeId(m_data.chargeTypeId);
|
||||
ddsVecFromPoly(poly, aiv.form());
|
||||
aiv.boundingBoxBottomLeft(Core::GeoPosition2D(bounds.bottomLeft().x(), bounds.bottomLeft().y()));
|
||||
aiv.boundingBoxTopRight(Core::GeoPosition2D(bounds.topRight().x(), bounds.topRight().y()));
|
||||
aiv.aesTypeId(AesType::AtBoobyTrap);
|
||||
aiv.effectStateId(data().effectStateId);
|
||||
aiv.id(1000 * m_data.id + AesType::AtBoobyTrap);
|
||||
aiv.aesItemId = m_data.id;
|
||||
aiv.effectStart = toMSec(m_data.effectStart);
|
||||
aiv.chargeStruct.chargeTypeId = m_data.chargeTypeId;
|
||||
ddsVecFromPoly(poly, aiv.form);
|
||||
aiv.boundingBoxBottomLeft = Core::GeoPosition2D(bounds.bottomLeft().x(), bounds.bottomLeft().y());
|
||||
aiv.boundingBoxTopRight = Core::GeoPosition2D(bounds.topRight().x(), bounds.topRight().y());
|
||||
aiv.aesTypeId = AesType::AtBoobyTrap;
|
||||
aiv.effectStateId = data().effectStateId;
|
||||
aiv.id = 1000 * m_data.id + static_cast<int>(AesType::AtBoobyTrap);
|
||||
|
||||
if (m_data.partyId != 0)
|
||||
aiv.partyId(m_data.partyId);
|
||||
aiv.partyId = m_data.partyId;
|
||||
|
||||
if (aiv != m_aiv)
|
||||
{
|
||||
aiv.sampleTime(partitionTimeMSec());
|
||||
aiv.sampleTime = partitionTimeMSec();
|
||||
m_aiv = aiv;
|
||||
m_mainHandler->dds()->dts()->publish(aiv);
|
||||
emit newAiv(m_aiv);
|
||||
@@ -191,21 +191,21 @@ void ObjectBoobyTrap::publishAiv()
|
||||
const QPolygonF poly = Polygons::boobyTrapCake(data(), data().impactRadius);
|
||||
const QRectF bounds(poly.boundingRect());
|
||||
AesItemView aiv2(m_aiv2);
|
||||
aiv2.aesItemId(m_data.id);
|
||||
aiv2.effectStart(toMSec(m_data.effectStart));
|
||||
aiv2.chargeStruct().chargeTypeId(m_data.chargeTypeId);
|
||||
ddsVecFromPoly(poly, aiv2.form());
|
||||
aiv2.boundingBoxBottomLeft(Core::GeoPosition2D(bounds.bottomLeft().x(), bounds.bottomLeft().y()));
|
||||
aiv2.boundingBoxTopRight(Core::GeoPosition2D(bounds.topRight().x(), bounds.topRight().y()));
|
||||
aiv2.aesTypeId(AesType::AtBoobyTrapSecondary);
|
||||
aiv2.effectStateId(data().effectStateId);
|
||||
aiv2.id(1000 * m_data.id + AesType::AtBoobyTrapSecondary);
|
||||
aiv2.aesItemId = m_data.id;
|
||||
aiv2.effectStart = toMSec(m_data.effectStart);
|
||||
aiv2.chargeStruct.chargeTypeId = m_data.chargeTypeId;
|
||||
ddsVecFromPoly(poly, aiv2.form);
|
||||
aiv2.boundingBoxBottomLeft = Core::GeoPosition2D(bounds.bottomLeft().x(), bounds.bottomLeft().y());
|
||||
aiv2.boundingBoxTopRight = Core::GeoPosition2D(bounds.topRight().x(), bounds.topRight().y());
|
||||
aiv2.aesTypeId = AesType::AtBoobyTrapSecondary;
|
||||
aiv2.effectStateId = data().effectStateId;
|
||||
aiv2.id = 1000 * m_data.id + static_cast<int>(AesType::AtBoobyTrapSecondary);
|
||||
|
||||
if (m_data.partyId != 0)
|
||||
aiv2.partyId(m_data.partyId);
|
||||
aiv2.partyId = m_data.partyId;
|
||||
if (aiv2 != m_aiv2)
|
||||
{
|
||||
aiv2.sampleTime(partitionTimeMSec());
|
||||
aiv2.sampleTime = partitionTimeMSec();
|
||||
m_aiv2 = aiv2;
|
||||
m_mainHandler->dds()->dts()->publish(aiv2);
|
||||
emit newAiv(aiv2);
|
||||
@@ -218,7 +218,7 @@ void ObjectBoobyTrap::removeTopics()
|
||||
{
|
||||
auto dts = m_mainHandler->dds()->dts();
|
||||
dts->removeBoobyTrapByKey(m_data.id);
|
||||
dts->removeAesItemViewByKey(1000 * m_data.id + AesType::AtBoobyTrap);
|
||||
dts->removeAesItemViewByKey(1000 * m_data.id + static_cast<int>(AesType::AtBoobyTrap));
|
||||
emit removeAiv(m_data.id);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user