AimLineAttack

From ZDoom Wiki
Jump to navigation Jump to search

Actor

native double AimLineAttack(double angle, double distance, out FTranslatedLineTarget pLineTarget = null, double vrange = 0., int flags = 0, Actor target = null, Actor friender = null)

Usage

Performs vertical aiming for a hitscan attack. Usually the value is then passed to LineAttack to perform a hitscan attack. The main purpose of this function is to handle vertical autoaim, while respecting various autoaim options, such as sv_smartaim and others.

Parameters

  • double angle
Absolute horizontal angle towards the actor to calculate the pitch to.
  • double distance
Maximum distance towards the actor. If the actor is beyond that distance, pitch will not be adjusted.
  • out FTranslatedLineTarget pLineTarget
If a pointer to a FTranslatedLineTarget struct is passed here, will output data into it.
  • double vrange
(Need more info)
  • int flags
Flags that modify the function's behavior. Multiple flags can be combined with |. The following flags are available:
  • ALF_FORCENOSMART — ignore sv_smartaim settings.
  • ALF_CHECK3D(Need more info)
  • ALF_CHECKNONSHOOTABLE(Need more info)
  • ALF_CHECKCONVERSATION(Need more info)
  • ALF_NOFRIENDS — don't adjust pitch if the actor is a friend of the shooter
  • ALF_PORTALRESTRICT — only work through portals with a global offset (to be used for stuff that cannot remember the calculated FTranslatedLineTarget info)
  • ALF_NOWEAPONCHECK — ignore the Weapon.NOAUTOAIM flag on the player's weapon
  • Actor target
(Need more info)
  • Actor friender
(Need more info)

Examples

Nuvolachalk.png Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please add them. This will make it easier to understand for future authors seeking assistance. Your contributions are greatly appreciated.


See also