Well... Maybe learn the basics first?Letylove49 wrote: ↑Thu Oct 13, 2022 8:41 pm now i got this : Call to setup1: bad or missing parameter 1.
[Solved]HolywarsNexgenHudFix
-
- Godlike
- Posts: 2897
- Joined: Fri Sep 25, 2015 9:01 pm
- Location: moved without proper hashing
Re: HolywarsNexgenHudFix
"If Origin not in center it be not in center." --Buggie
-
- Skilled
- Posts: 178
- Joined: Sat Nov 30, 2019 10:56 pm
Re: HolywarsNexgenHudFix
If i understand it right way, each occurrence of "setup(c)" call (there are 3 of them) must be replaced to "GetsetupName(c)".Letylove49 wrote: ↑Thu Oct 13, 2022 8:41 pm ok
now i got this : Call to setup1: bad or missing parameter 1.
Also, GetsetupName function must look this way then:
Code: Select all
simulated function GetsetupName(Canvas c)
{
if (PlayerPawn(Owner) != None)
if (PlayerPawn(Owner).GameReplicationInfo != None)
if (PlayerPawn(Owner).GameReplicationInfo.IsA('HolyWarsReplicationInfo'))
setup1(c);
else
setup(c);
}
So, most likely issues will proceed to occur anyway.
Also, any help here could be much more effective if at least some basic homework was done...
-
- Adept
- Posts: 278
- Joined: Tue Feb 28, 2012 7:47 pm
- Location: suisse
Re: HolywarsNexgenHudFix
ok now i'm able to compile but that don't work like expected.
pehaps i should show how the Hud should work on Holywars .
This come from the mod Holywars. ( pehaps i should put it directely on file NexgenHud.uc
pehaps i should show how the Hud should work on Holywars .
This come from the mod Holywars. ( pehaps i should put it directely on file NexgenHud.uc
Code: Select all
//=============================================================================
class HolyWarsHUD expands ChallengeHUD;
simulated function HUDSetup(canvas canvas)
{
local String MyName, SaintName;
local bool bHeretic;
Super.HUDSetup(canvas);
MyName = PlayerOwner.PlayerReplicationInfo.PlayerName;
bHeretic = HolyPRI(PlayerOwner.PlayerReplicationInfo).bHeretic;
SaintName = HolyWarsReplicationInfo( PlayerOwner.GameReplicationInfo ).TheSaint;
if( MyName == SaintName )
HUDColor = GoldColor;
else if( bHeretic )
HUDColor = RedColor;
else
HUDColor = BlueColor;
SolidHUDColor = HUDColor;
if ( Level.bHighDetailMode )
HUDColor = Opacity * 0.0625 * HUDColor;
}
-
- Skilled
- Posts: 178
- Joined: Sat Nov 30, 2019 10:56 pm
Re: HolywarsNexgenHudFix
Something is not alright there... Look at the call chain/sequence - from ChallengeHUD.PostRender to HUD Mutators PostRender calls and you will realize this issue normally should not occur and such fix should not be needed at all.
Because at the point NexgenHUD is being drawn HolyWarsHUD.HUDSetup function was already executed and proper HUDColor value assigned.
Maybe HUDColor value is overridden and not restored somewhere else - for example, in some of the HUD mutators...
Because at the point NexgenHUD is being drawn HolyWarsHUD.HUDSetup function was already executed and proper HUDColor value assigned.
Maybe HUDColor value is overridden and not restored somewhere else - for example, in some of the HUD mutators...
Mod-specific properties access may bring another issues or undesirable side effects in this case, it is better to avoid this...Letylove49 wrote: ↑Thu Oct 13, 2022 11:19 pm This come from the mod Holywars. ( pehaps i should put it directely on file NexgenHud.ucCode: Select all
bHeretic = HolyPRI(PlayerOwner.PlayerReplicationInfo).bHeretic; SaintName = HolyWarsReplicationInfo( PlayerOwner.GameReplicationInfo ).TheSaint;
-
- Adept
- Posts: 278
- Joined: Tue Feb 28, 2012 7:47 pm
- Location: suisse
Re: HolywarsNexgenHudFix
i think i will keep the fix that i have done on Nexgen112N in this case.Eternity wrote: ↑Fri Oct 14, 2022 8:43 am Something is not alright there... Look at the call chain/sequence - from ChallengeHUD.PostRender to HUD Mutators PostRender calls and you will realize this issue normally should not occur and such fix should not be needed at all.
Because at the point NexgenHUD is being drawn HolyWarsHUD.HUDSetup function was already executed and proper HUDColor value assigned.
Maybe HUDColor value is overridden and not restored somewhere else - for example, in some of the HUD mutators...
Mod-specific properties access may bring another issues or undesirable side effects in this case, it is better to avoid this...Letylove49 wrote: ↑Thu Oct 13, 2022 11:19 pm This come from the mod Holywars. ( pehaps i should put it directely on file NexgenHud.ucCode: Select all
bHeretic = HolyPRI(PlayerOwner.PlayerReplicationInfo).bHeretic; SaintName = HolyWarsReplicationInfo( PlayerOwner.GameReplicationInfo ).TheSaint;
The problem with the useUTHUDColor only concerns the Nexgenhud and does not affect the original hud so it is not too annoying especially in this case it is not a public version.
-
- Adept
- Posts: 278
- Joined: Tue Feb 28, 2012 7:47 pm
- Location: suisse
Re: HolywarsNexgenHudFix
Good new i have fund a way to make work Holywars without loste the function UseUTHudColor:
Code: Select all
// Set base hud color.
baseHUDColor = ChallengeHUD(player.myHUD).HUDColor; // use the HUD colour set in UT prefs
if(useUTHUDColor==True)
{ baseHUDColor = ChallengeHUD(player.myHUD).HUDColor;
} else { baseHUDColor = baseColors[player.playerReplicationInfo.team];
}
/*
if (player == none || player.playerReplicationInfo == none || player.gameReplicationInfo == none) {
baseHUDColor = baseColors[5];
} else if (player.playerReplicationInfo.bIsSpectator &&
!player.playerReplicationInfo.bWaitingPlayer) {
baseHUDColor = baseColors[4];
} else if (useUTHUDColor || (!player.gameReplicationInfo.bTeamGame && ChallengeHUD(player.myHUD) != none)) {
baseHUDColor = ChallengeHUD(player.myHUD).favoriteHUDColor * 15.9;
} else if (0 <= player.playerReplicationInfo.team && player.playerReplicationInfo.team <= 3) {
baseHUDColor = baseColors[player.playerReplicationInfo.team];
} else {
baseHUDColor = baseColors[5];
}
*/