Minor things worth mentioning

A refuge for those migrating from the fallen DXEditing.com and a place for general discussion relating to Deus Ex editing (coding, mapping, etc).
Post Reply
Hanfling
MJ12
Posts: 406
Joined: Sun Oct 04, 2009 6:54 pm

Minor things worth mentioning

Post by Hanfling »

Since i pop up a new thread for every small finding worth to notice, i stick to creating a thread for this stuff i found out for now.
Although no big secret, i didn't know it yet:

Object.uc

Code: Select all

native(231) final static function Log( coerce string S, optional name Tag );
The Tag parameter is the interessting part. This will be the the part displayed before : in the log file. So as an example:

Code: Select all

Log( "Failed to spawn replacement for"@ OtherPawn@"bInWorld ="@OtherPawn.bInWorld@"Location = ("$OtherPawn.Location$")", 'ReplaceFailed' );
Will produce the following log line:
ReplaceFailed: Failed to spawn replacement for 06_HongKong_WanChai_Canal.RepairBot0 bInWorld = True Location = (2304.605713,3092.363037,-416.430328)
However the interessting part is you can use a setting in the <Game.ini> file:

Code: Select all

[Core.System]
[...]
Suppress=ReplaceFailed
To get rid of the message in the log file. This is handy when you are testing a feature with a log of debug output and you easily can toogle the log messages on and off, without a need to change the source.
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.
Hanfling
MJ12
Posts: 406
Joined: Sun Oct 04, 2009 6:54 pm

LevelTime differs from accumulated tick time on listen serve

Post by Hanfling »

Today i spent some time working on the intro/endgame map support in my coop mod and during implementing the fastforward feature for clients joining after the cinematic has started i noticed some timing problems:

HXCameraPointDummy.uc

Code: Select all

var float		TickedSeconds;

event Spawned()
{
	StartTimeSeconds	= Level.TimeSeconds;
	TickedSeconds = 0.0;
}

event Tick( float DeltaTime )
{
	TicketSeconds += DeltaTime;
}
HXMissionScript.uc

Code: Select all

function NotifyPlayerUp( HXHuman P )
{
	Log( "Level.TimeSeconds - Dummy.StartTimeSeconds = " $ (Level.TimeSeconds - Dummy.StartTimeSeconds), 'CameraPoint' );
	Log( "Dummy.TickedSeconds = " $ Dummy.TickedSeconds, 'CameraPoint' );
}
NotifyPlayerUp is called the first time the first players joins the Dedicated Server, for Listen Servers it's called during my PlayerPawns's PostPostBeginPlay().
However, the expectation would be that those two values match within about a DeltaTime and maybe some even more irrelevant rounding errors.
This is the case for the dedicated server, the times match very well:
CameraPoint: Level.TimeSeconds - Dummy.StartTimeSeconds = 64.330978
CameraPoint: Dummy.TicketSeconds = 64.329857
On a listen server, things go pretty bad...
ScriptLog: Level.TimeSeconds - Dummy.StartTimeSeconds = 66.565224
ScriptLog: Dummy.TicketSeconds = 61.913860

ScriptLog: Level.TimeSeconds - Dummy.StartTimeSeconds = 45.611832
ScriptLog: Dummy.TicketSeconds = 40.888988

ScriptLog: Level.TimeSeconds - Dummy.StartTimeSeconds = 107.164047
ScriptLog: Dummy.TicketSeconds = 97.271294
However i have not figured out yet what the reason for this behavior is, or if it just happens on game startup. In normal gameplay this won't matter much, but for my cinematic sequences this time difference kills it all, since the camerapoints run clientside to have a smooth camera movement, and my simulation of what the players see is way behind leading to actors not showing up early enough and events firing too late, but i can stick to the accumulated time difference, which seems to be better match.
Possible sources of this issue:
- UI Code which might pause the game which changes things for ticking
- Me switching between windows, which halted the game (but should be not up to 10s)
- Slowdown of log message printing
- The actor is getting irrelevant sometimes for the listenserver, sth. like this statis stuff and will not get ticked
- Joining player causes a lag (but that should be not that huge)
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.
Hanfling
MJ12
Posts: 406
Joined: Sun Oct 04, 2009 6:54 pm

Having a DeusExLevelInfo around in MP

Post by Hanfling »

If you are doing some kind of Multiplayer Mod with own maps and want to have a DeusExLevelInfo as early around on the client as possible, you can make your own DeusExLevelInfo and place it instead of the vanilla DeusExLevelInfo.
The normal flow would be: the DeusExLevelInfo gets deleted on clients and later replicated without it's properties, so it becomes rather useless.

Sample Code:

Code: Select all

//=============================================================================
// MultiplayerDeusExLevelInfo
//=============================================================================
class MultiplayerDeusExLevelInfo extends DeusExLevelInfo;

defaultproperties
{
	bNoDelete=True
	RemoteRole=ROLE_None
}
I have not tested it, since i use some black magic to have the same effect for the stock maps.
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.
Hanfling
MJ12
Posts: 406
Joined: Sun Oct 04, 2009 6:54 pm

FootStep sound on Elevators

Post by Hanfling »

I'm trying to find out why the footsteps in Maggie Chans appartment are so fucked up, however i also found out that if you are in the elevator up to Maggie the GetFloorMaterial() will return the group of the ElevatorMover (which is none) and not of the real floor texture, however this seems to be easily fixable:

Code: Select all

function name GetFloorMaterial()
{
	local vector EndTrace, HitLocation, HitNormal;
	local actor target;
	local int texFlags;
	local name texName, texGroup;

	// trace down to our feet
	EndTrace = Location - CollisionHeight * 2 * vect(0,0,1);

	foreach TraceTexture(class'Actor', target, texName, texGroup, texFlags, HitLocation, HitNormal, EndTrace)
	{
		//oldver
		//if ((target == Level) || target.IsA('Mover'))
		if ( target == Level || ( target .IsA('Mover') && !target .IsA('ElevatorMover') ) )
			break;
	}

	return texGroup;
}
Last edited by Hanfling on Thu Sep 18, 2014 5:28 pm, edited 2 times in total.
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.
User avatar
bjorn98009_91
Silhouette
Posts: 688
Joined: Thu May 08, 2008 8:17 am
Location: Hufvudstaden, Sweden
Contact:

Re: Minor things worth mentioning

Post by bjorn98009_91 »

Cool, mind if I steal that?

The reason why you get the wrong footstep sound in Maggie's apartment is probably due to fucked up BSP information, the engine thinks you are on another surface then what you really are. We partially solved in in Revision by rebuilding the map, thus another BSP tree, but if you could find out more about what's doing it that would be super.
Producer and Quality Assurance Manager for Deus Ex: Revision.
Hanfling
MJ12
Posts: 406
Joined: Sun Oct 04, 2009 6:54 pm

Re: Minor things worth mentioning

Post by Hanfling »

No i don't mind go ahead.

Did it disappear with rebuilding the BSP or does it just happen less often?
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.
User avatar
bjorn98009_91
Silhouette
Posts: 688
Joined: Thu May 08, 2008 8:17 am
Location: Hufvudstaden, Sweden
Contact:

Re: Minor things worth mentioning

Post by bjorn98009_91 »

Seems like I'm misremembering, the issue with carpet sounding like metal is still there it has just changed location. Now the entire room right of the piano (with the little table) has metal sounds, and the corridor leading up to the secret door as well. So I think the issue moved slightly, but it's still not good at all.

Weren't there grass sounds somewhere in vanilla?
Producer and Quality Assurance Manager for Deus Ex: Revision.
Hanfling
MJ12
Posts: 406
Joined: Sun Oct 04, 2009 6:54 pm

Re: Minor things worth mentioning

Post by Hanfling »

TraceTexture() out of DX.

Code: Select all

void AActor::execTraceTexture( FFrame& Stack, RESULT_DECL )
{
	P_GET_OBJECT( UClass, BaseClass );
	P_GET_OBJECT_REF( AActor, Actor );
	P_GET_NAME_REF( TexName );
	P_GET_NAME_REF( TexGroup );
	P_GET_INT_REF( Flags );
	P_GET_VECTOR_REF( HitLoc );
	P_GET_VECTOR_REF( HitNorm );
	P_GET_VECTOR( End );
	P_GET_VECTOR_OPTX( Start, Location );
	P_GET_VECTOR_OPTX( Extent, FVector( 0.0f, 0.0f, 0.0f ) );
	P_FINISH;

	FMemMark MemMark( GMem );

	if ( !BaseClass )
		BaseClass = AActor::StaticClass();

	FCheckResult* Res = XLevel->MultiLineCheck( GMem, End, Start, Extent, 1, Level, 0 );

	PRE_ITERATOR

		if ( Res )
		{
			*Actor		= Res->Actor;
			*HitLoc		= Res->Location;
			*HitNorm	= Res->Normal;

			*TexName	= NAME_None;
			*TexGroup	= NAME_None;
			*Flags		= 0;

			if ( Res->Actor && Res->Actor->IsA( ALevelInfo::StaticClass() ) )
			{
				FBspNode& Node = XLevel->Model->Nodes(Res->Item);
				FBspSurf& Surf = XLevel->Model->Surfs(Node.iSurf);

				if ( Surf.Texture )
				{
					*TexName	= Surf.Texture->GetFName();

					if ( Surf.Texture->GetOuter() )
					{
						*TexGroup	= Surf.Texture->GetOuter()->GetFName();
					}
				}

				*Flags = Surf.PolyFlags;
			}

			Res = (FCheckResult *)Res->Next;
		}
		else
		{
			Stack.Code = &Stack.Node->Script( wEndOffset + 1 );

			*Actor = NULL;
			break;
		}

	POST_ITERATOR

	MemMark.Pop();
}
Seems using the FBspSurf's texture is the problem. As explenation for FBspSurf:
// FBspNode defines one node in the Bsp, including the front and back
// pointers and the polygon data itself. A node may have 0 or 3 to (MAX_NODE_VERTICES-1)
// vertices. If the node has zero vertices, it's only used for splitting and
// doesn't contain a polygon (this happens in the editor).
//
// vNormal, vTextureU, vTextureV, and others are indices into the level's
// vector table. iFront,iBack should be INDEX_NONE to indicate no children.
//
// If iPlane==INDEX_NONE, a node has no coplanars. Otherwise iPlane
// is an index to a coplanar polygon in the Bsp. All polygons that are iPlane
// children can only have iPlane children themselves, not fronts or backs.
This would explain why i get the texture out of the MJ12 rooms, which are on the same plane, however this is still strange, and FBSPNode have no texture info.

/edit:
Node.iPlane != INDEX_NONE seems to be always true when the wrong texture is traced, so i guess i should check the coplanars and find a way to figure out which coplanar is the right on.
And... seems like there are also textures in the wrong group.. like in the wanchai market... rug01 is the carpet but it is in the group stone.. maybe it was used on other maps as a floor with mosaic. I dunno, a list of texture in the wrong groud would be something i really appreciate.

/edit2:
Same for Node.iFront != INDEX_NONE || Node.iBack != INDEX_NONE. Anyway i'll try to build a list of textures the coplaner BSPSurfs have and a list of textures the childs have. Lets see if the right textures show up.
Last edited by Hanfling on Fri Sep 19, 2014 6:35 am, edited 1 time in total.
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.
Hanfling
MJ12
Posts: 406
Joined: Sun Oct 04, 2009 6:54 pm

