Created
June 13, 2015 06:29
-
-
Save AltimorTASDK/8e87744b50154f2d8da6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Called at game over screen | |
void __cdecl update_fireworks(int player_data) | |
{ | |
if ( *(_BYTE *)(player_data + 0xF2) & 2 && *(_BYTE *)(player_data + 0x16) & 1 )// master mode, logged in | |
{ | |
if ( (double)(random(&seed, 1) % 20000) < 625.0 ) | |
++*(_WORD *)(player_data + 0x1216); // +0x1216 = fireworks count | |
if ( (double)(random(&seed, 1) % 20000) < 312.5 ) | |
++*(_WORD *)(player_data + 0x1216); | |
if ( (double)(random(&seed, 1) % 20000) < 4.8828125 ) | |
*(_WORD *)(player_data + 0x1216) += random(&seed, 1) % 3 + 6; | |
if ( *(_BYTE *)(player_data + 0x30) ) // eligible for promo exam? | |
{ | |
if ( (double)(random(&seed, 1) % 20000) < 6666.6665 ) | |
++*(_WORD *)(player_data + 0x1216); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment