Menus overhaul #14

Merged
dkanus merged 30 commits from :somechanges into master 2022-01-23 22:14:51 +03:00
Showing only changes of commit 9b03198d32 - Show all commits

View File

@ -18,14 +18,37 @@ event NotifyLevelChange(){
function RegisterMutator(NicePack activePack){ function RegisterMutator(NicePack activePack){
NicePackMutator = activePack; NicePackMutator = activePack;
} }
function bool isPoisoned(ScrnHumanPawn pwn){
final private function bool bIsPoisoned(ScrnHumanPawn pwn)
{
local Inventory I; local Inventory I;
if(pwn.Inventory != none)
for(I = pwn.Inventory; I != none; I = I.Inventory) if (pwn.Inventory != none)
if(I != none && MeanPoisonInventory(I) != none) {
for (I = pwn.Inventory; I != none; I = I.Inventory)
{
if (MeanPoisonInventory(I) != none)
return true; return true;
}
}
return false; return false;
} }
final private function bool bIsBleeding(ScrnHumanPawn pwn)
{
local Inventory I;
if (pwn.Inventory != none)
{
for (I = pwn.Inventory; I != none; I = I.Inventory)
{
if (MeanBleedInventory(I) != none)
return true;
}
}
return false;
}
function PostRender(Canvas C){ function PostRender(Canvas C){
local int i; local int i;
local NicePack niceMutator; local NicePack niceMutator;
@ -48,24 +71,28 @@ function PostRender(Canvas C){
if(nicePlayer == none) if(nicePlayer == none)
return; return;
scrnHUDInstance = ScrnHUD(nicePlayer.myHUD); scrnHUDInstance = ScrnHUD(nicePlayer.myHUD);
//// Draw bleed and poison icons //// Draw bleed and poison icons
szRI = class'MeanReplicationInfo'.static.findSZri(ViewportOwner.Actor.PlayerReplicationInfo);
offset = 4; offset = 4;
if(szRI != none){ // BLEED!!!
if(szRI.isBleeding){ if (bIsBleeding(ScrnHumanPawn(C.ViewPort.Actor.Pawn)))
{
x = C.ClipX * 0.007; x = C.ClipX * 0.007;
y = C.ClipY * 0.93 - size * offset; y = C.ClipY * 0.93 - size * offset;
C.SetPos(x, y); C.SetPos(x, y);
C.DrawTile(bleedIcon, size, size, 0, 0, bleedIcon.MaterialUSize(), bleedIcon.MaterialVSize()); C.DrawTile(bleedIcon, size, size, 0, 0, bleedIcon.MaterialUSize(), bleedIcon.MaterialVSize());
} }
offset++; offset++;
if(isPoisoned(ScrnHumanPawn(C.ViewPort.Actor.Pawn))){ // POISON!!!
if (bIsPoisoned(ScrnHumanPawn(C.ViewPort.Actor.Pawn)))
{
x = C.ClipX * 0.007; x = C.ClipX * 0.007;
y = C.ClipY * 0.93 - size * offset; y = C.ClipY * 0.93 - size * offset;
C.SetPos(x, y); C.SetPos(x, y);
C.DrawTile(poisonIcon, size, size, 0, 0, poisonIcon.MaterialUSize(), poisonIcon.MaterialVSize()); C.DrawTile(poisonIcon, size, size, 0, 0, poisonIcon.MaterialUSize(), poisonIcon.MaterialVSize());
} }
}
if(niceWeap != none && niceWeap.bShowSecondaryCharge && scrnHUDInstance != none){ if(niceWeap != none && niceWeap.bShowSecondaryCharge && scrnHUDInstance != none){
C.ColorModulate.X = 1; C.ColorModulate.X = 1;
C.ColorModulate.Y = 1; C.ColorModulate.Y = 1;