mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2025-04-09 03:24:52 +00:00
Add names to the vote controllers and add a dummy issue as the first issue in each vote controller
Some community mods relied on vote index 0 for custom handling, but ever since KickIssue was removed from the global controller those mods would run into issues due to RestartGame being applied at the end of a custom vote
This commit is contained in:
parent
48809cb86c
commit
1517f71b62
2 changed files with 15 additions and 0 deletions
|
@ -29,6 +29,16 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
class CDummyIssue : public CBaseTFIssue
|
||||
{
|
||||
public:
|
||||
CDummyIssue(CVoteController* pVoteController) : CBaseTFIssue("Dummy", pVoteController) { }
|
||||
|
||||
virtual void ExecuteCommand( void ) OVERRIDE { };
|
||||
virtual const char *GetDisplayString( void ) OVERRIDE { return "Placeholder"; };
|
||||
virtual void ListIssueDetails( CBasePlayer *forWhom ) OVERRIDE { };
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
@ -12038,11 +12038,16 @@ void CTFGameRules::CreateStandardEntities()
|
|||
m_hGamerulesProxy->SetName( AllocPooledString("tf_gamerules" ) );
|
||||
|
||||
g_voteControllerGlobal = static_cast< CVoteController *>( CBaseEntity::Create( "vote_controller", vec3_origin, vec3_angle ) );
|
||||
g_voteControllerGlobal->SetName( MAKE_STRING("zz_global_vote_controller") );
|
||||
g_voteControllerRed = static_cast< CVoteController *>( CBaseEntity::Create( "vote_controller", vec3_origin, vec3_angle ) );
|
||||
g_voteControllerRed->SetName( MAKE_STRING("zz_red_vote_controller") );
|
||||
g_voteControllerBlu = static_cast< CVoteController *>( CBaseEntity::Create( "vote_controller", vec3_origin, vec3_angle ) );
|
||||
g_voteControllerBlu->SetName( MAKE_STRING("zz_blue_vote_controller") );
|
||||
|
||||
// Vote Issue classes are handled/cleaned-up by g_voteControllers
|
||||
NewTeamIssue< CDummyIssue >();
|
||||
NewTeamIssue< CKickIssue >();
|
||||
NewGlobalIssue< CDummyIssue >();
|
||||
NewGlobalIssue< CRestartGameIssue >();
|
||||
NewGlobalIssue< CChangeLevelIssue >();
|
||||
NewGlobalIssue< CNextLevelIssue >();
|
||||
|
|
Loading…
Reference in a new issue