void CUIZoneMap::Update() { CActor* pActor = smart_cast<CActor*>( Level().CurrentViewEntity() ); if ( !pActor ) return; if ( !( Device.dwFrame % 20 ) && IsGameTypeSingle() ) { string16 text_str; xr_strcpy( text_str, sizeof(text_str), "" ); CPda* pda = pActor->GetPDA(); if ( pda ) { u32 cn = pda->ActiveContactsNum(); if ( cn > 0 ) { xr_sprintf( text_str, sizeof(text_str), "%d", cn ); } } m_Counter_text.SetText( text_str ); } UpdateRadar( Device.vCameraPosition ); float h, p; Device.vCameraDirection.getHP( h, p ); SetHeading( -h ); m_clock_wnd->TextItemControl()->SetText( InventoryUtilities::GetGameTimeAsString( InventoryUtilities::etpTimeToMinutes ).c_str() ); }
void City::Update(sf::Time *delta, float *playerX) { UpdateRadar(*playerX); if (mAlertOn) Alert(); }