Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. simulated function ConsumePowerPool(float DeltaTime)
  2. {
  3. local TrPawn trP;
  4. local TrPlayerReplicationInfo TrPRI;
  5. local TrValueModifier VM;
  6. local float VMMultiplier;
  7.  
  8. VMMultiplier = 1.0;
  9.  
  10. trP = TrPawn(Instigator);
  11. if (trP != none)
  12. {
  13. // Apply skill/perk.
  14. TrPRI = trP.GetTribesReplicationInfo();
  15. if( TrPRI != none )
  16. {
  17. VM = TrPRI.GetCurrentValueModifier();
  18. if( VM != none )
  19. {
  20. VMMultiplier = 1.0 - VM.m_fPackEnergyCostBuffPct;
  21. }
  22. }
  23.  
  24. TrP.ConsumePowerPool(GetPowerPool(trp) * DeltaTime * VMMultiplier);
  25. TrP.SyncClientCurrentPowerPool();
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement