fix tripware turret

This commit is contained in:
GenZmeY 2022-06-16 00:14:29 +03:00
parent b90da74582
commit 177f5bc56c
5 changed files with 204 additions and 1 deletions

View File

@ -120,6 +120,12 @@ function Initialize()
MyKFGI.KFGFxManagerClass = class'MskGsGFxMoviePlayer_Manager'; MyKFGI.KFGFxManagerClass = class'MskGsGFxMoviePlayer_Manager';
MyKFGI.MyKFGRI.VoteCollectorClass = class'MskGsVoteCollector'; MyKFGI.MyKFGRI.VoteCollectorClass = class'MskGsVoteCollector';
if (MyKFGI.PlayerControllerClass == class'KFGame.KFPlayerController')
MyKFGI.PlayerControllerClass = class'MskGsPlayerController';
else if (MyKFGI.PlayerControllerClass == class'KFGameContent.KFPlayerControllerVersus')
MyKFGI.PlayerControllerClass = class'MskGsPlayerControllerVersus';
else if (MyKFGI.PlayerControllerClass == class'KFGame.KFPlayerController_WeeklySurvival')
MyKFGI.PlayerControllerClass = class'MskGsPlayerController_WeeklySurvival';
MyKFGI.MyKFGRI.VoteCollector = new(MyKFGI.MyKFGRI) MyKFGI.MyKFGRI.VoteCollectorClass; MyKFGI.MyKFGRI.VoteCollector = new(MyKFGI.MyKFGRI) MyKFGI.MyKFGRI.VoteCollectorClass;
VoteCollector = MskGsVoteCollector(MyKFGI.MyKFGRI.VoteCollector); VoteCollector = MskGsVoteCollector(MyKFGI.MyKFGRI.VoteCollector);
@ -292,6 +298,8 @@ function NotifyLogin(Controller C)
Initialize(); Initialize();
`log("NotifyLogin:" @ C);
RepInfo = Spawn(class'MskGsRepInfo', KFPlayerController(C)); RepInfo = Spawn(class'MskGsRepInfo', KFPlayerController(C));
RepInfo.C = C; RepInfo.C = C;
RepInfo.Mut = Self; RepInfo.Mut = Self;

View File

@ -0,0 +1,65 @@
class MskGsPlayerController extends KFPlayerController;
event Destroyed()
{
local KFProjectile KFProj;
local int i;
// Stop currently playing stingers when the map is being switched
if( StingerAkComponent != none )
{
StingerAkComponent.StopEvents();
}
// Useful:
// https://wiki.beyondunreal.com/What_happens_when_an_Actor_is_destroyed
for (i = DeployedTurrets.Length - 1; i >= 0; --i)
{
if (DeployedTurrets[i] != None)
if (!DeployedTurrets[i].bPendingDelete && !DeployedTurrets[i].bDeleteMe)
DeployedTurrets[i].Destroy();
// don't worry about the Destroyed event on Turret
// because it doesn't do anything if the turret is not in the list
DeployedTurrets.Remove(i, 1);
}
SetRTPCValue( 'Health', 100, true );
PostAkEvent( LowHealthStopEvent );
bPlayingLowHealthSFX = false;
// Update projectiles in the world
foreach DynamicActors( class'KFProjectile', KFProj )
{
if( KFProj.InstigatorController == self )
{
KFProj.OnInstigatorControllerLeft();
}
}
if( LocalCustomizationPawn != none && !LocalCustomizationPawn.bPendingDelete )
{
LocalCustomizationPawn.Destroy();
}
if (OnlineSub != none)
{
OnlineSub.ClearAllReadOnlineAvatarByNameCompleteDelegates();
OnlineSub.ClearAllReadOnlineAvatarCompleteDelegates();
}
if (WorldInfo.NetMode != NM_DedicatedServer)
{
ClearMixerDelegates();
ClearDiscord();
}
ClientMatchEnded();
Super(GamePlayerController).Destroyed();
}
defaultproperties
{
}

View File

@ -0,0 +1,65 @@
class MskGsPlayerControllerVersus extends KFPlayerControllerVersus;
event Destroyed()
{
local KFProjectile KFProj;
local int i;
// Stop currently playing stingers when the map is being switched
if( StingerAkComponent != none )
{
StingerAkComponent.StopEvents();
}
// Useful:
// https://wiki.beyondunreal.com/What_happens_when_an_Actor_is_destroyed
for (i = DeployedTurrets.Length - 1; i >= 0; --i)
{
if (DeployedTurrets[i] != None)
if (!DeployedTurrets[i].bPendingDelete && !DeployedTurrets[i].bDeleteMe)
DeployedTurrets[i].Destroy();
// don't worry about the Destroyed event on Turret
// because it doesn't do anything if the turret is not in the list
DeployedTurrets.Remove(i, 1);
}
SetRTPCValue( 'Health', 100, true );
PostAkEvent( LowHealthStopEvent );
bPlayingLowHealthSFX = false;
// Update projectiles in the world
foreach DynamicActors( class'KFProjectile', KFProj )
{
if( KFProj.InstigatorController == self )
{
KFProj.OnInstigatorControllerLeft();
}
}
if( LocalCustomizationPawn != none && !LocalCustomizationPawn.bPendingDelete )
{
LocalCustomizationPawn.Destroy();
}
if (OnlineSub != none)
{
OnlineSub.ClearAllReadOnlineAvatarByNameCompleteDelegates();
OnlineSub.ClearAllReadOnlineAvatarCompleteDelegates();
}
if (WorldInfo.NetMode != NM_DedicatedServer)
{
ClearMixerDelegates();
ClearDiscord();
}
ClientMatchEnded();
Super(GamePlayerController).Destroyed();
}
defaultproperties
{
}

View File

@ -0,0 +1,65 @@
class MskGsPlayerController_WeeklySurvival extends KFPlayerController_WeeklySurvival;
event Destroyed()
{
local KFProjectile KFProj;
local int i;
// Stop currently playing stingers when the map is being switched
if( StingerAkComponent != none )
{
StingerAkComponent.StopEvents();
}
// Useful:
// https://wiki.beyondunreal.com/What_happens_when_an_Actor_is_destroyed
for (i = DeployedTurrets.Length - 1; i >= 0; --i)
{
if (DeployedTurrets[i] != None)
if (!DeployedTurrets[i].bPendingDelete && !DeployedTurrets[i].bDeleteMe)
DeployedTurrets[i].Destroy();
// don't worry about the Destroyed event on Turret
// because it doesn't do anything if the turret is not in the list
DeployedTurrets.Remove(i, 1);
}
SetRTPCValue( 'Health', 100, true );
PostAkEvent( LowHealthStopEvent );
bPlayingLowHealthSFX = false;
// Update projectiles in the world
foreach DynamicActors( class'KFProjectile', KFProj )
{
if( KFProj.InstigatorController == self )
{
KFProj.OnInstigatorControllerLeft();
}
}
if( LocalCustomizationPawn != none && !LocalCustomizationPawn.bPendingDelete )
{
LocalCustomizationPawn.Destroy();
}
if (OnlineSub != none)
{
OnlineSub.ClearAllReadOnlineAvatarByNameCompleteDelegates();
OnlineSub.ClearAllReadOnlineAvatarCompleteDelegates();
}
if (WorldInfo.NetMode != NM_DedicatedServer)
{
ClearMixerDelegates();
ClearDiscord();
}
ClientMatchEnded();
Super(GamePlayerController).Destroyed();
}
defaultproperties
{
}

2
tools

@ -1 +1 @@
Subproject commit 49fcaf67a29c5b478dc10f1f0ae08ed43017cd36 Subproject commit 02222cf4536ac3b4dc9341c17549f77bd8efd4a4