Syncs Iron Curtain or Force Shield timer to another techno.
| 150 | |
| 151 | // Syncs Iron Curtain or Force Shield timer to another techno. |
| 152 | void TechnoExt::SyncInvulnerability(TechnoClass* pFrom, TechnoClass* pTo) |
| 153 | { |
| 154 | if (pFrom->IsIronCurtained()) |
| 155 | { |
| 156 | const auto pTypeExt = TechnoExt::ExtMap.Find(pFrom)->TypeExtData; |
| 157 | const bool isForceShielded = pFrom->ForceShielded; |
| 158 | const bool allowSyncing = !isForceShielded ? pTypeExt->IronCurtain_KeptOnDeploy.Get(RulesExt::Global()->IronCurtain_KeptOnDeploy) : |
| 159 | pTypeExt->ForceShield_KeptOnDeploy.Get(RulesExt::Global()->ForceShield_KeptOnDeploy); |
| 160 | |
| 161 | if (allowSyncing) |
| 162 | { |
| 163 | pTo->IronCurtainTimer = pFrom->IronCurtainTimer; |
| 164 | pTo->IronTintStage = pFrom->IronTintStage; |
| 165 | pTo->ForceShielded = isForceShielded; |
| 166 | } |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | double TechnoExt::GetCurrentSpeedMultiplier(FootClass* pThis) |
| 171 | { |