Garry's Mod Wiki

ENTITY:OverrideMoveFacing

  boolean ENTITY:OverrideMoveFacing( number interval, table data )

Description

Called to completely override NPC movement facing.

This hook only exists for ai type SENTs.

Arguments

1 number interval
Time interval for the movement, in seconds. Usually time since last movement.
2 table data
Extra data for the movement. A table containing the following data:
  • boolean hasTraced - The result if a forward probing trace has been done
  • number expectedDist - The distance expected to move this think
  • number flags - AILMG flags
  • number maxDist - The distance maximum distance intended to travel in path length
  • number navType - NAV enum
  • number speed - The sequence ground speed. Note these need not always agree with "target"
  • Entity moveTarget- Target entity
  • Vector dir - The actual move. Note these need not always agree with "target"
  • Vector facing - The actual move. Note these need not always agree with "target"
  • Vector target - Object of the goal

Returns

1 boolean
Return true to disable the default movement facing code.