Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#303 fixed gametype voting #317

Merged
merged 1 commit into from
Apr 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/ui/ui_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4872,15 +4872,15 @@ static void UI_RunMenuScript( char **args ) {
}

} else if ( Q_stricmp( name, "voteGame" ) == 0 ) {
int ui_voteGameType = trap_Cvar_VariableValue( "ui_voteGameType" );
if ( ui_voteGameType >= 0 && ui_voteGameType < uiInfo.numGameTypes ) {
trap_Cmd_ExecuteText( EXEC_APPEND, va( "callvote gametype %i\n", ui_voteGameType ) );
int ui_netGameType = trap_Cvar_VariableValue( "ui_netGameType" );
if (ui_netGameType >= 0 && ui_netGameType < uiInfo.numGameTypes ) {
trap_Cmd_ExecuteText( EXEC_APPEND, va( "callvote gametype %i\n", uiInfo.gameTypes[ui_netGameType].gtEnum) );
}

} else if ( Q_stricmp( name, "refGame" ) == 0 ) {
int ui_voteGameType = trap_Cvar_VariableValue( "ui_voteGameType" );
if ( ui_voteGameType >= 0 && ui_voteGameType < uiInfo.numGameTypes ) {
trap_Cmd_ExecuteText( EXEC_APPEND, va( "ref gametype %i\n", ui_voteGameType ) );
int ui_netGameType = trap_Cvar_VariableValue( "ui_netGameType" );
if (ui_netGameType >= 0 && ui_netGameType < uiInfo.numGameTypes ) {
trap_Cmd_ExecuteText( EXEC_APPEND, va( "ref gametype %i\n", uiInfo.gameTypes[ui_netGameType].gtEnum) );
}

} else if ( Q_stricmp( name, "voteTimelimit" ) == 0 ) {
Expand Down
3 changes: 1 addition & 2 deletions src/wolf.vcxproj.user
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerCommand>$(RTCWBASE)\$(TargetName)$(TargetExt)</LocalDebuggerCommand>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerCommandArguments>
</LocalDebuggerCommandArguments>
<LocalDebuggerCommandArguments>+set fs_game rtcwpro +exec server.cfg</LocalDebuggerCommandArguments>
<LocalDebuggerWorkingDirectory>$(RTCWBASE)\</LocalDebuggerWorkingDirectory>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Dedicated|Win32'">
Expand Down