Decompile fn_20108 (CRagEffect::Sphere)
Batch #14081 by secret: 0 byte-identical, 1 confirmed by peer review. - fn_20108 CRagEffect::Sphere: logic confirmed by peer review Peer-reviewed-by: Yommy, Tanke Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
c6de231600
commit
4d5e8af608
2 changed files with 24 additions and 20 deletions
|
|
@ -2050,18 +2050,18 @@ void CRagEffect::Sphere() {
|
|||
return;
|
||||
}
|
||||
|
||||
this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 7, 0.0f, 0.0f, 0.0f, WorldObjects())->state;
|
||||
this->state.lastPrim = CreateEffectParticle(*this, this->render, 7, 0.0f, 0.0f, 0.0f, WorldObjects());
|
||||
this->state.duration = 500 - this->state.stateCnt;
|
||||
EffectPrimitiveState& particle = *this->state.unknown_11C84;
|
||||
particle.duration = 300;
|
||||
particle.radius = 0.1f;
|
||||
particle.radiusSpeed = 0.15f;
|
||||
particle.gravSpeed = 0.15f;
|
||||
particle.longitude = 2.0f;
|
||||
particle.longSpeed = 8.0f;
|
||||
particle.longAccel = -0.01f;
|
||||
particle.size = 1.2f;
|
||||
reinterpret_cast<matrix*>(particle.transform)->MakeYRotation(GetRadian(static_cast<int>(particle.longitude)));
|
||||
this->state.lastPrim->state.duration = 300;
|
||||
this->state.lastPrim->state.radius = 0.1f;
|
||||
this->state.lastPrim->state.radiusSpeed = 0.15f;
|
||||
this->state.lastPrim->state.gravSpeed = 0.15f;
|
||||
this->state.lastPrim->state.longitude = 2.0f;
|
||||
this->state.lastPrim->state.longSpeed = 8.0f;
|
||||
this->state.lastPrim->state.longAccel = -0.01f;
|
||||
this->state.lastPrim->state.size = 1.2f;
|
||||
reinterpret_cast<matrix*>(this->state.lastPrim->state.transform)->MakeYRotation(GetRadian(static_cast<int>(this->state.lastPrim->state.longitude)));
|
||||
EffectPrimitiveState& particle = this->state.lastPrim->state;
|
||||
const float* m = particle.transform;
|
||||
const float distance = particle.radius;
|
||||
particle.deltaPos2 = {
|
||||
|
|
@ -2069,14 +2069,14 @@ void CRagEffect::Sphere() {
|
|||
(m[1] * 0.0f - m[4] * 30.0f) + distance * m[7] + m[10],
|
||||
(m[2] * 0.0f - m[5] * 30.0f) + distance * m[8] + m[11]
|
||||
};
|
||||
particle.chRadiSpeed = 1;
|
||||
particle.unknown_01D8 = 0;
|
||||
particle.chPoint.push_back(95.0f);
|
||||
particle.chVal1.push_back(-0.15f);
|
||||
particle.chVal2.push_back(particle.radiusAccel);
|
||||
Owner(&particle).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr");
|
||||
Owner(&particle).SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act");
|
||||
Owner(&particle).InitSegment();
|
||||
this->state.lastPrim->state.chRadiSpeed = 1;
|
||||
this->state.lastPrim->state.unknown_01D8 = 0;
|
||||
this->state.lastPrim->state.chPoint.push_back(95.0f);
|
||||
this->state.lastPrim->state.chVal1.push_back(-0.15f);
|
||||
this->state.lastPrim->state.chVal2.push_back(this->state.lastPrim->state.radiusAccel);
|
||||
this->state.lastPrim->SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr");
|
||||
this->state.lastPrim->SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act");
|
||||
this->state.lastPrim->InitSegment();
|
||||
}
|
||||
|
||||
// OFFSET: 0x00C17220
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
class CRes;
|
||||
struct EffectPrimitiveState;
|
||||
struct CEffectPrim;
|
||||
struct EffectActor;
|
||||
|
||||
struct RagEffectState {
|
||||
|
|
@ -44,7 +45,10 @@ struct RagEffectState {
|
|||
/* 11944 */ int currentKey[128];
|
||||
/* 11B44 */ int loopCount;
|
||||
/* 11B48 */ int loopLimit;
|
||||
/* 11B4C */ EffectPrimitiveState* unknown_11C84;
|
||||
union {
|
||||
/* 11B4C */ EffectPrimitiveState* unknown_11C84;
|
||||
/* 11B4C */ CEffectPrim* lastPrim;
|
||||
};
|
||||
/* 11B50 */ std::int32_t unknown_11C88[4];
|
||||
/* 11B60 */ unsigned char forceRender;
|
||||
/* 11B61 */ unsigned char unknown_11C99[3];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue