@@ -40,7 +40,6 @@ public static void ReadPlayMenu(Bitmap frame)
4040 Vars . gameData . state == State . Finished ||
4141 Vars . gameData . state == State . WaitForUpload )
4242 {
43- if ( ! IsValidGame ( ) ) return ;
4443 Server . CheckGameUpload ( ) ;
4544 Vars . gameData = new GameData ( Vars . gameData . currentRating ) ;
4645 }
@@ -69,20 +68,20 @@ public static void ReadStats(Bitmap frame)
6968 {
7069 if ( Vars . statsTimer . Elapsed . TotalSeconds < 20 ) return ;
7170
72- string eliminationsText = Functions . BitmapToText ( frame , 129 , 894 , 40 , 21 , false , 110 , Network . Numbers ) ;
71+ string eliminationsText = Functions . BitmapToText ( frame , 129 , 895 , 40 , 23 , false , 110 , Network . Numbers ) ;
7372 if ( eliminationsText . Equals ( string . Empty ) ) return ;
74- string damageText = Functions . BitmapToText ( frame , 129 , 958 , 80 , 21 , false , 110 , Network . Numbers ) ;
73+ string damageText = Functions . BitmapToText ( frame , 129 , 959 , 80 , 23 , false , 110 , Network . Numbers ) ;
7574 if ( damageText . Equals ( string . Empty ) ) return ;
76- string objKillsText = Functions . BitmapToText ( frame , 379 , 898 , 40 , 21 , false , 110 , Network . Numbers ) ;
77- if ( objKillsText . Equals ( string . Empty ) ) return ;
78- string healingText = Functions . BitmapToText ( frame , 379 , 958 , 80 , 21 , false , 110 , Network . Numbers ) ;
75+ string objectiveKillsText = Functions . BitmapToText ( frame , 379 , 895 , 40 , 23 , false , 110 , Network . Numbers ) ;
76+ if ( objectiveKillsText . Equals ( string . Empty ) ) return ;
77+ string healingText = Functions . BitmapToText ( frame , 379 , 959 , 80 , 23 , false , 110 , Network . Numbers ) ;
7978 if ( healingText . Equals ( string . Empty ) ) return ;
80- string deathsText = Functions . BitmapToText ( frame , 629 , 958 , 40 , 21 , false , 110 , Network . Numbers ) ;
79+ string deathsText = Functions . BitmapToText ( frame , 629 , 959 , 40 , 23 , false , 110 , Network . Numbers ) ;
8180 if ( deathsText . Equals ( string . Empty ) ) return ;
8281
8382 if ( int . TryParse ( eliminationsText , out int eliminations ) &&
8483 int . TryParse ( damageText , out int damage ) &&
85- int . TryParse ( objKillsText , out int objectiveKills ) &&
84+ int . TryParse ( objectiveKillsText , out int objectiveKills ) &&
8685 int . TryParse ( healingText , out int healing ) &&
8786 int . TryParse ( deathsText , out int deaths ) )
8887 {
@@ -98,6 +97,7 @@ public static void ReadStats(Bitmap frame)
9897 break ;
9998 }
10099 }
100+ //frame.Save(@"C:\testData\" + eliminations + "_" + Guid.NewGuid() + ".png"); // test
101101 Vars . gameData . stats . Add ( new Stat ( ( int ) Vars . gameData . gameTimer . Elapsed . TotalSeconds , eliminations , damage , objectiveKills , healing , deaths , heroStats ) ) ;
102102 Vars . statsTimer . Restart ( ) ;
103103 }
@@ -186,7 +186,6 @@ public static void ReadMainMenu(Bitmap frame)
186186 {
187187 if ( menuText . Equals ( "PLAY" ) )
188188 {
189- if ( ! IsValidGame ( ) ) return ;
190189 Functions . DebugMessage ( "Recognized main menu" ) ;
191190 Vars . loopDelay = 250 ;
192191 Vars . gameData . state = State . Finished ;
@@ -269,7 +268,6 @@ public static void ReadFinalScore(Bitmap frame)
269268 {
270269 if ( Functions . CompareStrings ( finalScoreText , "FIHNLSCORE" ) >= 40 )
271270 {
272- if ( ! IsValidGame ( ) ) return ;
273271 Functions . DebugMessage ( "Recognized final score" ) ;
274272 Vars . gameData . state = State . Finished ;
275273 Vars . gameData . timer . Stop ( ) ;
@@ -339,7 +337,7 @@ public static void ReadPlayerNamesAndRank(Bitmap frame)
339337 playerRankX += 422 ;
340338 }
341339 }
342- private static bool IsValidGame ( )
340+ public static bool IsValidGame ( )
343341 {
344342 if ( Vars . gameData . timer . Elapsed . TotalSeconds < 300 )
345343 {
0 commit comments