Skip to content

Significant NPC component behavior diffs from FCNPC #1155

Closed
openmultiplayer/omp-stdlib
#58

Description

@NexiusTailer

While chatting in one of ru community resources, one guy has noticed a few significant behavior differences between omp NPC component and FCNPC plugin when porting his gamemode (which heavily uses NPCs, so it should all be good catches because it covers the most of ported NPC features). The reason that I'm reporting it now is just because I summarized it in a brief list instead of tldr claims, each of the point seems pretty important tho:

  1. NPC_SetFacingAngleToPos and NPC_SetFacingAngleToPlayer (based on FCNPC_SetAngleToPos and FCNPC_SetAngleToPlayer). Those two made life much more easier by that it automatically calculates the angle between the NPC and other player/position and sets the NPC this calculated angle.

  2. Make NPC_Respawn to be able respawning NPCs which are dead, since FCNPC can do this and pretty much logic was built on this fact. NPC_Respawn still has sense to be separated from NPC_Spawn, because it re-applies many things to the NPC when you respawn him instead of just spawn. Scripters are aware of this difference and sometimes use Respawn on dead NPCs, so it's an issue now (not to mention that ability to respawn dead NPCs with FCNPC_Respawn was also documented).

  3. Make default NPC move type like it was in FCNPC (probably it's better to be NPC_MOVE_TYPE_AUTO). Currently there are many movement glitches with it when porting, if using the default parameter value in the most of movement natives (you can see some of the cases here in this demo).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions