dComIfG_Ccsp_SetMass

This commit is contained in:
LagoLunatic
2025-05-29 19:40:36 -04:00
parent 7e37357f66
commit 22ba12593a
7 changed files with 26 additions and 50 deletions
+8
View File
@@ -3971,6 +3971,14 @@ inline dCcS* dComIfG_Ccsp() {
return &g_dComIfG_gameInfo.play.mCcS;
}
// This should be dComIfG_Ccsp()->SetMass everywhere, but for some reason that combination of two
// inlines consistently breaks the match on retail. But for the demo, using the proper inlines is requires to match.
#if VERSION == VERSION_DEMO
#define dComIfG_Ccsp_SetMass dComIfG_Ccsp()->SetMass
#else
#define dComIfG_Ccsp_SetMass dComIfG_Ccsp()->mMass_Mng.Set
#endif
inline void dComIfG_setTimerMode(int ms) { g_dComIfG_gameInfo.play.setTimerMode(ms); }
inline int dComIfG_getTimerMode() { return g_dComIfG_gameInfo.play.getTimerMode(); }
+2 -6
View File
@@ -298,9 +298,7 @@ void daArrow_c::arrowShooting() {
mAtCps.CalcAtVec();
dComIfG_Ccsp()->Set(&mAtCps);
// Using the dComIfG_Ccsp inline here breaks the match.
// dComIfG_Ccsp()->SetMass(&mCps, 1);
g_dComIfG_gameInfo.play.mCcS.SetMass(&mAtCps, 1);
dComIfG_Ccsp_SetMass(&mAtCps, 1);
clrAtHitNormal();
setAtHitPosBuff(&end);
@@ -874,9 +872,7 @@ BOOL daArrow_c::procMove() {
mAtCps.CalcAtVec();
dComIfG_Ccsp()->Set(&mAtCps);
// Using the dComIfG_Ccsp inline here breaks the match.
// dComIfG_Ccsp()->SetMass(&mCps, 1);
g_dComIfG_gameInfo.play.mCcS.SetMass(&mAtCps, 1);
dComIfG_Ccsp_SetMass(&mAtCps, 1);
}
return TRUE;
+3 -9
View File
@@ -2134,9 +2134,7 @@ static fopAc_ac_c* yari_hit_check(bk_class* i_this) {
i_this->m1040.MoveCAt(i_this->m11A8);
dComIfG_Ccsp()->Set(&i_this->m1040);
if (i_this->m02D5 != 0) {
// Using the dComIfG_Ccsp inline here breaks the match.
// dComIfG_Ccsp()->SetMass(&i_this->m1040, 3);
dComIfG_Ccsp()->mMass_Mng.Set(&i_this->m1040, 3);
dComIfG_Ccsp_SetMass(&i_this->m1040, 3);
}
if (i_this->m1040.ChkAtHit()) {
i_this->m0B78 = 5;
@@ -3334,9 +3332,7 @@ static void Bk_move(bk_class* i_this) {
i_this->m1040.OffAtVsPlayerBit();
i_this->m1040.SetAtSpl(dCcG_At_Spl_UNK1);
dComIfG_Ccsp()->Set(&i_this->m1040);
// Using the dComIfG_Ccsp inline here breaks the match.
// dComIfG_Ccsp()->SetMass(&i_this->m1040, 3);
dComIfG_Ccsp()->mMass_Mng.Set(&i_this->m1040, 3);
dComIfG_Ccsp_SetMass(&i_this->m1040, 3);
if (i_this->m1040.ChkAtHit() && actor->speed.y < -50.0f) {
actor->speed.y = 0.0f;
@@ -4422,9 +4418,7 @@ static BOOL daBk_Execute(bk_class* i_this) {
MtxPosition(&sp58, &sp4C);
i_this->m0B88.SetC(sp4C);
dComIfG_Ccsp()->Set(&i_this->m0B88);
// Using the inline breaks the match.
// dComIfG_Ccsp()->SetMass(&i_this->m0B88, 3);
dComIfG_Ccsp()->mMass_Mng.Set(&i_this->m0B88, 3);
dComIfG_Ccsp_SetMass(&i_this->m0B88, 3);
cXyz sp40 = i_this->m116C;
cXyz sp34 = i_this->current.pos;
+1 -3
View File
@@ -477,9 +477,7 @@ namespace daBomb2 {
mSph.SetR(radius);
mSph.SetC(pos);
dComIfG_Ccsp()->Set(&mSph);
//using inline breaks match
//dComIfG_Ccsp()->SetMass(&mSph, 3);
g_dComIfG_gameInfo.play.mCcS.SetMass(&mSph, 3);
dComIfG_Ccsp_SetMass(&mSph, 3);
}
}
+4 -12
View File
@@ -672,9 +672,7 @@ void daBomb_c::makeWaterEffect() {
mSph.SetC(current.pos);
if(mMassCounter != g_Counter.mCounter0) {
dComIfG_Ccsp()->Set(&mSph);
//using inline breaks match
//dComIfG_Ccsp()->SetMass(&mSph, 3);
g_dComIfG_gameInfo.play.mCcS.SetMass(&mSph, 3);
dComIfG_Ccsp_SetMass(&mSph, 3);
mMassCounter = g_Counter.mCounter0;
field_0x782 = 1;
}
@@ -834,9 +832,7 @@ BOOL daBomb_c::procExplode_init() {
mSph.SetC(current.pos);
if(mMassCounter != g_Counter.mCounter0) {
dComIfG_Ccsp()->Set(&mSph);
//using inline breaks match
//dComIfG_Ccsp()->SetMass(&mSph, 3);
g_dComIfG_gameInfo.play.mCcS.SetMass(&mSph, 3);
dComIfG_Ccsp_SetMass(&mSph, 3);
field_0x782 = 1;
mMassCounter = g_Counter.mCounter0;
}
@@ -899,9 +895,7 @@ bool daBomb_c::procExplode() {
mSph.SetC(current.pos);
if(mMassCounter != g_Counter.mCounter0) {
dComIfG_Ccsp()->Set(&mSph);
//using inline breaks match
//dComIfG_Ccsp()->SetMass(&mSph, 3);
g_dComIfG_gameInfo.play.mCcS.SetMass(&mSph, 3);
dComIfG_Ccsp_SetMass(&mSph, 3);
mMassCounter = g_Counter.mCounter0;
field_0x782 = 1;
}
@@ -1088,9 +1082,7 @@ BOOL daBomb_c::execute() {
mSph.SetR(scale.x * 30.0f);
if(mMassCounter != g_Counter.mCounter0) {
dComIfG_Ccsp()->Set(&mSph);
//using inline breaks match
//dComIfG_Ccsp()->SetMass(&mSph, 3);
g_dComIfG_gameInfo.play.mCcS.SetMass(&mSph, 3);
dComIfG_Ccsp_SetMass(&mSph, 3);
mMassCounter = g_Counter.mCounter0;
}
}
+2 -6
View File
@@ -186,9 +186,7 @@ BOOL daHookshot_c::procWait() {
mSightCps.SetR(5.0f);
mSightCps.CalcAtVec();
dComIfG_Ccsp()->Set(&mSightCps);
// Using the inline breaks the match.
// dComIfG_Ccsp()->SetMass(&mSightCps, 1);
g_dComIfG_gameInfo.play.mCcS.SetMass(&mSightCps, 1);
dComIfG_Ccsp_SetMass(&mSightCps, 1);
m2A3 = false;
mCurrProcFunc = &daHookshot_c::procShot;
@@ -298,9 +296,7 @@ BOOL daHookshot_c::procShot() {
mSightCps.SetR(5.0f);
mSightCps.CalcAtVec();
dComIfG_Ccsp()->Set(&mSightCps);
// Using the inline breaks the match.
// dComIfG_Ccsp()->SetMass(&mSightCps, 1);
g_dComIfG_gameInfo.play.mCcS.SetMass(&mSightCps, 1);
dComIfG_Ccsp_SetMass(&mSightCps, 1);
current.pos = sp8C;
}
+6 -14
View File
@@ -9817,10 +9817,7 @@ void daPy_lk_c::setCollision() {
mCyl.OnTgSetBit();
}
dComIfG_Ccsp()->Set(&mCyl);
// Using the dComIfG_Ccsp inline here (and everywhere else
// in this function) breaks the match.
// dComIfG_Ccsp()->SetMass(&mCyl, 1);
g_dComIfG_gameInfo.play.mCcS.SetMass(&mCyl, 1);
dComIfG_Ccsp_SetMass(&mCyl, 1);
mWindCyl.SetC(spD0);
mWindCyl.SetH(mCyl.GetH());
mWindCyl.SetR(mCyl.GetR());
@@ -10074,14 +10071,12 @@ void daPy_lk_c::setCollision() {
}
}
dComIfG_Ccsp()->Set(&mAtCyl);
// dComIfG_Ccsp()->SetMass(&mAtCyl, 1);
g_dComIfG_gameInfo.play.mCcS.SetMass(&mAtCyl, 1);
dComIfG_Ccsp_SetMass(&mAtCyl, 1);
int i;
dCcD_Cps* pdVar21 = &mAtCps[0];
for (i = 0; i < 3; i++, pdVar21++) {
dComIfG_Ccsp()->Set(pdVar21);
// dComIfG_Ccsp()->SetMass(&pdVar21, 1);
g_dComIfG_gameInfo.play.mCcS.SetMass(pdVar21, 1);
dComIfG_Ccsp_SetMass(pdVar21, 1);
}
} else {
if (mSwBlur.field_0x014 < 10) {
@@ -10200,8 +10195,7 @@ void daPy_lk_c::setCollision() {
mFanWindCps.SetAtVec(spC4);
mFanWindCps.SetR(in_f31);
dComIfG_Ccsp()->Set(&mFanWindCps);
// dComIfG_Ccsp()->SetMass(&mFanWindCps, 1);
g_dComIfG_gameInfo.play.mCcS.SetMass(&mFanWindCps, 1);
dComIfG_Ccsp_SetMass(&mFanWindCps, 1);
} else {
mFanWindCps.ResetAtHit();
}
@@ -10217,8 +10211,7 @@ void daPy_lk_c::setCollision() {
mFanWindSph.SetC(current.pos);
}
dComIfG_Ccsp()->Set(&mFanWindSph);
// dComIfG_Ccsp()->SetMass(&mFanWindSph, 1);
g_dComIfG_gameInfo.play.mCcS.SetMass(&mFanWindSph, 1);
dComIfG_Ccsp_SetMass(&mFanWindSph, 1);
m353A--;
} else {
mFanWindSph.ResetAtHit();
@@ -10237,8 +10230,7 @@ void daPy_lk_c::setCollision() {
mFanLightCps.SetAtVec(local_118);
mFanLightCps.OnAtSetBit();
dComIfG_Ccsp()->Set(&mFanLightCps);
// dComIfG_Ccsp()->SetMass(&mFanLightCps, 1);
g_dComIfG_gameInfo.play.mCcS.SetMass(&mFanLightCps, 1);
dComIfG_Ccsp_SetMass(&mFanLightCps, 1);
} else {
mFanLightCps.ResetAtHit();
mFanLightCps.OffAtSetBit();