@@ -767,32 +767,34 @@ DEFINE_HOOK(0x70FB73, FootClass_IsBunkerableNow_Dehardcode, 0x6)
767
767
768
768
DEFINE_HOOK (0x730D1F , DeployCommandClass_Execute_VoiceDeploy, 0x5 )
769
769
{
770
- GET_STACK (int , unitsToDeploy, STACK_OFFSET (0x18 , -0x4 ));
770
+ GET_STACK (const int , unitsToDeploy, STACK_OFFSET (0x18 , -0x4 ));
771
771
772
772
if (unitsToDeploy != 1 )
773
773
return 0 ;
774
774
775
775
GET (TechnoClass* const , pThis, ESI);
776
- auto const whatAmI = pThis->WhatAmI ();
776
+
777
+ const auto whatAmI = pThis->WhatAmI ();
777
778
778
779
if (whatAmI == AbstractType::Infantry)
779
780
{
780
- auto pInfantry = static_cast <InfantryClass*>(pThis);
781
+ const auto pInfantry = static_cast <InfantryClass*>(pThis);
781
782
782
783
if (!pInfantry->IsDeploying )
783
784
{
784
785
if (pInfantry->IsDeployed ())
785
- pThis->QueueVoice (pThis-> GetTechnoType () ->VoiceUndeploy );
786
+ pThis->QueueVoice (pInfantry-> Type ->VoiceUndeploy );
786
787
else
787
- pThis->QueueVoice (pThis-> GetTechnoType () ->VoiceDeploy );
788
+ pThis->QueueVoice (pInfantry-> Type ->VoiceDeploy );
788
789
}
789
790
}
790
791
else if (whatAmI == AbstractType::Unit)
791
792
{
792
- auto pUnit = static_cast <UnitClass*>(pThis);
793
+ const auto pUnit = static_cast <UnitClass*>(pThis);
794
+ const auto pType = pUnit->Type ;
793
795
794
- if (pUnit->TryToDeploy () || pUnit-> Type ->IsSimpleDeployer )
795
- pThis->QueueVoice (pThis-> GetTechnoType () ->VoiceDeploy );
796
+ if (pUnit->TryToDeploy () || pType ->IsSimpleDeployer )
797
+ pThis->QueueVoice (pType ->VoiceDeploy );
796
798
}
797
799
798
800
return 0 ;
0 commit comments