Advertisement
Benji23245

Untitled

Jun 7th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. //Outside OnFrame function
  2. float ChaosBoostLv1 = 8.0f;
  3. bool was_invincible_before = false;
  4.  
  5. void SetInvincible(ObjectMaster *obj)
  6. {
  7. was_invincible_before = true;
  8. RunObjectChildren(obj);
  9. }
  10.  
  11. void UnsetInvincible(ObjectMaster *obj)
  12. {
  13. was_invincible_before = false;
  14. CheckThingButThenDeleteObject(obj);
  15. }
  16.  
  17.  
  18. // Inside OnFrame function
  19. //Chaos Boost Homing attack
  20. if (co2 == NULL) return;
  21. if (GetCharacterObject(0) && GetCharacterID(0) == Characters_Sonic && MetalSonicFlag == 0)
  22. {
  23. WriteData((float**)0x0049265F, &ChaosBoostLv1);
  24. WriteData((void*)0x497CB5, 0x90, 4);
  25. WriteData((short*)0x497CC0, (short)83);
  26. WriteData((void*)0x497CC2, 0x90, 4);
  27. WriteData((void*)0x49234D, 0x90, 3);
  28. if (!was_invincible_before)
  29. {
  30. if (CharObj1Ptrs[0]->Action == 14) co2->Powerups |= Powerups_Invincibility;
  31. else co2->Powerups &= ~Powerups_Invincibility;
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement