XC_Engine [20] - XC_Core [7b] - XC_IpDrv

User avatar
papercoffee
Godlike
Posts: 10443
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: XC_GameEngine [build 10] [10.1 hotfix]

Post by papercoffee »

@ Qwerty
Please keep the 24 hours time limit between your double posts or edit the earlier one instead.
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: XC_GameEngine [build 10] [10.1 hotfix]

Post by sektor2111 »

Qwerty wrote:Critical: (ALplayer CTF-(VIP)AA.ALplayer1, Function Engine.PlayerPawn.ServerMove)
Whoaahaa, again valhala madness toward Water-zones LOL.
That avatar proves again how nice is, I'll bet more people got rid of it, or got rid of maps teleporting in/out of water heh, super mapping again.
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: XC_GameEngine [build 10] [10.1 hotfix]

Post by Higor »

I did it, replication checks do go through traslucent surfaces.
I couldn't tap into the relevancy checks code without breaking the inventory chain replication so I decided to use a different approach.
Basically, edit the map's BSP nodes during replication checks and restore them once done LOL.

Code: Select all

struct XC_ENGINE_API FNodeFlagC
{
	public:
	INT NodeIdx;
	BYTE NodeFlags;
	FNodeFlagC()	{};
};

void UXC_Level::TickNetServer( FLOAT DeltaSeconds )
{
	guard(UXC_Level::TickNetServer);
	TArray<FNodeFlagC> NFC(NotVisBlockingCount); //PreInitialize the dynamic array using NotVisBlockingCount elements (optimization, 0 during first tick)
	INT j=0;
	for ( INT i=0 ; i<Model->Nodes.Num() ; i++ )
	{
		if ( (Model->Nodes(i).NodeFlags & NF_NotVisBlocking) //Is CSG, and NotVisBlocking
			&& !(Model->Nodes(i).NodeFlags & NF_NotCsg) )
		{
			if ( j == NFC.Num() ) //If our dynamic array is smaller than what we need (only during first tick)
				NFC.Add();
			NFC(j).NodeFlags = Model->Nodes(i).NodeFlags;
			NFC(j).NodeIdx = i;
			j++;
			Model->Nodes(i).NodeFlags = NF_NotCsg;
		}
	}
	NotVisBlockingCount = j;
//	if ( NotVisBlockingCount )
//		debugf( NAME_Log, TEXT("Found %i translucent CSG surfs"), NotVisBlockingCount);
	Super::TickNetServer( DeltaSeconds);
	for ( i=0 ; i<j ; i++ ) //Restore
		Model->Nodes( NFC(i).NodeIdx).NodeFlags = NFC(i).NodeFlags;
	unguard;
}
On a different note,
If Unreal Engine 1 were to be opensourced, the first set of replication fixes would be to allow relevancy of actors in the player's current sky zone, and random point in the hitbox to prevent invisible campers, besides what I just did...

EDIT:
If this code takes more than 1ms on big maps I might consider precaching the node positions as well... but that would break and native mode modifying the BSP in realtime... not that they exist but you never know.

EDIT2:
Dun dun dun!!
- native(1718) final function bool AddToPackageMap( optional string PkgName);
Yes! You know you want it @Wises!!!
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: XC_GameEngine [build 10] [10.1 hotfix]

Post by sektor2111 »

Maybe will be a better option something like this:

Code: Select all

EditorEngine=Editor.EditorEngine
into

Code: Select all

EditorEngine=XC_Editor.XC_EditorEngine
See that deal with BSP (btw)...
Higor wrote: Basically, edit the map's BSP nodes during replication checks and restore them once done LOL.
Or never restore those stupid ones - probably DevBsp need a revision too.
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: XC_GameEngine [build 10] [10.1 hotfix]

Post by Higor »

What that code is doing is literally turn all translucent solid surfaces into non-solid, so there's the need to restore the old flags immediately to prevent actors from cratering into walls lol.
I think I'll release version 11 as it is right now... (gotta boot that linux VM to build... sigh)-

On a different note, I made a variant of the Vector-by-Coords transformation so that it disregards the Z axis for Cylinder traces, much less cycles than before and works for both platforms.
FPU can be so damn easy to assemble with once you get the idea (even easier than standard assembly opcodes).

Code: Select all