Bad news

Post by Hanfling »

Code first:

Code: Select all

				UModel* Model = XLevel->Model;

				FBspNode Node = Model->Nodes(Res->Item);
				FBspSurf Surf = Model->Surfs(Node.iSurf);

				// Coplanar FBspNodes
				if ( Node.iPlane != INDEX_NONE )
				{
					GLog->Logf( TEXT("Warning: Node.iPlane != INDEX_NONE") );
					
					TArray<FName> CoNames;

					for ( FBspNode Current = Model->Nodes(Res->Item); Model->Nodes.IsValidIndex( Current.iPlane ); Current = Model->Nodes( Current.iPlane ) )
					{
						FBspSurf CurrentSurf = Model->Surfs(Current.iSurf);

						CoNames.AddUniqueItem( CurrentSurf.Texture ? CurrentSurf.Texture->GetFName() : NAME_None );
					}

					GLog->Logf( TEXT("CoNames.Num() = %i"), CoNames.Num() );

					for ( INT i = 0; i < CoNames.Num(); i++ )
						GLog->Logf( TEXT("CoNames(%i) = %s"), i, *CoNames(i) );
				}

				// Childs
				if ( Node.iFront != INDEX_NONE  )
				{
					GLog->Logf( TEXT("Warning: Node.iFront != INDEX_NONE") );
				}
				if ( Node.iBack != INDEX_NONE  )
				{
					GLog->Logf( TEXT("Warning: Node.iBack != INDEX_NONE") );
				}
Okay, i checked the iSurf thing.. however for maggie chans appartment the *real* texture appeared in the lists:
TraceTexture: ----[TraceTextureHan]-----------------------------------------------
Log: Warning: Node.iPlane != INDEX_NONE
Log: CoNames.Num() = 4
Log: CoNames(0) = HexagonTile
Log: CoNames(1) = FlwrCrptPatrn_A
Log: CoNames(2) = floor3
Log: CoNames(3) = floor2
Log: Warning: Node.iFront != INDEX_NONE
Log: Warning: Node.iBack != INDEX_NONE
TraceTexture: Target = 06_HongKong_WanChai_Street.LevelInfo0 ,TexName = HexagonTile TexGroup = Metal TexFlags = 0
TraceTexture: ======================================================================
HexagonTile is the tile which makes the metal sound, and FlwrCrptPatrn_A is the texture i want, so i need to find a way to find out on which bsp plane i'm standing. I have a list of points the polygon has, a normal and a player postion. This is just simple math to figure out if the straight (Player.Location + \nu * Normal) is inside the polygon (Remember, the player might stand on a surface which normal is not (0, 0, 1)!).

However, this will not be enough, if i load up WanChai Market, and walk next to the newspaper/flower stand:
TraceTexture: ----[TraceTextureHan]-----------------------------------------------
Log: Warning: Node.iPlane != INDEX_NONE
Log: CoNames.Num() = 1
Log: CoNames(0) = FlwrCrptPatrn_A
TraceTexture: Target = 06_HongKong_WanChai_Market.LevelInfo0 ,TexName = FlwrCrptPatrn_A TexGroup = Textile TexFlags = 0
TraceTexture: ======================================================================
But this should be stone sth, but it didn't even show up. However it has no iFront nor iBack to check further, so i guess there is another BSPNode which has an iPlane which points at this BSPSurf, and this is really bad, since i probably have to search *ALL* BspNodes for a reference to this one.. and the all bsp nodes for a reference to this one... this might be to slow and is ugly anyway.

However i might just need to do this when the checks for inside the polygon fail. And still with just the polygon check added this would work at least way more reliable then the old TraceTexture(). However.. i'm really supprised that the old TraceTexture() even worked that well.

/edit:

Code: Select all

