| 2133 | } |
| 2134 | |
| 2135 | static int32_t *getActionTimerPointer(df::unit_action *action) { |
| 2136 | switch (action->type) |
| 2137 | { |
| 2138 | case unit_action_type::None: |
| 2139 | break; |
| 2140 | case unit_action_type::Move: |
| 2141 | return &action->data.move.timer; |
| 2142 | case unit_action_type::Attack: |
| 2143 | if (action->data.attack.timer1 != 0) // Wind-up timer is still active, work on it |
| 2144 | return &action->data.attack.timer1; |
| 2145 | else // Wind-up timer is finished, work on recovery timer |
| 2146 | return &action->data.attack.timer2; |
| 2147 | case unit_action_type::HoldTerrain: |
| 2148 | return &action->data.holdterrain.timer; |
| 2149 | case unit_action_type::Climb: |
| 2150 | return &action->data.climb.timer; |
| 2151 | case unit_action_type::Job: |
| 2152 | return &action->data.job.timer; |
| 2153 | case unit_action_type::Talk: |
| 2154 | return &action->data.talk.timer; |
| 2155 | case unit_action_type::Unsteady: |
| 2156 | return &action->data.unsteady.timer; |
| 2157 | case unit_action_type::Dodge: |
| 2158 | return &action->data.dodge.timer; |
| 2159 | case unit_action_type::Recover: |
| 2160 | return &action->data.recover.timer; |
| 2161 | case unit_action_type::StandUp: |
| 2162 | return &action->data.standup.timer; |
| 2163 | case unit_action_type::LieDown: |
| 2164 | return &action->data.liedown.timer; |
| 2165 | case unit_action_type::JobRecover: |
| 2166 | return &action->data.jobrecover.timer; |
| 2167 | case unit_action_type::PushObject: |
| 2168 | return &action->data.pushobject.timer; |
| 2169 | case unit_action_type::SuckBlood: |
| 2170 | return &action->data.suckblood.timer; |
| 2171 | case unit_action_type::Mount: |
| 2172 | return &action->data.mount.timer; |
| 2173 | case unit_action_type::Dismount: |
| 2174 | return &action->data.dismount.timer; |
| 2175 | case unit_action_type::HoldItem: |
| 2176 | return &action->data.holditem.timer; |
| 2177 | case unit_action_type::LoadRangedWeapon: |
| 2178 | return &action->data.loadrangedweapon.movewait; |
| 2179 | case unit_action_type::ShootRangedWeapon: |
| 2180 | return &action->data.shootrangedweapon.movewait; |
| 2181 | case unit_action_type::ThrowItem: |
| 2182 | return &action->data.throwitem.movewait; |
| 2183 | case unit_action_type::PostShootRecovery: |
| 2184 | return &action->data.postshootrecovery.movewait; |
| 2185 | case unit_action_type::LeadAnimal: |
| 2186 | case unit_action_type::StopLeadAnimal: |
| 2187 | case unit_action_type::Jump: |
| 2188 | case unit_action_type::ReleaseTerrain: |
| 2189 | case unit_action_type::Parry: |
| 2190 | case unit_action_type::Block: |
| 2191 | case unit_action_type::ReleaseItem: |
| 2192 | break; |
no outgoing calls
no test coverage detected