#if ASM
inline void ASMTransformXY(const FCoords &Coords, const FVector &InVector, FVector &OutVector)
{
	// FCoords is a structure of 4 vectors: Origin, X, Y, Z
	//				 	  x  y  z
	// FVector	Origin;   0  4  8
	// FVector	XAxis;   12 16 20 <= z=0
	// FVector  YAxis;   24 28 32 <= z=0
	// FVector  ZAxis;   36 40 44 <= unused
	//
	//	task:	Temp = ( InVector - Coords.Origin );
	//			Outvector.X = (Temp | Coords.XAxis);
	//			Outvector.Y = (Temp | Coords.YAxis);
	//			Outvector.Z = (Temp);
	// Basically, move(X,Y,Z) and rotate(X,Y) a point
	// This is super fast
	__asm
	{
		mov     esi,[InVector]
		mov     edx,[Coords]     
		mov     edi,[OutVector]

		// get source
		fld     dword ptr [esi+0]
		fld     dword ptr [esi+4]
		fld     dword ptr [esi+8] // z y x
		fxch    st(2)     // xyz

		// subtract origin
		fsub    dword ptr [edx + 0]  // xyz
		fxch    st(1)  
		fsub	dword ptr [edx + 4]  // yxz
		fxch    st(2)
		fsub	dword ptr [edx + 8]  // zxy

		fstp	dword ptr [edi+8] // store z, xy
		// duplicate X for transforming
		fld		st(0)			// X X Y
		fmul	dword ptr [edx+12]	//Xx X Y
		fxch	st(1)			//X Xx Y
		fmul	dword ptr [edx+24]	//Xy Xx Y

		// duplicate Y for transforming
		fxch	st(2)			//Y Xx Xy
		fld		st(0)			//Y Y Xx Xy
		fmul	dword ptr [edx+28]	//Yy Y Xx Xy
		fxch	st(1)			//Y Yy Xx Xy
		fmul	dword ptr [edx+16]	//Yx Yy Xx Xy
		
		// sum results (Xx+Yx and Xy+Yy)
		faddp	st(2),st(0)		//Yy  Yx+Xx  Xy
		faddp	st(2),st(0)		//Yx+Xx  Yy+Xy

		// store
		fstp	dword ptr [edi+0]
		fstp	dword ptr [edi+4]
	}
}
And for both platforms!

Code: Select all

#elif ASMLINUX
inline void ASMTransformXY(const FCoords &Coords, const FVector &InVector, FVector &OutVector)
{
	__asm__ __volatile__ ("
		# Get source.
		flds	0(%%esi);			# x
		flds	4(%%esi);			# y x
		flds	8(%%esi);			# z y x
		fxch	%%st(2);

		# Subtract origin.
		fsubs	0(%1);
		fxch	%%st(1);
		fsubs	4(%1);
		fxch	%%st(2);
		fsubs	8(%1);				# z x y

		fstps	8(%%edi);			# store z, xy
		# duplicate X for transforming
		fld		%%st(0); 			# X X Y
		fmuls	12(%1);				# Xx X Y
		fxch	%%st(1);			# X Xx Y
		fmuls	24(%1);				# Xy Xx Y

		# duplicate Y for transforming
		fxch	%%st(2);			# Y Xx Xy
		fld		%%st(0);			# Y Y Xx Xy
		fmuls	28(%1);				# Yy Y Xx Xy
		fxch	%%st(1);			# Y Yy Xx Xy
		fmuls	16(%1);				# Yx Yy Xx Xy

		# sum results (Xx+Yx and Xy+Yy)
		faddp	%%st(0),%%st(2);	# Yy  Yx+Xx  Xy
		faddp	%%st(0),%%st(2);	# Yx+Xx  Yy+Xy

		# store
		fstps	0(%%edi);
		fstps	4(%%edi);
	"
	:
	:	"S" (&InVector),
		"q" (&Coords),
		"D" (&OutVector)
	: "memory"
	);
}
But... the performance gain was nearly non-existant, I guess the bottleneck are the AABB(Axis Aligned Bounding Box) checks that then derivate into contained actors.


EDIT:
How stupid of me, I never constructed the 'Version' property, all of my methods were failing because of that!!!!
Well, time to fix it... and use 'XC_Version' instead as name.
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: XC_GameEngine [build 11 - Dynamic Package Loading]

Post by Higor »

@papercoffee have mercy.

Removed debug crash upon failed map load (ops!)
Added CollidingActors native iterator.
Added bUseReplicationHack flag to enable replication traces going through translucent solids.
- Doesn't tend work when surfaces separate zones.
Standard extra native functions persist during map loads and are only removed on Win32 clients connected to a server.
- You can call extended natives during GameInfo's InitGame stage now.
- Linux clients have the standard natives up at all times.
Added AddToPackageMap native (227 opcode), you can now add packages without specifying them as ServerPackages.
- Limitation: the AddToPackageMap calls must be done before the first Tick
- Not specifying a package name will default to the caller's own Package
SetEnemy hook is now optional (default=true)
Removed b451Hack property.
Removed TravelManager property.
Added XC_Version property to allow mods to identify the server's XC_Engine if there is one running.
More source exposed.

Added 'Self Dynamic Loading.txt' documentation file.
Letting a package have control over it's presence in the UPackageMap object without
requiring it to be in 'ServerPackages' list.

WARNINGS:
This method crashes servers not running XC_Engine if not coded the following way.
This method only works before the first Tick, so do it while mutators are initializing.
Make sure this method isn't called on clients, may crash windows clients.

The function needs to be declared on the class about to use it, the compiler won't
complain about it and you'll be able to call it without problems if the opcode (1718)
is defined.

In order to prevent a call when said opcode isn't defined (Win32 client, no XC_Engine)
We simply perform a sanity check and make the mod not depend on XC_Engine at all!

AddToPackageMap works in two different ways:
- PkgName specified: attempts to load said package and add to Send list.
- PkgName unspecified: adds the actor's own package to Send list.
Adding a package to the UPackageMap object will automatically add all of it's
dependancies as well, so if you have a master package that (statically) loads others,
simply add that one package and the others will be inserted as well.

This method cannot force packages marked as ServerSide-Only to be sent.

====================

Code: Select all

class MyMutator expands Mutator;

native(1718) final function bool AddToPackageMap( optional string PkgName);

event PostBeginPlay()
{
	if ( int(ConsoleCommand("get ini:engine.engine.gameengine xc_version")) >= 11 )
		AddToPackageMap();
}
====================
User avatar
papercoffee
Godlike
Posts: 10443
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.
Contact:

Re: XC_GameEngine [build 11 - Dynamic Package Loading]

Post by papercoffee »

I'll let you get away with this... ;)

But do you know the Edit-Copy-Delete-Post trick? ...this way can you add (edit) new content into your post AND bump a thread. Without being at the mercy of the mods :mrgreen:
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: XC_GameEngine [build 11 - Dynamic Package Loading]

Post by sektor2111 »

Anyone with a crash or something ? I did not see troubles at this moment, I didn't made any package loader (I'm not sure if I need such thing).

For MH, SetEnemy hook is active, for others with custom stuff No. It do seems to work fine in any case (with stuff sorted not garbage).
noccer
Adept
Posts: 362
Joined: Sun Aug 01, 2010 12:15 pm
Personal rank: Proud Terrorist

Re: XC_GameEngine [build 11 - Dynamic Package Loading]

Post by noccer »

Today i setup a 436 server on a Linux machine.... It is really awesome! :D
Image

