diff options
| author | fig02 <fig02srl@gmail.com> | 2021-01-18 16:04:04 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-18 16:04:04 -0500 |
| commit | 00a5edea71a605e7bdad78892b2863000e53624e (patch) | |
| tree | 8750e088e82191ddda97b566e2dc28d9d999a3a6 /src/code/z_collision_check.c | |
| parent | 20206fba0d1c404c7493c470a0526a5e50cc1576 (diff) | |
Actor Struct Changes (and a few related things) (#617)
* reformat header
* type -> category
* done for now i think
* some more stuff
* first -> head
* focus
* flag comment
* ground -> floor
* remove asm, name wrapper funcs
* name func, format
* review
* targetPriority, format
* git subrepo pull --force tools/ZAPD
subrepo:
subdir: "tools/ZAPD"
merged: "0305ec2c2"
upstream:
origin: "https://github.com/zeldaret/ZAPD.git"
branch: "master"
commit: "0305ec2c2"
git-subrepo:
version: "0.4.3"
origin: "https://github.com/ingydotnet/git-subrepo.git"
commit: "2f68596"
* comment
* review
* feet flags
* horse shadow
Diffstat (limited to 'src/code/z_collision_check.c')
| -rw-r--r-- | src/code/z_collision_check.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/code/z_collision_check.c b/src/code/z_collision_check.c index be884c444..30f71cda2 100644 --- a/src/code/z_collision_check.c +++ b/src/code/z_collision_check.c @@ -1632,7 +1632,7 @@ void CollisionCheck_HitSolid(GlobalContext* globalCtx, ColliderInfo* info, Colli * Plays a hit sound effect for AT colliders attached to Player based on the AC element's elemType. */ s32 CollisionCheck_SwordHitAudio(Collider* at, ColliderInfo* acInfo) { - if (at->actor != NULL && at->actor->type == ACTORTYPE_PLAYER) { + if (at->actor != NULL && at->actor->category == ACTORCAT_PLAYER) { if (acInfo->elemType == ELEMTYPE_UNK0) { Audio_PlaySoundGeneral(NA_SE_IT_SWORD_STRIKE, &at->actor->projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8); @@ -2962,8 +2962,8 @@ void CollisionCheck_ResetDamage(CollisionCheckInfo* info) { */ void CollisionCheck_SetInfoNoDamageTable(CollisionCheckInfo* info, CollisionCheckInfoInit* init) { info->health = init->health; - info->unk_10 = init->unk_02; - info->unk_12 = init->unk_04; + info->cylRadius = init->cylRadius; + info->cylHeight = init->cylHeight; info->mass = init->mass; } @@ -2973,8 +2973,8 @@ void CollisionCheck_SetInfoNoDamageTable(CollisionCheckInfo* info, CollisionChec void CollisionCheck_SetInfo(CollisionCheckInfo* info, DamageTable* damageTable, CollisionCheckInfoInit* init) { info->health = init->health; info->damageTable = damageTable; - info->unk_10 = init->unk_02; - info->unk_12 = init->unk_04; + info->cylRadius = init->cylRadius; + info->cylHeight = init->cylHeight; info->mass = init->mass; } @@ -2984,9 +2984,9 @@ void CollisionCheck_SetInfo(CollisionCheckInfo* info, DamageTable* damageTable, void CollisionCheck_SetInfo2(CollisionCheckInfo* info, DamageTable* damageTable, CollisionCheckInfoInit2* init) { info->health = init->health; info->damageTable = damageTable; - info->unk_10 = init->unk_02; - info->unk_12 = init->unk_04; - info->unk_14 = init->unk_06; + info->cylRadius = init->cylRadius; + info->cylHeight = init->cylHeight; + info->cylYShift = init->cylYShift; info->mass = init->mass; } @@ -3218,9 +3218,9 @@ s32 CollisionCheck_LineOCCheck(GlobalContext* globalCtx, CollisionCheckContext* * Moves the ColliderCylinder's position to the actor's position */ void Collider_UpdateCylinder(Actor* actor, ColliderCylinder* collider) { - collider->dim.pos.x = actor->posRot.pos.x; - collider->dim.pos.y = actor->posRot.pos.y; - collider->dim.pos.z = actor->posRot.pos.z; + collider->dim.pos.x = actor->world.pos.x; + collider->dim.pos.y = actor->world.pos.y; + collider->dim.pos.z = actor->world.pos.z; } /** |
