50 struct Entity *owner_entity =
57 int32_t nav_work_index = 0;
59 if (entity_navigation_work_list_staging_buffer_ptr->
active_count > 0)
66 bool has_more_navigation_entries;
72 if (navigation_target_actor)
88 entity_navigation_work_list_staging_buffer_ptr =
90 has_more_navigation_entries =
91 nav_work_index + 1 < entity_navigation_work_list_staging_buffer_ptr->
active_count;
93 }
while (has_more_navigation_entries);
97 int32_t surface_trail_mode;
104 surface_trail_mode = surface_trail_selector - 1;
106 if (surface_trail_selector - 1 >= 0)
128 surface_trail_mode = ((int32_t)UINT32_MAX);
132 if (forced_animation_ticks)
145 int32_t ground_reaction;
146 uint32_t state_rumble_or_death_bits;
152 state_rumble_or_death_bits = controller->
state_flags;
157 controller->
state_flags = state_rumble_or_death_bits;
159 if (!attachment_expired)
166 if (ground_reaction > 0)
180 if (health_or_energy > 0)
184 if (health_or_energy > maximum_health)
188 struct Actor_State **attachment_slot_cursor = attachment_slot;
190 for (int32_t component_index = 0; component_index < 2; ++component_index)
195 if (component_position_actor_x)
219 *(uint32_t *)attachment_slot = (uint32_t)(NULL);
224 if (owner_entity->
flags & component_action_mask)
230 owner_entity->
flags &= ~component_action_mask;
238 owner_entity->
flags &= ~component_action_mask;
240 owner_entity->
flags &= ~component_action_mask;
244 behavior_actor, behavior_actor, &controller->
component_records[component_index]);
246 if (spawned_attachment_or_command_bits)
250 if (previous_attachment)
252 uint8_t previous_attachment_refcount = previous_attachment->
attach_refcount;
254 if (previous_attachment_refcount)
255 previous_attachment->
attach_refcount = previous_attachment_refcount - 1;
258 *(uint32_t *)attachment_slot_cursor = (uint32_t)(spawned_attachment_or_command_bits);
271 attachment_slot_cursor = &attachment_slot_cursor[1];
273 attachment_slot = attachment_slot_cursor;
278 if (movement_target_actor)
305 uint32_t death_entity_flags = owner_entity->
flags;
308 owner_entity->
flags = death_entity_flags;
434 int16_t death_fade_timer = behavior_actor->
fade_timer;
436 if (death_fade_timer <= 0)
443 behavior_actor->
fade_timer = death_fade_timer - 1;
453 int32_t next_animation_state;
461 next_animation_state = default_anim_state;
465 int32_t preserve_active_animation;
469 preserve_active_animation = 1;
477 preserve_active_animation = 0;
481 preserve_active_animation = 0;
492 next_animation_state = previous_animation_state;
511 else if (!preserve_active_animation)
521 if (!(owner_entity->
flags & request))
524 owner_entity->
flags &= ~request;
529 if (next_animation_state !=
ACTOR_ANIMATION_NONE && next_animation_state != previous_animation_state)
544 if (ground_collision_node)