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

Post Reply
User avatar
Chamberly
Godlike
Posts: 1963
Joined: Sat Sep 17, 2011 4:32 pm
Personal rank: Dame. Vandora
Location: TN, USA
Contact:

Re: XC_GameEngine [test build 6 - v451 Linux fix - CacheConv

Post by Chamberly »

Rofl... speech binder didn't seem to work so I had to edit that manually as well. :)

I got a female vp1 saying Search and Destory. :D
Image
Image
Image Edit: Why does my sig not work anymore?
P3T3^
Novice
Posts: 28
Joined: Wed Jan 15, 2014 2:10 pm
Location: The Netherlands

Re: XC_GameEngine [test build 6 - v451 Linux fix - CacheConv

Post by P3T3^ »

If you are running this engine on a Windows Server do you still need the TF2.dll TickFix ? I could see a reference to a timingfix in the .ini is why i'm asking.
Do i still need to run it on a single core ? and set priority to high ? or can i just keep this engine running on multiple cores ?

I was getting some strange spikes and graphical issues on the server with XC_GameEngingV5_1. But if i'm running the timingfix and TF2 fix might be a reason as to why ?
Haven't tested the v6 version yet. Will do and give any feedback if needed ^^
Instagib SPAM! Server 3v3 iCTF :: 80.56.111.165:7801 :: Only Small Maps (Down for 1 day due to moving)
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: XC_GameEngine [test build 6 - v451 Linux fix - CacheConv

Post by Higor »

Applying multiple timing fixes is redundant and lots of things can go wrong, although on Client UT's it works just fine with ACE's built in timing fix.
You can always try disabling one and enabling the other, or vice-versa.

My timing fix consists on changing the entire GameEngine::Tick()'s DeltaTime, which then propagates to all actor's Tick.
TickFix (and maybe ACE's?) consist on changing the granularity of 'Sleep' to a different value that 1.

...
Now I realize the Timing fix console command isn't working as intended.
I think I'll do a small bugfix release before finishing the runtime uscript recompiler (if i ever get to finish that)...
User avatar
Wises
Godlike
Posts: 1089
Joined: Sun Sep 07, 2008 10:59 am
Personal rank: ...

Re: XC_GameEngine [test build 6 - v451 Linux fix - CacheConv

Post by Wises »

Re: timing & dualcore fixes

Not sure if relevant but hopefully is compatible with this fix by Iloveut99 : viewtopic.php?f=3&t=2970

This one appears to do a better job then the other one esp on laptops.

Greetz.
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: XC_GameEngine [test build 7]

Post by Higor »

Fixed modified GET, SET commands from being able to read/write right after the end of a static array.
Exposed property MDeltaTimer[10] (editconst, transient, float) so it gets serialized on garbage collection.
The above change fixes Timing Fix causing the game to slow down during the first second after map load.
Corrected the entire boolean properties' bitmasks, this fixes ToggleTimingFix command.
Added 'ActorSlots' command that logs which slots are empty or taken by deleted actors.
Added 'PackageMap' command that prints existing UPackageMap(s) info to the log.


The whole boolean properties issue was a big one.
A lot of undocumented stuff were causing my config Booleans to not have a [1-0] behaviour, but 2048-0, 1024-0, etc.
This caused inconsistencies between UnrealScript and Native code disagreeing when a property was false or true, causing most of the save/load problems with the ToggleTimingFix command.

Let's analyse the D3D7 sources:

Variable definitions of the renderer object:

Code: Select all

    BITFIELD				UseMipmapping;
    BITFIELD				UseTrilinear;
    BITFIELD				UseMultitexture;
    BITFIELD				UsePalettes;
    BITFIELD				UseGammaCorrection;
	BITFIELD				Use3dfx;
	BITFIELD				UseD3DSoftwareRenderer;
	BITFIELD				UseTripleBuffering;
	BITFIELD				UseVSync;
	BITFIELD				UseVertexSpecular;
	BITFIELD				UseAlphaPalettes;
	BITFIELD				UsePrecache;
	BITFIELD				UseVideoMemoryVB;
	BITFIELD                UseAGPTextures;
	BITFIELD                UseVertexFog;
	BITFIELD				UseNonlocalTextures;	
	BITFIELD                Use32BitZBuffer;
StaticConstructor, where the UProperty objects are defined to expose properties to UnrealScript interface.

Code: Select all

    void StaticConstructor()
	{
		guard(UD3DRenderDevice::StaticConstructor);
		new(GetClass(),TEXT("UseMipmapping"),       RF_Public)UBoolProperty ( CPP_PROPERTY(UseMipmapping       ), TEXT("Options"), CPF_Config );
		new(GetClass(),TEXT("UseTrilinear"),        RF_Public)UBoolProperty ( CPP_PROPERTY(UseTrilinear        ), TEXT("Options"), CPF_Config );
		new(GetClass(),TEXT("UseMultitexture"),     RF_Public)UBoolProperty ( CPP_PROPERTY(UseMultitexture     ), TEXT("Options"), CPF_Config );
		new(GetClass(),TEXT("UsePalettes"),         RF_Public)UBoolProperty ( CPP_PROPERTY(UsePalettes         ), TEXT("Options"), CPF_Config );
		new(GetClass(),TEXT("UseGammaCorrection"),  RF_Public)UBoolProperty ( CPP_PROPERTY(UseGammaCorrection  ), TEXT("Options"), CPF_Config );
		new(GetClass(),TEXT("Use3dfx"),             RF_Public)UBoolProperty ( CPP_PROPERTY(Use3dfx             ), TEXT("Options"), CPF_Config );
		new(GetClass(),TEXT("UseTripleBuffering"),  RF_Public)UBoolProperty ( CPP_PROPERTY(UseTripleBuffering  ), TEXT("Options"), CPF_Config );
		new(GetClass(),TEXT("UseVSync"),            RF_Public)UBoolProperty ( CPP_PROPERTY(UseVSync            ), TEXT("Options"), CPF_Config );
		new(GetClass(),TEXT("UsePrecache"),         RF_Public)UBoolProperty ( CPP_PROPERTY(UsePrecache         ), TEXT("Options"), CPF_Config );
		new(GetClass(),TEXT("UseVideoMemoryVB"),    RF_Public)UBoolProperty ( CPP_PROPERTY(UseVideoMemoryVB    ), TEXT("Options"), CPF_Config );
		new(GetClass(),TEXT("UseAGPTextures"),      RF_Public)UBoolProperty ( CPP_PROPERTY(UseAGPTextures      ), TEXT("Options"), CPF_Config );		
		new(GetClass(),TEXT("UseVertexFog"),        RF_Public)UBoolProperty ( CPP_PROPERTY(UseVertexFog        ), TEXT("Options"), CPF_Config );		
		new(GetClass(),TEXT("Use32BitZBuffer"),     RF_Public)UBoolProperty ( CPP_PROPERTY(Use32BitZBuffer     ), TEXT("Options"), CPF_Config );
...
This system is WRONG.
As you can see, the BITFIELD properties aren't packed into a single 4 byte block, when a class's properties are relinked post-StaticConstructor() said properties may suffer changes as it happens with UBoolProperty:
When relinking c++ created UBoolProperty objects, it starts with the oldest created property and goes backwards, it then assigns an incremental bitmask to any consequent UBoolProperty properties.

In this case:
Changing Use32BitZBuffer sets the value between 0,1
Changing UseVertexFog does so between 0,2
Changing UseAGPTextures does so between 0,4
... and so on, because all of the properties were defined together when pointing to non-packed BITFIELD c++ properties.
Forcibly changing UseAGPTextures to 1 via memory would make the Properties dialog display it as FALSE, but the renderer would still operate as if it was TRUE.
It's kind of annoying if you're actually enabling/disabling these settings in native code as it will certainly differ with the UScript behaviour, causing SET,GET,SAVE inconsistancies.

Also, since it's being relinked backwards, you NEED to invert either the UBoolProperty creation statements, or the c++ property order!!!


This is how I've done it:

Most of automatically generated classes headers include this, in this case, UnXC_Game.h

Code: Select all

#if _MSC_VER
#pragma pack (push,4)
#endif
So when we define our c++ class we pack the BITFIELD properties
I used two 4 byte blocks to separate booleans here, one for status vars and another for config vars.
As you can see

Code: Select all

class XC_ENGINE_API UXC_GameEngine : public UGameEngine
{
	public:
	
	INT				DummyData_0;	//Safety for 451 games

	UXC_TravelManager*	TravelManager; //Travel manager subsystem

	ULevel*			GLevel2; 
	INT				TmpSize;	//Init hacking
	INT				LastMapIdx;
	FString			MapCachedPrefix;
	TArray<FString> MapCache;
	FXC_TimeManager	XC_TimeManager;

	//Config
	TArray<FString>	NoBrushTrackerFix;
	BITFIELD		bDisableTimingFix:1 GCC_PACK(4);
	BITFIELD		bDisableBrushTracker:1;
	BITFIELD		bSortMaplistByFolder:1;
	BITFIELD		bSortMaplistGlobal:1;
	BITFIELD		bAutoTravelManager:1;
	BITFIELD		bCacheConvertAtJoin:1;

	INT				DummyData_1 GCC_PACK(4);

	//Hook data
	TArray<AActor*>	PreLoginHooks; //Actor pointers
	Native			ExecDoNothing; //Taken from native 3550
	Native			OldGetMapName; //Keeping this here...
	TArray<BYTE>	OldGetWeapon;
	TArray<BYTE>	OldPreLogin;
	TArray<BYTE>	OldSetEnemy;
	TArray<BYTE>	OldRocketTick;

	//Hook status
	BITFIELD		bHackingInit:1 GCC_PACK(4);
	BITFIELD		bHackingTracker:1;
	BITFIELD		b451Hack:1;
	BITFIELD		bHackedEngine:1; //Main switch for general engine hacks (GetWeapon, PreLogin)
	BITFIELD		bSetEnemy:1;
	BITFIELD		bRocketTick:1;

	INT				DummyData_2 GCC_PACK(4); //Safety for 451 games
Now we go to a part of UXC_GameEngine::StaticConstructor()...
Check out how it's done:
Instead of using one of the Bitfield's locations, I used DummyData vars minus 4 (size of INT) for easier visibility.
Also, noticed the flipped order and the extra UObjectProperty created in the middle to break the link between both UBoolProperty blocks, resetting the bitmask back to 1.

Code: Select all

	new( TheClass,TEXT("bCacheConvertAtJoin"), RF_Public) UBoolProperty( CPP_PROPERTY(DummyData_1)-4, TEXT("XC_GameEngine"), CPF_Native|CPF_Edit|CPF_Config );
	new( TheClass,TEXT("bAutoTravelManager"), RF_Public) UBoolProperty( CPP_PROPERTY(DummyData_1)-4, TEXT("XC_GameEngine"), CPF_Native|CPF_Edit|CPF_Config );
	new( TheClass,TEXT("bSortMaplistGlobal"), RF_Public) UBoolProperty( CPP_PROPERTY(DummyData_1)-4, TEXT("XC_GameEngine"), CPF_Native|CPF_Edit|CPF_Config );
	new( TheClass,TEXT("bSortMaplistByFolder"), RF_Public) UBoolProperty( CPP_PROPERTY(DummyData_1)-4, TEXT("XC_GameEngine"), CPF_Native|CPF_Edit|CPF_Config );
	new( TheClass,TEXT("bDisableBrushTracker"), RF_Public) UBoolProperty( CPP_PROPERTY(DummyData_1)-4, TEXT("XC_GameEngine"), CPF_Native|CPF_Edit|CPF_Config );
	new( TheClass,TEXT("bDisableTimingFix"), RF_Public) UBoolProperty( CPP_PROPERTY(DummyData_1)-4, TEXT("XC_GameEngine"), CPF_Native|CPF_Edit|CPF_Config );

	//UBool properties on different bitfields must not be defined together, or else everything's gon' get fucked up (bitmaks become consequent when they shouldn't)
	new( TheClass, TEXT("TravelManager"), RF_Public) UObjectProperty( CPP_PROPERTY(TravelManager), TEXT("XC_GameEngine"), CPF_Edit|CPF_EditConst , UXC_TravelManager::StaticClass() );

	new( TheClass,TEXT("bRocketTick"), RF_Public) UBoolProperty( CPP_PROPERTY(DummyData_2)-4, TEXT("XC_GameEngine"), CPF_Native|CPF_Edit|CPF_EditConst );
	new( TheClass,TEXT("bSetEnemy"), RF_Public) UBoolProperty( CPP_PROPERTY(DummyData_2)-4, TEXT("XC_GameEngine"), CPF_Native|CPF_Edit|CPF_EditConst );
	new( TheClass,TEXT("bHackedEngine"), RF_Public) UBoolProperty( CPP_PROPERTY(DummyData_2)-4, TEXT("XC_GameEngine"), CPF_Native|CPF_Edit|CPF_EditConst );
	new( TheClass,TEXT("b451Hack"), RF_Public) UBoolProperty( CPP_PROPERTY(DummyData_2)-4, TEXT("XC_GameEngine"), CPF_Native|CPF_Edit|CPF_EditConst );
	new( TheClass,TEXT("bHackingTracker"), RF_Public) UBoolProperty( CPP_PROPERTY(DummyData_2)-4, TEXT("XC_GameEngine"), CPF_Native|CPF_Edit|CPF_EditConst );
	new( TheClass,TEXT("bHackingInit"), RF_Public) UBoolProperty( CPP_PROPERTY(DummyData_2)-4, TEXT("XC_GameEngine"), CPF_Native|CPF_Edit|CPF_EditConst );


PD:
If you want to expose arrays, you have to do it like this (static and dynamic arrays):

Code: Select all

	UArrayProperty *MapCacheArray = new( TheClass,TEXT("MapCache"), RF_Public) UArrayProperty ( CPP_PROPERTY(MapCache), TEXT("XC_GameEngine"), CPF_Native|CPF_Transient|CPF_Edit|CPF_EditConst );
	MapCacheArray->Inner = new (MapCacheArray, TEXT("StringProperty0"), RF_Public) UStrProperty;
	MapCacheArray->Inner->PropertyFlags = CPF_Native|CPF_Edit|CPF_EditConst;
	MapCacheArray->Inner->ElementSize = 12; //SIZE OF TARRAY!!!

	UIntProperty *MSecArray = new( TheClass, TEXT("MSecTimer"), RF_Public) UIntProperty( CPP_PROPERTY(XC_TimeManager), TEXT("XC_GameEngine"), CPF_Native|CPF_Transient|CPF_Edit|CPF_EditConst );
	MSecArray->ArrayDim = 10;
	MSecArray->ElementSize = 4; //SIZE OF INT!!!
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: XC_GameEngine [test build 7]

Post by sektor2111 »

Dude, if I'm thinking more I guess you have to get from somewhere original source-codes of binaries and rework this mess claimed ENGINE. Because:
- ServerCrashFix came based on new "fixes" by UTPG at once with destroying editor, and were still claiming it functional;
- Original game-types are firing multiple times Game-Speed and Timer causing states to go wrong (Skaarj bugs are boosted here) - I think this ought to happen only ONCE restricted somehow if function has been already called - no more speed changing "on fly" only using admin commands for testing;
- implement bUseMultiCore in whatever config and default it to False;
- fix those fake Net slots opened causing PlayerCanSeeMe crashes - No Pawn = No connection - end of BS. Also here is some ... interesting how this piece of crap can detect visibility;

- solving collision crash bug;
- solving Adjustaim troubles based on null frames - suggestion: keep old frame if the newer called is missing in order to have a mesh else return properly or kill pawn instantly or... whatever removal... or if cylinder got a hit return True and done else = False
- destroy client attempting to join as a rat or whatever parasite;
- implement header definition if any coder will require something changed game-type based;
- No need anything else than fixing what is already done and messed up.

For myself:
Facts - default properties for brush bCollideActors = False, bBlockActors = False, bBlockPlayers = False
WTF ???
I'm highly doubt about CanSee, LineOfSight, FastTrace and Trace if they really work accurate :loool: . Also I'm interested to capture SeenPlayer if has something to say if a creature can see only my Left Leg (Or right Leg - or any part) behind a stair.
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: XC_GameEngine [test build 7]

Post by Higor »

sektor2111 wrote:- ServerCrashFix came based on new "fixes" by UTPG at once with destroying editor, and were still claiming it functional;
Never informed myself of what this fixed, glad it works tho.
sektor2111 wrote:- Original game-types are firing multiple times Game-Speed and Timer causing states to go wrong (Skaarj bugs are boosted here) - I think this ought to happen only ONCE restricted somehow if function has been already called - no more speed changing "on fly" only using admin commands for testing;
Weird, can you give examples?
sektor2111 wrote:- fix those fake Net slots opened causing PlayerCanSeeMe crashes - No Pawn = No connection - end of BS. Also here is some ... interesting how this piece of crap can detect visibility;
That left me flipping... so a NetConnection without player pawn causes PlayerCanSeeMe crash? Looks like someone didn't add a sanity check there.
That native function looks easy to fix, I'd need to create a dummy Pawn subclass so I can access it's variables... and redirect the native call to my own function.
It's doable, you tested this function more than I did, if you can describe what it should be doing then I'll be able to create a clone of said function that actually works.
Of course, dunno how it will work performance-wise but I kinda have some experience in visibility checks for static mesh occlusion in terrain maps so I know a few fast algorithms to apply before the actual traces.
sektor2111 wrote:- solving collision crash bug;
This is the n2 reason I made XC_GameEngine, even in the public headers it's a pain to figure out how it's done.
And the limited sources from other engines hasn't helped, maybe it's time I visited UnrealEngine 4's sources...
sektor2111 wrote:- solving Adjustaim troubles based on null frames - suggestion: keep old frame if the newer called is missing in order to have a mesh else return properly or kill pawn instantly or... whatever removal... or if cylinder got a hit return True and done else = False
Not aware of AdjustAim issues... my FerBotz literally deprecated AdjustAim to actually firing at ViewRotation like players do so I never bothered to even experiment with it... any explanation will help me understand and fix.
sektor2111 wrote:- destroy client attempting to join as a rat or whatever parasite;
More information on this?
sektor2111 wrote:- implement header definition if any coder will require something changed game-type based;
Coding guidelines for Games using XCGE?
Can do that.
XCGE classes headers?
I edit those a LOT, it's best to work using the UnrealScript exposed properties so you don't have to worry with offsets and such.
If you ever want to know more about the properties, launch a client with XC_GameEngine on windows and type:
EDITOBJECT NAME=XC_GameEngine0
You'll see a lot of info there (even GameEngine properties being exposed as well).
sektor2111 wrote:For myself:
Facts - default properties for brush bCollideActors = False, bBlockActors = False, bBlockPlayers = False
WTF ???
That's been done on purpose, Movers were never supposed to be spawned in runtime, and these properties surely apply for CylinderCollision so they were most likely disabled to not cause problems with the BSP collision.
Still, you can create brushless Movers with cylinder collisions, and pawns can walk on them as seen on SiegeIV's platforms.
sektor2111 wrote:I'm highly doubt about CanSee, LineOfSight, FastTrace and Trace if they really work accurate :loool: . Also I'm interested to capture SeenPlayer if has something to say if a creature can see only my Left Leg (Or right Leg - or any part) behind a stair.
Doing multiple traces is indeed an expensive method and should be avoided, PlayerCanSeeMe event is used for network and local players and not bots, so it's purpose is clearly that of running/pausing events that are or are not supposed to be seen.
LineOfSightTo works just fine, does three traces instead of one.
Same with Trace.

Both Trace and FastTrace hit dynamic BSP generated by Movers (with a brush tracker) and will stop there, if you want to check that a door exists between two points, it's best to use TraceActors during map initialization (before first tick) because the Tracer isn't initialized yet (in both XCGE and vanilla games).



=========
EDIT:
Any I already found another text parsing issue in these GET, SET functions...
I hate working directly on TCHAR streams...
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: XC_GameEngine [test build 7]

Post by sektor2111 »

Higor wrote: sektor2111 wrote:- ServerCrashFix came based on new "fixes" by UTPG at once with destroying editor, and were still claiming it functional;
Never informed myself of what this fixed, glad it works tho.
It was described in Web-page with UT patches... This time memory doesn't cheat me. It is not fixed. Editor start but you cannot scroll world properly... eh...
Higor wrote: sektor2111 wrote:- Original game-types are firing multiple times Game-Speed and Timer causing states to go wrong (Skaarj bugs are boosted here) - I think this ought to happen only ONCE restricted somehow if function has been already called - no more speed changing "on fly" only using admin commands for testing;

Weird, can you give examples?
Sure...
GameInfo.UC

Code: Select all

function PreBeginPlay()
{
	StartTime = 0;
	SetGameSpeed(GameSpeed);  //#1
....
....
event InitGame( string Options, out string Error )
{
....
....
	if( InOpt != "" )
	{
		log("GameSpeed"@InOpt);
		SetGameSpeed(float(InOpt)); //#2
	}
....
DeathMatchPlus.UC

Code: Select all

event InitGame( string Options, out string Error )
{
	local string InOpt;

	Super.InitGame(Options, Error); //doing previous call

	RemainingTime = 60 * TimeLimit;
	SetGameSpeed(GameSpeed); //#3 if is not already twice mentioned
Skaarj HAVE 0 BUGS starting gamespeed ONCE. Got it ?
Higor wrote:That left me flipping... so a NetConnection without player pawn causes PlayerCanSeeMe crash? Looks like someone didn't add a sanity check there.
Yay... Who knows ? UnrealGold227 seems to have solved that problem. UT seems attached with other things than really required

Code: Select all

DevNet: Connection timed out after 15.000000 seconds (15.024000)
NetComeGo: Close TcpipConnection22 12/31/14 20:43:32
Critical: AActor::TestCanSeeMe
Critical: AActor::PlayerCanSeeMe
Critical: UObject::ProcessEvent
Critical: (UT_FlakCannon MH-Rook(AS)v3_R.UT_FlakCannon64, Function Engine.Inventory.Pickup.Timer)
Critical: AActor::Tick
Critical: TickAllActors
Critical: ULevel::Tick
Critical: (NetMode=1)
Critical: TickLevel
Critical: UGameEngine::Tick
Critical: UpdateWorld
Critical: UServerCommandlet::Main
Exit: Executing UObject::StaticShutdownAfterError
Exit: Exiting.
Uninitialized: Name subsystem shut down
Uninitialized: Log file closed, 12/31/14 20:47:32
Higor wrote:Not aware of AdjustAim issues... my FerBotz literally deprecated AdjustAim to actually firing at ViewRotation like players do so I never bothered to even experiment with it... any explanation will help me understand and fix.
It is about Engine.Pawn at once with a default animsequence "Fighter" missing from some pawns but is "default" is a NONE used for default. How can accelerate it ? See some FireFly flockpawn drawn as sprite not mesh. If has collision will return Accessed None when takes damage - no mesh. I believe (in hoping to wrong) is the same when mesh has no frame leaving a Void into HitLocation - Epic said: "make sure frames are named correctly" - or like that - and more "modders" were sure call unexistent frames - LOL. I forgot to fix that in my pawns but I'll fire a try other time... Of course maybe a tween tweak to keep old frame if new frame is missing would make things more linear and smoother than a deal with a 0 frame mesh.
Higor wrote: sektor2111 wrote:- destroy client attempting to join as a rat or whatever parasite;
More information on this?
A friend presented me a crash based on Predator.Predator. Is not a mismatch - is a total BS. One package has a monster, other one has a player-type - I don't know who was retarded making that second different one. Looks like there are some core tweaks in Linux 436 else the default seems to crash instantly...
Anthrax fixed unrealiable buffer exploit but is for 451. 436 is not so sensitive at PlayerCanSeeMe crashes - Windows based.

I would like to find a kind of 436 with real fixes rather than ruining Navigation support since it could be more properly fixed.
RememberSpot and ShowPath cute for debugging no longer works in 451, only as admin, and are a sort of dumbness since WayBeacon has no RemoteRole - is invisible On-Line but still spams console pointless - it would be better to be totally removed from dedicated servers if is causing lags or fixing it, rather than monkeying a supposed fixation. Amazing these fixes, right ? Else for 255 ban slots I think a decent server uses a general policy rule not that UT based, te, he... They implemented useless things in order to ruin what was good in 436.

As for preventing lags precaching meshes into certain classes. Where is redeemer pre-cached ?

For me... I'm totally unlucky and not so happy. I can toy a bit in UScript but I don't know more about C++ technology, else... I would use in secret my own engine without to make more noise in public places...
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: XC_GameEngine [test build 7]

Post by Higor »

We can all agree that v451 is garbage.

So in this case, a player attempts to join a server using a Monster class, the monster class doesn't spawn on server, but the client still waits for it to load... leaving the connection open?
This sure looks interesting... BTW native code should always have sanity checks, because it instacrashes... on accessed none warnings, etc.

Code: Select all

		if ( Client && Client->Viewports.Num() && Client->Viewports(0) && Client->Viewports(0)->Actor )
			PlayerActor = Client->Viewports(0)->Actor;
All of that to get your local PlayerPawn in a certain context.

So, about PlayerCanSeeMe()
Do bots count for this as well? (So i can figure out what's causing the crash)

During the loop, do the following checks:
- Super quick plane direction aim (am I behind this player?, discard this one if true)
- FOV check (am I outside of the player's view cone?, discard this one if true)
- Trace (if trace from said player hits me, return True, else loop next)
And return False at the end of the function (all discarded).
That the intended behaviour?


============
Skaarjs having issues with TimeDilation changes, that's a new one for me.
What's the visible problems on these pawns? Sudden game speed changes shouldn't really alter any non-TimeDilation factored timers.
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: XC_GameEngine [test build 7]

Post by sektor2111 »

Higor wrote:Skaarjs having issues with TimeDilation changes, that's a new one for me.
What's the visible problems on these pawns? Sudden game speed changes shouldn't really alter any non-TimeDilation factored timers.
Toying into MonsterHunt at a moment I noticed that only by rewriting ReplaceWith will help me to get rid of these bugs using log for fixing Pawn nearby a weapon replaced and unmarked. In old MH v503 using a timer a la UTJ suddenly Skaarj let weapon in place (and is a messed one) as long as it is bHeldItem before to Initialize PlayerView. Bot in common games enters later in map without messing up weapon's display HUD - Net gaming.
Back, I have logged timer (time from Level) - using a sort of regeneration. What I found ? No more than garbage - it was called even twice per second as long as timer fired up to value 1.00 was never 1. By rewriting SetGameSpeed, calling it once and using TimeDilation for timer suddenly log from ReplaceWith has gone (no longer forced tweaking)and Skaarj never missed weapon, I repeat NEVER - no need to mention that timer was running this time almost 100% correctly with very few milliseconds deviations here and there and returning to original values - no tick fix/timer fix used. No need to mention about other games fired with GameSpeed like this how are running - also I have a timer to enhance monster into DM and NEVER-EVER failed weapon, also weapon was dropped properly as long as Monsters enter AFTER starting games not in PostBeginPlay or earlier. Things have different feeling if this TimeDilation is fired a single time not many times in a small interval, it starts only ONCE and without using 1.1 or 1.5 stupid numbers :|
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: XC_GameEngine [test build 7]

Post by Higor »

Monsterhunt still utilizes DMMutator as base mutator?
That'd be dumb as hell, but whatever.
On Chamberly's server, spawning skaarjs on Siege will automatically give them the weapons, on uK Siege server the weapons aren't given... and i'm using LCWeapons' enhanced item replacer on both.
This does look indeed weird...

Regarding PlayerCanSeeMe():
- Works only on Local and Connected players.
- Works with spectators as well.
- FOV checking is done via a cylindric cone, not via a 'screen' cone.
- Said cone works both in front and behind the players (lol)
- Players further than 1600 units away will count as non-viewing.
- Eye Height is considered for starting trace position.

I'll fix that next...
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: XC_GameEngine [test build 7]

Post by sektor2111 »

Higor wrote:Monsterhunt still utilizes DMMutator as base mutator?
Nope... quote at Shrimp's remark- > "I had to recreate a custom DMMutator because original it was causing already too much troubles". And it was done... bugs simply moved. He admitted that class UIWeapons was a dummy one - written later UIWeapon (the "s" is a grammar problem not Engine problem - engine executing scripts not grammar but... nvm) and UIWeapons were meant to control decals on clients :ironic: . If ME, and Myself the player, want no decal because I have a poppy crappy display then it is my decision what I need or not, server should not even try to alter my decisions display related - or another "idea", testing monster power using Shadow decal ? Never worked ON-Line because it was placed in server for spying monster "skilled" - 0 skill in reality. Getting over that useless garbage Old weapons weren't really fixed... No problem let's keep subject because is interesting.

Engine binaries
I'll be extremely grateful if you can simply rewrite and completely override original PlayerCanSeeMe else I'm forced to fallback at 436 - 436 is not excepted but is more stable here, in exchange unprotected in other cases. For a few actors replaced which previously were asking that, I have simply written something in UScript as replacement, it works but is somehow expensive in resources, C++ is much faster than UScript. Don't forget to see if exist a relationship between Net slot opened and that 0 player which later is closed causing a total blow up.
Higor
Godlike
Posts: 1866
Joined: Sun Mar 04, 2012 6:47 pm

Re: XC_GameEngine [test build 7]

Post by Higor »

Try reproducing the PlayerCanSeeMe() bugs and crash using this:
Sektor.7z
(44.89 KiB) Downloaded 98 times
Also included a test map with an actor that plays an ambient sound when PlayerCanSeeMe() returns true.

The code in question:

Code: Select all

class AXC_DummyPawn : private APawn
{
	friend class UXC_GameEngine;
	
	public:
	DECLARE_FUNCTION(NewPlayerCanSeeMe);

	protected:
	UBOOL PCanSee( APlayerPawn* Other);
//    DECLARE_CLASS(APawn,AActor,0|CLASS_Abstract,XC_Engine) //This is unusable by the engine, it's only here to call NewPlayerCanSeeMe with a proper context.
};

Code: Select all

void AXC_DummyPawn::NewPlayerCanSeeMe(FFrame &Stack, RESULT_DECL)
{
	guard( XC_Engine::NewPlayerCanSeeMe);
	P_FINISH;

	*(UBOOL*)Result = 0;
	if ( XLevel )
	{
		if ( XLevel->Engine->Client && XLevel->Engine->Client->Viewports.Num() && XLevel->Engine->Client->Viewports(0) && XLevel->Engine->Client->Viewports(0)->Actor ) //Local player
			if ( PCanSee( XLevel->Engine->Client->Viewports(0)->Actor) )
			{
				*(UBOOL*)Result = 1;
				return;
			}
		if ( XLevel->NetDriver && XLevel->NetDriver->ClientConnections.Num() ) //Clients
		{
			for ( INT ip=0 ; ip < XLevel->NetDriver->ClientConnections.Num() ; ip++ )
				if ( XLevel->NetDriver->ClientConnections(ip) && XLevel->NetDriver->ClientConnections(ip)->Actor )
					if ( PCanSee( XLevel->NetDriver->ClientConnections(ip)->Actor) )
					{
						*(UBOOL*)Result = 1;
						return;
					}
		}
	}

	unguard;
}

Code: Select all

UBOOL AXC_DummyPawn::PCanSee( APlayerPawn* Other)
{
	guard( XC_Engine::PCanSee);
	check( Other);
	FVector aVec = Location - Other->Location;
	if ( aVec.IsZero() )
		return 0;
	if ( aVec.SizeSquared() > 2560000 )
		return 0;
	if ( aVec.SizeSquared() > (aVec + Other->ViewRotation.Vector()).SizeSquared() )
		return 0;
	if ( !aVec.Normalize() )
		return 0;
	FLOAT aFov = Other->FovAngle / 114.6; //Real angle outside of the center
	FLOAT aDot = aVec|Other->ViewRotation.Vector(); //This is the cosine of our angle
	if ( aDot < appCos(aFov * 1.2) )
		return 0;
	FCheckResult Hit;
	return XLevel->SingleLineCheck( Hit, this, Location, Other->Location + FVector(0,0,Other->BaseEyeHeight), TRACE_Level, FVector(0,0,0), 0|NF_NotVisBlocking);
	unguard;
}
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: XC_GameEngine [test build 7]

Post by sektor2111 »

Cool... Let me inflict some message when that happens like in video. First I'll try it as it is - or maybe I'll put null48 as music. Btw, I changed that TimeOut to 3 seconds. I have to see what's the deal. Looks like happens all time when an empty connection slot is closed and an actor does a query during this time.

Edit----------------by papercoffee

Looks like it really challenges me... I cannot crash it with that Extension. I'll try more.
To mention: Looks like that transparent brush makes it "invisible" and other one masked seems to keep it "visible" :shock: .
And... now I can see how works. Out of screen with good dots and still claims "visible". In right corner of screen completely visible claim "Invisible" :what:

Please avoid double posts within 24 hours ...use the edit button instead.
User avatar
Wises
Godlike
Posts: 1089
Joined: Sun Sep 07, 2008 10:59 am
Personal rank: ...

Re: XC_GameEngine [test build 7]

Post by Wises »

Will this work with MapVoteX or Dynamic Actor/Package Loaders?
cheers.
Post Reply