INT FindTop( UModel* Model, INT InIndex )
{
	for ( INT i = 0; i < Model->Nodes.Num(); i++ )
	{
		FBspNode Node = Model->Nodes( i );

		if ( Node.iPlane == InIndex )
			return FindTop( Model, i );
	}

	return InIndex;
}
But this doesn't seem to reveal new BspNodes. And for the critial part in the market before the news/flower stand this is also just:
TraceTexture: ----[TraceTextureHan]-----------------------------------------------
Log: TopNames.Num() = 1
Log: TopNames(0) = FlwrCrptPatrn_A
Log: Warning: Node.iPlane != INDEX_NONE
Log: CoNames.Num() = 1
Log: CoNames(0) = FlwrCrptPatrn_A
TraceTexture: Target = 06_HongKong_WanChai_Market.LevelInfo0 ,TexName = FlwrCrptPatrn_A TexGroup = Textile TexFlags = 0
TraceTexture: ======================================================================
I also found this grassstep sound near the compound there, but:
TraceTexture: ----[TraceTextureHan]-----------------------------------------------
Log: TopNames.Num() = 3
Log: TopNames(0) = LakeBed_A
Log: TopNames(1) = CermTileFloor_A
Log: TopNames(2) = HKM_Bricks_01
Log: Warning: Node.iPlane != INDEX_NONE
Log: CoNames.Num() = 3
Log: CoNames(0) = LakeBed_A
Log: CoNames(1) = CermTileFloor_A
Log: CoNames(2) = HKM_Bricks_01
Log: Warning: Node.iFront != INDEX_NONE
Log: Warning: Node.iBack != INDEX_NONE
TraceTexture: Target = 06_HongKong_WanChai_Market.LevelInfo0 ,TexName = LakeBed_A TexGroup = Earth TexFlags = 0
TraceTexture: ======================================================================
Earth makes this grass step sounds. However there is the right HKM_Bricks_01 texture, or at least i hope this is the right one, so this spot should be no issue.

/edit2:

Code: Select all

				guard(TurfsList);
				TArray<FName> TurfNames;

				if ( Node.iSurf != INDEX_NONE )
				{
					for ( INT i = 0; i < Surf.Nodes.Num(); i++ )
					{
						INT Index = Surf.Nodes(i);

						if ( Index != INDEX_NONE )
						{
							FBspNode CrashNode = Model->Nodes(Index);

							if ( CrashNode.iSurf != INDEX_NONE )
							{
								FBspSurf CurrySurf = Model->Surfs(CrashNode.iSurf);

								TurfNames.AddUniqueItem( CurrySurf.Texture ? CurrySurf.Texture->GetFName() : NAME_None );
							}
						}
					}
					GLog->Logf( TEXT("TurfNames.Num() = %i"), TurfNames.Num() );

					for ( i = 0; i < TurfNames.Num(); i++ )
						GLog->Logf( TEXT("TurfNames(%i) = %s"), i, *TurfNames(i) );
				}
				unguard;
Using the Surfs Nodes list won't help. It will return less textures and even skip the right one:

Code: Select all

TraceTexture: ----[TraceTextureHan]-----------------------------------------------
Log: TurfNames.Num() = 1
Log: TurfNames(0) = LakeBed_A
Log: TopNames.Num() = 3
Log: TopNames(0) = LakeBed_A
Log: TopNames(1) = CermTileFloor_A
Log: TopNames(2) = HKM_Bricks_01
Log: Warning: Node.iPlane != INDEX_NONE
Log: CoNames.Num() = 3
Log: CoNames(0) = LakeBed_A
Log: CoNames(1) = CermTileFloor_A
Log: CoNames(2) = HKM_Bricks_01
Log: Warning: Node.iFront != INDEX_NONE
Log: Warning: Node.iBack != INDEX_NONE
TraceTexture: Target = 06_HongKong_WanChai_Market.LevelInfo0 ,TexName = LakeBed_A TexGroup = Earth TexFlags = 0
TraceTexture: ======================================================================
TraceTexture: ----[TraceTextureHan]-----------------------------------------------
Log: TurfNames.Num() = 1
Log: TurfNames(0) = FlwrCrptPatrn_A
Log: TopNames.Num() = 1
Log: TopNames(0) = FlwrCrptPatrn_A
Log: Warning: Node.iPlane != INDEX_NONE
Log: CoNames.Num() = 1
Log: CoNames(0) = FlwrCrptPatrn_A
TraceTexture: Target = 06_HongKong_WanChai_Market.LevelInfo0 ,TexName = FlwrCrptPatrn_A TexGroup = Textile TexFlags = 0
TraceTexture: ======================================================================
So i guess this the best you can get in this approach, using SingleLineCheck() probably won't help as it is probably using MultiLineCheck() too. I guess trying out various trace flags won't help.

