The Dink Network

kill_game() in hit proc

April 8th 2010, 07:02 AM
dinkdead.gif
kill_game or crash_game?

This:
void hit (void)
{
  kill_game();
}

causes the game to exit (which is good) but I get the usual crash error "dink has encountered an error and needs to close. Send error report?" and the midi carries on playing until the dink.exe process is killed.

I accidently found out that a wait fixes this...
void hit (void)
{
  wait(1);
  kill_game();
}

Works fine. It also works if it's talk instead of hit (without the wait).

Strange. Something to do with the animation maybe??

Edit: It works in FreeDink! Just not in normal or Aural+.
April 8th 2010, 08:19 AM
peasantmb.gif
yeoldetoast
Peasant They/Them Australia
Oh, NOW YOU'VE DONE IT! 
I found this out ages ago and it was quite irritating at the time (making a barrel that quit the game when you hit it). Good to know that an accidental wait(1); fixes it!