ModeManager: Difference between revisions
Jump to navigation
Jump to search
TomEdwards (talk | contribs) (Created page with ''''ModeManager''' is a required global object that manages ClientModes. Since no Valve game has more than one ClientMode any more, it is almost entirely vestigial. There is n…') |
TomEdwards (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
'''ModeManager''' is a required global object that manages [[ClientMode]]s. Since no Valve game has more than one ClientMode any more, it is almost entirely vestigial. There is no base implementation. | '''ModeManager''' is a required global object that manages [[ClientMode]]s. Since no Valve game has more than one ClientMode any more, it is almost entirely vestigial. There is no base implementation of the <code>IVModeManager</code> [[interface]]. | ||
== Minimum implementation == | == Minimum implementation == |
Latest revision as of 03:49, 7 August 2009
ModeManager is a required global object that manages ClientModes. Since no Valve game has more than one ClientMode any more, it is almost entirely vestigial. There is no base implementation of the IVModeManager
interface.
Minimum implementation
#include "ivmodemanager.h"
class CSkeletonModeManager : public IVModeManager
{
void Init() {}
void SwitchMode( bool commander, bool force ) {}
void LevelInit( const char* newmap ) {}
void LevelShutdown() { g_pClientMode->LevelShutdown(); }
};
IVModeManager* modemanager = (IVModeManager*)new CSkeletonModeManager;
SwitchMode()
and LevelInit()
are both called when a new map is loaded.