Code: Select all

enum ETraceActorFlags
{
	// Bitflags.
	TRACE_Pawns         = 0x01, // Check collision with pawns.
	TRACE_Movers        = 0x02, // Check collision with movers.
	TRACE_Level         = 0x04, // Check collision with level geometry.
	TRACE_ZoneChanges   = 0x08, // Check collision with soft zone boundaries.
	TRACE_Others        = 0x10, // Check collision with all other kinds of actors.
	TRACE_OnlyProjActor = 0x20, // Check collision with other actors only if they are projectile targets

	// Combinations.
	TRACE_VisBlocking   = TRACE_Level | TRACE_Movers,
	TRACE_AllColliding  = TRACE_Pawns | TRACE_Movers | TRACE_Level | TRACE_Others,
	TRACE_AllEverything = TRACE_Pawns | TRACE_Movers | TRACE_Level | TRACE_ZoneChanges | TRACE_Others,
	TRACE_ProjTargets	= TRACE_OnlyProjActor | TRACE_AllColliding,
};
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.
User avatar
bjorn98009_91
Silhouette
Posts: 688
Joined: Thu May 08, 2008 8:17 am
Location: Hufvudstaden, Sweden
Contact:

Re: Minor things worth mentioning

Post by bjorn98009_91 »

Wow, this is way out of my league. However textures in the wrong texture group should be fixable, as long as we have a list of them. When compiling textures for New Vision or similar one should be able to change the erroneous textures to the right group, and one could possibly go back and decompile the vanilla texture packages, fix the groups and recompile, unless you want to rewrite some of that code and have a lot of conditionals checking for specific textures and then in real time adjust their group.

How did you even get hold of that code? I thought only the headers and static libs were released for the native side of DX code.
Producer and Quality Assurance Manager for Deus Ex: Revision.
Hanfling
MJ12
Posts: 406
Joined: Sun Oct 04, 2009 6:54 pm

Re: Minor things worth mentioning

Post by Hanfling »

When i have a list, i might hardcode this for my coop mod, since FNames are basically just integers (the texture fnames which should get their id at runtime), so a rb tree should be the way to go for this. However i need a list of it. :D
Last edited by Hanfling on Sat Jan 17, 2015 4:07 am, edited 1 time in total.
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.
Cybernetic pig
Illuminati
Posts: 2284
Joined: Thu Mar 08, 2012 3:21 am

Re: Minor things worth mentioning

Post by Cybernetic pig »

Hanfling wrote: Programming.
If killing people suddenly gave the murderer the victim's power Highlander style, you'd be the first person I'd murder for your programming skills :twisted:

Damn, there'd be death and destruction all over the world. Best things stay as they are.
Last edited by Cybernetic pig on Sat Jan 17, 2015 6:09 am, edited 1 time in total.
Hanfling
MJ12
Posts: 406
Joined: Sun Oct 04, 2009 6:54 pm

Good News.

Post by Hanfling »

Cybernetic pig wrote:If killing people suddenly gave the murderer the victim's power Highlander style, you'd be the first person I'd murder for your programming skills :twisted:
Made my day! :D

