[FIXED] Black screen after login when in a other world

Here we stuff all the bugs we've managed to squash/squish/squelch.
Post Reply
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Black screen after login when in a other world

Post by Grimson »

If you teleport your char to a other world than Felucca, then logout and log back in you only get a black screen with your char in the center. Using refresh or teleport seems to fix it till the next login. I did have a quick look at the starchar() function but couldn't find anything wrong.
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

Yes, I noticed this when I originally implemented multiple map-file handling and the mapdiff changes. I ran through some packet logs to find the issue, but so far haven't had any luck.
Scott
supremoleet
UOX3 Neophyte
Posts: 28
Joined: Fri Sep 01, 2006 3:37 am
Has thanked: 0
Been thanked: 0
Contact:

Post by supremoleet »

Has there been any luck on figuring this one out? I've been noticing it myself.
supremoleet
UOX3 Neophyte
Posts: 28
Joined: Fri Sep 01, 2006 3:37 am
Has thanked: 0
Been thanked: 0
Contact:

Post by supremoleet »

I made this fix on my system. The code fix to this (so you don't have to have your players [refresh every time they log in on other maps) is pretty simple. In pcmanage.cpp at line 835 (just after the line mSock->LoginComplete( true );), add the following:

Code: Select all

			if( mChar->WorldNumber() > 0 )
			{
				mSock->sysmessage( "Adjusting character position..." );
				mChar->Teleport();
			}
The sysmessage part was really just for debugging purposes and isn't necessary. Basically all this does is force a teleport on login. This should do the trick.
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

And for those who don't want or can't change the sources try a global JS script like:

Code: Select all

function onLogin( sockPlayer, pChar )
{
	if( pChar.worldnumber > 0 )
		pChar.StartTimer( 1000, 1, true );
}

function onTimer( pChar, timerID )
{
	if( timerID == 1 )
	{
		pChar.Teleport();
	}
}
Still it would be good to find out what the real problem is.
Mindless Automaton
UOX3 Apprentice
Posts: 189
Joined: Wed May 10, 2006 3:48 am
Has thanked: 0
Been thanked: 1 time
Contact:

Post by Mindless Automaton »

I ran across a similar situation to this when I was using rtele to jump around whichever world was through the red gate by the shrine of honesty.

I just rtele'd through the mountains and such right off the west end of the map. I was not about to rtele anymore, so I used the travel menu to jump to Britain.

I did notice on the server console a error went by saying:

ERROR: ASSERT: CStaticIterator(); Not inside a valid world

Eventually using GO, I was able to tele to a real location, except I could no longer move :o

Aiiee Armageddon!
Mindless Automaton
Linux - UOX3 - 0.99.5 dev branch
Win10Pro 19042.572 - UOX3 0.99.3a; Razor 1.0.14; Client 7.0.87.11 or 4.0.11c (Patch 0)
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

Nice work supremoleet, I was certain I have tried doing another Teleport() call after the LoginComplete() but I guess not. :P I'll put that change up in my next commit.

MA: Yeah, that error happens any time it tries to read the MUL file for the spot you are standing and it can't find any data. Not sure why it would impede your ability to walk once you returned to a valid area... I'll look into it.
Mindless Automaton
UOX3 Apprentice
Posts: 189
Joined: Wed May 10, 2006 3:48 am
Has thanked: 0
Been thanked: 1 time
Contact:

Post by Mindless Automaton »

I want to say I was able to fix it by setting my Z to 1, but I can't remember what I did at the time really.

If I get a chance, I'll see if I can repeat it and take better notes.

Thansk!
Mindless Automaton
Linux - UOX3 - 0.99.5 dev branch
Win10Pro 19042.572 - UOX3 0.99.3a; Razor 1.0.14; Client 7.0.87.11 or 4.0.11c (Patch 0)
Post Reply