@@ -301,6 +301,17 @@ constexpr double Pade2_2(double in)
301
301
* (12 . - 6 * s + s * s) / (12 . + 6 * s + s * s);
302
302
}
303
303
304
+ // We need to handle Ares turrets/barrels/waterimage/nospawnalt
305
+ struct DummyExtHere // TODO: move it
306
+ {
307
+ char _[0xA4 ];
308
+ std::vector<VoxelStruct> ChargerTurrets;
309
+ std::vector<VoxelStruct> ChargerBarrels;
310
+ char __[0x120 ];
311
+ UnitTypeClass* WaterImage;
312
+ VoxelStruct NoSpawnAltVXL;
313
+ };
314
+
304
315
DEFINE_HOOK (0x73C47A , UnitClass_DrawAsVXL_Shadow, 0x5 )
305
316
{
306
317
GET (UnitClass*, pThis, EBP);
@@ -355,17 +366,6 @@ DEFINE_HOOK(0x73C47A, UnitClass_DrawAsVXL_Shadow, 0x5)
355
366
shadow_matrix.Scale ((float )Pade2_2 (baseScale_log));
356
367
}
357
368
358
- // We need to handle Ares turrets/barrels
359
- struct DummyExtHere
360
- {
361
- char _[0xA4 ];
362
- std::vector<VoxelStruct> ChargerTurrets;
363
- std::vector<VoxelStruct> ChargerBarrels;
364
- char __[0x120 ];
365
- UnitTypeClass* WaterImage;
366
- VoxelStruct NoSpawnAltVXL;
367
- };
368
-
369
369
auto GetMainVoxel = [&]()
370
370
{
371
371
if (pType->NoSpawnAlt && pThis->SpawnManager && pThis->SpawnManager ->CountDockedSpawns () == 0 )
@@ -636,7 +636,7 @@ DEFINE_JUMP(CALL6, 0x4148AB, 0x5F4300);
636
636
DEFINE_JUMP(CALL6, 0x4147F3, 0x5F4300);
637
637
*/
638
638
639
- DEFINE_HOOK (0x7072A1 , suka707280_ChooseTheGoddamnMatrix, 0x7 )
639
+ DEFINE_HOOK (0x7072A1 , suka707280_ChooseTheGoddamnMatrix, 0x6 )
640
640
{
641
641
GET (FootClass*, pThis, EBX);// Maybe Techno later
642
642
GET (VoxelStruct*, pVXL, EBP);
@@ -660,9 +660,12 @@ DEFINE_HOOK(0x7072A1, suka707280_ChooseTheGoddamnMatrix, 0x7)
660
660
if (who_are_you[0 ] == UnitTypeClass::AbsVTable)
661
661
pType = reinterpret_cast <TechnoTypeClass*>(who_are_you);// you are someone else
662
662
else
663
- return pThis->TurretAnimFrame % hva->FrameCount ;
664
- // you might also be SpawnAlt voxel, but I can't know
665
- // otherwise what would you expect me to do, shift back to ares typeext base and check if ownerobject is technotype?
663
+ {
664
+ // guess what, someone actually has a multisection nospawnalt
665
+ if (!(AresHelper::CanUseAres && pVXL == &reinterpret_cast <DummyExtHere*>(pType->align_2FC )->NoSpawnAltVXL ))
666
+ return pThis->TurretAnimFrame % hva->FrameCount ;
667
+ }
668
+ // you might also be WaterImage or sth else, but I don't want to care anymore, go fuck yourself
666
669
}
667
670
668
671
// Main body sections
0 commit comments