Good news on the flower/news. It was my fault, the condition check in the for loop was wrong. However this works right:

Code: Select all

				// Dump stuff.
				TArray<FName> CoNames;
				INT Index = Res->Item;

				while ( Index != INDEX_NONE )
				{
					FBspNode& CurrentNode = XLevel->Model->Nodes(Index);

					if ( CurrentNode.iSurf != INDEX_NONE )
					{
						FBspSurf& CurrentSurf = XLevel->Model->Surfs(CurrentNode.iSurf);

						CoNames.AddUniqueItem( CurrentSurf.Texture ? CurrentSurf.Texture->GetFName() : NAME_None );
					}

					Index = CurrentNode.iPlane;
				}

				GLog->Logf( TEXT("CoNames.Num() = %i"), CoNames.Num() );

				for ( INT i = 0; i < CoNames.Num(); i++ )
					GLog->Logf( TEXT("CoNames(%i) = %s"), i, *CoNames(i) );
And now in this spot:
TraceTexture: ----[TraceTextureHan]-----------------------------------------------
Log: CoNames.Num() = 2
Log: CoNames(0) = FlwrCrptPatrn_A
Log: CoNames(1) = HKM_Bricks_01
Log: Warning: Node.iPlane != INDEX_NONE
TraceTexture: Target = 06_HongKong_WanChai_Market.LevelInfo0 ,TexName = FlwrCrptPatrn_A TexGroup = Textile TexFlags = 0
TraceTexture: ======================================================================
This is the way it should be! So, now some simple school math and this is fixed once and forever.. woohooo!
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.
User avatar
bjorn98009_91
Silhouette
Posts: 688
Joined: Thu May 08, 2008 8:17 am
Location: Hufvudstaden, Sweden
Contact:

Re: Minor things worth mentioning

Post by bjorn98009_91 »

That's pretty damn impressive!

In what library is this code? Any chance you will be able to rebuild said library/hook this somehow so your fix can be implemented?
Producer and Quality Assurance Manager for Deus Ex: Revision.
Hanfling
MJ12
Posts: 406
Joined: Sun Oct 04, 2009 6:54 pm

Re: Minor things worth mentioning

Post by Hanfling »

TraceTexture() is in Engine.dll

Native functions are just identified by indices in a table, so you could just switch two entries to hook it into this place or binary edit Engine.dll. However i would not recommend doing it in one of these ways. What i commend is you boot up a Revision.dll / Revision.u which has an an object lets say RevCppQuirks in it which has a function like:

Code: Select all

native final static iterator function TraceTextureOther( AActor Other, <TraceTextureParams> );
Which uses Other as a base, e.g.

Code: Select all

// Old
foreach TraceTexture(class'Actor', target, texName, texGroup, texFlags, HitLocation, HitNormal, EndTrace)
// New
foreach class'RevCppQuirks'.static.TraceTexture(Self, class'Actor', target, texName, texGroup, texFlags, HitLocation, HitNormal, EndTrace)
This will be that way i'll take for actors which do not have a native HX base classes.

For setting up a native package i recommend using MSVC6 and using SampleNativePackage out of ut432pubsrc as starting project file, since it will set up the project properties right (alignment is important!), but probably you won't need the autogenerate name stuff out of it. Probably you should stick more to:
http://web.archive.org/web/200104120448 ... ative.html

Speaking about revision, i have a small suggestion:
DeusEx.MenuChoice_Resolution.GetScreenResolutions()

Code: Select all

// Change
local string Resolutions[16];
// To
local string Resolutions[40]; // Match enumText[40]
So if a renderdev reports more then 16 resolutions they won't get needless reduced.
I demand my DXE User ID back. Launcher for DeusEx, Rune, Nerf, Unreal & Botpack. HX on Mod DB. Revision on Steam.
Post Reply