diff options
| author | elijah-thomas774 <elijahthomas774@gmail.com> | 2025-11-23 14:20:15 -0500 |
|---|---|---|
| committer | elijah-thomas774 <elijahthomas774@gmail.com> | 2025-11-23 15:11:22 -0500 |
| commit | 51040758a5d8b7fea613df4e6b3234c0951bb42a (patch) | |
| tree | 18c4a086d363f6735b6b120df83d0c4806e37b12 /src | |
| parent | 0c129f95fb10af9208f98f135bf3ceec23ea5b0b (diff) | |
d_t_barrel_pos OK
Diffstat (limited to 'src')
| -rw-r--r-- | src/REL/d/t/d_t_barrel_pos.cpp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/REL/d/t/d_t_barrel_pos.cpp b/src/REL/d/t/d_t_barrel_pos.cpp index 05b28f67..d57a19f4 100644 --- a/src/REL/d/t/d_t_barrel_pos.cpp +++ b/src/REL/d/t/d_t_barrel_pos.cpp @@ -1,3 +1,47 @@ #include "d/t/d_t_barrel_pos.h" +#include "d/a/obj/d_a_obj_stage_sink.h" +#include "d/t/d_t_barrel.h" +#include "f/f_base.h" + SPECIAL_ACTOR_PROFILE(TAG_BARREL_POS, dTgBarrelPos_c, fProfile::TAG_BARREL_POS, 0x222, 0, 0); + +int dTgBarrelPos_c::create() { + mLinkIndex = getFromParams(0, 0xFF); + if (mLinkIndex == 0xFF) { + mLinkIndex = 0; + } + + mLinkId = getFromParams(8, 0xF); + + mStageRef.link(dAcOstageSink_c::GetInstance()); + + mSpawnPosition = mPosition; + + return SUCCEEDED; +} + +int dTgBarrelPos_c::doDelete() { + return SUCCEEDED; +} + +int dTgBarrelPos_c::actorExecute() { + dAcOstageSink_c *pStage = mStageRef.get(); + + mVec3_c pos = pStage->mPosition; + mAng3_c rot = pStage->mRotation; + + mVec3_c stageDist = mSpawnPosition - pos; + mMtx_c m; + m.transS(pos); + m.ZXYrotM(rot); + m.multVecSR(stageDist, mPosition); + + mPosition += pos; + + return SUCCEEDED; +} + +int dTgBarrelPos_c::draw() { + return SUCCEEDED; +} |
