PDA

View Full Version : [Issue] UT Compass and UTDC


ODIE3
14th March, 2005, 07:01 PM
Greetings:

Since using UTDC a mutator that I use in Infiltration is having issues. This mutator displays a Compass HUD. What happens is when a player connects to my server(s) the HUD will not display. Sometimes reconnecting to the server causes the HUD to be displayed, sometimes not.

UT Compass has worked over a year without issues until I started to run UTDC. I hope you can look into this issue and perhaps make UTDC play nice with this mutator.

Thanks!

Here is the mutator to look at:
http://ghostdogs.net/inf/utcompass.zip

Readme.txt information:
*** Quick UTCompass API reference ***

This is a basic explanation of the three waypoint control functions and
their 'mutate' equivalents implemented in UTCompass v0.8.

--------------------------------------------------------------------------

UTCompassMut functions:

int setWP(int index, vector location, optional String sName);
Sets a waypoint for all present and future clients in the current game. If
a valid index number is specified any previous waypoint info will be
overwritten.
index : Place in waypoint list (0 through 15). If the provided number
is not within the 0 through 15 range, the first available
list position is used.
location : Where. Standard Unreal location info.
name : What the waypoint is called. If it starts with an asterisk
('*') it will NOT be listed along the left edge of the HUD.
The function returns the actual list position the waypoint is placed at
or -1 if unsuccessful.

clearWP(int index);
Deletes a waypoint.
index : Index of waypoint to delete. Must be between 0 and 15.

clearWPs();
Deletes ALL waypoints.

--------------------------------------------------------------------------

Mutate functions: These can ONLY be called from another server-side object
or a player who is logged in as an administrator. Use them to avoid
package-dependancy when this is undesirable.

"utcSetWP index%location%name"
Sets a waypoint. Parameters are the same as in the setWP() function, only
converted to string values and separated by '%' chars.

"utcClearWP index"
Deletes a waypoint.

"utcClearWPs"
Deletes all waypoints.

--------------------------------------------------------------------------

* Auxiliary functions *

From UTCompass v0.8 the exec commands "HUDMutate" and "HUDMutateNR" have been
added to the UTCompass.CompassController class. The purpose of this is to
enable HUD mutators on the client side to receive 'mutate' commands online
as well as offline and also regardless of wether the HUD mutator class is
the same as the server-side mutator (most common HUD mutators) or a class
of its own spawned exclusively with the player's HUD (UTcompass and INFYAC).

"HUDMutate" and "HUDMutateNR" are used exactly like normal "mutate" commands,
but they will only call the "mutate" functions on the mutators in the sender's
MyHUD.HUDMutator linked list.

Since the 'mutate' command by default recurses through the mutator chain (i.e.
the 'nextMutator' variable), the "HUDMutate" command might cause the 'mutate'
commands to be called twice if any of the mutators in the HUD mutator chain
also are part of the normal mutator chain. This ONLY happens in offline games
and server-side on listen (i.e. non-dedicated) servers. Also, "exclusively
spawned with the HUD object"-mutators like UTCompass and INFYAC are never
affected by this since they are only part of the HUD mutator chain
(myHUD.HUDMutator -> nextHUDMutator) and not the main mutator chain
(level.game.baseMutator -> nextMutator). The "HUDMutateNR" command ensures
this does not happen by temporarily setting the HUD mutators' nextMutator
variables to 'none' when calling the 'mutate' command and then restoring
them afterwards.

kawaii
14th March, 2005, 07:07 PM
Well Infiltatrion is a kina "seperat" mod for UT, and therefor there is no support for it (yet.)

Maybe it will come soon :)

ODIE3
14th March, 2005, 07:09 PM
Well, UT Compass is for UT in general. Just happens that I am using it on Infiltration.

ODIE3
14th March, 2005, 09:20 PM
Perhaps this client Log File is helpful but knowning my luck it is not:

I don't get a compass anymore on EAS. It is very annoying.

this is an error i get, from INF log.

