Page 1 of 1

how to fix the endgame sliding player bug?

Posted: Tue Nov 21, 2017 5:27 pm
by OwYeaW
yo guys, i would like to know how to fix this "sliding player bug"

this "sliding player bug" appears when the game has ended, every player that is not controlled by you, will slide horizontally until they get stuck in walls etc
now, ive seen this happening in many gametypes, so i guess this is a bug in the original UT code?

i would like to have all players frozen in their positions when the game has ended
any ideas on how to fix this bug?

Re: how to fix the endgame sliding player bug?

Posted: Tue Nov 21, 2017 8:46 pm
by Terraniux
Good topic. I find it also highly annoying. Although it brings sometimes funny moments, falling in lava or water. :lol2:

Re: how to fix the endgame sliding player bug?

Posted: Wed Nov 22, 2017 1:27 am
by Barbie
In most cases this avoids that Game-End-Gliding-Player in my server:

Code: Select all

function bool SetEndCams(string Reason) {
...
	for (P = Level.PawnList; P != None; P = P.nextPawn)
	{
		// remove velocity and freeze player:
		P.Velocity = vect(0,0,0);
		P.Acceleration = vect(0,0,0);
		P.SetPhysics(PHYS_None);
		P.SetLocation(P.Location);

		if (P.bIsPlayer && ((BestPawn == None) || (P.PlayerReplicationInfo.Score > BestPawn.PlayerReplicationInfo.Score)))
			BestPawn = P;
	}
...
In theory the code "P.SetLocation(P.Location)" should have no effect; I did not test that.

Re: how to fix the endgame sliding player bug?

Posted: Sat Nov 25, 2017 5:14 am
by OwYeaW
Barbie wrote:

Code: Select all

function bool SetEndCams(string Reason) {
...
	for (P = Level.PawnList; P != None; P = P.nextPawn)
	{
		// remove velocity and freeze player:
		P.Velocity = vect(0,0,0);
		P.Acceleration = vect(0,0,0);
		P.SetPhysics(PHYS_None);
		P.SetLocation(P.Location);

		if (P.bIsPlayer && ((BestPawn == None) || (P.PlayerReplicationInfo.Score > BestPawn.PlayerReplicationInfo.Score)))
			BestPawn = P;
	}
...
thank you for your correct answer, this works as desired :tu:

Re: how to fix the endgame sliding player bug?

Posted: Sat Nov 25, 2017 8:46 am
by Higor
Gonna include this in XC_Engine's script patcher... if I remember to.

Re: how to fix the endgame sliding player bug?

Posted: Sat Nov 25, 2017 9:17 am
by sektor2111
And not only with bIsPlayer crap...