UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
cl_hud_callbacks.h File Reference

Go to the source code of this file.

Functions

void HUD_InitCallbacks (void)
 
ItemHUD_GetLeftHandWeapon (const le_t *actor, containerIndex_t *container)
 returns the weapon the actor's left hand is touching. In case the actor holds a two handed weapon in his right hand, this weapon is returned here. This function only returns nullptr if no two handed weapon is in the right hand and the left hand is empty. More...
 
const fireDef_tHUD_GetFireDefinitionForHand (const le_t *actor, const actorHands_t hand)
 Returns the fire definition of the item the actor has in the given hand. More...
 
int HUD_CalcReloadTime (const le_t *le, const objDef_t *weapon, int toContainer)
 

Function Documentation

int HUD_CalcReloadTime ( const le_t le,
const objDef_t weapon,
int  toContainer 
)
const fireDef_t* HUD_GetFireDefinitionForHand ( const le_t actor,
const actorHands_t  hand 
)

Returns the fire definition of the item the actor has in the given hand.

Parameters
[in]actorThe pointer to the actor we want to get the data from.
[in]handWhich hand to use
Returns
the used fireDef_t

Definition at line 57 of file cl_hud_callbacks.cpp.

References Item::def(), Item::getFiredefs(), and le_s::getHandItem().

Referenced by HUD_CheckFiremodeReservation(), HUD_DisplayActions(), HUD_FireWeapon_f(), HUD_PopupFiremodeReservation(), and HUD_UpdateReactionFiremodes().

Item* HUD_GetLeftHandWeapon ( const le_t actor,
containerIndex_t container 
)

returns the weapon the actor's left hand is touching. In case the actor holds a two handed weapon in his right hand, this weapon is returned here. This function only returns nullptr if no two handed weapon is in the right hand and the left hand is empty.

Todo:
remove me

Definition at line 36 of file cl_hud_callbacks.cpp.

References CID_RIGHT, le_s::getLeftHandItem(), le_s::getRightHandItem(), and Item::isHeldTwoHanded().

Referenced by HUD_ReloadLeft_f(), HUD_UpdateActor(), HUD_UpdateActorCvar(), and HUD_UpdateActorFireMode().