Skip to content

Commit

Permalink
Make konami code actually do something
Browse files Browse the repository at this point in the history
  • Loading branch information
isage committed Apr 8, 2019
1 parent e0a1c42 commit 3f4a3e8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/intro/title.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ void run_konami_code()
if (kc_table[title.kc_pos] == -1)
{
NXE::Sound::SoundManager::getInstance()->playSfx(NXE::Sound::SFX::SND_MENU_SELECT);
game.debug.god = 1;
title.kc_pos = 0;
}
}
Expand Down
5 changes: 4 additions & 1 deletion src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1263,10 +1263,13 @@ void hurtplayer(int damage)
if (!player || !player->hp)
return;
#if defined(DEBUG)
if (game.debug.god || inputs[DEBUG_MOVE_KEY])
if (inputs[DEBUG_MOVE_KEY])
return;
#endif

if (game.debug.god)
return;

if (player->hurt_time)
return;

Expand Down

0 comments on commit 3f4a3e8

Please sign in to comment.