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.
HolywarsNexgenHudFix
-
Barbie
- Godlike
- Posts: 3329
- 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
-
Eternity
- Skilled
- Posts: 179
- 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...
-
Letylove49
- Masterful
- Posts: 529
- Joined: Tue Feb 28, 2012 7:47 pm
- Personal rank: AK admin
- 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;
}-
Eternity
- Skilled
- Posts: 179
- 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;
-
Letylove49
- Masterful
- Posts: 529
- Joined: Tue Feb 28, 2012 7:47 pm
- Personal rank: AK admin
- 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.
-
Letylove49
- Masterful
- Posts: 529
- Joined: Tue Feb 28, 2012 7:47 pm
- Personal rank: AK admin
- 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];
}
*/
-
Letylove49
- Masterful
- Posts: 529
- Joined: Tue Feb 28, 2012 7:47 pm
- Personal rank: AK admin
- Location: suisse
Re:HolywarsNexgenHudFix
i' m still trying to fix that witout have to remove some code but yet i don't get what i want.
and add that
on holywars the hud must be blue , gold or red. but i get utpreferences hud color instind of the Blue hud at the spawn.
how i can solve that ?
for make it work the only way i have fund yet is to remove/***************************************************************************************************
*
* $DESCRIPTION Initializes/updates the variables used in the rendering procedure.
* $PARAM c Canvas object that provides the drawing capabilities.
* $REQUIRE c != none
* $ENSURE c.font != none
*
**************************************************************************************************/
simulated function setup(Canvas c) {
local int index;
local bool bUpdateBase;
local float dummy;
// Make sure the font ain't none.
if (baseFont == none) baseFont = getFont(chatMsgSize, c);
c.font = baseFont;
// Get local PlayerPawn.
player = c.viewport.actor;
// Set base hud color.
baseHUDColor = ChallengeHUD(player.myHUD).HUDColor; // use the HUD colour set in UT prefs
if (Level.Game.IsA('Holywars')){
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];
}
Code: Select all
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];
}and add that
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];
}how i can solve that ?