More CPlayer

This commit is contained in:
Jack Andersen 2017-07-27 20:56:23 -10:00
parent 473103d41a
commit 48ba71a6c8
6 changed files with 221 additions and 124 deletions

View File

@ -17,13 +17,13 @@ struct ITweakPlayer : ITweak
virtual float GetFluidGravAccel() const=0;
virtual float GetHudLagAmount() const=0;
virtual float GetOrbitNormalDistance() const=0;
virtual float GetOrbitDistanceCompareSignificance() const=0;
virtual float GetOrbitDistanceThreshold() const=0;
virtual uint32_t GetOrbitScreenBoxHalfExtentX(int zone) const=0;
virtual uint32_t GetOrbitScreenBoxHalfExtentY(int zone) const=0;
virtual uint32_t GetOrbitScreenBoxCenterX(int zone) const=0;
virtual uint32_t GetOrbitScreenBoxCenterY(int zone) const=0;
virtual uint32_t GetEnemyScreenBoxCenterX(int zone) const=0;
virtual uint32_t GetEnemyScreenBoxCenterY(int zone) const=0;
virtual uint32_t GetOrbitZoneIdealX(int zone) const=0;
virtual uint32_t GetOrbitZoneIdealY(int zone) const=0;
virtual float GetOrbitNearX() const=0;
virtual float GetOrbitNearZ() const=0;
virtual float GetOrbitZRange() const=0;
@ -32,6 +32,10 @@ struct ITweakPlayer : ITweak
virtual bool GetFiringCancelsCameraPitch() const=0;
virtual bool GetAssistedAimingIgnoreHorizontal() const=0;
virtual bool GetAssistedAimingIgnoreVertical() const=0;
virtual float GetAimMaxDistance() const=0;
virtual float GetAimThresholdDistance() const=0;
virtual float GetAimBoxWidth() const=0;
virtual float GetAimBoxHeight() const=0;
virtual float GetAimAssistHorizontalAngle() const=0;
virtual float GetAimAssistVerticalAngle() const=0;
virtual float GetScanningFrameSenseRange() const=0;
@ -43,7 +47,7 @@ struct ITweakPlayer : ITweak
virtual float GetX274() const=0; // x274
virtual float GetX278() const=0; // x278
virtual float GetPlayerBallHalfExtent() const=0; // x27c
virtual float GetOrbitDistanceThreshold() const=0;
virtual float GetOrbitDistanceMax() const=0;
virtual float GetGrappleSwingLength() const=0;
virtual float GetGrappleSwingPeriod() const=0;
virtual float GetGrapplePullSpeedMin() const=0;

View File

@ -330,7 +330,7 @@ struct PlayerHintParameters : BigYAML
Value<atUint32> propertyCount;
Value<bool> unknown1;
Value<bool> unknown2;
Value<bool> unknown3;
Value<bool> extendTargetDistance;
Value<bool> unknown4;
Value<bool> unknown5;
Value<bool> unknown6;

View File

