how to fix the endgame sliding player bug?

Discussions about Coding and Scripting
OwYeaW
Average
Posts: 74
Joined: Fri Jan 09, 2015 4:24 pm

how to fix the endgame sliding player bug?

Post by OwYeaW » Tue Nov 21, 2017 5:27 pm

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?

Terraniux
Masterful
Posts: 703
Joined: Mon Jan 05, 2009 8:08 pm
Personal rank: Banished member

Re: how to fix the endgame sliding player bug?

Post by Terraniux » Tue Nov 21, 2017 8:46 pm

Good topic. I find it also highly annoying. Although it brings sometimes funny moments, falling in lava or water. :lol2:
This member can only post when permitted.

User avatar
Barbie
Godlike
Posts: 2107
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: how to fix the endgame sliding player bug?

Post by Barbie » Wed Nov 22, 2017 1:27 am

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.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

OwYeaW
Average
Posts: 74
Joined: Fri Jan 09, 2015 4:24 pm

Re: how to fix the endgame sliding player bug?

Post by OwYeaW » Sat Nov 25, 2017 5:14 am

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:

Higor
Godlike
Posts: 1832
Joined: Sun Mar 04, 2012 6:47 pm

Re: how to fix the endgame sliding player bug?

Post by Higor » Sat Nov 25, 2017 8:46 am

Gonna include this in XC_Engine's script patcher... if I remember to.
ImageImage
Image unreal://23.111.157.138:7777
Image unreal://46.228.199.205:7788

User avatar
sektor2111
Godlike
Posts: 5336
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: how to fix the endgame sliding player bug?

Post by sektor2111 » Sat Nov 25, 2017 9:17 am

And not only with bIsPlayer crap...