MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / setHandState

Method setHandState

game/state/battle/battleunit.cpp:5263–5275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5261}
5262
5263void BattleUnit::setHandState(HandState state)
5264{
5265 current_hand_state = state;
5266 target_hand_state = state;
5267 hand_animation_ticks_remaining = 0;
5268 firing_animation_ticks_remaining =
5269 state != HandState::Firing
5270 ? 0
5271 : agent->getAnimationPack()->getFrameCountFiring(displayedItem, current_body_state,
5272 current_movement_state, facing) *
5273 TICKS_PER_FRAME_UNIT;
5274 residual_aiming_ticks_remaining = state == HandState::Aiming ? TICKS_PER_SECOND / 3 : 0;
5275}
5276
5277void BattleUnit::beginTurning(GameState &, Vec2<int> newFacing)
5278{

Callers

nothing calls this directly

Calls 2

getFrameCountFiringMethod · 0.80
getAnimationPackMethod · 0.80

Tested by

no test coverage detected