@ -223,8 +223,8 @@ void CTweakPlayer::read(athena::io::IStreamReader& __dna_reader)
x22c_ = __dna_reader.readFloatBig();
/* x230_ */
x230_ = __dna_reader.readFloatBig();
/* x234_ */
x234_ = __dna_reader.readFloatBig();
/* x234_aimMaxDistance */
x234_aimMaxDistance = __dna_reader.readFloatBig();
/* x238_ */
x238_ = __dna_reader.readFloatBig();
/* x23c_ */
@ -235,16 +235,16 @@ void CTweakPlayer::read(athena::io::IStreamReader& __dna_reader)
x244_ = __dna_reader.readFloatBig();
/* x248_ */
x248_ = __dna_reader.readFloatBig();
/* x24c_ */
x24c_ = __dna_reader.readFloatBig();
/* x24c_aimThresholdDistance */
x24c_aimThresholdDistance = __dna_reader.readFloatBig();
/* x250_ */
x250_ = __dna_reader.readFloatBig();
/* x254_ */
x254_ = __dna_reader.readFloatBig();
/* x258_ */
x258_ = __dna_reader.readFloatBig();
/* x25c_ */
x25c_ = __dna_reader.readFloatBig();
/* x258_aimBoxWidth */
x258_aimBoxWidth = __dna_reader.readFloatBig();
/* x25c_aimBoxHeight */
x25c_aimBoxHeight = __dna_reader.readFloatBig();
/* x260_ */
x260_ = __dna_reader.readFloatBig();
/* x264_aimAssistHorizontalAngle */
@ -289,8 +289,8 @@ void CTweakPlayer::read(athena::io::IStreamReader& __dna_reader)
x19c_ = __dna_reader.readFloatBig();
/* x1a0_ */
x1a0_ = __dna_reader.readFloatBig();
/* x1a4_ */
x1a4_orbitDistanceCompareSignificance = __dna_reader.readFloatBig();
/* x1a4_orbitDistanceThreshold */
x1a4_orbitDistanceThreshold = __dna_reader.readFloatBig();
/* x1a8_orbitScreenBoxHalfExtentX[0] */
x1a8_orbitScreenBoxHalfExtentX[0] = __dna_reader.readUint32Big();
/* x1b0_orbitScreenBoxHalfExtentY[0] */
@ -299,10 +299,10 @@ void CTweakPlayer::read(athena::io::IStreamReader& __dna_reader)
x1b8_orbitScreenBoxCenterX[0] = __dna_reader.readUint32Big();
/* x1c0_orbitScreenBoxCenterY[0] */
x1c0_orbitScreenBoxCenterY[0] = __dna_reader.readUint32Big();
/* x1c8_enemyScreenBoxCenterX[0] */
x1c8_enemyScreenBoxCenterX[0] = __dna_reader.readUint32Big();
/* x1d0_enemyScreenBoxCenterY[0] */
x1d0_enemyScreenBoxCenterY[0] = __dna_reader.readUint32Big();
/* x1c8_orbitZoneIdealX[0] */
x1c8_orbitZoneIdealX[0] = __dna_reader.readUint32Big();
/* x1d0_orbitZoneIdealY[0] */
x1d0_orbitZoneIdealY[0] = __dna_reader.readUint32Big();
/* x1a8_orbitScreenBoxHalfExtentX[1] */
x1a8_orbitScreenBoxHalfExtentX[1] = __dna_reader.readUint32Big();
/* x1b0_orbitScreenBoxHalfExtentY[1] */
@ -311,10 +311,10 @@ void CTweakPlayer::read(athena::io::IStreamReader& __dna_reader)
x1b8_orbitScreenBoxCenterX[1] = __dna_reader.readUint32Big();
/* x1c0_orbitScreenBoxCenterY[1] */
x1c0_orbitScreenBoxCenterY[1] = __dna_reader.readUint32Big();
/* x1c8_enemyScreenBoxCenterX[1] */
x1c8_enemyScreenBoxCenterX[1] = __dna_reader.readUint32Big();
/* x1d0_enemyScreenBoxCenterY[1] */
x1d0_enemyScreenBoxCenterY[1] = __dna_reader.readUint32Big();
/* x1c8_orbitZoneIdealX[1] */
x1c8_orbitZoneIdealX[1] = __dna_reader.readUint32Big();
/* x1d0_orbitZoneIdealY[1] */
x1d0_orbitZoneIdealY[1] = __dna_reader.readUint32Big();
/* x1d8_orbitNearX */
x1d8_orbitNearX = __dna_reader.readFloatBig();
/* x1dc_orbitNearZ */
@ -361,8 +361,8 @@ void CTweakPlayer::read(athena::io::IStreamReader& __dna_reader)
x220_ = __dna_reader.readFloatBig();
/* x224_scanningFrameSenseRange */
x224_scanningFrameSenseRange = __dna_reader.readFloatBig();
/* x2a0_orbitDistanceThreshold */
x2a0_orbitDistanceThreshold = __dna_reader.readFloatBig();
/* x2a0_orbitDistanceMax */
x2a0_orbitDistanceMax = __dna_reader.readFloatBig();
/* x2a4_grappleSwingLength */
x2a4_grappleSwingLength = __dna_reader.readFloatBig();
/* x2a8_grappleSwingPeriod */
@ -663,8 +663,8 @@ void CTweakPlayer::write(athena::io::IStreamWriter& __dna_writer) const
__dna_writer.writeFloatBig(x22c_);
/* x230_ */
__dna_writer.writeFloatBig(x230_);
/* x234_ */
__dna_writer.writeFloatBig(x234_);
/* x234_aimMaxDistance */
__dna_writer.writeFloatBig(x234_aimMaxDistance);
/* x238_ */
__dna_writer.writeFloatBig(x238_);
/* x23c_ */
@ -675,16 +675,16 @@ void CTweakPlayer::write(athena::io::IStreamWriter& __dna_writer) const
__dna_writer.writeFloatBig(x244_);
/* x248_ */
__dna_writer.writeFloatBig(x248_);
/* x24c_ */
__dna_writer.writeFloatBig(x24c_);
/* x24c_aimThresholdDistance */
__dna_writer.writeFloatBig(x24c_aimThresholdDistance);
/* x250_ */
__dna_writer.writeFloatBig(x250_);
/* x254_ */
__dna_writer.writeFloatBig(x254_);
/* x258_ */
__dna_writer.writeFloatBig(x258_);
/* x25c_ */
__dna_writer.writeFloatBig(x25c_);
/* x258_aimBoxWidth */
__dna_writer.writeFloatBig(x258_aimBoxWidth);
/* x25c_aimBoxHeight */
__dna_writer.writeFloatBig(x25c_aimBoxHeight);
/* x260_ */
__dna_writer.writeFloatBig(x260_);
/* x264_aimAssistHorizontalAngle */
@ -729,8 +729,8 @@ void CTweakPlayer::write(athena::io::IStreamWriter& __dna_writer) const
__dna_writer.writeFloatBig(x19c_);
/* x1a0_ */
__dna_writer.writeFloatBig(x1a0_);
/* x1a4_ */
__dna_writer.writeFloatBig(x1a4_orbitDistanceCompareSignificance);
/* x1a4_orbitDistanceThreshold */
__dna_writer.writeFloatBig(x1a4_orbitDistanceThreshold);
/* x1a8_orbitScreenBoxHalfExtentX[0] */
__dna_writer.writeUint32Big(x1a8_orbitScreenBoxHalfExtentX[0]);
/* x1b0_orbitScreenBoxHalfExtentY[0] */
@ -739,10 +739,10 @@ void CTweakPlayer::write(athena::io::IStreamWriter& __dna_writer) const
__dna_writer.writeUint32Big(x1b8_orbitScreenBoxCenterX[0]);
/* x1c0_orbitScreenBoxCenterY[0] */
__dna_writer.writeUint32Big(x1c0_orbitScreenBoxCenterY[0]);
/* x1c8_enemyScreenBoxCenterX[0] */
__dna_writer.writeUint32Big(x1c8_enemyScreenBoxCenterX[0]);
/* x1d0_enemyScreenBoxCenterY[0] */
__dna_writer.writeUint32Big(x1d0_enemyScreenBoxCenterY[0]);
/* x1c8_orbitZoneIdealX[0] */
__dna_writer.writeUint32Big(x1c8_orbitZoneIdealX[0]);
/* x1d0_orbitZoneIdealY[0] */
__dna_writer.writeUint32Big(x1d0_orbitZoneIdealY[0]);
/* x1a8_orbitScreenBoxHalfExtentX[1] */
__dna_writer.writeUint32Big(x1a8_orbitScreenBoxHalfExtentX[1]);
/* x1b0_orbitScreenBoxHalfExtentY[1] */
@ -751,10 +751,10 @@ void CTweakPlayer::write(athena::io::IStreamWriter& __dna_writer) const
__dna_writer.writeUint32Big(x1b8_orbitScreenBoxCenterX[1]);
/* x1c0_orbitScreenBoxCenterY[1] */
__dna_writer.writeUint32Big(x1c0_orbitScreenBoxCenterY[1]);
/* x1c8_enemyScreenBoxCenterX[1] */
__dna_writer.writeUint32Big(x1c8_enemyScreenBoxCenterX[1]);
/* x1d0_enemyScreenBoxCenterY[1] */
__dna_writer.writeUint32Big(x1d0_enemyScreenBoxCenterY[1]);
/* x1c8_orbitZoneIdealX[1] */
__dna_writer.writeUint32Big(x1c8_orbitZoneIdealX[1]);
/* x1d0_orbitZoneIdealY[1] */
__dna_writer.writeUint32Big(x1d0_orbitZoneIdealY[1]);
/* x1d8_orbitNearX */
__dna_writer.writeFloatBig(x1d8_orbitNearX);
/* x1dc_orbitNearZ */
@ -801,8 +801,8 @@ void CTweakPlayer::write(athena::io::IStreamWriter& __dna_writer) const
__dna_writer.writeFloatBig(x220_);
/* x224_scanningFrameSenseRange */
__dna_writer.writeFloatBig(x224_scanningFrameSenseRange);
/* x2a0_orbitDistanceThreshold */
__dna_writer.writeFloatBig(x2a0_orbitDistanceThreshold);
/* x2a0_orbitDistanceMax */
__dna_writer.writeFloatBig(x2a0_orbitDistanceMax);
/* x2a4_grappleSwingLength */
__dna_writer.writeFloatBig(x2a4_grappleSwingLength);
/* x2a8_grappleSwingPeriod */
@ -1133,8 +1133,8 @@ void CTweakPlayer::read(athena::io::YAMLDocReader& __dna_docin)
x22c_ = __dna_docin.readFloat("x22c_");
/* x230_ */
x230_ = __dna_docin.readFloat("x230_");
/* x234_ */
x234_ = __dna_docin.readFloat("x234_");
/* x234_aimMaxDistance */
x234_aimMaxDistance = __dna_docin.readFloat("x234_aimMaxDistance");
/* x238_ */
x238_ = __dna_docin.readFloat("x238_");
/* x23c_ */
@ -1145,16 +1145,16 @@ void CTweakPlayer::read(athena::io::YAMLDocReader& __dna_docin)
x244_ = __dna_docin.readFloat("x244_");
/* x248_ */
x248_ = __dna_docin.readFloat("x248_");
/* x24c_ */
x24c_ = __dna_docin.readFloat("x24c_");
/* x24c_aimThresholdDistance */
x24c_aimThresholdDistance = __dna_docin.readFloat("x24c_aimThresholdDistance");
/* x250_ */
x250_ = __dna_docin.readFloat("x250_");
/* x254_ */
x254_ = __dna_docin.readFloat("x254_");
/* x258_ */
x258_ = __dna_docin.readFloat("x258_");
/* x25c_ */
x25c_ = __dna_docin.readFloat("x25c_");
/* x258_aimBoxWidth */
x258_aimBoxWidth = __dna_docin.readFloat("x258_aimBoxWidth");
/* x25c_aimBoxHeight */
x25c_aimBoxHeight = __dna_docin.readFloat("x25c_aimBoxHeight");
/* x260_ */
x260_ = __dna_docin.readFloat("x260_");
/* x264_aimAssistHorizontalAngle */
@ -1214,8 +1214,8 @@ void CTweakPlayer::read(athena::io::YAMLDocReader& __dna_docin)
x19c_ = __dna_docin.readFloat("x19c_");
/* x1a0_ */
x1a0_ = __dna_docin.readFloat("x1a0_");
/* x1a4_ */
x1a4_orbitDistanceCompareSignificance = __dna_docin.readFloat("x1a4_");
/* x1a4_orbitDistanceThreshold */
x1a4_orbitDistanceThreshold = __dna_docin.readFloat("x1a4_orbitDistanceThreshold");
/* x1a8_orbitScreenBoxHalfExtentX */
size_t __x1a8_Count;
if (auto v = __dna_docin.enterSubVector("x1a8_orbitScreenBoxHalfExtentX", __x1a8_Count))
@ -1252,23 +1252,23 @@ void CTweakPlayer::read(athena::io::YAMLDocReader& __dna_docin)
/* x1c0_orbitScreenBoxCenterY[1] */
x1c0_orbitScreenBoxCenterY[1] = __dna_docin.readUint32("x1c0_orbitScreenBoxCenterY");
}
/* x1c8_enemyScreenBoxCenterX */
/* x1c8_orbitZoneIdealX */
size_t __x1c8_Count;
if (auto v = __dna_docin.enterSubVector("x1c8_enemyScreenBoxCenterX", __x1c8_Count))
if (auto v = __dna_docin.enterSubVector("x1c8_orbitZoneIdealX", __x1c8_Count))
{
/* x1c8_enemyScreenBoxCenterX[0] */
x1c8_enemyScreenBoxCenterX[0] = __dna_docin.readUint32("x1c8_enemyScreenBoxCenterX");
/* x1c8_enemyScreenBoxCenterX[1] */
x1c8_enemyScreenBoxCenterX[1] = __dna_docin.readUint32("x1c8_enemyScreenBoxCenterX");
/* x1c8_orbitZoneIdealX[0] */
x1c8_orbitZoneIdealX[0] = __dna_docin.readUint32("x1c8_orbitZoneIdealX");
/* x1c8_orbitZoneIdealX[1] */
x1c8_orbitZoneIdealX[1] = __dna_docin.readUint32("x1c8_orbitZoneIdealX");
}
/* x1d0_enemyScreenBoxCenterY */
/* x1d0_orbitZoneIdealY */
size_t __x1d0_Count;
if (auto v = __dna_docin.enterSubVector("x1d0_enemyScreenBoxCenterY", __x1d0_Count))
if (auto v = __dna_docin.enterSubVector("x1d0_orbitZoneIdealY", __x1d0_Count))
{
/* x1d0_enemyScreenBoxCenterY[0] */
x1d0_enemyScreenBoxCenterY[0] = __dna_docin.readUint32("x1d0_enemyScreenBoxCenterY");
/* x1d0_enemyScreenBoxCenterY[1] */
x1d0_enemyScreenBoxCenterY[1] = __dna_docin.readUint32("x1d0_enemyScreenBoxCenterY");
/* x1d0_orbitZoneIdealY[0] */
x1d0_orbitZoneIdealY[0] = __dna_docin.readUint32("x1d0_orbitZoneIdealY");
/* x1d0_orbitZoneIdealY[1] */
x1d0_orbitZoneIdealY[1] = __dna_docin.readUint32("x1d0_orbitZoneIdealY");
}
/* x1d8_orbitNearX */
x1d8_orbitNearX = __dna_docin.readFloat("x1d8_orbitNearX");
@ -1316,8 +1316,8 @@ void CTweakPlayer::read(athena::io::YAMLDocReader& __dna_docin)
x220_ = __dna_docin.readFloat("x220_");
/* x224_scanningFrameSenseRange */
x224_scanningFrameSenseRange = __dna_docin.readFloat("x224_scanningFrameSenseRange");
/* x2a0_orbitDistanceThreshold */
x2a0_orbitDistanceThreshold = __dna_docin.readFloat("x2a0_orbitDistanceThreshold");
/* x2a0_orbitDistanceMax */
x2a0_orbitDistanceMax = __dna_docin.readFloat("x2a0_orbitDistanceMax");
/* x2a4_grappleSwingLength */
x2a4_grappleSwingLength = __dna_docin.readFloat("x2a4_grappleSwingLength");
/* x2a8_grappleSwingPeriod */
@ -1642,8 +1642,8 @@ void CTweakPlayer::write(athena::io::YAMLDocWriter& __dna_docout) const
__dna_docout.writeFloat("x22c_", x22c_);
/* x230_ */
__dna_docout.writeFloat("x230_", x230_);
/* x234_ */
__dna_docout.writeFloat("x234_", x234_);
/* x234_aimMaxDistance */
__dna_docout.writeFloat("x234_aimMaxDistance", x234_aimMaxDistance);
/* x238_ */
__dna_docout.writeFloat("x238_", x238_);
/* x23c_ */
@ -1654,16 +1654,16 @@ void CTweakPlayer::write(athena::io::YAMLDocWriter& __dna_docout) const
__dna_docout.writeFloat("x244_", x244_);
/* x248_ */
__dna_docout.writeFloat("x248_", x248_);
/* x24c_ */
__dna_docout.writeFloat("x24c_", x24c_);
/* x24c_aimThresholdDistance */
__dna_docout.writeFloat("x24c_aimThresholdDistance", x24c_aimThresholdDistance);
/* x250_ */
__dna_docout.writeFloat("x250_", x250_);
/* x254_ */
__dna_docout.writeFloat("x254_", x254_);
/* x258_ */
__dna_docout.writeFloat("x258_", x258_);
/* x25c_ */
__dna_docout.writeFloat("x25c_", x25c_);
/* x258_aimBoxWidth */
__dna_docout.writeFloat("x258_aimBoxWidth", x258_aimBoxWidth);
/* x25c_aimBoxHeight */
__dna_docout.writeFloat("x25c_aimBoxHeight", x25c_aimBoxHeight);
/* x260_ */
__dna_docout.writeFloat("x260_", x260_);
/* x264_aimAssistHorizontalAngle */
@ -1720,8 +1720,8 @@ void CTweakPlayer::write(athena::io::YAMLDocWriter& __dna_docout) const
__dna_docout.writeFloat("x19c_", x19c_);
/* x1a0_ */
__dna_docout.writeFloat("x1a0_", x1a0_);
/* x1a4_ */
__dna_docout.writeFloat("x1a4_", x1a4_orbitDistanceCompareSignificance);
/* x1a4_orbitDistanceThreshold */
__dna_docout.writeFloat("x1a4_orbitDistanceThreshold", x1a4_orbitDistanceThreshold);
/* x1a8_orbitScreenBoxHalfExtentX */
if (auto v = __dna_docout.enterSubVector("x1a8_orbitScreenBoxHalfExtentX"))
{
@ -1754,21 +1754,21 @@ void CTweakPlayer::write(athena::io::YAMLDocWriter& __dna_docout) const
/* x1c0_orbitScreenBoxCenterY[1] */
__dna_docout.writeUint32("x1c0_orbitScreenBoxCenterY", x1c0_orbitScreenBoxCenterY[1]);
}
/* x1c8_enemyScreenBoxCenterX */
if (auto v = __dna_docout.enterSubVector("x1c8_enemyScreenBoxCenterX"))
/* x1c8_orbitZoneIdealX */
if (auto v = __dna_docout.enterSubVector("x1c8_orbitZoneIdealX"))
{
/* x1c8_enemyScreenBoxCenterX[0] */
__dna_docout.writeUint32("x1c8_enemyScreenBoxCenterX", x1c8_enemyScreenBoxCenterX[0]);
/* x1c8_enemyScreenBoxCenterX[1] */
__dna_docout.writeUint32("x1c8_enemyScreenBoxCenterX", x1c8_enemyScreenBoxCenterX[1]);
/* x1c8_orbitZoneIdealX[0] */
__dna_docout.writeUint32("x1c8_orbitZoneIdealX", x1c8_orbitZoneIdealX[0]);
/* x1c8_orbitZoneIdealX[1] */
__dna_docout.writeUint32("x1c8_orbitZoneIdealX", x1c8_orbitZoneIdealX[1]);
}
/* x1d0_enemyScreenBoxCenterY */
if (auto v = __dna_docout.enterSubVector("x1d0_enemyScreenBoxCenterY"))
/* x1d0_orbitZoneIdealY */
if (auto v = __dna_docout.enterSubVector("x1d0_orbitZoneIdealY"))
{
/* x1d0_enemyScreenBoxCenterY[0] */
__dna_docout.writeUint32("x1d0_enemyScreenBoxCenterY", x1d0_enemyScreenBoxCenterY[0]);
/* x1d0_enemyScreenBoxCenterY[1] */
__dna_docout.writeUint32("x1d0_enemyScreenBoxCenterY", x1d0_enemyScreenBoxCenterY[1]);
/* x1d0_orbitZoneIdealY[0] */
__dna_docout.writeUint32("x1d0_orbitZoneIdealY", x1d0_orbitZoneIdealY[0]);
/* x1d0_orbitZoneIdealY[1] */
__dna_docout.writeUint32("x1d0_orbitZoneIdealY", x1d0_orbitZoneIdealY[1]);
}
/* x1d8_ */
__dna_docout.writeFloat("x1d8_orbitNearX", x1d8_orbitNearX);
@ -1816,8 +1816,8 @@ void CTweakPlayer::write(athena::io::YAMLDocWriter& __dna_docout) const
__dna_docout.writeFloat("x220_", x220_);
/* x224_scanningFrameSenseRange */
__dna_docout.writeFloat("x224_scanningFrameSenseRange", x224_scanningFrameSenseRange);
/* x2a0_orbitDistanceThreshold */
__dna_docout.writeFloat("x2a0_orbitDistanceThreshold", x2a0_orbitDistanceThreshold);
/* x2a0_orbitDistanceMax */
__dna_docout.writeFloat("x2a0_orbitDistanceMax", x2a0_orbitDistanceMax);
/* x2a4_grappleSwingLength */
__dna_docout.writeFloat("x2a4_grappleSwingLength", x2a4_grappleSwingLength);
/* x2a8_grappleSwingPeriod */

