OmniONSScoring
- captainsnarf
- Posts: 2713
- Joined: Tue Jul 06, 2021 1:51 pm
- Location: Washington
- Server Sponsor: Yes
- Server Admin: Yes
- Contact:
OmniONSScoring
I made a few small changes, hoping to fix the unreg issue. Changes pushed to the github.
1. I updated the replacement so it only replaces MainCoreDestroyed for real powercores, not all the powernodes too.
2. Uncommented the code at the bottom which calls RoundEnded() for the controller. This is needed for the server and client round end states to match. Previously it was only getting set on client.
This is on the server. I backed up the old version in case it doesn't work.
1. I updated the replacement so it only replaces MainCoreDestroyed for real powercores, not all the powernodes too.
2. Uncommented the code at the bottom which calls RoundEnded() for the controller. This is needed for the server and client round end states to match. Previously it was only getting set on client.
This is on the server. I backed up the old version in case it doesn't work.
- pooty
- Posts: 4535
- Joined: Sat Apr 03, 2021 10:22 am
- Location: Michigan
- Server Sponsor: Yes
- Server Admin: Yes
Re: OmniONSScoring
I rebuilt it, added 1.1 to build number.
Peeps are on so I can't install, have to turn off server, I'll get to it tomorrow
Peeps are on so I can't install, have to turn off server, I'll get to it tomorrow
- captainsnarf
- Posts: 2713
- Joined: Tue Jul 06, 2021 1:51 pm
- Location: Washington
- Server Sponsor: Yes
- Server Admin: Yes
- Contact:
Re: OmniONSScoring
So there is some weirdness after the round ends, but at least the unregs issue is fixed.
I added this check, make sure 'other' is not a node, only a core
and uncommented this
I think there is something up/wrong with the ONSPlus code that was copied over. Most is in UTComp_ONSGameRules. It sets the OnCoreDestroyed function for nodes (to give node isolation bonus), so I think there was a conflict above since it would have got overwritten in the original version.
C.RoundHasEnded() is a server function, while PC.ClientRoundEnded() is a client function. They both end up doing the same thing, GotoState('RoundEnded').
Either way, I'll take the after round stuff over unregs any day.
I added this check, make sure 'other' is not a node, only a core
Code: Select all
PC = ONSPowerCore(Other)
if (PC!=None && ONSPowerNode(Other) == None && bCustomScoring)
PC.OnCoreDestroyed = MainCoreDestroyedOmniScoring;
Code: Select all
if (!ONSGame.bGameEnded)
C.RoundHasEnded();
C.RoundHasEnded() is a server function, while PC.ClientRoundEnded() is a client function. They both end up doing the same thing, GotoState('RoundEnded').
Either way, I'll take the after round stuff over unregs any day.
- pooty
- Posts: 4535
- Joined: Sat Apr 03, 2021 10:22 am
- Location: Michigan
- Server Sponsor: Yes
- Server Admin: Yes
Re: OmniONSScoring
Strange that function would affect shots/unregs? So it does create its own OnCoreDestoryed.... only thing that should have broke was node isolation bonus... but oh well.
UTComp needs this? Its not in the original code. Its likely forcing/skipping PC.ClientRoundEnded() for some causing the issues.C.RoundHasEnded() is a server function, while PC.ClientRoundEnded() is a client function. They both end up doing the same thing, GotoState('RoundEnded').
- pooty
- Posts: 4535
- Joined: Sat Apr 03, 2021 10:22 am
- Location: Michigan
- Server Sponsor: Yes
- Server Admin: Yes
Re: OmniONSScoring
Code: Select all
//round has ended
for (C = Level.ControllerList; C != None; C = C.NextController)
{
PC = PlayerController(C);
if (PC != None)
{
PC.ClientSetBehindView(true);
PC.ClientSetViewTarget(ONSGame.PowerCores[ONSGame.FinalCore[T]]);
PC.SetViewTarget(ONSGame.PowerCores[ONSGame.FinalCore[T]]);
if (!ONSGame.bGameEnded)
{
PC.ClientRoundEnded();
if (bDebug) log("PC.ClientRoundEnded called for "$PC.PlayerReplicationInfo.PlayerName,'OmniONSScoring');
}
else
{
// match/game ended
PC.ClientGameEnded();
if (bDebug) log("PC.ClientGameEnded called for "$PC.PlayerReplicationInfo.PlayerName,'OmniONSScoring');
}
}
// this does fix UTComp End game drama, but its a bandaid
// this is needed to set controller to correct state on server
if (!ONSGame.bGameEnded)
{
if (bDebug) log("C.RoundHasEnded called",'OmniONSScoring');
C.RoundHasEnded();
}
}
Code: Select all
// this does fix UTComp End game drama, but its a bandaid
// this is needed to set controller to correct state on server
if (!ONSGame.bGameEnded)
{
if (bDebug) log("C.RoundHasEnded called",'OmniONSScoring');
C.RoundHasEnded();
}
- captainsnarf
- Posts: 2713
- Joined: Tue Jul 06, 2021 1:51 pm
- Location: Washington
- Server Sponsor: Yes
- Server Admin: Yes
- Contact:
Re: OmniONSScoring
Hmm, that needs to be in the for loop. That is where 'C' variable comes from. Each controller should call RoundHasEnded().
- pooty
- Posts: 4535
- Joined: Sat Apr 03, 2021 10:22 am
- Location: Michigan
- Server Sponsor: Yes
- Server Admin: Yes
Re: OmniONSScoring
Ah I see. That like that originally, my bad.Each controller should call RoundHasEnded().
So something in UTComp isn't getting set at end of round. Is there another call there we need to add?
- captainsnarf
- Posts: 2713
- Joined: Tue Jul 06, 2021 1:51 pm
- Location: Washington
- Server Sponsor: Yes
- Server Admin: Yes
- Contact:
Re: OmniONSScoring
That's why I pushed the 1.55 version.
We had an override for that state in UTComp that came from ONSPlus. I removed it, so it uses the default code now.
Code: Select all
class Controller;
function RoundHasEnded()
{
GotoState('RoundEnded')
}
- pooty
- Posts: 4535
- Joined: Sat Apr 03, 2021 10:22 am
- Location: Michigan
- Server Sponsor: Yes
- Server Admin: Yes
Re: OmniONSScoring
Cool.. we will see today if there's any more end round shenanigans...
https://www.youtube.com/watch?v=JNPW2wZ4D2s
https://www.youtube.com/watch?v=JNPW2wZ4D2s
- captainsnarf
- Posts: 2713
- Joined: Tue Jul 06, 2021 1:51 pm
- Location: Washington
- Server Sponsor: Yes
- Server Admin: Yes
- Contact:
Re: OmniONSScoring
It seems like it's fixed now? I didn't play enough to know for sure