From de6567f15a2e20399b55c4dfaa8364ba104ff195 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Sat, 22 Jan 2022 20:36:30 +0400 Subject: [PATCH] Disable `breathsound` log on pawn spawn --- sources/NiceHumanPawn.uc | 34 ++++++++++++++++++++++++++++ sources/Zeds/Nice/NiceZombieBloat.uc | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/sources/NiceHumanPawn.uc b/sources/NiceHumanPawn.uc index a7dd51e..a0154b3 100644 --- a/sources/NiceHumanPawn.uc +++ b/sources/NiceHumanPawn.uc @@ -863,6 +863,40 @@ simulated function AltFire(optional float F){ super.AltFire(F); } +// added copy-cated function to disable some log +simulated function Setup(xUtil.PlayerRecord rec, optional bool bLoadNow) +{ + local ScrnPlayerController PC; + local string CN; + + PC = ScrnPlayerController(Controller); + if ( PC != none && IsLocallyControlled() ) + { + // check this only on player side, because it stores + // RedCharacter & BlueCharacter in the config + CN = rec.DefaultName; + if ( !PC.ValidateCharacter(CN) ) { + // character invalid, change it valid one, which was set up in ValidateCharacter() + rec = class'xUtil'.static.FindPlayerRecord(CN); + PC.ChangeCharacter(CN); + } + } + + super(KFPawn).Setup(rec, bLoadNow); + + if( class(Species) != none ) + { + BreathingSound = class'KFDARSoundGroup'.default.BreathingSound; + } + else if( class(Species) != none ) + { + BreathingSound = class'KFFemaleSoundGroup'.default.BreathingSound; + } + // disable the log!!! + // log(BreathingSound); +} + + defaultproperties { defaultInvincibilityDuration=2.000000 diff --git a/sources/Zeds/Nice/NiceZombieBloat.uc b/sources/Zeds/Nice/NiceZombieBloat.uc index ef95593..c3ab99b 100644 --- a/sources/Zeds/Nice/NiceZombieBloat.uc +++ b/sources/Zeds/Nice/NiceZombieBloat.uc @@ -265,7 +265,7 @@ simulated function Tick(float deltatime) BileExplosionLoc = Location; BileExplosionLoc.z += (CollisionHeight - (CollisionHeight * 0.5)); - GibBileExplosion = Spawn(class 'LowGoreBileExplosion',self,, BileExplosionLoc ); + GibBileExplosion = Spawn(class'LowGoreBileExplosion',self,, BileExplosionLoc ); bPlayBileSplash = true; } }