View File

@ -67,13 +67,13 @@ struct CTweakPlayer : ITweakPlayer
Value<float> x198_;
Value<float> x19c_;
Value<float> x1a0_;
Value<float> x1a4_orbitDistanceCompareSignificance;
Value<float> x1a4_orbitDistanceThreshold;
Value<atUint32> x1a8_orbitScreenBoxHalfExtentX[2];
Value<atUint32> x1b0_orbitScreenBoxHalfExtentY[2];
Value<atUint32> x1b8_orbitScreenBoxCenterX[2];
Value<atUint32> x1c0_orbitScreenBoxCenterY[2];
Value<atUint32> x1c8_enemyScreenBoxCenterX[2];
Value<atUint32> x1d0_enemyScreenBoxCenterY[2];
Value<atUint32> x1c8_orbitZoneIdealX[2];
Value<atUint32> x1d0_orbitZoneIdealY[2];
Value<float> x1d8_orbitNearX;
Value<float> x1dc_orbitNearZ;
Value<float> x1e0_;
@ -120,17 +120,17 @@ struct CTweakPlayer : ITweakPlayer
Value<bool> x22a_28_assistedAimingIgnoreVertical : 1;
Value<float> x22c_;
Value<float> x230_;
Value<float> x234_;
Value<float> x234_aimMaxDistance;
Value<float> x238_;
Value<float> x23c_;
Value<float> x240_;
Value<float> x244_;
Value<float> x248_;
Value<float> x24c_;
Value<float> x24c_aimThresholdDistance;
Value<float> x250_;
Value<float> x254_;
Value<float> x258_;
Value<float> x25c_;
Value<float> x258_aimBoxWidth;
Value<float> x25c_aimBoxHeight;
Value<float> x260_;
Value<float> x264_aimAssistHorizontalAngle;
Value<float> x268_aimAssistVerticalAngle;
@ -147,7 +147,7 @@ struct CTweakPlayer : ITweakPlayer
Value<float> x294_;
Value<float> x298_;
Value<float> x29c_;
Value<float> x2a0_orbitDistanceThreshold;
Value<float> x2a0_orbitDistanceMax;
Value<float> x2a4_grappleSwingLength;
Value<float> x2a8_grappleSwingPeriod;
Value<float> x2ac_grapplePullSpeedMin;
@ -183,13 +183,13 @@ struct CTweakPlayer : ITweakPlayer
float GetFluidGravAccel() const { return xc8_fluidGravAccel; }
float GetHudLagAmount() const { return x138_hudLagAmount; }
float GetOrbitNormalDistance() const { return x180_orbitNormalDistance; }
float GetOrbitDistanceCompareSignificance() const { return x1a4_orbitDistanceCompareSignificance; }
float GetOrbitDistanceThreshold() const { return x1a4_orbitDistanceThreshold; }
uint32_t GetOrbitScreenBoxHalfExtentX(int zone) const { return x1a8_orbitScreenBoxHalfExtentX[zone]; }
uint32_t GetOrbitScreenBoxHalfExtentY(int zone) const { return x1b0_orbitScreenBoxHalfExtentY[zone]; }
uint32_t GetOrbitScreenBoxCenterX(int zone) const { return x1b8_orbitScreenBoxCenterX[zone]; }
uint32_t GetOrbitScreenBoxCenterY(int zone) const { return x1c0_orbitScreenBoxCenterY[zone]; }
uint32_t GetEnemyScreenBoxCenterX(int zone) const { return x1c8_enemyScreenBoxCenterX[zone]; }
uint32_t GetEnemyScreenBoxCenterY(int zone) const { return x1d0_enemyScreenBoxCenterY[zone]; }
uint32_t GetOrbitZoneIdealX(int zone) const { return x1c8_orbitZoneIdealX[zone]; }
uint32_t GetOrbitZoneIdealY(int zone) const { return x1d0_orbitZoneIdealY[zone]; }
float GetOrbitNearX() const { return x1d8_orbitNearX; }
float GetOrbitNearZ() const { return x1dc_orbitNearZ; }
float GetOrbitZRange() const { return x1ec_orbitZRange; }
@ -201,6 +201,10 @@ struct CTweakPlayer : ITweakPlayer
bool GetFiringCancelsCameraPitch() const { return x22a_26_firingCancelsCameraPitch; }
bool GetAssistedAimingIgnoreHorizontal() const { return x22a_27_assistedAimingIgnoreHorizontal; }
bool GetAssistedAimingIgnoreVertical() const { return x22a_28_assistedAimingIgnoreVertical; }
float GetAimMaxDistance() const { return x234_aimMaxDistance; }
float GetAimThresholdDistance() const { return x24c_aimThresholdDistance; }
float GetAimBoxWidth() const { return x258_aimBoxWidth; }
float GetAimBoxHeight() const { return x25c_aimBoxHeight; }
float GetAimAssistHorizontalAngle() const { return x264_aimAssistHorizontalAngle; }
float GetAimAssistVerticalAngle() const { return x268_aimAssistVerticalAngle; }
float GetPlayerHeight() const { return x26c_playerHeight; }
@ -208,7 +212,7 @@ struct CTweakPlayer : ITweakPlayer
float GetX274() const { return x274_; }
float GetX278() const { return x278_; }
float GetPlayerBallHalfExtent() const { return x27c_playerBallHalfExtent; }
float GetOrbitDistanceThreshold() const { return x2a0_orbitDistanceThreshold; }
float GetOrbitDistanceMax() const { return x2a0_orbitDistanceMax; }
float GetGrappleSwingLength() const { return x2a4_grappleSwingLength; }
float GetGrappleSwingPeriod() const { return x2a8_grappleSwingPeriod; }
float GetGrapplePullSpeedMin() const { return x2ac_grapplePullSpeedMin; }

