Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 43d6eca

Browse files
committed
Clean up deprecated shit
1 parent 57b8868 commit 43d6eca

File tree

9 files changed

+1
-145
lines changed

9 files changed

+1
-145
lines changed

Entities/ACraft.cpp

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -800,37 +800,6 @@ float ACraft::GetCollectedInventoryMass() const {
800800
return inventoryMass;
801801
}
802802

803-
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
804-
805-
//////////////////////////////////////////////////////////////////////////////////////////
806-
// Virtual method: OnMOHit
807-
//////////////////////////////////////////////////////////////////////////////////////////
808-
// Description: Defines what should happen when this MovableObject hits another MO.
809-
// This is called by the owned Atom/AtomGroup of this MovableObject during
810-
// travel.
811-
812-
bool ACraft::OnMOHit(MovableObject *pOtherMO)
813-
{
814-
/* Obviously don't put craft into craft
815-
// See if we hit any craft with open doors to get sucked into
816-
ACraft *pCraft = dynamic_cast<ACraft *>(pOtherMO);
817-
818-
// Don't let things of wrong teams get sucked into other team's craft
819-
if (!IsSetToDelete() && pCraft && m_Team == pCraft->GetTeam() && (pCraft->GetHatchState() == ACraft::OPEN || pCraft->GetHatchState() == ACraft::OPENING))
820-
{
821-
// Add (copy) to the ship's inventory
822-
pCraft->AddInventoryItem(dynamic_cast<MovableObject *>(this->Clone()));
823-
// Delete the original from scene - this is safer than 'removing' or handing over ownership halfway through MovableMan's update
824-
this->SetToDelete();
825-
// Terminate; we got sucked into the craft; so communicate this out
826-
return true;
827-
}
828-
*/
829-
// Don't terminate, continue travel
830-
return false;
831-
}
832-
833-
834803
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
835804

