Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
ScriptedBaseZeroingGenerator Class Reference
Inheritance diagram for ScriptedBaseZeroingGenerator:
BaseZeroingGenerator SCR_2DPiPScopeZeroingGenerator

Protected Member Functions

void OnInit (IEntity owner, BaseSightsComponent sights)
void OnUpdate (IEntity owner, BaseSightsComponent sights, float timeSlice)
event bool WB_GetZeroingData (float weaponAngle, float distance, out vector offset, out vector angles)
event float WB_CalculateWeaponZeroingAnimationValue (float pitch, float distance, out vector offset, out vector angles)
event vector WB_GetPivotPoint ()
event bool WB_InitGenerator ()
event void WB_CleanupGenerator ()

Detailed Description

Definition at line 7 of file ScriptedBaseZeroingGenerator.c.

Member Function Documentation

◆ OnInit()

void ScriptedBaseZeroingGenerator::OnInit ( IEntity owner,
BaseSightsComponent sights )
protected

Called on initialization.

Parameters
ownerParent entity.
sightsParent sights component.

◆ OnUpdate()

void ScriptedBaseZeroingGenerator::OnUpdate ( IEntity owner,
BaseSightsComponent sights,
float timeSlice )
protected

Called every frame when active to update current state.

Parameters
ownerParent entity.
sightsParent sights component.
timeSliceDelta of time since last update.

◆ WB_CalculateWeaponZeroingAnimationValue()

event float ScriptedBaseZeroingGenerator::WB_CalculateWeaponZeroingAnimationValue ( float pitch,
float distance,
out vector offset,
out vector angles )
protected

Return the animation value for the sights animation. This usually outputs a value that makes the sight line up with the eye as close as possible.

Parameters
pitchThe angle at which the weapon is held.
distanceThe distance this zeroing data is calculated for
offsetoutput Computed offset of the weapon to the eye position
anglesoutput Computed angles for holding the weapon
Returns
a float value, usually between 0 and 1, representing the percentage to forward into the sights animation

◆ WB_CleanupGenerator()

event void ScriptedBaseZeroingGenerator::WB_CleanupGenerator ( )
protected

Clean up. This method is only called automatically if WB_InitGenerator has return true. Otherwise, cleanup either needs to take place within WB_InitGenerator itself, or WB_InitGenerator must call this function

◆ WB_GetPivotPoint()

event vector ScriptedBaseZeroingGenerator::WB_GetPivotPoint ( )
protected

Returns the pivot point of the sights. Usually defined in the sights component, but might be missing if for example the front sight pivot is not on the owner but rather on the entity it is attached to (like the M203)

Parameters
ownerParent entity
sightsParent Sights component
Returns
pivot point

◆ WB_GetZeroingData()

event bool ScriptedBaseZeroingGenerator::WB_GetZeroingData ( float weaponAngle,
float distance,
out vector offset,
out vector angles )
protected

Called to obtain zeroing data for a given weapon angle.

Parameters
weaponAngleAngle how the weapon should be held
distanceThe distance this zeroing data is calculated for
offsetoutput Computed offset of the weapon to the eye position
anglesoutput Computed angles for holding the weapon
Returns
true if the value could be computed, false otherwise. Returning false usually implies that something catastrophic is wrong (missing sight component, missing owner, etc)

◆ WB_InitGenerator()

event bool ScriptedBaseZeroingGenerator::WB_InitGenerator ( )
protected

Initialize the generator

Returns
False if the initialization failed. This can be a misconfiguration of the prefab or any other reason

The documentation for this class was generated from the following file: