Use MASS_IMMOVABLE/MASS_HEAVY everywhere (#2269)

This commit is contained in:
cadmic 2024-10-10 20:48:26 -07:00 committed by GitHub
parent 53c57599a4
commit 746adfc727
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 15 additions and 15 deletions

View File

@ -381,7 +381,7 @@ void BossMo_Init(Actor* thisx, PlayState* play2) {
} else {
Actor_SetScale(&this->actor, 0.01f);
BossMo_SetupTentacle(this, play);
this->actor.colChkInfo.mass = 0xFF;
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
MO_WATER_LEVEL(play) = -50;
this->waterTexAlpha = 90.0f;
this->actor.world.pos.y = MO_WATER_LEVEL(play);

View File

@ -484,7 +484,7 @@ void BossTw_Init(Actor* thisx, PlayState* play2) {
}
Actor_SetScale(&this->actor, 2.5 * 0.01f);
this->actor.colChkInfo.mass = 255;
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
this->actor.colChkInfo.health = 0;
Collider_InitCylinder(play, &this->collider);

View File

@ -178,7 +178,7 @@ void EnDekunuts_SetupBurrow(EnDekunuts* this) {
void EnDekunuts_SetupBeginRun(EnDekunuts* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &gDekuNutsUnburrowAnim, -3.0f);
this->collider.dim.height = 37;
this->actor.colChkInfo.mass = 0x32;
this->actor.colChkInfo.mass = 50;
Actor_PlaySfx(&this->actor, NA_SE_EN_NUTS_DAMAGE);
this->collider.base.acFlags &= ~AC_ON;
this->actionFunc = EnDekunuts_BeginRun;
@ -446,7 +446,7 @@ void EnDekunuts_ColliderCheck(EnDekunuts* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
Actor_SetDropFlag(&this->actor, &this->collider.elem, true);
if (this->actor.colChkInfo.mass == 0x32) {
if (this->actor.colChkInfo.mass == 50) {
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
if (this->actor.colChkInfo.damageEffect != 1) {
if (this->actor.colChkInfo.damageEffect == 2) {

View File

@ -83,7 +83,7 @@ void EnDntJiji_Init(Actor* thisx, PlayState* play) {
// "Deku Scrub mask show elder"
PRINTF(VT_FGCOL(YELLOW) "☆☆☆☆☆ デグナッツお面品評会長老 ☆☆☆☆☆ %x\n" VT_RST, this->stage);
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
this->actor.colChkInfo.mass = 0xFF;
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
this->actor.attentionRangeType = ATTENTION_RANGE_6;
this->actionFunc = EnDntJiji_SetFlower;
this->actor.gravity = -2.0f;

View File

@ -128,7 +128,7 @@ void EnDntNomal_Init(Actor* thisx, PlayState* play) {
this->type = ENDNTNOMAL_TARGET;
}
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
this->actor.colChkInfo.mass = 0xFF;
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
this->objectId = -1;
if (this->type == ENDNTNOMAL_TARGET) {
PRINTF("\n\n");
@ -676,7 +676,7 @@ void EnDntNomal_SetupStageAttack(EnDntNomal* this, PlayState* play) {
if (this->timer3 == 0) {
this->endFrame = (f32)Animation_GetLastFrame(&gDntStageSpitAnim);
Animation_Change(&this->skelAnime, &gDntStageSpitAnim, 1.0f, 0.0f, this->endFrame, ANIMMODE_ONCE, -10.0f);
this->actor.colChkInfo.mass = 0xFF;
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
this->isSolid = true;
this->timer2 = 0;
Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_ENEMY);

View File

@ -63,7 +63,7 @@ static ColliderCylinderInit sCylinderInit = {
{ 18, 20, 0, { 0, 0, 0 } },
};
static CollisionCheckInfoInit2 sColChkInit = { 1, 2, 25, 25, 0xFF };
static CollisionCheckInfoInit2 sColChkInit = { 1, 2, 25, 25, MASS_IMMOVABLE };
void EnDodojr_Init(Actor* thisx, PlayState* play) {
EnDodojr* this = (EnDodojr*)thisx;

View File

@ -176,7 +176,7 @@ void EnGb_Init(Actor* thisx, PlayState* play) {
ActorShape_Init(&this->dyna.actor.shape, 0.0f, ActorShadow_DrawCircle, 35.0f);
Actor_SetScale(&this->dyna.actor, 0.01f);
this->dyna.actor.colChkInfo.mass = 0xFF;
this->dyna.actor.colChkInfo.mass = MASS_IMMOVABLE;
this->dyna.actor.speed = 0.0f;
this->dyna.actor.velocity.y = 0.0f;
this->dyna.actor.gravity = -1.0f;

View File

@ -3608,9 +3608,9 @@ void EnHorse_Update(Actor* thisx, PlayState* play2) {
}
if (thisx->speed == 0.0f && !(this->stateFlags & ENHORSE_FLAG_19)) {
thisx->colChkInfo.mass = 0xFF;
thisx->colChkInfo.mass = MASS_IMMOVABLE;
} else {
thisx->colChkInfo.mass = 0xFE;
thisx->colChkInfo.mass = MASS_HEAVY;
}
if (thisx->speed >= 5.0f) {

View File

@ -60,7 +60,7 @@ void EnMk_Init(Actor* thisx, PlayState* play) {
Animation_PlayLoop(&this->skelAnime, &object_mk_Anim_000D88);
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
this->actor.colChkInfo.mass = 0xFF;
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
Actor_SetScale(&this->actor, 0.01f);
this->actionFunc = EnMk_Wait;

View File

@ -138,7 +138,7 @@ void EnNy_Init(Actor* thisx, PlayState* play) {
// "Dummy new initials"
PRINTF("ダミーニュウ イニシャル[ %d ] \n", this->actor.params);
PRINTF("En_Ny_actor_move2[ %x ] \n", EnNy_UpdateUnused);
this->actor.colChkInfo.mass = 0xFF;
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
this->actor.update = EnNy_UpdateUnused;
this->collider.base.colMaterial = COL_MATERIAL_METAL;
}

View File

@ -160,7 +160,7 @@ void EnSkb_Init(Actor* thisx, PlayState* play) {
this->actor.colChkInfo.damageTable = &sDamageTable;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 0.0f);
this->actor.focus.pos = this->actor.world.pos;
this->actor.colChkInfo.mass = 0xFE;
this->actor.colChkInfo.mass = MASS_HEAVY;
this->actor.colChkInfo.health = 2;
this->actor.shape.yOffset = -8000.0f;
SkelAnime_Init(play, &this->skelAnime, &gStalchildSkel, &gStalchildUncurlingAnim, this->jointTable,

View File

@ -113,7 +113,7 @@ void EnTrap_Init(Actor* thisx, PlayState* play) {
Collider_SetCylinder(play, &this->collider, thisx, &sCylinderInit);
ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawCircle, 0.0f);
thisx->attentionRangeType = ATTENTION_RANGE_3;
thisx->colChkInfo.mass = 0xFF;
thisx->colChkInfo.mass = MASS_IMMOVABLE;
}
void EnTrap_Destroy(Actor* thisx, PlayState* play) {