>>You can't steal any ip (v4)adresses, there are exactly 4294967296 of them, and they will still exist when you wrote down all of them, or are stored in a (master)servers database ;)<<
SC]-[WARTZ_{HoF}
Adept
Posts: 426
Joined: Tue Feb 21, 2012 7:29 pm

Re: XC_GameEngine [build 11 - Dynamic Package Loading]

Post by SC]-[WARTZ_{HoF} »

noccer wrote:Today i setup a 436 server on a Linux machine.... It is really awesome! :D
That is nice....
Image
Image
Image
RocketJedi
Inhuman
Posts: 850
Joined: Wed Mar 12, 2008 7:14 pm
Personal rank: I.T Master
Location: New York
Contact:

Re: XC_GameEngine [build 11 - Dynamic Package Loading]

Post by RocketJedi »

Build 11

Critical: appError called:
Critical: Failed to find function GetString in FlatMirror None
Exit: Executing UObject::StaticShutdownAfterError
Critical: UObject::execClassContext
Critical: (NexgenController CTF-Narrow7.NexgenController0 @ Function Nexgen112N.NexgenController.MutatorBroadcastLocalizedMessage : 007C)
Critical: UObject::ProcessEvent
Critical: (SLUtil CTF-Narrow7.SLUtil505, Function Engine.Actor.BroadcastLocalizedMessage)
Critical: RemoteCall
Critical: HandleStream
Critical: UActorChannel::ReceivedBunch
Critical: (Actor SLUtil505)
Critical: UChannel::ReceivedSequencedBunch
Critical: Direct
Critical: UChannel::ReceivedRawBunch
Critical: DispatchDataToChannel
Critical: BunchData
Critical: UNetConnection::ReceivedPacket
Critical: UNetConnection::ReceivedRawPacket
Critical: UTcpNetDriver::TickDispatch
Critical: UpdatePreNet
Critical: ULevel::Tick
Critical: (NetMode=1)
Critical: TickLevel
Critical: UGameEngine::Tick
Critical: UXC_GameEngine::Tick
Critical: UpdateWorld
Critical: UServerCommandlet::Main
Exit: Exiting.
Uninitialized: Name subsystem shut down
Uninitialized: Log file closed, 03/25/15 23:54:19
https://www.vulpinemission.com
Image ROCKET-X8 Server
Image MONSTERHUNT w/ NALI WEAPONS 3 + RX8
Image BUNNYTRACK NY
Image SNIPER DEATHMATCH
Image InstaGib + ComboGib + Jailbreak
Image ROSEBUM ROCKET-X RB
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: XC_GameEngine [build 11 - Dynamic Package Loading]

Post by Higor »

This UE3 code should summarize your crash, something's attempting to find a "GetString" UFunction in "FlatMirror" class.

Code: Select all

UFunction* UObject::FindFunctionChecked( FName InName, UBOOL Global ) const
{
	UFunction* Result = FindFunction(InName,Global);
	if( !Result )
		appErrorf( TEXT("Failed to find function %s in %s"), *InName.ToString(), *GetFullName() );
	return Result;
}
Which is caused by NexGenController's MutatorBroadcastLocalizedMessage here:

Code: Select all

out class<LocalMessage> message,
...
		msg = message.static.getString(switch, relatedPRI_1, relatedPRI_2, optionalObject);
Basically, this 'FlatMirror' class ended up referenced as a message class.
Probably by another mutator behind it, so.
Questions:
- List your entire message mutator chain (just summon an actor that logs them all)
- Find the FlatMirror class, give me more info about it.
- Check on that mutator chain, which one is setting 'FlatMirror' as a class.
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: XC_GameEngine [build 11 - Dynamic Package Loading]

Post by sektor2111 »

Interesting... but that crash did not seems to be delivered by XC_Engine. Is probably like that mover calling an invalid state. It's probably another messed portation ?
noccer
Adept
Posts: 362
Joined: Sun Aug 01, 2010 12:15 pm
Personal rank: Proud Terrorist

Re: XC_GameEngine [build 11 - Dynamic Package Loading]

Post by noccer »

Damn.

Crash on Windows 7 (436) client after mapchange online.

History: TestReach <- UObject::GetPathName <- UObject::GetFullName <- UStruct::SerializeBin <- (Class XConsole.XConsole Player[0]) <- UObject::Serialize <- (XConsole Transient.XConsole0) <- TestReach <- (XConsole Transient.XConsole0) <- UStruct::SerializeBin <- (Class WinDrv.WindowsViewport Console[0]) <- UObject::Serialize <- (WindowsViewport Transient.WindowsClient0.WindowsViewport0) <- UPlayer::Serialize <- UViewport::Serialize <- TestReach <- (WindowsViewport Transient.WindowsClient0.WindowsViewport0) <- TArray<< <- UClient::Serialize <- TestReach <- (WindowsClient Transient.WindowsClient0) <- UGameEngine::Serialize <- (XC_GameEngine Transient.XC_GameEngine0) <- UGameEngine::Serialize <- (XC_GameEngine Transient.XC_GameEngine0) <- UXC_GameEngine::Serialize <- TestReach <- (XC_GameEngine Transient.XC_GameEngine0) <- TArray<< <- UObject::SerializeRootSet <- UObject::CollectGarbage <- Cleanup <- UGameEngine::LoadMap <- UXC_GameEngine::LoadMap <- AttemptLoadPending <- TickPending <- UGameEngine::Tick <- UXC_GameEngine::Tick <- UpdateWorld <- MainLoop
Image

>>You can't steal any ip (v4)adresses, there are exactly 4294967296 of them, and they will still exist when you wrote down all of them, or are stored in a (master)servers database ;)<<
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: XC_GameEngine [build 11 - Dynamic Package Loading]

Post by Higor »

Transient object => Level reference crash, XC_GameEngine should have caught that one to prevent the crash... odd.
Try getting the latest XConsole beta, ~V~ has solved a couple of those crashes by changing the variable types so they don't get serialized.

EDIT: Ugh, now I realize that CollidingActors is broken... ffs.
Post Reply