1. Click here to join our community discord server.

Dismiss Notice

Don't forget to connect your Steam account to your forum profile. Click here to do this now or click your name in the right-top corner and choose 'External Accounts'.

Map Voting Suggestion

Discussion in '[L4D2] Points Reloaded' started by TastyFish, Aug 7, 2014.

  1. TastyFish

    TastyFish Member

    I think it's easier explaining my suggestion with this method:

    Five people use votemap
    Player 1 votes Dead Air
    Player 2 votes Passing
    Player 3 votes Cold Stream
    Player 4 votes No Mercy
    Player 5 votes Dark Carnival

    One vote for each map...yet No Mercy wins the vote. I understand if only one person votes a map then it will change to that map...HOWEVER, I don't understand when you have 1 vote for multiple maps that the server switches to the map that is highest up on the votemap list.

    Is there a way where if you have a situation with multiple 1 vote maps that it can pick one randomized or based on who votes first?
     
  2. dT_Tb

    dT_Tb Member

    In order to change the campaign "based on who votes first" we can have a quick fix

    I assume we are using ACS.
    Find SetTheCurrentVoteWinner() method,
    After the following loop:
    for(iMap = 0; iMap < iNumberOfMaps; iMap++)

    Add the following content:
    Code:
    if(bSomeoneHasVoted == true && iMapVotes[iOldWinningMapIndex] == g_iWinningMapVotes)
    {
      g_iWinningMapIndex = iOldWinningMapIndex;
    }
    
    
    If we are going to "pick one randomized"
    we might have to save all winning results to an array and pick one in CheckMapForChange()


    Just my thoughts, hope it will help :)