Advertisement
RattletraPM5

Untitled

Jul 6th, 2020
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. void __thiscall UpdateDeathTimer(Algae *this,int connectedAlgaes)
  2.  
  3. {
  4. int iVar1;
  5. int32_t iVar2;
  6. float fVar3;
  7.  
  8. iVar1 = (*(this->super_Spreadable).super_Repairable.super_Selectable._vptr_Selectable[10])();
  9. if ((char)iVar1 == '\0') {
  10. this->fDeathTimer = -1.00000000;
  11. return;
  12. }
  13. fVar3 = this->fDeathTimer;
  14. if (0.00000000 <= fVar3) {
  15. fVar3 = GetSpeedFactor(&FPSControl);
  16. fVar3 = this->fDeathTimer - (float)(connectedAlgaes * -3 + 0xf) * 0.00300000 * fVar3;
  17. if (fVar3 < 0.00000000) {
  18. this->fDeathTimer = 0.00000000;
  19. if (this->fOxygen < 90.00000000) {
  20. return;
  21. }
  22. goto LAB_0047f5c3;
  23. }
  24. this->fDeathTimer = fVar3;
  25. }
  26. if (90.00000000 <= this->fOxygen) {
  27. if (fVar3 == 0.00000000) {
  28. LAB_0047f5c3:
  29. // WARNING: Could not recover jumptable at 0x0047f5d3. Too many branches
  30. // WARNING: Treating indirect jump as call
  31. (*(this->super_Spreadable).super_Repairable.super_Selectable._vptr_Selectable[7])(this);
  32. return;
  33. }
  34. if (fVar3 < 0.00000000) {
  35. if (RNG == false) {
  36. iVar2 = random32();
  37. }
  38. else {
  39. iVar2 = rand();
  40. }
  41. this->fDeathTimer = (float)(iVar2 % 10 + 5);
  42. }
  43. }
  44. return;
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement