Unreal Tournament 469

Discussions about UT99
User avatar
Feralidragon
Godlike
Posts: 5250
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: Unreal Tournament 469

Post by Feralidragon » Sun Sep 27, 2020 7:27 pm

At this point it would just be best to close this thread with a link towards the new one, and moderate only that one to ensure that reports and such are really done at the proper location.

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

Re: Unreal Tournament 469

Post by sektor2111 » Mon Sep 28, 2020 4:40 pm

During this time I'll show you something for lecturing:

Code: Select all

	if( ParseCommand(&Str,TEXT("LEVEL")) )
	{
		if( ParseCommand(&Str,TEXT("REDRAW")) )
		{
			RedrawLevel(Level);
			return 1;
		}
		else if( ParseCommand(&Str,TEXT("LINKS")) )
		{
			Results->Text.Empty();
			int Internal=0,External=0;
			Results->Logf( TEXT("Level links:\r\n") );
			for( int i=0; i<Level->Actors.Num(); i++ )
			{
				if( Cast<ATeleporter>(Level->Actors(i)) )
				{
					ATeleporter& Teleporter = *(ATeleporter *)Level->Actors(i);
					Results->Logf( TEXT("   %s\r\n"), Teleporter.URL );
					if( appStrchr(*Teleporter.URL,'//') )
						External++;
					else
						Internal++;
				}
			}
			Results->Logf( TEXT("End, %i internal link(s), %i external.\r\n"), Internal, External );
			return 1;
		}
		else if( ParseCommand(&Str,TEXT("VALIDATE")) )
		{
			// Validate the level.
			Results->Text.Empty();
			Results->Log( TEXT("Level validation:\r\n") );

			// Make sure it's not empty.
			if( Level->Model->Nodes.Num() == 0 )
			{
				Results->Log( TEXT("Error: Level is empty!\r\n") );
				return 1;
			}

			// Find playerstart.
			for( INT i=0; i<Level->Actors.Num(); i++ )
				if( Cast<APlayerStart>(Level->Actors(i)) )
					break;
			if( i == Level->Actors.Num() )
			{
				Results->Log( TEXT("Error: Missing PlayerStart actor!\r\n") );
				return 1;
			}

			// Make sure PlayerStarts are outside.
			for( i=0; i<Level->Actors.Num(); i++ )
			{
				if( Cast<APlayerStart>(Level->Actors(i)) )
				{
					FCheckResult Hit(0.0);
					if( !Level->Model->PointCheck( Hit, NULL, Level->Actors(i)->Location, FVector(0,0,0), 0 ) )
					{
						Results->Log( TEXT("Error: PlayerStart doesn't fit!\r\n") );
						return 1;
					}
				}
			}

			// Check scripts.
			if( GEditor && !GEditor->CheckScripts( GWarn, UObject::StaticClass(), *Results ) )
			{
				Results->Logf( TEXT("\r\nError: Scripts need to be rebuilt!\r\n") );
				return 1;
			}

			// Check level title.
			if( Level->GetLevelInfo()->Title==TEXT("") )
			{
				Results->Logf( TEXT("Error: Level is missing a title!") );
				return 1;
			}
			else if( Level->GetLevelInfo()->Title==TEXT("Untitled") )
			{
				Results->Logf( TEXT("Warning: Level is untitled\r\n") );
			}

			// Check actors.
			for( i=0; i<Level->Actors.Num(); i++ )
			{
				AActor* Actor = Level->Actors(i);
				if( Actor )
				{
					guard(CheckingActors);
					check(Actor->GetClass()!=NULL);
					check(Actor->GetStateFrame());
					check(Actor->GetStateFrame()->Object==Actor);
					check(Actor->Level!=NULL);
					check(Actor->GetLevel()!=NULL);
					check(Actor->GetLevel()==Level);
					check(Actor->GetLevel()->Actors(0)!=NULL);
					check(Actor->GetLevel()->Actors(0)==Actor->Level);
					unguardf(( TEXT("(%i %s)"), i, Actor->GetFullName() ));
				}
			}

			// Success.
			Results->Logf( TEXT("Success: Level validation succeeded!\r\n") );
			return 1;
		}
		else
		{
			return 0;
		}
	}
Let me guess, this doesn't work for everyone not only for me.
I think Level validation it's important, you should be aware that bad Playerstart actors are trouble makers during game. I adapted this check to UScript in MapGarbage because no one did anything here - not even in UGold, at least I can see if here are problems or not. Question: Why this wasn't fixed ?

User avatar
Diego_HoF
Average
Posts: 64
Joined: Sun Jul 16, 2017 1:50 am
Personal rank: HoF Admin
Location: Costa Rica

Re: Unreal Tournament 469

Post by Diego_HoF » Thu Oct 01, 2020 11:52 pm

Already remove DirectX 10 but still same problems, so it wasn't that atleast