Log: FactoryCreateText: TextBuffer with TextBufferFactory (0 1 UTDCv16.dc)
Warning: Can't find file 'UTDCv16.dc' for import
Log: FactoryCreateText: TextBuffer with TextBufferFactory (0 1 UTDCv16.dll)
Log: Execing UTDCv16.dll
ScriptLog: Owners check found
ScriptLog: Process check
Warning: SpawnActor failed because class BlockPlayer has bStatic or bNoDelete
Warning: Actor not spawned for new channel
Warning: SpawnActor failed because class BlockPlayer has bStatic or bNoDelete
Warning: Actor not spawned for new channel
Warning: SpawnActor failed because class BlockPlayer has bStatic or bNoDelete
Warning: Actor not spawned for new channel
Warning: SpawnActor failed because class BlockPlayer has bStatic or bNoDelete
Warning: Actor not spawned for new channel
Warning: SpawnActor failed because class BlockPlayer has bStatic or bNoDelete
Warning: Actor not spawned for new channel
Warning: SpawnActor failed because class BlockPlayer has bStatic or bNoDelete
Warning: Actor not spawned for new channel
Warning: SpawnActor failed because class BlockPlayer has bStatic or bNoDelete
Warning: Actor not spawned for new channel
Warning: SpawnActor failed because class BlockPlayer has bStatic or bNoDelete
Warning: Actor not spawned for new channel
Log: Warning: missing bone/animation link for Object01 index 21458
ScriptLog: Memory check
ScriptWarning: UTCHUD EAS-INF-Refinery.UTCHUD0 (Function UTCompass.UTCHUD.utc_Toggle:001E) Accessed None
Log: Warning: missing bone/animation link for Static01 index 21456
DevMusic: Load music: Music Infmenu01.Infmenu01
DevMusic: Unregister music: Music Infmenu01.Infmenu01
DevMusic: Load music: Music InfSilent.InfSilent
Log: Warning: missing bone/animation link for Object01 index 21458
Log: appRequestExit(0)
Exit: Preparing to exit.

ODIE3
14th March, 2005, 10:17 PM
The author of the UTCompass says this:

That log doesn't help much. There is no way a UTCHUD's PlayerOwner variable could be 'none' unless it doesn't receive any calls to PostRender(). But the fact that UTC_Toggle() has been called at all indicates that it is a part of the client's HUD mutator chain. I can only think of two possible solutions:

Another HUD mutator is present and doesn't call nextHUDMutator.PostRender() properly. (Happens a lot, but not very likely in this case.)
The variable Canvas.Viewport.Actor is 'null' when it should contain a reference to the PlayerPawn owning the HUD. This might be where UTDC interfers with things.


The undocumented commands 'mutate utcdebug' and 'hudmutate utchdebug' might provide a clue about what's going on, BTW. Other than that, I'll try to get an updated version with a different way of getting the reference to the controlling PlayerPawn object as soon as possible.

PizzaMan
14th March, 2005, 10:42 PM
Have you tried

ShowLogo=False

(just guessing here)

ODIE3
14th March, 2005, 10:46 PM
I just turned that off. I will know tonight when players get on if the issue still happens with the Logo Disabled.

Thanks for your Idea [I was having the same thought].

ODIE3
15th March, 2005, 04:38 AM
Have you tried

ShowLogo=False

(just guessing here)


Well, turning that to False does not disable the logo.

When I was playing with no one else on the server I had not issuses [since the logo does not show with only one player]. As soon as players joined and that logo started UT Compass would stop working.

I disabled UTDC [since there was only four of us] restarted the Server and the UT Compass issue went away.

I am pretty sure the issue is with UTDC and perhaps it's HUD Logo.

Olethros
15th March, 2005, 12:48 PM
Yes, it definitely sounds like a bugged HUD mutator now. Since I have no access to UTDC's source code, I can't be 100% sure what's wrong, but here's a couple of mistakes that damn near 8 out of 10 people make when coding HUD mutators (including employees of Epic!):

