Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Outside OnFrame function
- float ChaosBoostLv1 = 8.0f;
- bool was_invincible_before = false;
- void SetInvincible(ObjectMaster *obj)
- {
- was_invincible_before = true;
- RunObjectChildren(obj);
- }
- void UnsetInvincible(ObjectMaster *obj)
- {
- was_invincible_before = false;
- CheckThingButThenDeleteObject(obj);
- }
- // Inside OnFrame function
- //Chaos Boost Homing attack
- if (co2 == NULL) return;
- if (GetCharacterObject(0) && GetCharacterID(0) == Characters_Sonic && MetalSonicFlag == 0)
- {
- WriteData((float**)0x0049265F, &ChaosBoostLv1);
- WriteData((void*)0x497CB5, 0x90, 4);
- WriteData((short*)0x497CC0, (short)83);
- WriteData((void*)0x497CC2, 0x90, 4);
- WriteData((void*)0x49234D, 0x90, 3);
- if (!was_invincible_before)
- {
- if (CharObj1Ptrs[0]->Action == 14) co2->Powerups |= Powerups_Invincibility;
- else co2->Powerups &= ~Powerups_Invincibility;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement