CDrone: Make use of in-class initializers for bitfields

Eliminates some code.
This commit is contained in:
Lioncash 2020-06-11 10:16:09 -04:00
parent 76a9d8f0f9
commit 2a357a1006
2 changed files with 13 additions and 25 deletions

View File

@ -65,19 +65,7 @@ CDrone::CDrone(TUniqueId uid, std::string_view name, EFlavorType flavor, const C
, x6b0_pathFind(nullptr, 3 + int(b1), pInfo.GetPathfindingIndex(), 1.f, 2.4f)
, x7cc_(CSfxManager::TranslateSFXID(sId))
, x82c_shieldModel(std::make_unique<CModelData>(CStaticRes{aId2, zeus::skOne3f}))
, x832_a(0)
, x832_b(0)
, x834_24_(false)
, x834_25_(false)
, x834_26_(false)
, x834_27_(false)
, x834_28_(false)
, x834_29_codeTrigger(false)
, x834_30_visible(false)
, x834_31_(false)
, x835_24_(false)
, x835_25_(b1)
, x835_26_(false) {
, x835_25_(b1) {
UpdateTouchBounds(pInfo.GetHalfExtent());
x460_knockBackController.SetEnableShock(true);
x460_knockBackController.SetAvailableState(EKnockBackAnimationState::Hurled, false);

View File

@ -80,19 +80,19 @@ class CDrone : public CPatterned {
rstl::reserved_vector<float, 2> x818_ = {{0.f, 0.f}};
rstl::reserved_vector<bool, 2> x824_ = {{false, false}};
std::unique_ptr<CModelData> x82c_shieldModel;
u8 x832_a : 3;
u8 x832_b : 3;
bool x834_24_ : 1;
bool x834_25_ : 1;
bool x834_26_ : 1;
bool x834_27_ : 1;
bool x834_28_ : 1;
bool x834_29_codeTrigger : 1;
bool x834_30_visible : 1;
bool x834_31_ : 1;
bool x835_24_ : 1;
u8 x832_a : 3 = 0;
u8 x832_b : 3 = 0;
bool x834_24_ : 1 = false;
bool x834_25_ : 1 = false;
bool x834_26_ : 1 = false;
bool x834_27_ : 1 = false;
bool x834_28_ : 1 = false;
bool x834_29_codeTrigger : 1 = false;
bool x834_30_visible : 1 = false;
bool x834_31_ : 1 = false;
bool x835_24_ : 1 = false;
bool x835_25_ : 1;
bool x835_26_ : 1;
bool x835_26_ : 1 = false;
void UpdateTouchBounds(float radius);
bool HitShield(const zeus::CVector3f& dir) const;