Merge branch 'master' of ssh://git.axiodl.com:6431/AxioDL/urde

This commit is contained in:
Jack Andersen 2019-06-05 14:08:24 -10:00
commit 77d0ef942d
7 changed files with 30 additions and 12 deletions

View File

@ -56,4 +56,5 @@ public:
void SetTargetPosition(const zeus::CVector3f& pos);
void SetNoHorizontalAim(bool b);
};
} // namespace urde

View File

@ -49,12 +49,12 @@ void CBloodFlower::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CSta
if (x450_bodyController->IsFrozen()) {
x450_bodyController->FrozenBreakout();
}
sub80119364(mgr);
CalculateAttackTime(mgr);
UpdateFire(mgr);
}
}
void CBloodFlower::sub80119364(CStateManager& mgr) {
void CBloodFlower::CalculateAttackTime(CStateManager& mgr) {
x584_curAttackTime = x308_attackTimeVariation * -mgr.GetActiveRandom()->Float();
}
@ -114,7 +114,6 @@ void CBloodFlower::DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node
}
void CBloodFlower::LaunchPollenProjectile(const zeus::CTransform& xf, CStateManager& mgr, float var_f1, s32 w1) {
static float tickPeriod = CProjectileWeapon::GetTickPeriod();
CProjectileInfo* proj = GetProjectileInfo();
TLockedToken<CWeaponDescription> projToken = proj->Token();
@ -174,7 +173,7 @@ bool CBloodFlower::ShouldTurn(CStateManager& mgr, float) {
void CBloodFlower::Active(CStateManager& mgr, EStateMsg msg, float arg) {
if (msg == EStateMsg::Activate) {
x32c_animState = EAnimState::Ready;
sub80119364(mgr);
CalculateAttackTime(mgr);
} else if (msg == EStateMsg::Update) {
TryCommand(mgr, pas::EAnimationState::LoopReaction, &CPatterned::TryLoopReaction, 0);
x450_bodyController->GetCommandMgr().DeliverCmd(CBCAdditiveAimCmd());

View File

@ -33,7 +33,7 @@ class CBloodFlower : public CPatterned {
CAssetId x620_;
void ActivateTriggers(CStateManager& mgr, bool activate);
void sub80119364(CStateManager&);
void CalculateAttackTime(CStateManager&);
void UpdateFire(CStateManager& mgr);
void TurnEffectsOn(u32, CStateManager&);
void TurnEffectsOff(u32, CStateManager&);
@ -52,6 +52,7 @@ public:
void Think(float dt, CStateManager& mgr);
void DoUserAnimEvent(CStateManager& mgr, const CInt32POINode& node, EUserEventType type, float dt);
void Render(const CStateManager& mgr) const;
void Touch(CActor&, CStateManager&) {}
CProjectileInfo* GetProjectileInfo() { return &x590_projectileInfo; }
bool ShouldAttack(CStateManager&, float);

View File

@ -16,13 +16,23 @@ CMagdolite::CMagdolite(TUniqueId uid, std::string_view name, const CEntityInfo&
float f2, const CDamageInfo& dInfo1, const CDamageInfo& dInfo2,
const CDamageVulnerability& dVuln1, const CDamageVulnerability& dVuln2, CAssetId modelId,
CAssetId skinId, float f3, float f4, float f5, float f6,
const urde::MP1::CMagdolite::CMagdoliteData& magData, float f7, float f8, float f9)
const CMagdolite::CMagdoliteData& magData, float f7, float f8, float f9)
: CPatterned(ECharacter::Magdolite, uid, name, EFlavorType::Zero, info, xf, std::move(mData), pInfo,
EMovementType::Flyer, EColliderType::One, EBodyType::BiPedal, actParms, EKnockBackVariant::Large) {}
EMovementType::Flyer, EColliderType::One, EBodyType::BiPedal, actParms, EKnockBackVariant::Large)
, x568_(f4)
, x56c_(f5)
, x570_(f6)
, x574_(f3)
, x578_(std::cos(zeus::degToRad(f2)))
, x57c_(f1)
, x584_boneTracker(*GetModelData()->GetAnimationData(), "head"sv, zeus::degToRad(f1), zeus::degToRad(90.f),
EBoneTrackingFlags::ParentIk) {
}
void CMagdolite::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) {
switch(msg) {
switch (msg) {
case EScriptObjectMessage::Damage:
case EScriptObjectMessage::InvulnDamage:
/* TODO Implement */
@ -31,7 +41,7 @@ void CMagdolite::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CState
x450_bodyController->Activate(mgr);
RemoveMaterial(EMaterialTypes::Solid, mgr);
AddMaterial(EMaterialTypes::NonSolidDamageable, mgr);
//x584_boneTracker.SetActive(false);
x584_boneTracker.SetActive(false);
CreateShadow(false);
/* TODO Finish */
break;

View File

@ -20,7 +20,14 @@ public:
};
private:
//CBoneTracking x584_boneTracker;
float x568_;
float x56c_;
float x570_;
float x574_;
float x578_;
float x57c_;
u32 x580_;
CBoneTracking x584_boneTracker;
public:
DEFINE_PATTERNED(Magdolite)
CMagdolite(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, CModelData&&,

View File

@ -98,7 +98,7 @@ static std::string _BuildVS(const SModelShadersInfo& info) {
") in vec4 weightIn["sv << unsigned(info.m_tag.getWeightCount()) << "];"sv;
vertOut << '\n';
vertOut << "#define URDE_TCG_EXPR "sv;
vertOut << "\n#define URDE_TCG_EXPR "sv;
using UVAnimType = BlendMaterial::UVAnimType;
using PassType = BlendMaterial::PassType;
int mtxIdx = 0;

@ -1 +1 @@
Subproject commit 630119350bd083d7a63b8cfea6afc11e5b7fac76
Subproject commit 82c607ec400f20dd96a7d64abcadea93eaa1a87b