Skip to content

Commit

Permalink
temporary backward-compatibility for single part vxls
Browse files Browse the repository at this point in the history
  • Loading branch information
chaserli committed Apr 10, 2024
1 parent bb8c92f commit ff1605e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Ext/SWType/FireSuperWeapon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ void SWTypeExt::ExtData::ApplySWNext(SuperClass* pSW, const CellStruct& cell)
int oldstart = pSuper->RechargeTimer.StartTime;
int oldleft = pSuper->RechargeTimer.TimeLeft;
pSuper->SetReadiness(true);
pSuper->Launch(cell, true);
pSuper->Launch(cell, pHouse->IsCurrentPlayer());
pSuper->Reset();
if (!this->SW_Next_RealLaunch)
{
Expand Down
10 changes: 6 additions & 4 deletions src/Ext/TechnoType/Hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -703,11 +703,13 @@ DEFINE_HOOK(0x7072A1, suka707280_ChooseTheGoddamnMatrix, 0x7)

Matrix3D hvamat = hva->Matrixes[shadow_index_now + hva->LayerCount * ChooseFrame()];

// A nasty temporary backward compatibility option
if (hva->LayerCount > 1 || pType->Turret)
// TO TEST : Check if this is the proper Z offset to shift the sections to the same level
hvamat.TranslateZ(
-hvamat.GetZVal()
- pVXL->VXL->TailerData->Bounds[0].Z
);
hvamat.TranslateZ(
-hvamat.GetZVal()
- pVXL->VXL->TailerData->Bounds[0].Z
);

matRet = *pMat * hvamat;

Expand Down
2 changes: 1 addition & 1 deletion src/Ext/WarheadType/Detonate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void WarheadTypeExt::ExtData::Detonate(TechnoClass* pOwner, HouseClass* pHouse,
// and therefore it will reuse the vanilla routine, which will crash inside of it
pSuper->SetReadiness(true);
// TODO: Can we use ClickFire instead of Launch?
pSuper->Launch(cell, true);
pSuper->Launch(cell, pHouse->IsCurrentPlayer());
pSuper->Reset();

if (!this->LaunchSW_RealLaunch)
Expand Down

0 comments on commit ff1605e

Please sign in to comment.