View File

@ -2396,17 +2396,112 @@ bool CPlayer::ValidateAimTargetId(TUniqueId, CStateManager& mgr) { return false;
bool CPlayer::ValidateObjectForMode(TUniqueId, CStateManager& mgr) const { return false; }
TUniqueId CPlayer::FindAimTargetId(CStateManager& mgr) { return {}; }
static zeus::CAABox BuildNearListBox(bool cropBottom, const zeus::CTransform& xf, float x, float z, float y)
{
zeus::CAABox aabb(-x, cropBottom ? 0.f : -y, -z, x, y, z);
return aabb.getTransformedAABox(xf);
}
TUniqueId CPlayer::FindAimTargetId(CStateManager& mgr)
{
float dist = g_tweakPlayer->GetAimMaxDistance();
if (x9c6_24_extendTargetDistance)
dist *= 5.f;
zeus::CAABox aabb =
BuildNearListBox(true, GetFirstPersonCameraTransform(mgr), g_tweakPlayer->GetAimBoxWidth(),
g_tweakPlayer->GetAimBoxHeight(), dist);
rstl::reserved_vector<TUniqueId, 1024> nearList;
mgr.BuildNearList(nearList, aabb, CMaterialFilter::MakeInclude({EMaterialTypes::Target}), this);
return CheckEnemiesAgainstOrbitZone(nearList, EPlayerZoneInfo::Zero, EPlayerZoneType::Ellipse, mgr);
}
const zeus::CTransform& CPlayer::GetFirstPersonCameraTransform(const CStateManager& mgr) const
{
return mgr.GetCameraManager()->GetFirstPersonCamera()->GetGunFollowTransform();
}
TUniqueId CPlayer::CheckEnemiesAgainstOrbitZone(const std::vector<TUniqueId>&, EPlayerZoneInfo, EPlayerZoneType,
CStateManager& mgr) const
TUniqueId CPlayer::CheckEnemiesAgainstOrbitZone(const std::vector<TUniqueId>& list, EPlayerZoneInfo info,
EPlayerZoneType zone, CStateManager& mgr) const
{
return {};
zeus::CVector3f eyePos = GetEyePosition();
zeus::CVector3f lookDir = x34_transform.basis[1].normalized();
float minEyeToAimMag = 10000.f;
float minPosInBoxMagSq = 10000.f;
TUniqueId bestId = kInvalidUniqueId;
float vpWHalf = g_Viewport.x8_width / 2;
float vpHHalf = g_Viewport.xc_height / 2;
float boxLeft = (g_tweakPlayer->GetOrbitZoneIdealX(int(info)) - vpWHalf) / vpWHalf;
float boxTop = (g_tweakPlayer->GetOrbitZoneIdealY(int(info)) - vpHHalf) / vpHHalf;
CFirstPersonCamera* fpCam = mgr.GetCameraManager()->GetFirstPersonCamera();
for (TUniqueId id : list)
{
if (CActor* act = static_cast<CActor*>(mgr.ObjectById(id)))
{
if (act->GetUniqueId() != GetUniqueId() && ValidateObjectForMode(act->GetUniqueId(), mgr))
{
zeus::CVector3f aimPos = act->GetAimPosition(mgr, 0.f);
zeus::CVector3f screenPos = fpCam->ConvertToScreenSpace(aimPos);
zeus::CVector3f posInBox(vpWHalf + screenPos.x * vpWHalf,
vpHHalf + screenPos.y * vpHHalf,
screenPos.z);
if (WithinOrbitScreenBox(posInBox, info, zone))
{
zeus::CVector3f eyeToAim = aimPos - eyePos;
float eyeToAimMag = eyeToAim.magnitude();
if (eyeToAimMag <= g_tweakPlayer->GetAimMaxDistance())
{
if (minEyeToAimMag - eyeToAimMag > g_tweakPlayer->GetAimThresholdDistance())
{
rstl::reserved_vector<TUniqueId, 1024> nearList;
TUniqueId intersectId = kInvalidUniqueId;
eyeToAim.normalize();
mgr.BuildNearList(nearList, eyePos, eyeToAim, eyeToAimMag,
OccluderFilter, act);
eyeToAim.normalize();
CRayCastResult result =
mgr.RayWorldIntersection(intersectId, eyePos, eyeToAim, eyeToAimMag,
LineOfSightFilter, nearList);
if (result.IsInvalid())
{
bestId = act->GetUniqueId();
float posInBoxLeft = posInBox.x - boxLeft;
float posInBoxTop = posInBox.y - boxTop;
minEyeToAimMag = eyeToAimMag;
minPosInBoxMagSq = posInBoxLeft * posInBoxLeft + posInBoxTop * posInBoxTop;
}
}
else if (std::fabs(eyeToAimMag - minEyeToAimMag) < g_tweakPlayer->GetAimThresholdDistance())
{
float posInBoxLeft = posInBox.x - boxLeft;
float posInBoxTop = posInBox.y - boxTop;
float posInBoxMagSq = posInBoxLeft * posInBoxLeft + posInBoxTop * posInBoxTop;
if (posInBoxMagSq < minPosInBoxMagSq)
{
rstl::reserved_vector<TUniqueId, 1024> nearList;
TUniqueId intersectId = kInvalidUniqueId;
eyeToAim.normalize();
mgr.BuildNearList(nearList, eyePos, eyeToAim, eyeToAimMag,
OccluderFilter, act);
eyeToAim.normalize();
CRayCastResult result =
mgr.RayWorldIntersection(intersectId, eyePos, eyeToAim, eyeToAimMag,
LineOfSightFilter, nearList);
if (result.IsInvalid())
{
bestId = act->GetUniqueId();
minEyeToAimMag = eyeToAimMag;
minPosInBoxMagSq = posInBoxMagSq;
}
}
}
}
}
}
}
}
return bestId;
}
TUniqueId CPlayer::FindOrbitTargetId(CStateManager& mgr)
@ -2414,12 +2509,6 @@ TUniqueId CPlayer::FindOrbitTargetId(CStateManager& mgr)
return FindBestOrbitableObject(x354_onScreenOrbitObjects, x330_orbitZone, mgr);
}
static zeus::CAABox BuildNearListBox(bool cropBottom, const zeus::CTransform& xf, float x, float z, float y)
{
zeus::CAABox aabb(-x, cropBottom ? 0.f : -y, -z, x, y, z);
return aabb.getTransformedAABox(xf);
}
void CPlayer::UpdateOrbitableObjects(CStateManager& mgr)
{
x354_onScreenOrbitObjects.clear();
@ -2430,7 +2519,7 @@ void CPlayer::UpdateOrbitableObjects(CStateManager& mgr)
return;
float dist = GetOrbitMaxTargetDistance(mgr);
if (x9c6_24_)
if (x9c6_24_extendTargetDistance)
dist *= 5.f;
zeus::CAABox nearAABB =
BuildNearListBox(true, GetFirstPersonCameraTransform(mgr),
@ -2454,11 +2543,11 @@ TUniqueId CPlayer::FindBestOrbitableObject(const std::vector<TUniqueId>& ids,
float minEyeToOrbitMag = 10000.f;
float minPosInBoxMagSq = 10000.f;
TUniqueId bestId = kInvalidUniqueId;
int vpWidthHalf = g_Viewport.x8_width / 2;
int vpHeightHalf = g_Viewport.xc_height / 2;
float boxLeft = (g_tweakPlayer->GetEnemyScreenBoxCenterX(int(info)) *
float vpWidthHalf = g_Viewport.x8_width / 2;
float vpHeightHalf = g_Viewport.xc_height / 2;
float boxLeft = (g_tweakPlayer->GetOrbitZoneIdealX(int(info)) *
g_Viewport.x8_width / 640 - vpWidthHalf) / vpWidthHalf;
float boxTop = (g_tweakPlayer->GetEnemyScreenBoxCenterY(int(info)) *
float boxTop = (g_tweakPlayer->GetOrbitZoneIdealY(int(info)) *
g_Viewport.xc_height / 448 - vpHeightHalf) / vpHeightHalf;
CFirstPersonCamera* fpCam = mgr.GetCameraManager()->GetFirstPersonCamera();
@ -2481,7 +2570,7 @@ TUniqueId CPlayer::FindBestOrbitableObject(const std::vector<TUniqueId>& ids,
{
if (mgr.GetPlayerState()->HasPowerUp(CPlayerState::EItemType::GrappleBeam) &&
eyeToOrbitMag < minEyeToOrbitMag &&
eyeToOrbitMag < g_tweakPlayer->GetOrbitDistanceThreshold())
eyeToOrbitMag < g_tweakPlayer->GetOrbitDistanceMax())
{
rstl::reserved_vector<TUniqueId, 1024> nearList;
TUniqueId intersectId = kInvalidUniqueId;
@ -2518,7 +2607,7 @@ TUniqueId CPlayer::FindBestOrbitableObject(const std::vector<TUniqueId>& ids,
}
}
if (minEyeToOrbitMag - eyeToOrbitMag > g_tweakPlayer->GetOrbitDistanceCompareSignificance() &&
if (minEyeToOrbitMag - eyeToOrbitMag > g_tweakPlayer->GetOrbitDistanceThreshold() &&
mgr.GetPlayerState()->GetCurrentVisor() != CPlayerState::EPlayerVisor::Scan)
{
rstl::reserved_vector<TUniqueId, 1024> nearList;
@ -2569,7 +2658,7 @@ TUniqueId CPlayer::FindBestOrbitableObject(const std::vector<TUniqueId>& ids,
}
if (std::fabs(eyeToOrbitMag - minEyeToOrbitMag) <
g_tweakPlayer->GetOrbitDistanceCompareSignificance() ||
g_tweakPlayer->GetOrbitDistanceThreshold() ||
mgr.GetPlayerState()->GetCurrentVisor() == CPlayerState::EPlayerVisor::Scan)
{
float posInBoxLeft = orbitPosScreen.x - boxLeft;

View File

@ -367,7 +367,7 @@ private:
bool x9c5_29_hitWall : 1;
bool x9c5_30_ : 1;
bool x9c5_31_ : 1;
bool x9c6_24_ : 1;
bool x9c6_24_extendTargetDistance : 1;
bool x9c6_25_ : 1;
bool x9c6_26_ : 1;
bool x9c6_27_aimingAtProjectile : 1;