|
楼主 |
发表于 2024-10-23 22:15:02
|
显示全部楼层
这三个都加上了,但是我没看到有变化,原版里有用到吗?
代码是这样的
- append("Mega Mission = %d (%s)", pFoot->unknown_int_5C4, getMissionName((int)pFoot->unknown_int_5C4));
- display();
- auto megaTarget = (AbstractClass*)pFoot->unknown_5CC;
- if (megaTarget)
- {
- auto mapCoords = CellStruct::Empty;
- auto ID = "N/A";
- if (auto const pObject = abstract_cast<ObjectClass*>(megaTarget))
- {
- mapCoords = pObject->GetMapCoords();
- ID = pObject->GetType()->get_ID();
- }
- else if (auto const pCell = abstract_cast<CellClass*>(megaTarget))
- {
- mapCoords = pCell->MapCoords;
- ID = "Cell";
- }
- append("Mega Target = %s, Distance = %d, Location = (%d, %d)", ID, (pFoot->DistanceFrom(megaTarget) / 256), mapCoords.X, mapCoords.Y);
- display();
- }
- auto megaDestination = (AbstractClass*)pFoot->unknown_5C8;
- auto pDestination = abstract_cast<TechnoClass*>(megaDestination);
- if (pDestination)
- {
- append("Destination = %s, Distance = %d, Location = (%d, %d)", pDestination->GetTechnoType()->ID, (pDestination->DistanceFrom(pFoot) / 256), pDestination->GetMapCoords().X, pDestination->GetMapCoords().Y);
- display();
- }
- else
- {
- if (megaDestination)
- {
- auto destCell = CellClass::Coord2Cell(pFoot->Destination->GetCoords());
- append("Mega Destination = (%d, %d)", destCell.X, destCell.Y);
- display();
- }
- }
复制代码
|
|