notnotnotswipez / MoreCompany

MIT License
58 stars 21 forks source link

V50 Bug with new Enemy #69

Open woshimarcel opened 7 months ago

woshimarcel commented 7 months ago

Before saying anything: I am not 100% sure if MoreCompany is the problem, I cannot really test that because I have not enough friends that have time testing that.

Bug: The new enemy "Butler" will not go into the Attacking-Phase. Probably because of the following (in Italic + Bold):

public override void Start()
{
        base.Start();
        **_lastSeenPlayerPositions = new Vector3[4];
        seenPlayers = new bool[4];
        timeOfLastSeenPlayers = new float[4];_**
        if (murderMusicAudio == null)
        {
            ambience2.transform.SetParent(RoundManager.Instance.spawnedScrapContainer);
            murderMusicAudio = ambience2;
        }
        if (StartOfRound.Instance.connectedPlayersAmount == 0)
        {
            enemyHP = 1;
            idleMovementSpeedBase *= 0.75f;
        }
}

Those three arrays all have a max size of 4, if there's just one more player, it'll most likely cause an error The arrays should be directly underneath the class declaration (ButlerEnemyAI)

1A3Dev commented 7 months ago

Was already fixed before you even submitted this however swipez wanted to wait for v50 to be out of beta before updating (since it would've broke compatibility with v49).