102 Dalmatians: Puppies to the Rescue
Decompilation Source Reference | GitLab repository
Loading...
Searching...
No Matches
actors.c
Go to the documentation of this file.
1/* Recovered game implementation; original addresses identify provenance. */
16#include "pcdogs/game/types.h"
19#include "pcdogs/math/types.h"
22#include "pcdogs/scene/types.h"
24#include "pcdogs/types/common.h"
25#include <math.h>
26#include <stdarg.h>
27#include <string.h>
28
29// Original pcdogs.exe: 0x42f390
30// A matched joint returns its index and writes its live reference actor. A disabled or dying reference becomes NULL. An absent joint leaves the output untouched.
31int32_t ComponentCollision_ResolveReferenceActor(struct Component_CollisionRecord *collision_records, int32_t record_count, int32_t attachment_joint_index, struct Actor_State **out_reference_actor)
32{
33 if (!attachment_joint_index)
34 return attachment_joint_index;
35
36 struct Component_CollisionRecord *record_cursor = collision_records;
37 int32_t first_attachment_joint = (uint16_t)(record_cursor->attachment_joint_index);
38
39 if (first_attachment_joint != attachment_joint_index)
40 {
41 int32_t records_remaining = record_count;
42 int32_t candidate_attachment_joint;
43
44 do
45 {
46 record_cursor = &record_cursor[1];
47
48 int32_t remaining_before_advance = records_remaining;
49
50 records_remaining -= 1;
51
52 if (remaining_before_advance == 1)
53 return 0;
54
55 candidate_attachment_joint = (uint16_t)record_cursor->attachment_joint_index;
56 } while (candidate_attachment_joint != attachment_joint_index);
57 }
58
59 struct Actor_State *reference_actor = record_cursor->reference_actor;
60
61 *out_reference_actor = reference_actor;
62
63 if (!reference_actor || reference_actor->lifecycle_flags & (ACTOR_LIFECYCLE_DISABLED | ACTOR_LIFECYCLE_DESTROYING))
64 *out_reference_actor = NULL;
65
66 return attachment_joint_index;
67}
68
69// Original pcdogs.exe: 0x42fd80
70// Installs the projectile logic, hit-response and lifecycle callbacks.
77
78// Original pcdogs.exe: 0x430120
79// Filters component collisions, optionally retargets the component and checks damage and sound cooldowns. Same-owner class-3 contacts return -2, other rejected contacts return -1, and a zero policy result bypasses the remaining checks.
81{
83 {
84 struct Actor *owner = comp->spawn_context->owner;
85
86 if (owner && owner == ((const struct Component_SpawnParams *)other_actor->record_ptr)->owner)
88 }
89
90 int32_t filtered_collision_result = Component_CheckActorCollisionTypeAdapter(comp, other_actor);
91
92 if (!filtered_collision_result)
93 return 0;
94
95 struct Component_SpawnParams *spawn_context = comp->spawn_context;
96
97 // A cleared homing target can be replaced by this contact.
98 if (filtered_collision_result > 0 && spawn_context->state_flags & COMPONENT_STATE_TARGET_CLEARED && spawn_context->definition->homing_turn_step_angle12)
99 {
100 struct Actor *attached_actor = spawn_context->attached_actor;
101
102 if (attached_actor && attached_actor != (struct Actor *)(intptr_t)-1)
103 {
104 uint8_t attach_refcount = attached_actor->attach_refcount;
105
106 if (attach_refcount)
107 attached_actor->attach_refcount = attach_refcount - 1;
108 }
109
110 Component_UpdateCollisionDetection((struct Component_CollisionRecord *)(&spawn_context->definition), 1, (struct Actor_State *)(comp), other_actor,
111 NULL);
112
113 struct Actor *attached_actor_1 = spawn_context->attached_actor;
114
115 if (attached_actor_1)
116 {
117 attached_actor_1->attach_refcount += 1;
118 spawn_context->state_flags |= COMPONENT_STATE_HAS_TARGET;
119 }
120 }
121
124
125 if (Component_GetDamageAmount(comp, NULL) <= 0)
127
130 ? -1
131 : 0);
132}
133
134// Original pcdogs.exe: 0x432db0
135// Tests an actor against world geometry and obstacles, either building the candidate cache or replaying it. The actor's collision class is restored after the pass.
136void Collision_DetectActorCollisions(struct Actor_State *actor, BOOL use_cached_collision_list)
137{
138 uint8_t collision_class = actor->collision_class;
139
141 actor->collision_class = 0;
142
143 // A second sweep can reuse the world geometry candidates from the first.
144 if (use_cached_collision_list)
145 {
146 int32_t collision_object_count_2 = g_collisionObjectCount;
147
148 if (collision_object_count_2)
149 {
150 struct Collision_Node **cached_node_cursor = g_collisionObjectNodes;
151 int32_t i;
152
153 do
154 {
155 struct Collision_Node *collision_source = (struct Collision_Node *)(*(uint32_t *)cached_node_cursor);
156 int32_t polygon_count;
157
158 if (collision_source->node_type != COLLISION_NODE_ORIENTED_BOX)
159 polygon_count = (int32_t)collision_source->polygon_count;
160 else
161 polygon_count = (int32_t)collision_source->bounds.oriented_box.polygon_count;
162
163 Collision_DetectAndResolve3DCollision(actor, collision_source,
164 collision_source->vertices, collision_source->polygons, polygon_count);
165 cached_node_cursor = &cached_node_cursor[1];
166 i = collision_object_count_2;
167 collision_object_count_2 -= 1;
168 } while (i != 1);
169 }
170 }
171 else
172 {
173 int32_t behavior_flags = actor->behavior_flags;
174 uint32_t modified_flag_or_swept_diameter = behavior_flags & ACTOR_BEHAVIOR_COLLISION_CORRECTION;
175 uint32_t saved_modified_flag = modified_flag_or_swept_diameter;
176
177 if (modified_flag_or_swept_diameter)
179
180 struct Scene_Node *object_node_root = g_objectNodeRoot;
181
183
184 struct Collision_Node *ground_collision_node_2 = actor->ground_collision_node;
185 struct Mesh_RuntimeVertex *runtime_vertices = object_node_root->runtime_vertices;
186
187 use_cached_collision_list = (BOOL)(runtime_vertices);
188
189 if (ground_collision_node_2 && ground_collision_node_2->node_type != COLLISION_NODE_MESH)
190 ground_collision_node_2 = NULL;
191
192 while (true)
193 {
194 if (ground_collision_node_2 && !(ground_collision_node_2->node_cull_flags & (COLLISION_NODE_CULL_DISABLED | COLLISION_NODE_CULL_FORCE_HIDDEN)) && (actor->collision_class != COLLISION_CLASS_CAMERA_PROBE || !(ground_collision_node_2->flags_high & (COLLISION_NODE_CAMERA_PROBE_SKIP >> 8))))
195 {
196 int32_t dy = actor->sub_pos.y - ground_collision_node_2->collision_offset.y;
197 int32_t dx = actor->sub_pos.x - ground_collision_node_2->collision_offset.x;
198 int32_t dz = actor->sub_pos.z - ground_collision_node_2->collision_offset.z;
199 struct Math_Vec3I32 segment_delta;
200
201 segment_delta.x = dx;
202
203 uint32_t sphere = (int32_t)ground_collision_node_2->bounds.sphere.radius;
204
205 segment_delta.y = dy;
206 segment_delta.z = dz;
207
208 int32_t swept_bounding_radius = Math_ApproxDistance3DWeighted(dx, dy, dz) + (((int32_t)actor->cull_radius + sphere) << 6);
209
210 modified_flag_or_swept_diameter = (uint32_t)swept_bounding_radius * 2;
211
212 if (actor->world_render_pos.x - (uint32_t)ground_collision_node_2->bounds.sphere.center.x + swept_bounding_radius <= modified_flag_or_swept_diameter && actor->world_render_pos.y - (uint32_t)ground_collision_node_2->bounds.sphere.center.y + swept_bounding_radius <= modified_flag_or_swept_diameter && actor->world_render_pos.z - (uint32_t)ground_collision_node_2->bounds.sphere.center.z + swept_bounding_radius <= modified_flag_or_swept_diameter &&
214 &ground_collision_node_2->bounds.sphere.center, &segment_delta, sphere))
215 {
216 int32_t collision_object_count = g_collisionObjectCount;
217
218 g_collisionObjectNodes[collision_object_count] = ground_collision_node_2;
219 g_collisionObjectCount = collision_object_count + 1;
220 Collision_DetectAndResolve3DCollision(actor, ground_collision_node_2,
221 ground_collision_node_2->vertices, ground_collision_node_2->polygons,
222 (int32_t)ground_collision_node_2->polygon_count);
223 }
224
225 runtime_vertices = (struct Mesh_RuntimeVertex *)(use_cached_collision_list);
226 }
227
228 do
229 {
230 ground_collision_node_2 = (struct Collision_Node *)(runtime_vertices);
231
232 if (!runtime_vertices)
233 {
234 if (!actor->sub_pos.x && !actor->sub_pos.z && !actor->sub_pos.y && !saved_modified_flag)
235 {
236 int16_t response_z = actor->collision_response_components.z;
237
238 actor->collision_push_components.x += (uint16_t)actor->collision_response_xz;
239 actor->collision_push_components.z += response_z;
240 }
241 else
242 {
243 struct Collision_Node *ground_collision_node = actor->ground_collision_node;
244 BOOL ground_contact_result;
245
246 if (ground_collision_node && ground_collision_node->node_type == COLLISION_NODE_ORIENTED_BOX && actor->cull_radius <= COLLISION_PROBE_GROUND_RADIUS_LIMIT_Q6)
247 ground_contact_result = (BOOL)(Collision_FindActorGroundContact(actor, NULL));
248
249 if (!ground_collision_node || ground_collision_node->node_type != COLLISION_NODE_ORIENTED_BOX || actor->cull_radius > COLLISION_PROBE_GROUND_RADIUS_LIMIT_Q6 || !ground_contact_result)
251 }
252
253 break;
254 }
255
256 runtime_vertices = *(struct Mesh_RuntimeVertex **)runtime_vertices;
257 use_cached_collision_list = (BOOL)(runtime_vertices);
258 } while (actor->ground_collision_node == ground_collision_node_2);
259
260 if (!ground_collision_node_2)
261 break;
262 }
263 }
264
266 {
267 struct Collision_Node *ground_node = actor->ground_collision_node;
268
269 if (ground_node && ground_node->flags & COLLISION_NODE_SPECIAL_CONTACT)
271 }
272
273 actor->collision_class = collision_class;
274
275 return;
276}
277
278// Original pcdogs.exe: 0x433960
279// Walks the terminated obstacle-node preorder list, skipping rejected subtrees and resolving eligible swept collisions. It records the change in collision-push components across the scan.
281{
282 int32_t z = actor->sub_pos.z;
283 int16_t negated_push_z = -((int16_t)actor->collision_push_components.z);
284
285 actor->collision_response_xz = -(actor->collision_push_xz);
286
287 int32_t y = actor->sub_pos.y;
288
289 actor->collision_response_components.z = negated_push_z;
290
291 int32_t motion_distance = Math_ApproxDistance3DWeighted(actor->sub_pos.x, y, z);
292 struct Collision_Node **obstacle_nodes = g_objectNodeRoot->collision_node_list;
293 int32_t actor_swept_radius = motion_distance + ((int32_t)actor->cull_radius << 6);
294 struct Collision_Node *obstacle_node = *obstacle_nodes;
295 struct Collision_Node **next_node_slot = obstacle_nodes + 1;
296 int32_t saved_swept_radius = actor_swept_radius;
297 struct Collision_Node **saved_next_node_slot = next_node_slot;
298
299 if (obstacle_node)
300 {
301 while (true)
302 {
303 struct Collision_Node **selected_next_node_slot;
304
306 selected_next_node_slot = &next_node_slot[obstacle_node->subtree_skip_count];
307 else
308 {
309 int32_t obstacle_radius = obstacle_node->collision_radius;
310 int32_t combined_swept_radius = (obstacle_radius << 6) + actor_swept_radius;
311 int32_t swept_diameter = combined_swept_radius * 2;
312 if ((uint32_t)(actor->world_render_pos.x - obstacle_node->origin.x + combined_swept_radius) > (uint32_t)swept_diameter ||
313 (uint32_t)(actor->world_render_pos.y - obstacle_node->origin.y + combined_swept_radius) > (uint32_t)swept_diameter ||
314 (uint32_t)(actor->world_render_pos.z - obstacle_node->origin.z + combined_swept_radius) > (uint32_t)swept_diameter ||
315 !Collision_CheckLineSphereIntersection(actor, &obstacle_node->origin, &actor->sub_pos, obstacle_radius))
316 selected_next_node_slot = &saved_next_node_slot[obstacle_node->subtree_skip_count];
317 else
318 {
319 int16_t behavior_flags = (int16_t)obstacle_node->flags;
320
322 {
323 int32_t collision_object_count = g_collisionObjectCount;
324
325 g_collisionObjectNodes[collision_object_count] = obstacle_node;
326 g_collisionObjectCount = collision_object_count + 1;
327 Collision_DetectAndResolve3DCollision(actor, obstacle_node,
328 obstacle_node->vertices, obstacle_node->polygons,
329 (int32_t)obstacle_node->bounds.oriented_box.polygon_count);
330 }
331
332 selected_next_node_slot = saved_next_node_slot;
333 }
334 }
335
336 obstacle_node = *selected_next_node_slot;
337 next_node_slot = selected_next_node_slot + 1;
338 saved_next_node_slot = next_node_slot;
339
340 if (!obstacle_node)
341 break;
342
343 actor_swept_radius = saved_swept_radius;
344 }
345 }
346
347 int16_t final_push_z = actor->collision_push_components.z;
348
349 actor->collision_response_components.x += (uint16_t)actor->collision_push_xz;
350 actor->collision_response_components.z += final_push_z;
351}
352
353// Original pcdogs.exe: 0x433ae0
354// Computes a response-weighted world contact point and impact-motion payload for an actor pair. The final contact Y omits the relative Y delta, and a stationary target uses the unnormalized relative motion after overwriting the intermediate normalization result.
355void Collision_CalculateImpactContactData(struct Actor_State *actor, struct Actor_State *other_actor, int32_t collision_fraction_q12, struct Math_Vec3I32 *out_contact_pos, struct Math_Vec3I32 *out_impact_motion)
356{
357 struct Actor_State *other_actor_1 = other_actor;
358
359 out_impact_motion->x = other_actor_1->sub_pos.x;
360 out_impact_motion->y = other_actor_1->sub_pos.y;
361 out_impact_motion->z = other_actor_1->sub_pos.z;
362
363 int32_t y = actor->sub_pos.y;
364 int32_t relative_contact_x = actor->sub_pos.x - other_actor_1->sub_pos.x;
365 int32_t relative_motion_y = y - other_actor_1->sub_pos.y;
366 int32_t relative_motion_z = actor->sub_pos.z - other_actor_1->sub_pos.z;
367 int64_t motion_x_fraction_wide = (int64_t)collision_fraction_q12 * relative_contact_x;
368
369 relative_contact_x = (int32_t)((uint64_t)motion_x_fraction_wide >> MATH_Q12_SHIFT);
370
371 int64_t motion_y_fraction_wide = (int64_t)collision_fraction_q12 * relative_motion_y;
372 int64_t motion_z_fraction_wide = (int64_t)collision_fraction_q12 * relative_motion_z;
373 int32_t interpolated_world_y = ((int32_t)((uint64_t)motion_y_fraction_wide >> MATH_Q12_SHIFT)) + actor->world_render_pos.y;
374 int32_t interpolated_world_z = ((int32_t)((uint64_t)motion_z_fraction_wide >> MATH_Q12_SHIFT)) + actor->world_render_pos.z;
375
376 relative_contact_x = relative_contact_x + actor->world_render_pos.x - other_actor_1->world_render_pos.x;
377
378 int32_t relative_contact_y = interpolated_world_y - other_actor_1->world_render_pos.y;
379 int32_t relative_contact_z = interpolated_world_z - other_actor_1->world_render_pos.z;
380 struct Actor_CollisionShapeNodeView *other_actor_collision_shape_node =
382 int32_t other_shape_radius;
383
384 if (other_actor_collision_shape_node->extent_encoding_mode)
385 other_shape_radius = (int32_t)other_actor_collision_shape_node->shape.box.collision_probe_radius_q6 << 6;
386 else
387 other_shape_radius = (uint32_t)other_actor_collision_shape_node->shape.sphere.radius_q12;
388
389 if (other_shape_radius)
390 {
391 struct Actor_CollisionShapeNodeView *actor_collision_shape_node =
393 int32_t actor_shape_radius;
394
395 if (actor_collision_shape_node->extent_encoding_mode)
396 actor_shape_radius = (int32_t)actor_collision_shape_node->shape.box.collision_probe_radius_q6 << 6;
397 else
398 actor_shape_radius = (uint32_t)actor_collision_shape_node->shape.sphere.radius_q12;
399
400 if (actor_shape_radius)
401 {
402 int32_t radius_fraction = ((int64_t)other_shape_radius * MATH_Q12_ONE) / (actor_shape_radius + other_shape_radius);
403 int64_t radius_weighted_x_wide = (int64_t)radius_fraction * relative_contact_x;
404
405 relative_contact_x = (int32_t)((uint64_t)radius_weighted_x_wide >> MATH_Q12_SHIFT);
406
407 int64_t radius_weighted_y_wide = (int64_t)radius_fraction * relative_contact_y;
408
409 relative_contact_y = (int32_t)((uint64_t)radius_weighted_y_wide >> MATH_Q12_SHIFT);
410
411 int64_t radius_weighted_z_wide = (int64_t)radius_fraction * relative_contact_z;
412
413 relative_contact_z = (int32_t)((uint64_t)radius_weighted_z_wide >> MATH_Q12_SHIFT);
414 }
415 }
416
417 int32_t x = out_impact_motion->x;
418 struct Math_Vec3I32 *out_contact_pos_1;
419 int32_t final_contact_delta_x;
420 int32_t final_contact_delta_z;
421
422 if (x || out_impact_motion->y || out_impact_motion->z)
423 {
424 int32_t half_collision_fraction_q12 = collision_fraction_q12 >> 1;
425 int64_t half_target_motion_x_wide = (int64_t)half_collision_fraction_q12 * x;
426
427 out_contact_pos_1 = out_contact_pos;
428 out_contact_pos_1->x = (int32_t)((uint64_t)half_target_motion_x_wide >> MATH_Q12_SHIFT);
429
430 int64_t half_target_motion_y_wide = (int64_t)half_collision_fraction_q12 * out_impact_motion->y;
431
432 out_contact_pos_1->y = (int32_t)((uint64_t)half_target_motion_y_wide >> MATH_Q12_SHIFT);
433
434 int64_t half_target_motion_z_wide = (int64_t)half_collision_fraction_q12 * out_impact_motion->z;
435
436 final_contact_delta_z = relative_contact_z;
437 final_contact_delta_x = relative_contact_x;
438 out_contact_pos_1->z = (int32_t)((uint64_t)half_target_motion_z_wide >> MATH_Q12_SHIFT);
439 }
440 else
441 {
442 *(struct Math_Vec3I32 *)out_contact_pos = (struct Math_Vec3I32){
443 .z = 0,
444 .y = 0,
445 .x = 0};
446
447 int64_t squared_contact_x_wide = (int64_t)relative_contact_x * relative_contact_x;
448 int64_t squared_contact_y_wide = (int64_t)relative_contact_y * relative_contact_y;
449 int64_t squared_contact_z_wide = (int64_t)relative_contact_z * relative_contact_z;
450 int32_t contact_delta_length =
451 Math_SqrtFP12((int32_t)(((uint64_t)squared_contact_z_wide + (uint64_t)squared_contact_x_wide + (uint64_t)squared_contact_y_wide) >> MATH_Q12_SHIFT));
452 struct Math_Vec3I32 *out_impact_motion_1;
453
454 if (contact_delta_length)
455 {
456 int32_t bounce_scale_q16 = ((int64_t)COLLISION_BOUNCE_NORMALIZATION_NUMERATOR) / contact_delta_length;
457 int64_t bounce_x_wide = (int64_t)bounce_scale_q16 * relative_contact_x;
458
459 out_impact_motion->x = ((int32_t)((uint64_t)bounce_x_wide >> MATH_Q12_SHIFT)) >> 4;
460
461 int64_t bounce_y_wide = (int64_t)bounce_scale_q16 * relative_contact_y;
462
463 out_impact_motion->y = ((int32_t)((uint64_t)bounce_y_wide >> MATH_Q12_SHIFT)) >> 4;
464
465 int64_t bounce_z_wide = (int64_t)bounce_scale_q16 * relative_contact_z;
466
467 out_impact_motion->z = ((int32_t)((uint64_t)bounce_z_wide >> MATH_Q12_SHIFT)) >> 4;
468 out_impact_motion_1 = out_impact_motion;
469 }
470 else
471 {
472 out_impact_motion_1 = out_impact_motion;
473 *(struct Math_Vec3I32 *)out_impact_motion_1 = (struct Math_Vec3I32){
474 .z = 0,
475 .y = 0,
476 .x = 0};
477 }
478
479 final_contact_delta_x = relative_contact_x;
480 final_contact_delta_z = relative_contact_z;
481 other_actor_1 = other_actor;
482 out_impact_motion_1->x = final_contact_delta_x;
483 out_impact_motion_1->y = relative_contact_y;
484 out_contact_pos_1 = out_contact_pos;
485 out_impact_motion_1->z = final_contact_delta_z;
486 }
487
488 *(struct Math_Vec3I32 *)out_contact_pos_1 = (struct Math_Vec3I32){
489 .x = out_contact_pos_1->x + final_contact_delta_x + other_actor_1->world_render_pos.x,
490 .y = out_contact_pos_1->y + other_actor_1->world_render_pos.y,
491 .z = out_contact_pos_1->z + final_contact_delta_z + other_actor_1->world_render_pos.z};
492}
493
494// Original pcdogs.exe: 0x4343f0
495// Processes active actor pairs through probe callbacks, bounds checks and swept-sphere candidate tests, then dispatches actor, object and powerup collision responses.
497{
498 for (struct Actor *actor = Actor_CollisionListHead; actor; actor = actor->list_next)
499 {
500 int32_t collision_class;
501
502 if (!(actor->behavior_flags_high & (ACTOR_BEHAVIOR_PREPROCESSED >> 8)))
503 collision_class = Physics_UpdateActorPreprocess((struct Actor_State *)(actor));
504
505 if (actor->behavior_flags_high & (ACTOR_BEHAVIOR_PREPROCESSED >> 8) || (uint8_t)collision_class)
506 {
507 collision_class = (int32_t)(int8_t)actor->collision_class;
508
509 if (collision_class)
510 {
511 if (!(actor->lifecycle_flags & ACTOR_LIFECYCLE_DISABLED))
512 {
513 struct Actor *collision_list_prev = actor;
514 struct Actor *last_tested_actor = collision_list_prev;
515
516 g_collisionTestPosX = actor->world_render_pos.x;
517 g_collisionTestPosY = actor->world_render_pos.y;
518 g_collisionTestPosZ = actor->world_render_pos.z;
519 g_collisionTestRadiusQ6 = (int32_t)actor->cull_radius;
520 g_collisionTestMotionXQ12 = actor->sub_pos.x;
521 g_collisionTestMotionYQ12 = actor->sub_pos.y;
522 ActorCollisionProbeCallback probe_callback =
524 g_collisionTestMotionZQ12 = actor->sub_pos.z;
525
526 struct Actor *other_actor = actor->list_next;
527
528 ActorCollisionResponseCallback state_response_handler =
530
531 for (; other_actor; other_actor = collision_list_prev->list_next)
532 {
533 if ((other_actor->behavior_flags_high & (ACTOR_BEHAVIOR_PREPROCESSED >> 8)) ? !other_actor->collision_class : (!Physics_UpdateActorPreprocess((struct Actor_State *)(other_actor)) || !other_actor->collision_class))
534 {
535 collision_list_prev->list_next = other_actor->list_next;
536 other_actor->list_next = g_objectNodeRoot->deferred_actor_list;
537 g_objectNodeRoot->deferred_actor_list = other_actor;
538 }
539 else
540 {
541 last_tested_actor = other_actor;
542
543 if (!(other_actor->lifecycle_flags & ACTOR_LIFECYCLE_DISABLED))
544 {
545 int32_t actor_probe_result =
546 probe_callback(actor, other_actor, NULL, (uint32_t)COLLISION_CALLBACK_CONTACT_PROBE);
547
548 if (actor_probe_result != COLLISION_PROBE_SKIP_PAIR)
549 {
550 int32_t other_probe_result_raw =
551 Actor_DefaultUpdateCallbackSlot[(int32_t)(int8_t)other_actor->collision_class](other_actor, actor, 0, (uint32_t)COLLISION_CALLBACK_CONTACT_PROBE);
552 int32_t other_probe_result = other_probe_result_raw;
553
554 if (other_probe_result_raw != COLLISION_PROBE_SKIP_PAIR && (other_probe_result_raw | actor_probe_result))
555 {
556 int32_t dx =
557 g_collisionTestMotionXQ12 - other_actor->sub_pos.x;
558 int32_t dy =
559 g_collisionTestMotionYQ12 - other_actor->sub_pos.y;
560 int32_t dz =
561 g_collisionTestMotionZQ12 - other_actor->sub_pos.z;
562 struct Math_Vec3I32 subpos_delta = (struct Math_Vec3I32){
563 .x = dx,
564 .y = dy,
565 .z = dz};
566
567 int32_t combined_swept_radius = Math_ApproxDistance3DWeighted(dx, dy, dz) + (((int32_t)other_actor->cull_radius + g_collisionTestRadiusQ6) << 6);
568 struct Math_Vec3I32 world_sweep_delta;
569
570 if (actor_probe_result > 0 || other_probe_result > 0)
571 {
572 int32_t dx_1 = other_actor->world_render_pos.x - g_collisionTestPosX - subpos_delta.x;
573 int32_t world_delta_z = other_actor->world_render_pos.z - g_collisionTestPosZ;
574 int32_t dy_1 = other_actor->world_render_pos.y - g_collisionTestPosY - subpos_delta.y;
575
576 world_sweep_delta.x = dx_1;
577
578 int32_t dz_1 = world_delta_z - subpos_delta.z;
579
580 world_sweep_delta.y = dy_1;
581 world_sweep_delta.z = dz_1;
582
583 int32_t sweep_distance =
584 Math_ApproxDistance3DWeighted(dx_1, dy_1, dz_1);
585 int32_t sweep_distance_saved = sweep_distance;
586
587 if (sweep_distance < actor_probe_result)
588 {
589 actor_probe_result = state_response_handler((struct Actor_State *)(actor),
590 (struct Actor_State *)(other_actor), sweep_distance);
591 sweep_distance = sweep_distance_saved;
592 }
593 else if (actor_probe_result > 0)
594 actor_probe_result = 0;
595
596 if (sweep_distance < other_probe_result)
597 {
598 other_probe_result = Collision_ProcessActorToActorCollisions_StateHandlerTable[(int32_t)(int8_t)other_actor->collision_class]((struct Actor_State *)(other_actor),
599 (struct Actor_State *)(actor), sweep_distance);
600 sweep_distance = sweep_distance_saved;
601 }
602 else if (other_probe_result > 0)
603 other_probe_result = 0;
604
605 if (other_probe_result | actor_probe_result && sweep_distance <= combined_swept_radius)
606 {
607 int32_t z = other_actor->world_render_pos.z;
608 int32_t z_1 = other_actor->sub_pos.z;
609 int32_t y = other_actor->world_render_pos.y;
610
611 world_sweep_delta.x =
612 other_actor->world_render_pos.x + other_actor->sub_pos.x;
613
614 int32_t cull_radius =
615 (int32_t)other_actor->cull_radius;
616
617 world_sweep_delta.y = y + other_actor->sub_pos.y;
618 world_sweep_delta.z = z + z_1;
619
621 &world_sweep_delta, &subpos_delta,
624 (struct Actor_State *)(other_actor), actor_probe_result,
625 other_probe_result);
626 }
627 }
628 else
629 {
630 int32_t swept_diameter = combined_swept_radius * 2;
631
632 if ((uint32_t)(g_collisionTestPosX - other_actor->world_render_pos.x + combined_swept_radius) <= (uint32_t)swept_diameter && (uint32_t)(g_collisionTestPosY - other_actor->world_render_pos.y + combined_swept_radius) <= (uint32_t)swept_diameter && (uint32_t)(g_collisionTestPosZ - other_actor->world_render_pos.z + combined_swept_radius) <= (uint32_t)swept_diameter)
633 {
634 int32_t z = other_actor->world_render_pos.z;
635 int32_t z_1 = other_actor->sub_pos.z;
636 int32_t y = other_actor->world_render_pos.y;
637
638 world_sweep_delta.x =
639 other_actor->world_render_pos.x + other_actor->sub_pos.x;
640
641 int32_t cull_radius =
642 (int32_t)other_actor->cull_radius;
643
644 world_sweep_delta.y = y + other_actor->sub_pos.y;
645 world_sweep_delta.z = z + z_1;
646
648 &world_sweep_delta, &subpos_delta,
651 (struct Actor_State *)(other_actor), actor_probe_result,
652 other_probe_result);
653 }
654 }
655 }
656 }
657 }
658 }
659
660 collision_list_prev = last_tested_actor;
661 }
662 }
664 continue;
665 {
666 if (actor->parent_component && collision_class <= 3)
667 {
669
670 if (actor->behavior_flags & ACTOR_BEHAVIOR_WORKLIST_MEMBER)
672 }
673 }
674 }
675 }
676 }
677}
678
679// Original pcdogs.exe: 0x434770
680// Orders an actor pair by collision fraction and resolves overlap using class-specific collision shapes. Static overlap dispatches callbacks directly; separated axes use temporary planes for swept resolution.
681void Collision_ResolveActorToActorCollision(struct Actor_State *actor_a, struct Actor_State *actor_b, int32_t actor_a_response, int32_t actor_b_response)
682{
683 struct Actor_State *smaller_actor = actor_b;
684 struct Actor_State *larger_actor = actor_a;
685
686 if (smaller_actor->scale_factor > larger_actor->scale_factor)
687 {
688 actor_a = smaller_actor;
689
690 int32_t saved_actor_a_response = actor_a_response;
691
692 actor_b = larger_actor;
693 actor_a_response = actor_b_response;
694 larger_actor = actor_a;
695 actor_b_response = saved_actor_a_response;
696 smaller_actor = actor_b;
697 }
698
699 struct Actor_CollisionShapeNodeView *larger_shape_or_extent_z_bits =
701 int32_t collision_radius_q12 = Collision_GetShapeRadiusQ12(larger_shape_or_extent_z_bits);
702
703 struct Actor_CollisionShapeNodeView *smaller_actor_collision_shape_node =
705 union Actor_CollisionShapeExtentOverlay *target_half_extents;
706 int16_t sphere_extents[3];
707
708 if (smaller_actor_collision_shape_node->extent_encoding_mode != COLLISION_EXTENTS_PACKED_PAIRS)
709 {
710 int16_t sphere_half_extent =
711 (int16_t)((uint32_t)smaller_actor_collision_shape_node->shape.sphere.radius_q12 >> 6);
712
713 sphere_extents[2] = sphere_half_extent;
714 sphere_extents[1] = sphere_half_extent;
715 sphere_extents[0] = sphere_half_extent;
716 target_half_extents = (union Actor_CollisionShapeExtentOverlay *)(uintptr_t)sphere_extents;
717 }
718 else
719 target_half_extents = &smaller_actor_collision_shape_node->shape;
720
721 int32_t y = smaller_actor->world_render_pos.y;
722 int32_t axis_index = 0;
723 int32_t delta[3];
724
725 delta[0] = larger_actor->world_render_pos.x - smaller_actor->world_render_pos.x;
726 delta[1] = larger_actor->world_render_pos.y - y;
727 delta[2] = larger_actor->world_render_pos.z - smaller_actor->world_render_pos.z;
728
729 int32_t axis_projection[3];
730 int16_t *rotation_column = &smaller_actor->rot_mat.m10;
731 union Actor_CollisionShapeExtentOverlay *half_extent_cursor = target_half_extents;
732 int16_t *next_rotation_column = rotation_column;
733
734 while (true)
735 {
736 axis_projection[0] = (int32_t)rotation_column[-3];
737 axis_projection[1] = rotation_column[0];
738 axis_projection[2] = rotation_column[3];
739
740 int32_t axis_half_extent = *(uint16_t *)half_extent_cursor;
741 int32_t expanded_extent_or_corner_z = (axis_half_extent << 6) + collision_radius_q12;
742
743 if ((uint32_t)(((uint64_t)((int64_t)delta[0] * axis_projection[0]) + (uint64_t)((int64_t)delta[1] * axis_projection[1]) + (uint64_t)((int64_t)delta[2] * axis_projection[2])) >> MATH_Q12_SHIFT) + (uint32_t)expanded_extent_or_corner_z > (uint32_t)expanded_extent_or_corner_z * 2)
744 {
745 struct Collision_Vertex vertices[8];
746
747 for (int32_t i = 0; i < 4;)
748 {
749 int32_t packed_corner_xy;
750
751 switch (i)
752 {
753 case 0:
754 {
755 *(uint16_t *)&packed_corner_xy = -(*(int16_t *)target_half_extents);
756 *(uint16_t *)((char *)&packed_corner_xy + 2) =
757 -(target_half_extents->packed_yz.extents_yz_q6);
758 *(uint16_t *)&expanded_extent_or_corner_z = -(target_half_extents->packed_pairs.extent_z_and_probe_radius_q6);
759
760 break;
761 }
762
763 case 1:
764 {
765 *(uint16_t *)&expanded_extent_or_corner_z = target_half_extents->packed_pairs.extent_z_and_probe_radius_q6;
766
767 break;
768 }
769
770 case 2:
771 {
772 *(uint16_t *)((char *)&packed_corner_xy + 2) =
773 target_half_extents->packed_yz.extents_yz_q6;
774
775 break;
776 }
777
778 case 3:
779 {
780 *(uint16_t *)&expanded_extent_or_corner_z = -(target_half_extents->packed_pairs.extent_z_and_probe_radius_q6);
781
782 break;
783 }
784 }
785
786 vertices[i].packed_position.xy = packed_corner_xy;
787 vertices[i].pos.z = (int16_t)expanded_extent_or_corner_z;
788
789 int32_t opposite_vertex_byte_offset = (i - ((i & 1) << 1) + 5) * 0xc;
790
791 vertices[i - ((i & 1) << 1) + 5].pos.x = (int16_t)-(packed_corner_xy);
792 i += 1;
793 vertices[opposite_vertex_byte_offset / sizeof(vertices[0])].pos.y = (int16_t)-(*(int16_t *)((char *)&packed_corner_xy + 2));
794 vertices[opposite_vertex_byte_offset / sizeof(vertices[0])].pos.z = -(expanded_extent_or_corner_z);
795 }
796
797 for (int32_t extent_axis_index = 0; extent_axis_index < 3; extent_axis_index++)
798 {
799 Collision_BoxFacePolygons[extent_axis_index * 2 + 1].face_plane->plane_distance =
800 -((int32_t)(uint16_t)target_half_extents->box.half_extents_q6[extent_axis_index]) << 0xa;
801 Collision_BoxFacePolygons[extent_axis_index * 2].face_plane->plane_distance =
802 Collision_BoxFacePolygons[extent_axis_index * 2 + 1].face_plane->plane_distance;
803 }
804
805 struct Actor_State *actor = actor_a;
806 int16_t saved_actor_scale = actor->scale_factor;
807
808 if (!actor_a_response)
809 actor->scale_factor = -1;
810
811 int16_t saved_target_scale = actor_b->scale_factor;
812
813 if (!actor_b_response)
814 actor_b->scale_factor = -1;
815
816 Collision_DetectAndResolve3DCollision(actor, (struct Collision_Node *)actor_b, (struct Collision_Vertex *)(&vertices),
818
819 if (!actor_a_response)
820 actor->scale_factor = saved_actor_scale;
821
822 if (actor_b_response)
823 return;
824
825 actor_b->scale_factor = (int16_t)saved_target_scale;
826
827 return;
828 }
829
830 bool has_more_axes = axis_index + 1 < 3;
831
832 axis_index += 1;
833 next_rotation_column = &next_rotation_column[1];
834 half_extent_cursor = (void *)((char *)half_extent_cursor + 2);
835
836 if (!has_more_axes)
837 {
838 struct Actor_State *actor_a_1;
839 struct Actor_State *actor_b_1;
840
841 if (!actor_a_response)
842 {
843 actor_b_1 = actor_b;
844 actor_a_1 = actor_a;
845 }
846 else
847 {
848 actor_a_1 = actor_a;
849 actor_b_1 = actor_b;
850
851 if (Actor_DefaultUpdateCallbackSlot[(int32_t)(int8_t)actor_a_1->collision_class](actor_a_1,
852 actor_b_1, 0, 0))
853 actor_a_1->scale_factor = 0;
854 }
855
856 if (actor_b_response && Actor_DefaultUpdateCallbackSlot[(int32_t)(int8_t)actor_b_1->collision_class](actor_b_1, actor_a_1, 0, 0))
857 actor_b_1->scale_factor = 0;
858
859 return;
860 }
861
862 rotation_column = next_rotation_column;
863 }
864}
865
866// Original pcdogs.exe: 0x436460
867// Consumes a controller collision-response slot and returns its target if the target-specific eligibility checks pass. A rejected target is still removed from the slot.
868struct Actor_State *Collision_GetValidCollisionTarget(struct Actor_State *actor, int32_t collision_slot)
869{
870 struct Player_ControllerRecordView *record = actor->record_ptr;
871 struct Actor_State *target = record->collision_response_slots_0_to_4[collision_slot];
872
873 if (!target)
874 return NULL;
875
876 record->collision_response_slots_0_to_4[collision_slot] = NULL;
877
879 return target;
880
882 return NULL;
883
885 return NULL;
886
887 return target;
888}
#define ACTOR_BEHAVIOR_MOVEMENT_LOCKED
Definition constants.h:16
#define ACTOR_BEHAVIOR_AIRBORNE
Definition constants.h:13
#define ACTOR_LIFECYCLE_DISABLED
Definition constants.h:39
#define ACTOR_BEHAVIOR_WORKLIST_MEMBER
Definition constants.h:34
#define ACTOR_LIFECYCLE_DESTROYING
Definition constants.h:43
#define ACTOR_BEHAVIOR_PENETRATING
Definition constants.h:31
#define ACTOR_BEHAVIOR_GROUNDED_MOTION
Definition constants.h:14
#define ACTOR_ATTACHMENT_SUPPRESS_PLATFORM_CONTACT
Definition constants.h:48
#define ACTOR_BEHAVIOR_BYPASS_COLLISION
Definition constants.h:18
#define ACTOR_BEHAVIOR_PREPROCESSED
Definition constants.h:20
#define ACTOR_BEHAVIOR_COLLISION_CORRECTION
Definition constants.h:33
#define Actor_CollisionListHead
Definition globals.h:58
#define Actor_DefaultUpdateCallbackSlot
Definition globals.h:30
void Collision_DetectActorCollisions(struct Actor_State *actor, BOOL use_cached_collision_list)
Definition actors.c:136
void Collision_DetectActorObstacles(struct Actor_State *actor)
Definition actors.c:280
struct Actor_State * Collision_GetValidCollisionTarget(struct Actor_State *actor, int32_t collision_slot)
Definition actors.c:868
void Collision_ProcessActorToActorCollisions()
Definition actors.c:496
void Collision_CalculateImpactContactData(struct Actor_State *actor, struct Actor_State *other_actor, int32_t collision_fraction_q12, struct Math_Vec3I32 *out_contact_pos, struct Math_Vec3I32 *out_impact_motion)
Definition actors.c:355
void Collision_InitializeFunctionPointers()
Definition actors.c:71
void Collision_ResolveActorToActorCollision(struct Actor_State *actor_a, struct Actor_State *actor_b, int32_t actor_a_response, int32_t actor_b_response)
Definition actors.c:681
int32_t Collision_HandleComponentCollision(struct Component_ProjectileActorView *comp, struct Actor_State *other_actor)
Definition actors.c:80
int32_t ComponentCollision_ResolveReferenceActor(struct Component_CollisionRecord *collision_records, int32_t record_count, int32_t attachment_joint_index, struct Actor_State **out_reference_actor)
Definition actors.c:31
uint8_t Audio_CanRegisterCollisionSound(struct Audio_CollisionSoundCooldownEntry *entries, struct Actor_State *other_actor, int32_t sound_key)
Definition spatial.c:110
#define COLLISION_SOUND_COOLDOWN_RECORD_OFFSET
Definition constants.h:120
@ COLLISION_PROBE_SKIP_PAIR
Definition constants.h:126
@ COLLISION_PROBE_NO_RESPONSE
Definition constants.h:127
#define COLLISION_BOUNCE_NORMALIZATION_NUMERATOR
Definition constants.h:119
#define COLLISION_NODE_CULL_DISABLED
Definition constants.h:60
@ COLLISION_ACTOR_CLASS_PROJECTILE
Definition constants.h:69
@ COLLISION_ACTOR_CLASS_CHARACTER
Definition constants.h:68
#define COLLISION_CALLBACK_CONTACT_PROBE
Definition constants.h:45
@ COLLISION_EXTENTS_PACKED_PAIRS
Definition constants.h:75
#define COLLISION_POLYGON_PLATFORM_CONTACT_ENABLED
Definition constants.h:27
#define COLLISION_NODE_COLLIDABLE
Definition constants.h:37
@ COLLISION_TARGET_CHAIN
Definition constants.h:93
#define COLLISION_NODE_SPECIAL_CONTACT
Definition constants.h:39
@ COLLISION_CLASS_CAMERA_PROBE
Definition constants.h:15
#define COLLISION_NODE_CULL_FORCE_HIDDEN
Definition constants.h:61
@ COLLISION_NODE_MESH
Definition constants.h:7
@ COLLISION_NODE_ORIENTED_BOX
Definition constants.h:8
#define COLLISION_PROBE_GROUND_RADIUS_LIMIT_Q6
Definition constants.h:80
#define COLLISION_NODE_SKIP_OBSTACLE_QUERY
Definition constants.h:42
#define COLLISION_NODE_REFRESH_GROUND_CONTACT
Definition constants.h:78
#define COLLISION_NODE_CAMERA_PROBE_SKIP
Definition constants.h:40
void Collision_ProcessPowerupCollisions(struct Actor_State *actor)
Definition events.c:530
void Collision_ProcessProjectileLifecycle(struct Actor_State *actor)
Definition events.c:257
struct Collision_Node * Collision_FindActorGroundContact(struct Actor_State *actor, struct Collision_Polygon **out_polygon)
Definition ground.c:614
uint8_t Collision_CheckLineSphereIntersection(struct Actor_State *actor, struct Math_Vec3I32 *sphere_center, struct Math_Vec3I32 *segment_delta, uint32_t sphere_radius)
Definition geometry.c:64
void Collision_DetectObjectNodeCollisions(struct Actor_State *actor, int32_t object_list_index)
Definition objects.c:111
void Collision_BuildAndResolveGroundEdgeWalls(struct Actor_State *actor)
Definition ground.c:788
int32_t Collision_ProcessProjectileHit(void *subject, void *other_object, struct Collision_Polygon *collision_poly, int32_t collision_depth)
Definition events.c:35
int32_t Collision_GetShapeRadiusQ12(const struct Actor_CollisionShapeNodeView *shape)
Definition geometry.c:17
void Collision_DetectAndResolve3DCollision(struct Actor_State *actor, struct Collision_Node *collision_source, struct Collision_Vertex *vertices, struct Collision_Polygon *polygons, int32_t polygon_count)
uint8_t Collision_TestLineSphereIntersection(struct Math_Vec3I32 *line_start, struct Math_Vec3I32 *segment_delta, uint32_t sphere_radius)
Definition geometry.c:102
#define g_collisionTestRadiusQ6
Definition globals.h:45
#define g_collisionObjectNodes
Definition globals.h:90
#define Collision_ProcessActorToActorCollisions_StateHandlerTable
Definition globals.h:78
#define g_collisionObjectCount
Definition globals.h:60
#define g_collisionResponseBuffer
Definition globals.h:48
#define Collision_BoxFacePolygons
Definition globals.h:93
#define g_collisionTestMotionXQ12
Definition globals.h:36
#define g_collisionTestPosZ
Definition globals.h:33
#define g_collisionTestPosX
Definition globals.h:27
#define g_collisionTestMotionZQ12
Definition globals.h:42
#define g_collisionTestPosY
Definition globals.h:30
#define g_collisionTestMotionYQ12
Definition globals.h:39
int32_t(* ActorCollisionResponseCallback)(struct Actor_State *actor, void *other_actor_or_out_reference, int32_t distance_or_reference_selector)
Definition common.h:10
int32_t(* ActorCollisionProbeCallback)(void *subject, void *other_object, struct Collision_Polygon *collision_poly, int32_t collision_depth)
Definition common.h:9
#define COMPONENT_STATE_TARGET_CLEARED
Definition constants.h:22
#define COMPONENT_STATE_HAS_TARGET
Definition constants.h:23
uint16_t Component_GetDamageAmount(struct Component_ProjectileActorView *comp, int32_t *out_hit_flag)
Definition properties.c:16
void Component_UpdateCollisionDetection(struct Component_CollisionRecord *collision_records, int32_t slot_count, struct Actor_State *actor, struct Actor_State *other_actor, struct Math_Vec3I32 *test_pos)
void Component_UpdateProjectileLogic(struct Component_ProjectileActorView *comp)
Definition lifecycle.c:407
int32_t Component_CheckActorCollisionTypeAdapter(struct Component_ProjectileActorView *comp, struct Actor_State *other_actor)
Definition collision.c:19
#define g_behaviorProcessProjectileFunc
Definition globals.h:9
#define g_projectileLogicFunc
Definition globals.h:12
#define MATH_Q12_SHIFT
Definition constants.h:8
#define MATH_Q12_ONE
Definition constants.h:9
int32_t Math_SqrtFP12(uint32_t value)
int32_t Math_ApproxDistance3DWeighted(int32_t dx, int32_t dy, int32_t dz)
Definition fixed_point.c:59
uint8_t Physics_UpdateActorPreprocess(struct Actor_State *actor)
Definition behavior.c:153
#define g_objectNodeRoot
Definition globals.h:12
int16_t half_extents_q6[3]
Definition types.h:36
int16_t collision_probe_radius_q6
Definition types.h:39
union Actor_CollisionShapeExtentOverlay shape
Definition types.h:562
uint8_t collision_class
Definition types.h:435
int32_t collision_response_xz
Definition types.h:503
int32_t collision_push_xz
Definition types.h:492
struct Component_Instance * collision_component_or_parent_component
Definition types.h:437
uint16_t x
Definition types.h:496
int16_t cull_radius
Definition types.h:424
uint8_t lifecycle_flags
Definition types.h:392
struct Actor_State::@046003157221137033352243305322145230101305267353::@310120147361127005160350306337045233155315004262 collision_response_components
uint8_t actor_type
Definition types.h:391
struct Collision_Polygon * ground_contact_polygon
Definition types.h:452
struct Collision_Node * ground_collision_node
Definition types.h:451
uint8_t behavior_flags_high
Definition types.h:412
int32_t behavior_flags
Definition types.h:407
uint16_t z
Definition types.h:497
struct Actor_State::@000347335321225257200273166125221262042042274352::@355017126165076161135046166331324200333365100231 collision_push_components
uint8_t attach_slot_index
Definition types.h:393
int16_t scale_factor
Definition types.h:439
struct Math_Vec3I32 world_render_pos
Definition types.h:420
void * record_ptr
Definition types.h:477
struct Math_Vec3I32 sub_pos
Definition types.h:386
struct Math_Matrix3x3I16 rot_mat
Definition types.h:383
Definition types.h:118
uint8_t collision_class
Definition types.h:188
uint8_t lifecycle_flags
Definition types.h:139
struct Actor * list_next
Definition types.h:119
uint8_t attach_refcount
Definition types.h:189
uint8_t behavior_flags_high
Definition types.h:165
uint32_t subtree_skip_count
Definition types.h:277
union Collision_NodeBoundsOverlay bounds
Definition types.h:308
struct Collision_Vertex * vertices
Definition types.h:292
int16_t polygon_count
Definition types.h:290
uint32_t flags
Definition types.h:297
uint8_t node_type
Definition types.h:286
struct Math_Vec3I32 collision_offset
Definition types.h:284
uint8_t flags_high
Definition types.h:302
struct Collision_Polygon * polygons
Definition types.h:291
int32_t collision_radius
Definition types.h:307
uint8_t node_cull_flags
Definition types.h:287
struct Math_Vec3I32 origin
Definition types.h:283
uint16_t flags
Definition types.h:66
struct Math_Vec3I32 center
Definition types.h:209
int16_t z
Definition types.h:111
struct Collision_Vertex::@111126275124057154070202104324102117233165176236::@061322026074334072070347216127267241215241121036 pos
uint32_t xy
Definition types.h:116
struct Collision_Vertex::@111126275124057154070202104324102117233165176236::@335106066264226003006335032356352061154334151042 packed_position
int16_t x
Definition types.h:109
int16_t y
Definition types.h:110
uint16_t attachment_joint_index
Definition types.h:44
struct Actor_State * reference_actor
Definition types.h:48
int32_t homing_turn_step_angle12
Definition types.h:91
struct Component_SpawnParams * spawn_context
Definition types.h:221
struct Component_Definition * definition
Definition types.h:322
struct Actor * owner
Definition types.h:314
int32_t spawn_frame
Definition types.h:335
uint8_t state_flags
Definition types.h:333
struct Actor * attached_actor
Definition types.h:327
int16_t m10
Definition types.h:165
int32_t y
Definition types.h:471
int32_t x
Definition types.h:470
int32_t z
Definition types.h:472
uint8_t configured_jump_hold_ticks
Definition types.h:153
struct Actor_State * collision_response_slots_0_to_4[0x5]
Definition types.h:183
struct Mesh_RuntimeVertex * runtime_vertices
Definition types.h:144
struct Actor_CollisionShapeExtentOverlay::@012154035243133015240250250255231204101367116236 packed_yz
struct Actor_CollisionSphereExtentView sphere
Definition types.h:287
struct Actor_CollisionShapeExtentOverlay::@051275254310303332307011254315225110223152303125 packed_pairs
struct Actor_CollisionBoxExtentView box
Definition types.h:288
struct Collision_OrientedBoxNodeBoundsView oriented_box
Definition types.h:264
struct Collision_SphereNodeBoundsView sphere
Definition types.h:263