Skip to content

City Watch enemies causing significant performance issues #2737

@RedRoryOTheGlen

Description

@RedRoryOTheGlen

When there are many City Watch enemies present and hunting the player, performance will significantly decrease.

Image

Image

This seems to be caused by each individual City Watch enemy's EnemySounds.IsReady() repeatedly calling dfAudioSource.GetAudioClip() twice every Fixed Update due to the City Watch having their Move Sound and Attack Sound variables set to SoundClips.None. Changing these values to SoundClips.EnemyMove or EnemyAttack either in EnemyBasics or through a mod accessing the static EnemyBasics.Enemies array results in a massive performance boost even when there are numerous City Watch engaging the player.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions