ForrestMarkX / KF2-Server-Extension

A repository for ServerExtension by Marco found here https://forums.tripwireinteractive.com/forum/killing-floor-2/killing-floor-2-modifications/general-modding-discussion-ad/beta-mod-releases/109463-mutator-server-extension-mod
GNU Lesser General Public License v3.0
12 stars 16 forks source link

Boss Wave Bugged #18

Closed axolotl777 closed 6 years ago

axolotl777 commented 6 years ago

The camera is stuck in a third person view of the boss and doesn't return to the player, making the last wave virtually un-winnable.

robertoocpgammes1 commented 6 years ago

I'm also having this problem my friend. https://image.prntscr.com/image/YcljPAOmT5eXa1yz15UEYg.png

ForrestMarkX commented 6 years ago

There's the problem, you're spawning two bosses

robertoocpgammes1 commented 6 years ago

Thanks for the reply, Forrest. I tried to put only 1 boss on the last wave, tried various configurations, but always ends up coming 2 bosses in the end. Sorry for the lousy English

duk6046 commented 6 years ago

This is my boss camera fix code, add in ExtPlayerController.uc it becomes similar to existing KF2 client.

function SetBossCamera( KFInterface_MonsterBoss Boss )
{
    if( Boss != none && Boss.GetMonsterPawn().HitFxInfo.bObliterated )
    {
        SetLocation( Boss.GetMonsterPawn().Location );
    }

    SetViewTarget( Boss.GetMonsterPawn() );

    if( Role == ROLE_Authority && !IsLocalPlayerController() )
    {
        PlayerCamera.CameraStyle = 'Boss';
    }
    else
    {
        ClientSetCameraMode( 'Boss' );
    }
    SetTimer(3.0, false, 'ResetCamera');
}

function ResetCamera()
{
    local ExtPlayerController KFPC;

    foreach WorldInfo.AllControllers(class'ServerExt.ExtPlayerController', KFPC)
    {
       KFPC.SetCameraMode('FirstPerson');
       KFPC.ClientSetCameraMode('FirstPerson');
    }
}
robertoocpgammes1 commented 6 years ago

Could you check your ExtPlayerController.uc?

robertoocpgammes1 commented 6 years ago

Problem solved:

function SetBossCamera( KFInterface_MonsterBoss Boss ) { // If our view target has been obliterated, the camera will default to view the player controller. // So, put the player controller where the view target was. if( Boss != none && Boss.GetMonsterPawn().HitFxInfo.bObliterated ) { SetLocation( Boss.GetMonsterPawn().Location ); }

SetViewTarget( Boss.GetMonsterPawn() );

if( Role == ROLE_Authority && !IsLocalPlayerController() )
{
    PlayerCamera.CameraStyle = 'Boss';
}
else
{
    ClientSetCameraMode( 'Boss' );
}

}