+void DemoConfirm_Check_Gamestatus(entity btn, entity me)
+{
+ if(!(gamestatus & (GAME_CONNECTED | GAME_ISSERVER))) // we're not in a match, lets watch the demo
+ {
+ if(btn.democlicktype == DMO_PLAY)
+ { demolist.startDemo(demolist); }
+ else if(btn.democlicktype == DMO_TIME)
+ { demolist.timeDemo(demolist); }
+ }
+ else // already in a match, player has to confirm
+ {
+ if(btn.democlicktype == DMO_PLAY)
+ { DialogOpenButton_Click(btn, main.demostartconfirmDialog); }
+ else if(btn.democlicktype == DMO_TIME)
+ { DialogOpenButton_Click(btn, main.demotimeconfirmDialog); }
+ }
+}
+