Using the AddMutator() function in the HUD mutator chain. This sets the mutator's NextMutator reference rather than NextHUDMutator, and the new mutator will never receive PostRender() calls.
Calling NextMutator.PostRender() rather than NextHUDMutator.PostRender() or...
Not calling the next mutator's PostRender() at all when done drawing stuff.


At the risk of sounding condescending, here's a couple of proper code examples:
/**
* The HUD mutator's PostRender() function.
*/
Simulated Function PostRender(Canvas canvas){

// Your stuff here (...)

if(nextHudMutator!=none) nextHUDMutator.PostRender(Canvas); //IMPORTANT!
}

/**
* Example on adding a mutator to the HUD's mutator chain. Also see code
* example from Mutator.RegisterHUDMutator(). The important bit is to make
* sure that it sets the proper references to NextHUDMutator.
*/
Simulated Function RegisterHUDMutatorFor(HUD myHUD){
local Mutator M;

M = myHUD.HUDMutator;
myHUD.HUDMutator = self;
NextHUDMutator = M;
bHUDMutator = True;
}

ODIE3
15th March, 2005, 04:18 PM
I have tried to turn off the Logo in both UTDC 1.5 and 1.6. The ini setting is set to false and I also tried mutate utdc showlogo off. Neither of those would turn off the logo. For the mutate logo off, I was logged in as Admin and UTDC told me it was off. I reconnected and the logo appeared.

Troublesome could you attempt to confirm the HUD Logo issue please?

Troublesome
16th March, 2005, 08:30 PM
yea forgot the option to disable logo

basicly the code for the logo is taken from the cshp source:

simulated function AttachBadge()
{
local private PlayerPawn PPawn;

PPawn = PlayerPawn(Owner);
if ((DCBadge != None) || (PPawn == None) || (PPawn.MyHud == None))
{
return;
}

DCBadge = Spawn(class 'UTDCBadge', PPawn);
if (DCBadge != None)
{
DCBadge.VersionStr = VersionStr;
DCBadge.xPos = xPos;
DCBadge.yPos = yPos;
DCBadge.MyHud = PPawn.MyHud;
DCBadge.NextHUD = PPawn.myHud.HudMutator;

// Attach it to the player
PPawn.myHud.HudMutator = DCBadge;
}
else
{
Log("Couldn't Spawn Badge");
}
}

in DCBadge postrender:
if (NextHUD != None && NextHUD != Self)
NextHUD.PostRender(Canvas);

ODIE3
16th March, 2005, 08:44 PM
Any chance to get a UTDC 1.6.1 to be able to disable the logo? We are starting a League this weekend and would like to use UTDC and UT-Compass for the matches.

Olethros
16th March, 2005, 08:55 PM
DCBadge.NextHUD = PPawn.myHud.HudMutator;
That's the problem right there. You HAVE to use the variable NextHUDMutator defined in Engine.Mutator to reference the next HUD mutator in the list. The rest seems OK, as far as I can see. Just replace all instances of "NextHUD" with "NextHUDMutator" in the DCBadge class and it should be fine.

geogob
16th March, 2005, 08:58 PM
in DCBadge postrender:
if (NextHUD != None && NextHUD != Self)
NextHUD.PostRender(Canvas);


*erm*

if (NextHUDMutator != None && NextHUDMutator != Self)
NextHUDMutator.PostRender(Canvas);

?


EDIT: damn... even on remote forums where I never appear I do get instaposted. :confused:

ODIE3
16th March, 2005, 09:01 PM
Hey, you stole my sig picture! :P

geogob
17th March, 2005, 06:25 AM
Yeah right... guilty.

And I forgot to mention the other lines not consistant with the correction suggested, but I'm sure you figured it out (anyway Olethros pointed it out).

ODIE3
17th March, 2005, 04:22 PM
Any chance on a quick fix for the HUD Logo issue? While I know it seems simple to correct your HUD Logo code, UTDC Next Version may be to far along with other additions/fixes to be released.

Just would like to know how long we over at Infiltration will have to hop along during normal/match game play with the HUD Logo effecting the UT Compass [Speech Pad Mutator and possibility the HUD Score issues].