836805
void ACraft::GibThis(const Vector &impactImpulse, MovableObject *movableObjectToIgnore) {

Entities/ACraft.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -461,19 +461,6 @@ enum Side
461461
/// </summary>
462462
void ResetAllTimers() override;
463463

464-
//////////////////////////////////////////////////////////////////////////////////////////
465-
// Virtual method: OnMOHit
466-
//////////////////////////////////////////////////////////////////////////////////////////
467-
// Description: Defines what should happen when this MovableObject hits another MO.
468-
// This is called by the owned Atom/AtomGroup of this MovableObject during
469-
// travel.
470-
// Arguments: The other MO hit. Ownership is not transferred.
471-
// Return value: Wheter the MovableObject should immediately halt any travel going on
472-
// after this hit.
473-
474-
bool OnMOHit(MovableObject *pOtherMO) override;
475-
476-
477464
//////////////////////////////////////////////////////////////////////////////////////////
478465
// Virtual method: Update
479466
//////////////////////////////////////////////////////////////////////////////////////////

Entities/Actor.cpp

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,40 +1151,6 @@ bool Actor::ParticlePenetration(HitData &hd) {
11511151
return penetrated;
11521152
}
11531153

1154-
1155-
//////////////////////////////////////////////////////////////////////////////////////////
1156-
// Virtual method: OnMOHit
1157-
//////////////////////////////////////////////////////////////////////////////////////////
1158-
// Description: Defines what should happen when this MovableObject hits another MO.
1159-
// This is called by the owned Atom/AtomGroup of this MovableObject during
1160-
// travel.
1161-
1162-
bool Actor::OnMOHit(MovableObject *pOtherMO)
1163-
{
1164-
/* The ACraft now actively suck things in with cast rays instead
1165-
// See if we hit any craft with open doors to get sucked into
1166-
ACraft *pCraft = dynamic_cast<ACraft *>(pOtherMO);
1167-
1168-
// Don't let things of wrong teams get sucked into other team's craft
1169-
if (!IsSetToDelete() && pCraft && m_Team == pCraft->GetTeam() && (pCraft->GetHatchState() == ACraft::OPEN || pCraft->GetHatchState() == ACraft::OPENING))
1170-
{
1171-
// Switch control to the craft we just entered, if this is currently player controlled
1172-
// Set AI controller of this one going into the ship
1173-
if (g_ActivityMan.GetActivity() && this->GetController()->IsPlayerControlled())
1174-
g_ActivityMan.GetActivity()->SwitchToActor(pCraft, this->GetController()->GetPlayer(), this->GetTeam());
1175-
// Add (copy) to the ship's inventory
1176-
pCraft->AddInventoryItem(dynamic_cast<MovableObject *>(this->Clone()));
1177-
// Delete the original from scene - this is safer than 'removing' or handing over ownership halfway through MovableMan's update
1178-
this->SetToDelete();
1179-
// Terminate; we got sucked into the craft; so communicate this out
1180-
return true;
1181-
}
1182-
*/
1183-
// Don't terminate, continue travel
1184-
return false;
1185-
}
1186-
1187-
11881154
//////////////////////////////////////////////////////////////////////////////////////////
11891155
// Virtual method: GetAIModeIcon
11901156
//////////////////////////////////////////////////////////////////////////////////////////

Entities/Actor.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,20 +1052,6 @@ ClassInfoGetters;
10521052

10531053
bool ParticlePenetration(HitData &hd) override;
10541054

1055-
1056-
//////////////////////////////////////////////////////////////////////////////////////////
1057-
// Virtual method: OnMOHit
1058-
//////////////////////////////////////////////////////////////////////////////////////////
1059-
// Description: Defines what should happen when this MovableObject hits another MO.
1060-
// This is called by the owned Atom/AtomGroup of this MovableObject during
1061-
// travel.
1062-
// Arguments: The other MO hit. Ownership is not transferred.
1063-
// Return value: Wheter the MovableObject should immediately halt any travel going on
1064-
// after this hit.
1065-
1066-
bool OnMOHit(MovableObject *pOtherMO) override;
1067-
1068-
10691055
//////////////////////////////////////////////////////////////////////////////////////////
10701056
// Virtual method: PreTravel
10711057
//////////////////////////////////////////////////////////////////////////////////////////

Entities/AtomGroup.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,12 +1465,6 @@ namespace RTE {
14651465
if (!intersectedMO) {
14661466
return false;
14671467
}
1468-
if (m_OwnerMOSR->OnMOHit(intersectedMO)) {
1469-
return false;
1470-
}
1471-
if (intersectedMO->OnMOHit(m_OwnerMOSR->GetRootParent())) {
1472-
return false;
1473-
}
14741468

14751469
std::list<Atom *> intersectingAtoms;
14761470

Entities/HeldDevice.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -370,21 +370,6 @@ void HeldDevice::Deactivate()
370370
m_Activated = false;
371371
}
372372

373-
374-
//////////////////////////////////////////////////////////////////////////////////////////
375-
// Virtual method: OnMOHit
376-
//////////////////////////////////////////////////////////////////////////////////////////
377-
// Description: Defines what should happen when this MovableObject hits another MO.
378-
// This is called by the owned Atom/AtomGroup of this MovableObject during
379-
// travel.
380-
381-
bool HeldDevice::OnMOHit(MovableObject *pOtherMO)
382-
{
383-
// Don't terminate, continue on
384-
return false;
385-
}
386-
387-
388373
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
389374

390375
bool HeldDevice::TransferJointImpulses(Vector &jointImpulses, float jointStiffnessValueToUse, float jointStrengthValueToUse, float gibImpulseLimitValueToUse) {

Entities/HeldDevice.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -547,20 +547,6 @@ ClassInfoGetters;
547547
/// <returns>Whether this HeldDevice is empty.</returns>
548548
virtual bool IsEmpty() const { return false; }
549549

550-
551-
//////////////////////////////////////////////////////////////////////////////////////////
552-
// Virtual method: OnMOHit
553-
//////////////////////////////////////////////////////////////////////////////////////////
554-
// Description: Defines what should happen when this MovableObject hits another MO.
555-
// This is called by the owned Atom/AtomGroup of this MovableObject during
556-
// travel.
557-
// Arguments: The other MO hit. Ownership is not transferred.
558-
// Return value: Wheter the MovableObject should immediately halt any travel going on
559-
// after this hit.
560-
561-
bool OnMOHit(MovableObject *pOtherMO) override;
562-
563-
564550
//////////////////////////////////////////////////////////////////////////////////////////
565551
// Virtual method: Update
566552
//////////////////////////////////////////////////////////////////////////////////////////

Entities/MovableObject.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -746,11 +746,7 @@ bool MovableObject::OnMOHit(HitData &hd)
746746
if (hd.RootBody[HITOR] != hd.RootBody[HITEE] && (hd.Body[HITOR] == this || hd.Body[HITEE] == this)) {
747747
RunScriptedFunctionInAppropriateScripts("OnCollideWithMO", false, false, {hd.Body[hd.Body[HITOR] == this ? HITEE : HITOR], hd.RootBody[hd.Body[HITOR] == this ? HITEE : HITOR]});
748748
}
749-
return hd.Terminate[hd.RootBody[HITOR] == this ? HITOR : HITEE] = OnMOHit(hd.RootBody[hd.RootBody[HITOR] == this ? HITEE : HITOR]);
750-
}
751-
752-
bool MovableObject::OnMOHit(MovableObject *pOtherMO) {
753-
return false;
749+
return hd.Terminate[hd.RootBody[HITOR] == this ? HITOR : HITEE] = false;
754750
}
755751

756752
void MovableObject::SetHitWhatTerrMaterial(unsigned char matID) {

Entities/MovableObject.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,19 +1274,6 @@ enum MOType
12741274
bool OnMOHit(HitData &hd);
12751275

12761276

1277-
//////////////////////////////////////////////////////////////////////////////////////////
1278-
// Virtual method: OnMOHit
1279-
//////////////////////////////////////////////////////////////////////////////////////////
1280-
// Description: Defines what should happen when this MovableObject hits another MO.
1281-
// This is called by the owned Atom/AtomGroup of this MovableObject during
1282-
// travel.
1283-
// Arguments: The other MO hit. Ownership is not transferred.
1284-
// Return value: Wheter the MovableObject should immediately halt any travel going on
1285-
// after this hit.
1286-
1287-
virtual bool OnMOHit(MovableObject *pOtherMO);
1288-
1289-
12901277
//////////////////////////////////////////////////////////////////////////////////////////
12911278
// Pure v. method: OnBounce
12921279
//////////////////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)