mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-20 05:51:18 +00:00
Cleanup z_collision_check
1 (#1427)
* Cleanup `z_collision_check.c` and structs
* Revert `other*` names to master, split to other pr
* WIP/experimental: `ColliderCylinderElement`
* Revert "WIP/experimental: `ColliderCylinderElement`"
This reverts commit cfc8c32ace
.
* ac/atHitInfo -> HitElem
* rename some collider elements to "elem" (instead of item, info, hurtbox...)
* cut down on more "hitbox" usage
* name all `ColliderElement*` temps properly
* rearrange colcheck structs
* add collider shape name descriptions
* reword collider shape descriptions
* jntsph first again
---------
Co-authored-by: fig02 <fig02srl@gmail.com>
This commit is contained in:
parent
f02d012ce7
commit
1a8772e540
93 changed files with 1725 additions and 1601 deletions
|
@ -554,8 +554,8 @@ void EnGe2_Update(Actor* thisx, PlayState* play) {
|
|||
if ((this->stateFlags & GE2_STATE_KO) || (this->stateFlags & GE2_STATE_CAPTURING)) {
|
||||
this->actionFunc(this, play);
|
||||
} else if (this->collider.base.acFlags & AC_HIT) {
|
||||
if ((this->collider.info.acHitInfo != NULL) &&
|
||||
(this->collider.info.acHitInfo->toucher.dmgFlags & DMG_HOOKSHOT)) {
|
||||
if ((this->collider.elem.acHitElem != NULL) &&
|
||||
(this->collider.elem.acHitElem->toucher.dmgFlags & DMG_HOOKSHOT)) {
|
||||
//! @bug duration parameter is larger than 255 which messes with the internal bitpacking of the colorfilter.
|
||||
//! Because of the duration being tracked as an unsigned byte it ends up being truncated to 144
|
||||
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, 400);
|
||||
|
@ -606,8 +606,8 @@ void EnGe2_UpdateStunned(Actor* thisx, PlayState* play2) {
|
|||
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 40.0f, 25.0f, 40.0f, UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2);
|
||||
|
||||
if ((this->collider.base.acFlags & AC_HIT) && ((this->collider.info.acHitInfo == NULL) ||
|
||||
!(this->collider.info.acHitInfo->toucher.dmgFlags & DMG_HOOKSHOT))) {
|
||||
if ((this->collider.base.acFlags & AC_HIT) && ((this->collider.elem.acHitElem == NULL) ||
|
||||
!(this->collider.elem.acHitElem->toucher.dmgFlags & DMG_HOOKSHOT))) {
|
||||
this->actor.colorFilterTimer = 0;
|
||||
EnGe2_ChangeAction(this, GE2_ACTION_KNOCKEDOUT);
|
||||
this->timer = 100;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue