Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 039ce0e

Browse files
committed
Stuff related to Arms and ThrownDevices.
1 parent 426e055 commit 039ce0e

File tree

6 files changed

+84
-50
lines changed

6 files changed

+84
-50
lines changed

Entities/AHuman.cpp

Lines changed: 59 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ void AHuman::Clear()
8383
m_BGArmFlailScalar = 0.7F;
8484
m_EquipHUDTimer.Reset();
8585
m_WalkAngle.fill(Matrix());
86+
m_FlailArms = 1.0F;
8687

8788
m_DeviceState = SCANNING;
8889
m_SweepState = NOSWEEP;
@@ -179,6 +180,7 @@ int AHuman::Create(const AHuman &reference) {
179180
m_JetAngleRange = reference.m_JetAngleRange;
180181
m_FGArmFlailScalar = reference.m_FGArmFlailScalar;
181182
m_BGArmFlailScalar = reference.m_BGArmFlailScalar;
183+
m_FlailArms = reference.m_FlailArms;
182184

183185
m_pFGHandGroup = dynamic_cast<AtomGroup *>(reference.m_pFGHandGroup->Clone());
184186
m_pFGHandGroup->SetOwner(this);
@@ -253,6 +255,8 @@ int AHuman::ReadProperty(const std::string_view &propName, Reader &reader) {
253255
reader >> m_FGArmFlailScalar;
254256
} else if (propName == "BGArmFlailScalar") {
255257
reader >> m_BGArmFlailScalar;
258+
} else if (propName == "FlailArms") {
259+
reader >> m_FlailArms;
256260
} else if (propName == "FGArm") {
257261
SetFGArm(dynamic_cast<Arm *>(g_PresetMan.ReadReflectedPreset(reader)));
258262
} else if (propName == "BGArm") {
@@ -352,6 +356,8 @@ int AHuman::Save(Writer &writer) const
352356
writer << m_FGArmFlailScalar;
353357
writer.NewProperty("BGArmFlailScalar");
354358
writer << m_BGArmFlailScalar;
359+
writer.NewProperty("FlailArms");
360+
writer << m_FlailArms;
355361
writer.NewProperty("FGArm");
356362
writer << m_pFGArm;
357363
writer.NewProperty("BGArm");
@@ -3181,6 +3187,7 @@ void AHuman::Update()
31813187
// Movement direction
31823188

31833189
bool isStill = m_Vel.GetMagnitude() + m_PrevVel.GetMagnitude() < 1.0F;
3190+
bool aiming = m_Controller.IsState(AIM_SHARP);
31843191

31853192
// If the pie menu is on, try to preserve whatever move state we had before it going into effect.
31863193
if (!m_Controller.IsState(PIE_MENU_ACTIVE)) {
@@ -3211,7 +3218,7 @@ void AHuman::Update()
32113218
}
32123219

32133220
// Walk backwards if the aiming is already focused in the opposite direction of travel.
3214-
if (analogAim.GetMagnitude() != 0 || m_Controller.IsState(AIM_SHARP)) {
3221+
if (analogAim.GetMagnitude() != 0 || aiming) {
32153222
m_Paths[FGROUND][m_MoveState].SetHFlip(m_Controller.IsState(MOVE_LEFT));
32163223
m_Paths[BGROUND][m_MoveState].SetHFlip(m_Controller.IsState(MOVE_LEFT));
32173224
} else if ((m_Controller.IsState(MOVE_RIGHT) && m_HFlipped) || (m_Controller.IsState(MOVE_LEFT) && !m_HFlipped)) {
@@ -3300,14 +3307,14 @@ void AHuman::Update()
33003307
// Set the timer to a base number so we don't get a sluggish feeling at start.
33013308
if (m_AimState != AIMUP) { m_AimTmr.SetElapsedSimTimeMS(m_AimState == AIMSTILL ? 150 : 300); }
33023309
m_AimState = AIMUP;
3303-
m_AimAngle += m_Controller.IsState(AIM_SHARP) ? std::min(static_cast<float>(m_AimTmr.GetElapsedSimTimeMS()) * 0.00005F, 0.05F) : std::min(static_cast<float>(m_AimTmr.GetElapsedSimTimeMS()) * 0.00015F, 0.15F) * m_Controller.GetDigitalAimSpeed();
3310+
m_AimAngle += aiming ? std::min(static_cast<float>(m_AimTmr.GetElapsedSimTimeMS()) * 0.00005F, 0.05F) : std::min(static_cast<float>(m_AimTmr.GetElapsedSimTimeMS()) * 0.00015F, 0.15F) * m_Controller.GetDigitalAimSpeed();
33043311
if (m_AimAngle > m_AimRange) { m_AimAngle = m_AimRange; }
33053312

33063313
} else if (m_Controller.IsState(AIM_DOWN) && m_Status != INACTIVE) {
33073314
// Set the timer to a base number so we don't get a sluggish feeling at start.
33083315
if (m_AimState != AIMDOWN) {m_AimTmr.SetElapsedSimTimeMS(m_AimState == AIMSTILL ? 150 : 300); }
33093316
m_AimState = AIMDOWN;
3310-
m_AimAngle -= m_Controller.IsState(AIM_SHARP) ? std::min(static_cast<float>(m_AimTmr.GetElapsedSimTimeMS()) * 0.00005F, 0.05F) : std::min(static_cast<float>(m_AimTmr.GetElapsedSimTimeMS()) * 0.00015F, 0.15F) * m_Controller.GetDigitalAimSpeed();
3317+
m_AimAngle -= aiming ? std::min(static_cast<float>(m_AimTmr.GetElapsedSimTimeMS()) * 0.00005F, 0.05F) : std::min(static_cast<float>(m_AimTmr.GetElapsedSimTimeMS()) * 0.00015F, 0.15F) * m_Controller.GetDigitalAimSpeed();
33113318
if (m_AimAngle < -m_AimRange) { m_AimAngle = -m_AimRange; }
33123319

33133320
} else if (analogAim.GetMagnitude() != 0 && m_Status != INACTIVE) {
@@ -3343,7 +3350,7 @@ void AHuman::Update()
33433350

33443351
// TODO: make the delay data driven by both the actor and the device!
33453352
//
3346-
if (m_Controller.IsState(AIM_SHARP) && m_Status == STABLE && (m_MoveState == STAND || m_MoveState == CROUCH || m_MoveState == NOMOVE || m_MoveState == WALK) && m_Vel.GetMagnitude() < 5.0F && GetEquippedItem()) {
3353+
if (aiming && m_Status == STABLE && (m_MoveState == STAND || m_MoveState == CROUCH || m_MoveState == NOMOVE || m_MoveState == WALK) && m_Vel.GetMagnitude() < 5.0F && GetEquippedItem()) {
33473354
float aimMag = analogAim.GetMagnitude();
33483355

33493356
// If aim sharp is being done digitally, then translate to full analog aim mag
@@ -3376,8 +3383,14 @@ void AHuman::Update()
33763383

33773384
ThrownDevice *pThrown = nullptr;
33783385
if (m_pFGArm && m_Status != INACTIVE) {
3379-
// Force arm to idle by reaching toward a virtually inaccessible point.
3380-
m_pFGArm->ReachToward(Vector());
3386+
if (m_pBGLeg && m_MoveState == WALK && m_FlailArms > 0) {
3387+
m_pFGArm->ReachToward(m_pFGArm->GetJointPos() + m_pFGArm->GetIdleOffset().GetXFlipped(m_HFlipped).RadRotate(std::sin(m_pBGLeg->GetRotAngle() + c_HalfPI * GetFlipFactor()) * m_FlailArms));
3388+
} else if (m_pFGLeg && m_FlailArms > 0) {
3389+
m_pFGArm->ReachToward(m_pFGArm->GetJointPos() + m_pFGArm->GetIdleOffset().GetXFlipped(m_HFlipped).RadRotate(std::sin(m_pFGLeg->GetRotAngle() + c_HalfPI * GetFlipFactor()) * m_FlailArms));
3390+
} else {
3391+
// Force arm to idle by reaching toward a virtually inaccessible point.
3392+
m_pFGArm->ReachToward(Vector());
3393+
}
33813394

33823395
// Activate held device, if it's not a thrown device.
33833396
if (m_pFGArm->HoldsHeldDevice() && !m_pFGArm->HoldsThrownDevice()) {
@@ -3392,22 +3405,23 @@ void AHuman::Update()
33923405
else if (m_pFGArm->GetHeldMO()) {
33933406
pThrown = dynamic_cast<ThrownDevice *>(m_pFGArm->GetHeldMO());
33943407
if (pThrown) {
3408+
pThrown->SetSharpAim(aiming ? 1.0F : 0);
33953409
if (m_Controller.IsState(WEAPON_FIRE)) {
33963410
if (m_ArmsState != THROWING_PREP) {
33973411
m_ThrowTmr.Reset();
33983412
if (!pThrown->ActivatesWhenReleased()) { pThrown->Activate(); }
33993413
}
34003414
m_ArmsState = THROWING_PREP;
3401-
m_pFGArm->ReachToward(m_Pos + (m_pFGArm->GetParentOffset() + pThrown->GetStartThrowOffset().RadRotate(m_AimAngle + m_AngularVel * deltaTime)).GetXFlipped(m_HFlipped) * m_Rotation);
3415+
m_pFGArm->ReachToward(m_pFGArm->GetJointPos() + pThrown->GetStartThrowOffset().RadRotate(m_AimAngle + m_AngularVel * deltaTime).GetXFlipped(m_HFlipped));
34023416
} else if (m_ArmsState == THROWING_PREP) {
34033417
m_ArmsState = THROWING_RELEASE;
34043418
// TODO: figure out how to properly use EndThrowOffset, since it doesn't play much a role for just one frame!
3405-
m_pFGArm->SetHandPos(m_Pos + (m_pFGArm->GetParentOffset() + pThrown->GetEndThrowOffset().RadRotate(adjustedAimAngle)).GetXFlipped(m_HFlipped) * m_Rotation);
3419+
m_pFGArm->SetHandPos(m_pFGArm->GetJointPos() + pThrown->GetEndThrowOffset().RadRotate(adjustedAimAngle).GetXFlipped(m_HFlipped));
34063420

34073421
MovableObject *pMO = m_pFGArm->ReleaseHeldMO();
34083422

34093423
if (pMO) {
3410-
pMO->SetPos(m_Pos + (m_pFGArm->GetParentOffset() + Vector(m_pFGArm->GetMaxLength(), -m_pFGArm->GetMaxLength() * 0.5F)).GetXFlipped(m_HFlipped).RadRotate(adjustedAimAngle) * m_Rotation);
3424+
pMO->SetPos(m_pFGArm->GetJointPos() + Vector(m_pFGArm->GetMaxLength() * GetFlipFactor(), -m_pFGArm->GetMaxLength() * 0.5F).RadRotate(adjustedAimAngle));
34113425
float maxThrowVel = pThrown->GetMaxThrowVel();
34123426
float minThrowVel = pThrown->GetMinThrowVel();
34133427
if (maxThrowVel == 0) {
@@ -3416,8 +3430,8 @@ void AHuman::Update()
34163430
minThrowVel = maxThrowVel * 0.2F;
34173431
}
34183432
Vector tossVec(minThrowVel + (maxThrowVel - minThrowVel) * GetThrowProgress(), 0.5F * RandomNormalNum());
3419-
tossVec.RadRotate(m_AimAngle);
3420-
pMO->SetVel(tossVec.GetXFlipped(m_HFlipped) * m_Rotation);
3433+
tossVec.RadRotate(m_AimAngle + m_AngularVel * deltaTime);
3434+
pMO->SetVel(tossVec.GetXFlipped(m_HFlipped));
34213435
pMO->SetAngularVel(m_AngularVel + RandomNum(-5.0F, 2.5F) * GetFlipFactor());
34223436
pMO->SetRotAngle(adjustedAimAngle);
34233437

@@ -3436,11 +3450,14 @@ void AHuman::Update()
34363450
}
34373451
if (pThrown->ActivatesWhenReleased()) { pThrown->Activate(); }
34383452
m_ThrowTmr.Reset();
3453+
} else {
3454+
m_pFGArm->ReachToward(m_pFGArm->GetJointPos() + pThrown->GetStanceOffset().RadRotate(adjustedAimAngle));
34393455
}
34403456
}
34413457
} else if (m_ArmsState == THROWING_RELEASE && m_ThrowTmr.GetElapsedSimTimeMS() > 100) {
34423458
m_pFGArm->SetHeldMO(SwapNextInventory());
34433459
m_pFGArm->SetHandPos(m_Pos + m_HolsterOffset.GetXFlipped(m_HFlipped));
3460+
EquipShieldInBGArm();
34443461
m_ArmsState = WEAPON_READY;
34453462
} else if (m_ArmsState == THROWING_RELEASE) {
34463463
m_pFGArm->SetHandPos(m_Pos + (m_HolsterOffset + Vector(15, -15)).GetXFlipped(m_HFlipped));
@@ -3546,7 +3563,7 @@ void AHuman::Update()
35463563
// Try to detect a new item
35473564
if (m_pFGArm && m_Status == STABLE) {
35483565
reach += m_pFGArm->GetMaxLength();
3549-
reachPoint = m_pFGArm->GetPos() + m_pFGArm->GetJointOffset().GetXFlipped(m_HFlipped).RadRotate(m_pFGArm->GetRotAngle());
3566+
reachPoint = m_pFGArm->GetJointPos();
35503567
if (!m_pItemInReach) {
35513568
MOID itemMOID = g_SceneMan.CastMORay(reachPoint, Vector(reach * RandomNum(), 0).RadRotate(GetAimAngle(true) + RandomNum(-c_HalfPI, 0.0F) * GetFlipFactor()), m_MOID, Activity::NoTeam, g_MaterialGrass, true, 2);
35523569

@@ -3867,23 +3884,31 @@ void AHuman::Update()
38673884
m_pBGArm->ReachToward(m_pBGHandGroup->GetLimbPos(m_HFlipped));
38683885

38693886
} else {
3870-
if (HeldDevice * heldDevice = dynamic_cast<HeldDevice *>(GetEquippedItem())) {
3887+
HeldDevice * heldDevice = dynamic_cast<HeldDevice *>(GetEquippedItem());
3888+
ThrownDevice * thrownDevice = dynamic_cast<ThrownDevice *>(heldDevice);
3889+
if (thrownDevice && (m_ArmsState == THROWING_PREP || aiming)) {
3890+
m_pBGArm->ReachToward(m_pBGArm->GetJointPos() + thrownDevice->GetEndThrowOffset().RadRotate(m_AimAngle).GetXFlipped(m_HFlipped));
3891+
} else if (heldDevice) {
38713892
if (GetEquippedBGItem() && !heldDevice->IsOneHanded()) {
38723893
UnequipBGArm();
38733894
} else {
3874-
m_pBGArm->Reach(m_pFGArm->GetHeldDevice()->GetSupportPos());
3895+
m_pBGArm->Reach(heldDevice->GetSupportPos());
38753896
if (m_pBGArm->DidReach()) {
3876-
m_pFGArm->GetHeldDevice()->SetSupported(true);
3877-
m_pBGArm->SetRecoil(m_pFGArm->GetHeldDevice()->GetRecoilForce(), m_pFGArm->GetHeldDevice()->GetRecoilOffset(), m_pFGArm->GetHeldDevice()->IsRecoiled());
3897+
heldDevice->SetSupported(true);
3898+
m_pBGArm->SetRecoil(heldDevice->GetRecoilForce(), heldDevice->GetRecoilOffset(), heldDevice->IsRecoiled());
38783899
} else {
38793900
// BGArm did not reach to support the device. Count device as supported anyway, if crouching.
3880-
m_pFGArm->GetHeldDevice()->SetSupported(m_MoveState == CROUCH || m_ProneState == PRONE);
3901+
heldDevice->SetSupported(m_MoveState == CROUCH || m_ProneState == PRONE);
38813902
m_pBGArm->SetRecoil(Vector(), Vector(), false);
38823903
}
38833904
}
3905+
} else if (m_pFGLeg && m_MoveState == WALK && m_FlailArms > 0) {
3906+
m_pBGArm->ReachToward(m_pBGArm->GetJointPos() + m_pBGArm->GetIdleOffset().GetXFlipped(m_HFlipped).RadRotate(std::sin(m_pFGLeg->GetRotAngle() + c_HalfPI * GetFlipFactor()) * m_FlailArms));
3907+
} else if (m_pBGLeg && m_FlailArms > 0) {
3908+
m_pBGArm->ReachToward(m_pBGArm->GetJointPos() + m_pBGArm->GetIdleOffset().GetXFlipped(m_HFlipped).RadRotate(std::sin(m_pBGLeg->GetRotAngle() + c_HalfPI * GetFlipFactor()) * m_FlailArms));
38843909
} else {
3885-
// Use an unreachable position to force this arm to idle, so it wont bug out where the AtomGroup was left off
3886-
m_pBGArm->Reach(Vector());
3910+
// Force arm to idle by reaching toward a virtually inaccessible point.
3911+
m_pBGArm->ReachToward(Vector());
38873912
}
38883913
}
38893914
} else {
@@ -4011,8 +4036,8 @@ void AHuman::Update()
40114036
}
40124037

40134038
// Rotational balancing spring calc
4014-
if (m_Status == STABLE)
4015-
{
4039+
if (m_Status == STABLE) {
4040+
40164041
// If we're supposed to be laying down on the ground, make the spring pull the body that way until we reach that angle
40174042
if (m_ProneState != NOTPRONE)
40184043
{
@@ -4096,34 +4121,27 @@ void AHuman::Update()
40964121
//////////////////////////////////////////////////////////////////////////////////////////
40974122

40984123
void AHuman::DrawThrowingReticle(BITMAP *targetBitmap, const Vector &targetPos, float progressScalar) const {
4099-
const int pointCount = 9;
4100-
Vector points[pointCount];
4101-
//Color colors[pointCount];
4124+
const int pointCount = 9;
4125+
Vector points[pointCount];
41024126

41034127
for (int index = 0; index < pointCount; index++) {
41044128
points[index].SetXY(static_cast<float>(index * 4), 0.0F);
4105-
//colors[index].SetRGB(255 - index * 3, 225 - index * 20, index);
41064129
}
4130+
Vector outOffset(m_pFGArm->GetMaxLength() * GetFlipFactor(), -m_pFGArm->GetMaxLength() * 0.5F);
41074131

4108-
Vector outOffset(15.0F * GetFlipFactor(), -5.0F);
4109-
4110-
acquire_bitmap(targetBitmap);
4111-
4112-
for (int i = 0; i < pointCount * progressScalar; ++i) {
4113-
points[i].FlipX(m_HFlipped);
4114-
points[i] += outOffset;
4115-
points[i].RadRotate((m_AimAngle * GetFlipFactor()) + m_Rotation.GetRadAngle());
4116-
points[i] += m_Pos;
4117-
if (m_pFGArm)
4118-
points[i] += m_pFGArm->GetParentOffset();
4132+
acquire_bitmap(targetBitmap);
41194133

4120-
// Put the flickering glows on the reticle dots, in absolute scene coordinates
4121-
g_PostProcessMan.RegisterGlowDotEffect(points[i], YellowDot, 55 + RandomNum(0, 100));
4134+
for (int i = 0; i < pointCount * progressScalar; ++i) {
4135+
points[i].FlipX(m_HFlipped);
4136+
points[i] += outOffset;
4137+
points[i].RadRotate(m_AimAngle * GetFlipFactor() + m_AngularVel * g_TimerMan.GetDeltaTimeSecs());
4138+
points[i] += m_pFGArm->GetJointPos();
41224139

4123-
putpixel(targetBitmap, points[i].GetFloorIntX() - targetPos.GetFloorIntX(), points[i].GetFloorIntY() - targetPos.GetFloorIntY(), g_YellowGlowColor);
4124-
}
4140+
g_PostProcessMan.RegisterGlowDotEffect(points[i], YellowDot, RandomNum(63, 127));
4141+
putpixel(targetBitmap, points[i].GetFloorIntX() - targetPos.GetFloorIntX(), points[i].GetFloorIntY() - targetPos.GetFloorIntY(), g_YellowGlowColor);
4142+
}
41254143

4126-
release_bitmap(targetBitmap);
4144+
release_bitmap(targetBitmap);
41274145
}
41284146

41294147
//////////////////////////////////////////////////////////////////////////////////////////

Entities/AHuman.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -927,6 +927,18 @@ ClassInfoGetters;
927927
/// <param name="newPrepTime">New duration to fully charge a throw in MS.</param>
928928
void SetThrowPrepTime(long newPrepTime) { m_ThrowPrepTime = newPrepTime; }
929929

930+
/// <summary>
931+
/// Gets whether this AHuman is set to flail its arms while walking, overriding the arms' idle behavior.
932+
/// </summary>
933+
/// <returns>Whether this AHuman is set to flail its arms.</returns>
934+
float GetFlailArms() const { return m_FlailArms; }
935+
936+
/// <summary>
937+
/// Sets whether this AHuman is set to flail its arms while walking.
938+
/// </summary>
939+
/// <param name="newValue">Whether this AHuman should flail its arms.</param>
940+
void SetFlailArms(float newValue) { m_FlailArms = newValue; }
941+
930942
/// <summary>
931943
/// Gets this AHuman's stride sound. Ownership is NOT transferred!
932944
/// </summary>
@@ -1032,6 +1044,7 @@ ClassInfoGetters;
10321044
float m_BGArmFlailScalar; //!< The rate at which this AHuman's BG Arm follows the the bodily rotation. Set to a negative value for a "counterweight" effect.
10331045
Timer m_EquipHUDTimer; //!< Timer for showing the name of any newly equipped Device.
10341046
std::array<Matrix, 2> m_WalkAngle; //!< An array of rot angle targets for different movement states.
1047+
float m_FlailArms; //!< Toggles the arm sway when walking.
10351048

10361049
////////////////
10371050
// AI States

Entities/Arm.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,6 @@ void Arm::Update() {
354354
m_AngularVel = 0.0F;
355355
}
356356

357-
UpdateCurrentHandOffset();
358-
359357
HeldDevice *heldDevice = m_pHeldMO ? dynamic_cast<HeldDevice *>(m_pHeldMO) : nullptr;
360358
const ThrownDevice *thrownDevice = heldDevice ? dynamic_cast<ThrownDevice *>(heldDevice) : nullptr;
361359

@@ -372,6 +370,8 @@ void Arm::Update() {
372370

373371
Attachable::Update();
374372

373+
UpdateCurrentHandOffset();
374+
375375
m_Recoiled = heldDevice && heldDevice->IsRecoiled();
376376

377377
if (heldDevice && !thrownDevice) {
@@ -446,7 +446,8 @@ void Arm::UpdateArmFrame() {
446446
void Arm::Draw(BITMAP *pTargetBitmap, const Vector &targetPos, DrawMode mode, bool onlyPhysical) const {
447447
Attachable::Draw(pTargetBitmap, targetPos, mode, onlyPhysical);
448448

449-
if (!onlyPhysical && (mode == g_DrawColor || mode == g_DrawWhite || mode == g_DrawTrans) && (!m_Parent || m_pHeldMO || (!m_pHeldMO && !m_DidReach))) {
449+
//if (!onlyPhysical && (mode == g_DrawColor || mode == g_DrawWhite || mode == g_DrawTrans) && (!m_Parent || m_pHeldMO || (!m_pHeldMO && !m_DidReach))) {
450+
if (!onlyPhysical && (mode == g_DrawColor || mode == g_DrawWhite || mode == g_DrawTrans)) {
450451
DrawHand(pTargetBitmap, targetPos, mode);
451452
if (m_pHeldMO && m_pHeldMO->IsDrawnAfterParent()) { m_pHeldMO->Draw(pTargetBitmap, targetPos, mode, onlyPhysical); }
452453
}

Entities/Attachable.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,12 @@ namespace RTE {
237237
/// </summary>
238238
/// <param name="newJointOffset">A Vector describing the offset of the joint relative to the this Attachable's origin/center of mass position.</param>
239239
void SetJointOffset(const Vector &newJointOffset) { m_JointOffset = newJointOffset; }
240+
241+
/// <summary>
242+
/// Gets the absolute position of the joint that the parent of this Attachable sets upon Update().
243+
/// </summary>
244+
/// <returns>A Vector describing the current absolute position of the joint.</returns>
245+
Vector GetJointPos() const { return m_JointPos; }
240246
#pragma endregion
241247

242248
#pragma region Force Transferral

Entities/ThrownDevice.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,6 @@ namespace RTE {
111111
#pragma endregion
112112

113113
#pragma region Virtual Override Methods
114-
/// <summary>
115-
/// Gets the current position offset of this ThrownDevice's joint relative from the parent Actor's position, if attached.
116-
/// </summary>
117-
/// <returns>A const reference to the current stance parent offset.</returns>
118-
Vector GetStanceOffset() const override { return m_StanceOffset.GetXFlipped(m_HFlipped); }
119-
120114
/// <summary>
121115
/// Resets all the timers used by this (e.g. emitters, etc). This is to prevent backed up emissions from coming out all at once while this has been held dormant in an inventory.
122116
/// </summary>

Lua/LuaBindingsEntities.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,7 @@ namespace RTE {
424424
.property("FirearmIsSemiAuto", &AHuman::FirearmIsSemiAuto)
425425
.property("FirearmActivationDelay", &AHuman::FirearmActivationDelay)
426426
.property("LimbPathPushForce", &AHuman::GetLimbPathPushForce, &AHuman::SetLimbPathPushForce)
427+
.property("FlailArms", &AHuman::GetFlailArms, &AHuman::SetFlailArms)
427428

428429
.def("EquipFirearm", &AHuman::EquipFirearm)
429430
.def("EquipThrowable", &AHuman::EquipThrowable)
@@ -536,6 +537,7 @@ namespace RTE {
536537
.property("JointStrength", &Attachable::GetJointStrength, &Attachable::SetJointStrength)
537538
.property("JointStiffness", &Attachable::GetJointStiffness, &Attachable::SetJointStiffness)
538539
.property("JointOffset", &Attachable::GetJointOffset, &Attachable::SetJointOffset)
540+
.property("JointPos", &Attachable::GetJointPos)
539541
.property("ApplyTransferredForcesAtOffset", &Attachable::GetApplyTransferredForcesAtOffset, &Attachable::SetApplyTransferredForcesAtOffset)
540542
.property("BreakWound", &Attachable::GetBreakWound, &AttachableSetBreakWound)
541543
.property("ParentBreakWound", &Attachable::GetParentBreakWound, &AttachableSetParentBreakWound)

0 commit comments

Comments
 (0)