diff --git a/cl_dll/client_scratch-2005.vcproj b/cl_dll/client_scratch-2005.vcproj index 044a7fa6b..7afeaf684 100644 --- a/cl_dll/client_scratch-2005.vcproj +++ b/cl_dll/client_scratch-2005.vcproj @@ -5422,14 +5422,6 @@ RelativePath=".\entity_client_tools.cpp" > - - - - diff --git a/cl_dll/game_controls/baseviewport.cpp b/cl_dll/game_controls/baseviewport.cpp index 47ffe6db0..9a140dbc4 100644 --- a/cl_dll/game_controls/baseviewport.cpp +++ b/cl_dll/game_controls/baseviewport.cpp @@ -42,7 +42,6 @@ #include "hud.h" #include "NavProgress.h" #include "classmenu.h" -#include "mapguidemenu.h" // our definition #include "baseviewport.h" @@ -176,7 +175,6 @@ void CBaseViewport::CreateDefaultPanels( void ) // --> Mirv: FF panels AddNewPanel(CreatePanelByName(PANEL_TEAM)); AddNewPanel(CreatePanelByName(PANEL_CLASS)); - AddNewPanel(CreatePanelByName(PANEL_MAPGUIDE)); AddNewPanel(CreatePanelByName(PANEL_MAP)); // <-- #endif @@ -241,10 +239,6 @@ IViewPortPanel* CBaseViewport::CreatePanelByName(const char *szPanelName) { newpanel = new CClassMenu(this); } - else if (Q_strcmp(PANEL_MAPGUIDE, szPanelName) == 0) - { - newpanel = new CMapGuideMenu(this); - } else if (Q_strcmp(PANEL_MAP, szPanelName) == 0) { newpanel = new CMapScreen(this); diff --git a/cl_dll/game_controls/mapguidemenu.cpp b/cl_dll/game_controls/mapguidemenu.cpp deleted file mode 100644 index cc1d586ce..000000000 --- a/cl_dll/game_controls/mapguidemenu.cpp +++ /dev/null @@ -1,258 +0,0 @@ -/******************************************************************** - created: 2006/02/13 - created: 13:2:2006 18:45 - filename: f:\ff-svn\code\trunk\cl_dll\game_controls\mapguidemenu.cpp - file path: f:\ff-svn\code\trunk\cl_dll\game_controls - file base: mapguidemenu - file ext: cpp - author: Gavin "Mirvin_Monkey" Bramhill - - purpose: -*********************************************************************/ - -#include "cbase.h" -#include "mapguidemenu.h" -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -#include "IGameUIFuncs.h" -#include - -// memdbgon must be the last include file in a .cpp file!!! -#include "tier0/memdbgon.h" - -using namespace vgui; -extern INetworkStringTable *g_pStringTableInfoPanel; -extern IGameUIFuncs *gameuifuncs; - -//----------------------------------------------------------------------------- -// Purpose: Create a test menu -//----------------------------------------------------------------------------- -CON_COMMAND(mapguidemenu, "Shows the mapguide menu") -{ - if (!gViewPortInterface) - return; - - IViewPortPanel *panel = gViewPortInterface->FindPanelByName(PANEL_MAPGUIDE); - - if (panel) - { - gViewPortInterface->ShowPanel(PANEL_TEAM, false); - gViewPortInterface->ShowPanel(PANEL_CLASS, false); - gViewPortInterface->ShowPanel(panel, true); - } - else - Msg("Couldn't find panel.\n"); -} - -//----------------------------------------------------------------------------- -// Purpose: This handles our mouseover buttons -//----------------------------------------------------------------------------- -class GuideMouseOverPanelButton : public vgui::Button -{ -private: - DECLARE_CLASS_SIMPLE( GuideMouseOverPanelButton, vgui::Button ); - - vgui::ImagePanel *m_pImagePanel; - -public: - GuideMouseOverPanelButton( vgui::Panel *parent, const char *panelName, vgui::Panel *templatePanel ) : - vgui::Button( parent, panelName, L"GuideMouseOverPanelButton" ) - { - m_pImagePanel = (vgui::ImagePanel *) templatePanel; - } - -private: - - virtual void OnCursorEntered( ) - { - BaseClass::OnCursorEntered(); - - char mapName[MAX_MAP_NAME + 4]; - char imagePath[MAX_PATH]; - - Q_strncpy(mapName, engine->GetLevelName(), strlen(engine->GetLevelName()) - 3); - sprintf(imagePath, "%s/%s", mapName, GetName()); - - if (m_pImagePanel) - m_pImagePanel->SetImage(imagePath); - } -}; - -//----------------------------------------------------------------------------- -// Purpose: Constructor -//----------------------------------------------------------------------------- -CMapGuideMenu::CMapGuideMenu(IViewPort *pViewPort) : Frame(NULL, PANEL_MAPGUIDE) -{ - // initialize dialog - m_pViewPort = pViewPort; - - m_flNextUpdate = 0; - - // load the new scheme early!! - SetScheme("ClientScheme"); - SetMoveable(false); - SetSizeable(false); - SetProportional(true); - - // hide the system buttons - SetTitleBarVisible(false); - - // info window about this class - m_pPanel = new Panel(this, "ClassInfo"); - m_pPanel->SetFgColor(Color(255, 255, 255, 255)); - - m_pImagePanel = new ImagePanel(this, "MapGuideImage"); - - m_pCancel = new Button(this, "cancelbutton", "#FF_CANCEL"); - - LoadControlSettings("Resource/UI/MapGuideMenu.res"); - - ((vgui::Button *) FindChildByName("overview"))->SetVisible(true); - ((vgui::Button *) FindChildByName("interest"))->SetVisible(true); - ((vgui::Button *) FindChildByName("extraguide1"))->SetVisible(false); - ((vgui::Button *) FindChildByName("extraguide2"))->SetVisible(false); - ((vgui::Button *) FindChildByName("extraguide3"))->SetVisible(false); - ((vgui::Button *) FindChildByName("extraguide4"))->SetVisible(false); - - Reset(); -} - -//----------------------------------------------------------------------------- -// Purpose: Destructor -//----------------------------------------------------------------------------- -CMapGuideMenu::~CMapGuideMenu() -{ -} - -//----------------------------------------------------------------------------- -// Purpose: Do whatever command is needed -//----------------------------------------------------------------------------- -void CMapGuideMenu::OnCommand(const char *command) -{ - if (Q_strcmp(command, "cancel") != 0) - engine->ClientCmd(command); - else - // Back to the team menu - m_pViewPort->ShowPanel(PANEL_TEAM, true); - - m_pViewPort->ShowPanel(this, false); - - BaseClass::OnCommand(command); -} - -//----------------------------------------------------------------------------- -// Purpose: Nothing -//----------------------------------------------------------------------------- -void CMapGuideMenu::SetData(KeyValues *data) -{ -} - -//----------------------------------------------------------------------------- -// Purpose: Show or don't show -//----------------------------------------------------------------------------- -void CMapGuideMenu::ShowPanel(bool bShow) -{ - if (BaseClass::IsVisible() == bShow) - return; - - m_pViewPort->ShowBackGround(bShow); - - if (bShow) - { - Activate(); - SetMouseInputEnabled(true); - } - else - { - SetVisible(false); - SetMouseInputEnabled(false); - } -} - -//----------------------------------------------------------------------------- -// Purpose: Don't need anything yet -//----------------------------------------------------------------------------- -void CMapGuideMenu::Reset() -{ -} - -//----------------------------------------------------------------------------- -// Purpose: Update the menu with everything -//----------------------------------------------------------------------------- -void CMapGuideMenu::Update() -{ -} - -//----------------------------------------------------------------------------- -// Purpose: Give them some key control too -//----------------------------------------------------------------------------- -void CMapGuideMenu::OnKeyCodePressed(KeyCode code) -{ - // Show the scoreboard over this if needed - if (engine->GetLastPressedEngineKey() == gameuifuncs->GetEngineKeyCodeForBind("showscores")) - gViewPortInterface->ShowPanel(PANEL_SCOREBOARD, true); - - // Support hiding the menu by hitting your changeteam button again like TFC - if (engine->GetLastPressedEngineKey() == gameuifuncs->GetEngineKeyCodeForBind("changeteam")) - gViewPortInterface->ShowPanel(this, false); - - // Support bring the team menu back up if the class menu is showing - if (engine->GetLastPressedEngineKey() == gameuifuncs->GetEngineKeyCodeForBind("changeteam")) - { - m_pViewPort->ShowPanel(this, false); - engine->ClientCmd("changeteam"); - } - - BaseClass::OnKeyCodePressed(code); -} - -void CMapGuideMenu::OnKeyCodeReleased(KeyCode code) -{ - // Hide the scoreboard now - if (engine->GetLastPressedEngineKey() == gameuifuncs->GetEngineKeyCodeForBind("showscores")) - gViewPortInterface->ShowPanel(PANEL_SCOREBOARD, false); - - BaseClass::OnKeyCodeReleased(code); -} - -//----------------------------------------------------------------------------- -// Purpose: Magic override to allow vgui to create mouse over buttons for us -//----------------------------------------------------------------------------- -Panel *CMapGuideMenu::CreateControlByName(const char *controlName) -{ - if (!Q_stricmp("MouseOverPanelButton", controlName)) - { - GuideMouseOverPanelButton *newButton = CreateNewMouseOverPanelButton(m_pImagePanel); - - return newButton; - } - else - { - return BaseClass::CreateControlByName(controlName); - } -} - -//----------------------------------------------------------------------------- -// Purpose: A lovely factory function -//----------------------------------------------------------------------------- -GuideMouseOverPanelButton *CMapGuideMenu::CreateNewMouseOverPanelButton(vgui::Panel *panel) -{ - return new GuideMouseOverPanelButton(this, NULL, panel); -} diff --git a/cl_dll/game_controls/mapguidemenu.h b/cl_dll/game_controls/mapguidemenu.h deleted file mode 100644 index 630590ec5..000000000 --- a/cl_dll/game_controls/mapguidemenu.h +++ /dev/null @@ -1,80 +0,0 @@ -/******************************************************************** - created: 2006/02/13 - created: 13:2:2006 18:47 - filename: f:\ff-svn\code\trunk\cl_dll\game_controls\mapguidemenu.h - file path: f:\ff-svn\code\trunk\cl_dll\game_controls - file base: mapguidemenu - file ext: h - author: Gavin "Mirvin_Monkey" Bramhill - - purpose: -*********************************************************************/ - -#ifndef MAPGUIDEMENU_H -#define MAPGUIDEMENU_H -#ifdef _WIN32 -#pragma once -#endif - -#include -#include -#include - -#include -#include - -namespace vgui -{ - class TextEntry; -} - -// Forward declaration -class GuideMouseOverPanelButton; - -class CMapGuideMenu : public vgui::Frame, public IViewPortPanel -{ -private: - DECLARE_CLASS_SIMPLE(CMapGuideMenu, vgui::Frame); - -public: - CMapGuideMenu(IViewPort *pViewPort); - virtual ~CMapGuideMenu(); - - virtual void SetData(KeyValues *data); - virtual void Reset(); - virtual void Update(); - virtual void ShowPanel(bool bShow); - - // both vgui::Frame and IViewPortPanel define these, so explicitly define them here as passthroughs to vgui - vgui::VPANEL GetVPanel() { return BaseClass::GetVPanel(); } - - virtual bool IsVisible() { return BaseClass::IsVisible(); } - virtual void SetParent(vgui::VPANEL parent) { BaseClass::SetParent(parent); } - virtual const char *GetName() { return PANEL_MAPGUIDE; } - virtual bool NeedsUpdate() { return gpGlobals->curtime > m_flNextUpdate; } - virtual bool HasInputElements() { return true; } - - void OnKeyCodePressed(vgui::KeyCode code); - void OnKeyCodeReleased(vgui::KeyCode code); - -public: - -protected: - - // vgui overrides - virtual void OnCommand(const char *command); - - IViewPort *m_pViewPort; - - vgui::Button *m_pCancel; - vgui::Panel *m_pPanel; - vgui::ImagePanel *m_pImagePanel; - - float m_flNextUpdate; - - virtual vgui::Panel *CreateControlByName(const char *controlName); - GuideMouseOverPanelButton * CreateNewMouseOverPanelButton(vgui::Panel *panel); -}; - - -#endif // MAPGUIDEMENU_H diff --git a/cl_dll/game_controls/teammenu.cpp b/cl_dll/game_controls/teammenu.cpp index c93f62cee..638a4c7c9 100644 --- a/cl_dll/game_controls/teammenu.cpp +++ b/cl_dll/game_controls/teammenu.cpp @@ -230,7 +230,7 @@ CTeamMenu::CTeamMenu(IViewPort *pViewPort) : BaseClass(NULL, PANEL_TEAM) m_pAutoAssignButton = new FFButton(this, "AutoAssignButton", (const char *) NULL, this, "AutoAssign"); m_pSpectateButton = new FFButton(this, "SpectateButton", (const char *) NULL, this, "Spectate"); - m_pFlythroughButton = new FFButton(this, "FlythroughButton", (const char *) NULL, this, "mapguide overview"); + m_pFlythroughButton = new FFButton(this, "FlythroughButton", (const char *) NULL, this, "mapguide"); m_pMapScreenshotButton = new FFButton(this, "MapScreenshotButton", (const char *) NULL, this, "MapShot"); diff --git a/game_shared/ff/ff_gamemovement.cpp b/game_shared/ff/ff_gamemovement.cpp index 3811d44a9..884c60c86 100644 --- a/game_shared/ff/ff_gamemovement.cpp +++ b/game_shared/ff/ff_gamemovement.cpp @@ -77,7 +77,6 @@ class CFFGameMovement : public CGameMovement // CGameMovement virtual bool CheckJumpButton(); virtual bool CanAccelerate(); - virtual void FullNoClipMove(float factor, float maxacceleration); virtual void CheckVelocity( void ); virtual void CategorizePosition( void ); @@ -472,31 +471,6 @@ void CFFGameMovement::CategorizePosition() #endif } -//----------------------------------------------------------------------------- -// Purpose: Mapguide movement. Needs sorting out at some point -//----------------------------------------------------------------------------- -void CFFGameMovement::FullNoClipMove(float factor, float maxacceleration) -{ -#ifdef CLIENT_DLL - //CFFPlayer *ffplayer = (CFFPlayer *) player; - - //if( ffplayer->m_flNextMapGuideTime > gpGlobals->curtime ) - //{ - // CFFMapGuide *nextguide = ffplayer->m_hNextMapGuide; - // CFFMapGuide *lastguide = ffplayer->m_hLastMapGuide; - - // float t = clamp( ( ffplayer->m_flNextMapGuideTime - gpGlobals->curtime ) / 10.0f, 0, 1.0f ); - - // Vector vecNewPos = t * lastguide->GetAbsOrigin() + ( 1 - t ) * nextguide->GetAbsOrigin(); - // QAngle angNewDirection = t * lastguide->GetAbsAngles() + ( 1 - t ) * nextguide->GetAbsAngles(); - - // // Apply these here - //} - //else -#endif - BaseClass::FullNoClipMove(factor, maxacceleration); -} - //----------------------------------------------------------------------------- // Purpose: Movement while building in Fortress Forever //----------------------------------------------------------------------------- diff --git a/game_shared/viewport_panel_names.h b/game_shared/viewport_panel_names.h index a50e7fc29..d5d441c7e 100644 --- a/game_shared/viewport_panel_names.h +++ b/game_shared/viewport_panel_names.h @@ -17,7 +17,6 @@ #define PANEL_TEAM "team" #define PANEL_CLASS "class" #define PANEL_SCOREBOARD "scores" -#define PANEL_MAPGUIDE "mapguides" #define PANEL_OVERVIEW "overview" #define PANEL_SPECGUI "specgui" // passive spectator elements (top/bottom bars) #define PANEL_SPECMENU "specmenu" // active spectator elements (options menus etc)