Gaming Zone > [MiA] Servers
VCTF - working on balancer
holyspam:
--- Code: --- if( ( Level.Game.IsInState == 'PendingMatch' && Level.Game.bWaitingToStartMatch == True && Level.Game.bWaitForNetPlayers == False )
|| ShuffleTeams )
{
if ( ( Level.Game.Countdown <= TimeToBalance || Level.Game.bQuickStart ) || ShuffleTeams )
{
doFirstBalance();
}
}
else if (Level.Game.IsInState == 'MatchInProgress' && balance_trigger_flag )
{
BeginBalance();
}
defaultproperties
{
WhenToBalance=3 // So we can adjust the moment of first balance
balance_trigger_flag=false
}
--- End code ---
This should work at all times, since "bQuickStart" will not trigger the countdown and StartupStage the actual variable that the game looks at is Countdown.
1. Allows us to adjust the time of balance instead of a hard-coded value.
2. Allows us to re-use the initial balance function as a "hard-balance" function to shuffle really bad teams mid-game and then a "soft-balance" function that executes on player joins/leaves or periodically
3. A few additional checks, to make sure it will run in the few moments before a game begins(Game is in state PendingMatch and WaitingToStartMatch variable is true) and only when enough real players have joined(bWaitForNetPlayers becomes false).
Or right before balance we add an extra 1-2 seconds to make sure all players(especially higher pings) have enough time to receive the team-change replication
--- Code: ---if (Level.Game.Countdown > 0) Level.Game.Countdown += 1;
--- End code ---
This will make the announcer say 3...2...1...1...play
**Disclaimer: I have not tried to compile all these,but they **should work**
It might be better to use "event" instead of function if you want to make sure the timing matches with native C code.
The_Cowboy:
I know it is crucial time of Equalizer, but I believe the mid-game function call is highly required.
People are wiping in it
The good balancing logic is being mangled here!!
Piglet:
People moaned about the old team player count code which stopped that happening. I'll add it back in again after checking whether it needs an update to stop it conflicting with this code.
Piglet:
Ok - checked the code. They should play nicely together. It's back on from next map.
The_Cowboy:
I believe the old code is completely redundant now that we have cherry picked aspects of it (in some sense the team switch).
The important issue is at what points in time (during the match) to call for BalanceCTFTeams() function. I believe summoning all the powers who demanded Equalizer in the first place should be useful.
Indirectly I am pointing towards Flenser(US), Gil-Galad(PT) and Cronix(HR). Let the discussion begin!
I shall start with the issue that what to do with the players deliberately spectating and then joining a stronger team.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version