From f60d27afb78fd0272a22ec55f0316b6231781001 Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Sun, 30 Jan 2011 16:37:47 -0600 Subject: [PATCH] "Welcome back to Celebrity Jeopardy sm-ssc. I thought I was done with this, but Regis Philbin ScreenSelectMaster Cursor, that mongrel idiot, decided to do a Celebrity Millionaire crash, and network theming competition being what it is, I stand before you, a broken and miserable man." For people who hate comedy in their commit logs, this makes it so ScreenSelectMaster only runs commands on cursors for human players (hopefully avoiding Access Violation in the process). --- Docs/Changelog_sm-ssc.txt | 4 ++++ src/ScreenSelectMaster.cpp | 25 ++++++++++++++++--------- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/Docs/Changelog_sm-ssc.txt b/Docs/Changelog_sm-ssc.txt index 0c457026a3..fe117c7c4d 100644 --- a/Docs/Changelog_sm-ssc.txt +++ b/Docs/Changelog_sm-ssc.txt @@ -13,6 +13,10 @@ _____________________________________________________________________________ sm-ssc v1.2.1 | 2011011? -------------------------------------------------------------------------------- +20110130 +-------- +* [ScreenSelectMaster] Only run cursor commands on players if they exist. [AJ] + 20110118 -------- * [ScreenEdit] Move editing Timing Data to their own mini menu. [Wolfman2000] diff --git a/src/ScreenSelectMaster.cpp b/src/ScreenSelectMaster.cpp index f9ed16e3a4..959bccc156 100644 --- a/src/ScreenSelectMaster.cpp +++ b/src/ScreenSelectMaster.cpp @@ -551,14 +551,17 @@ bool ScreenSelectMaster::ChangePage( int iNewChoice ) FOREACH( PlayerNumber, vpns, p ) { - if( SHOW_CURSOR ) + if( GAMESTATE->IsHumanPlayer(*p) ) { - m_sprCursor[*p]->HandleMessage( msg ); - m_sprCursor[*p]->SetXY( GetCursorX(*p), GetCursorY(*p) ); - } + if( SHOW_CURSOR ) + { + m_sprCursor[*p]->HandleMessage( msg ); + m_sprCursor[*p]->SetXY( GetCursorX(*p), GetCursorY(*p) ); + } - if( SHOW_SCROLLER ) - m_vsprScroll[*p][m_iChoice[*p]]->HandleMessage( msg ); + if( SHOW_SCROLLER ) + m_vsprScroll[*p][m_iChoice[*p]]->HandleMessage( msg ); + } } if( newPage == PAGE_2 ) @@ -649,8 +652,11 @@ bool ScreenSelectMaster::ChangeSelection( PlayerNumber pn, MenuDir dir, int iNew if( SHOW_CURSOR ) { - m_sprCursor[*p]->PlayCommand( "Change" ); - m_sprCursor[*p]->SetXY( GetCursorX(*p), GetCursorY(*p) ); + if( GAMESTATE->IsHumanPlayer(*p) ) + { + m_sprCursor[*p]->PlayCommand( "Change" ); + m_sprCursor[*p]->SetXY( GetCursorX(*p), GetCursorY(*p) ); + } } if( SHOW_SCROLLER ) @@ -880,7 +886,8 @@ void ScreenSelectMaster::TweenOnScreen() { FOREACH( PlayerNumber, vpns, p ) { - m_sprCursor[*p]->SetXY( GetCursorX(*p), GetCursorY(*p) ); + if( GAMESTATE->IsHumanPlayer(*p) ) + m_sprCursor[*p]->SetXY( GetCursorX(*p), GetCursorY(*p) ); } }