Skip to content

Commit

Permalink
another stupid bug
Browse files Browse the repository at this point in the history
  • Loading branch information
NexIsDumb committed Mar 2, 2024
1 parent ae20cfb commit fa22994
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions source/funkin/game/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1386,12 +1386,13 @@ class PlayState extends MusicBeatState
* @param retrySFX SFX played whenever the player retries. Defaults to `retrySFX` (`gameOverEnd`)
*/
public function gameOver(?character:Character, ?deathCharID:String, ?gameOverSong:String, ?lossSFX:String, ?retrySFX:String) {
var charToUse:Character = character.getDefault(opponentMode ? dad : boyfriend); // Imma still make it check null later just in case dad or bf are also null for some weird scripts - Nex
var event:GameOverEvent = scripts.event("onGameOver", EventManager.get(GameOverEvent).recycle(
character == null ? 0 : character.x,
character == null ? 0 : character.y,
character.getDefault(opponentMode ? dad : boyfriend),
deathCharID.getDefault(character != null ? character.gameOverCharacter : "bf-dead"),
character != null ? character.isPlayer : true,
charToUse == null ? 0 : charToUse.x,
charToUse == null ? 0 : charToUse.y,
charToUse,
deathCharID.getDefault(charToUse != null ? charToUse.gameOverCharacter : "bf-dead"),
charToUse != null ? charToUse.isPlayer : true,
gameOverSong.getDefault(this.gameOverSong),
lossSFX.getDefault(this.lossSFX),
retrySFX.getDefault(this.retrySFX)
Expand Down

0 comments on commit fa22994

Please sign in to comment.