## ETPub PCR alpha hacks (etpub_pcr_ah) ## (C) 2006-2007 PatheticCockroach.com ## This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License ## Derivative works may only be done if they are distributed with their source code. ## ## The original etpub_pcr_ah source and binaries can be found around http://www.patheticcockroach.com/etserver/etpub_pcr.php ## ## Note : ETPub PCR alpha hacks are just small modifications for ETPub (http://www.etpub.org) vote_nextmapSmooth : boolean, if enabled (1), will make a nextmap vote act as a timelimit 0.1 vote, so : - XP will be saved properly at the end of the map - the nextmap vote can't pass during warmup - the nextmap vote won't skip the map voting The part with 'CP("cp \"This vote is not allowed during warmup.\"");' disables the nextmap vote during warmup. default : 1 (enabled) ------------------------- MODIFICATION STARTS HERE src\game\g_vote.c : (line 693) **** REPLACE else { if( g_gametype.integer == GT_WOLF_CAMPAIGN ) { g_campaignInfo_t *campaign; campaign = &g_campaigns[level.currentCampaign]; if( campaign->current + 1 < campaign->mapCount ) { trap_Cvar_Set("g_currentCampaignMap", va( "%i", campaign->current + 1)); trap_SendConsoleCommand(EXEC_APPEND, va( "map %s\n", campaign->mapnames[campaign->current + 1])); AP("cp \"^3*** Loading next map in campaign! ***\n\""); } else { // Load in the nextcampaign trap_SendConsoleCommand(EXEC_APPEND, "vstr nextcampaign\n"); AP("cp \"^3*** Loading nextcampaign! ***\n\""); } } else { // Load in the nextmap trap_SendConsoleCommand(EXEC_APPEND, "vstr nextmap\n"); AP("cp \"^3*** Loading nextmap! ***\n\""); } } **** WITH else if (vote_nextmapSmooth.integer==0){ if( g_gametype.integer == GT_WOLF_CAMPAIGN ) { g_campaignInfo_t *campaign; campaign = &g_campaigns[level.currentCampaign]; if( campaign->current + 1 < campaign->mapCount ) { trap_Cvar_Set("g_currentCampaignMap", va( "%i", campaign->current + 1)); trap_SendConsoleCommand(EXEC_APPEND, va( "map %s\n", campaign->mapnames[campaign->current + 1])); AP("cp \"^3*** Loading next map in campaign! ***\n\""); } else { // Load in the nextcampaign trap_SendConsoleCommand(EXEC_APPEND, "vstr nextcampaign\n"); AP("cp \"^3*** Loading nextcampaign! ***\n\""); } } else { // Load in the nextmap trap_SendConsoleCommand(EXEC_APPEND, "vstr nextmap\n"); AP("cp \"^3*** Loading nextmap! ***\n\""); } } else { trap_SendConsoleCommand(EXEC_APPEND, "timelimit 0.1\n"); } **** AFTER else if(!vote_allow_nextmap.integer && ent && !ent->client->sess.referee) { G_voteDisableMessage(ent, arg); return(G_INVALID); } **** ADD else if(g_gamestate.integer != GS_PLAYING) { CP("cp \"This vote is not allowed during warmup.\""); return(G_INVALID); } src\game\g_local.h : (line 2154) **** AFTER extern vmCvar_t g_spawnInvul; **** ADD extern vmCvar_t vote_nextmapSmooth; src\game\g_main.c : (line 257) **** AFTER vmCvar_t g_spawnInvul; **** ADD vmCvar_t vote_nextmapSmooth; (line 755) **** AFTER { &g_spawnInvul, "g_spawnInvul", "3", 0 }, **** ADD { &vote_nextmapSmooth, "vote_nextmapSmooth", "1", 0 }, ------------------------- PERSONAL NOTES G_Nextmap_v G_Timelimit_v