mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-06 06:10:21 +00:00
attchaedA/attachedB renamed to parent/child (#358)
* fix colliderinit typo * rename parent/child * cleanup * forgot to change something in functions.h * SpawnAsChild * format
This commit is contained in:
parent
468c592792
commit
1f1b5e39f5
233 changed files with 584 additions and 585 deletions
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* File: z_arrow_light.c
|
||||
* Overlay: ovl_Arrow_Light
|
||||
* Description: Light Arrow. Spawned by and attached to a normal arrow.
|
||||
* Description: Light Arrow. Spawned as a child of a normal arrow.
|
||||
*/
|
||||
|
||||
#include "z_arrow_light.h"
|
||||
|
@ -65,7 +65,7 @@ void ArrowLight_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void ArrowLight_Charge(ArrowLight* this, GlobalContext* globalCtx) {
|
||||
EnArrow* arrow;
|
||||
|
||||
arrow = (EnArrow*)this->actor.attachedA;
|
||||
arrow = (EnArrow*)this->actor.parent;
|
||||
if ((arrow == NULL) || (arrow->actor.update == NULL)) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
|
@ -74,14 +74,14 @@ void ArrowLight_Charge(ArrowLight* this, GlobalContext* globalCtx) {
|
|||
if (this->radius < 10) {
|
||||
this->radius += 1;
|
||||
}
|
||||
// copy position and rotation from the attached arrow
|
||||
// copy position and rotation from arrow
|
||||
this->actor.posRot.pos = arrow->actor.posRot.pos;
|
||||
this->actor.shape.rot = arrow->actor.shape.rot;
|
||||
|
||||
func_8002F974(&this->actor, NA_SE_PL_ARROW_CHARGE_LIGHT - SFX_FLAG);
|
||||
|
||||
// If arrow's attached is null, Link has fired the arrow
|
||||
if (arrow->actor.attachedA == NULL) {
|
||||
// if arrow has no parent, player has fired the arrow
|
||||
if (arrow->actor.parent == NULL) {
|
||||
this->unkPos = this->actor.posRot.pos;
|
||||
this->radius = 10;
|
||||
ArrowLight_SetupAction(this, ArrowLight_Fly);
|
||||
|
@ -152,12 +152,12 @@ void ArrowLight_Fly(ArrowLight* this, GlobalContext* globalCtx) {
|
|||
f32 distanceScaled;
|
||||
s32 pad;
|
||||
|
||||
arrow = (EnArrow*)this->actor.attachedA;
|
||||
arrow = (EnArrow*)this->actor.parent;
|
||||
if ((arrow == NULL) || (arrow->actor.update == NULL)) {
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
// copy position and rotation from the attached arrow
|
||||
// copy position and rotation from parent arrow
|
||||
this->actor.posRot.pos = arrow->actor.posRot.pos;
|
||||
this->actor.shape.rot = arrow->actor.shape.rot;
|
||||
distanceScaled = Math_Vec3f_DistXYZ(&this->unkPos, &this->actor.posRot.pos) * (1.0f / 24.0f);
|
||||
|
@ -201,7 +201,7 @@ void ArrowLight_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Gfx* dispRefs[4];
|
||||
|
||||
stateFrames = globalCtx->state.frames;
|
||||
arrow = (EnArrow*)this->actor.attachedA;
|
||||
arrow = (EnArrow*)this->actor.parent;
|
||||
if (1) {}
|
||||
|
||||
if ((arrow != NULL) && (arrow->actor.update != NULL) && (this->timer < 255)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue