mirror of https://github.com/AxioDL/metaforce.git
Additional CPlayer work
This commit is contained in:
parent
dea26b1b32
commit
4528a6b60a
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$" />
|
<component name="CMakeWorkspace" IGNORE_OUTSIDE_FILES="true" PROJECT_DIR="$PROJECT_DIR$" />
|
||||||
</project>
|
</project>
|
|
@ -0,0 +1,3 @@
|
||||||
|
message(STATUS "32-bit asset name map not found; downloading to '${CMAKE_CURRENT_BINARY_DIR}/AssetNameMap32.bin'")
|
||||||
|
file(DOWNLOAD "https://www.dropbox.com/s/8rzkxstfap6hgi3/AssetNameMap32.dat"
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/AssetNameMap32.bin SHOW_PROGRESS)
|
|
@ -0,0 +1,3 @@
|
||||||
|
message(STATUS "64-bit asset name map not found; downloading to '${CMAKE_CURRENT_BINARY_DIR}/AssetNameMap64.bin'")
|
||||||
|
file(DOWNLOAD "https://www.dropbox.com/s/o1pp3ctu5dyhfwx/AssetNameMap64.dat"
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/AssetNameMap64.bin SHOW_PROGRESS)
|
|
@ -41,18 +41,13 @@ include(DNAMP3/CMakeLists.txt)
|
||||||
# Embed master shader script
|
# Embed master shader script
|
||||||
bintoc(RetroMasterShader.c Blender/RetroMasterShader.py RETRO_MASTER_SHADER)
|
bintoc(RetroMasterShader.c Blender/RetroMasterShader.py RETRO_MASTER_SHADER)
|
||||||
|
|
||||||
if(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/AssetNameMap32.bin")
|
# Download asset name databases
|
||||||
message(STATUS "Downloading 32bit ID map to '${CMAKE_CURRENT_BINARY_DIR}/AssetNameMap32.bin'")
|
add_custom_command(OUTPUT AssetNameMap32.bin COMMAND ${CMAKE_COMMAND} ARGS -P
|
||||||
file(DOWNLOAD "https://www.dropbox.com/s/8rzkxstfap6hgi3/AssetNameMap32.dat"
|
${CMAKE_CURRENT_SOURCE_DIR}/AssetMap32Download.cmake)
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/AssetNameMap32.bin SHOW_PROGRESS)
|
|
||||||
endif()
|
|
||||||
bintoc(AssetNameMap32.c ${CMAKE_CURRENT_BINARY_DIR}/AssetNameMap32.bin ASSET_NAME_MP32)
|
bintoc(AssetNameMap32.c ${CMAKE_CURRENT_BINARY_DIR}/AssetNameMap32.bin ASSET_NAME_MP32)
|
||||||
|
|
||||||
if(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/AssetNameMap64.bin")
|
add_custom_command(OUTPUT AssetNameMap64.bin COMMAND ${CMAKE_COMMAND} ARGS -P
|
||||||
message(STATUS "Downloading 64bit ID map to '${CMAKE_CURRENT_BINARY_DIR}/DNAMP3/AssetNameMap64.bin'")
|
${CMAKE_CURRENT_SOURCE_DIR}/AssetMap64Download.cmake)
|
||||||
file(DOWNLOAD "https://www.dropbox.com/s/o1pp3ctu5dyhfwx/AssetNameMap64.dat"
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/AssetNameMap64.bin SHOW_PROGRESS)
|
|
||||||
endif()
|
|
||||||
bintoc(AssetNameMap64.c ${CMAKE_CURRENT_BINARY_DIR}/AssetNameMap64.bin ASSET_NAME_MP64)
|
bintoc(AssetNameMap64.c ${CMAKE_CURRENT_BINARY_DIR}/AssetNameMap64.bin ASSET_NAME_MP64)
|
||||||
|
|
||||||
# Each game's DataSpec implementation
|
# Each game's DataSpec implementation
|
||||||
|
|
|
@ -14,8 +14,8 @@ struct ITweakGunRes : ITweak
|
||||||
{
|
{
|
||||||
Power,
|
Power,
|
||||||
Ice,
|
Ice,
|
||||||
Plasma,
|
|
||||||
Wave,
|
Wave,
|
||||||
|
Plasma,
|
||||||
Phazon
|
Phazon
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -49,25 +49,32 @@ struct ITweakGunRes : ITweak
|
||||||
|
|
||||||
ResId GetBeamModel(EBeamId beam) const
|
ResId GetBeamModel(EBeamId beam) const
|
||||||
{
|
{
|
||||||
int b = int(beam);
|
auto b = int(beam);
|
||||||
if (b < 0 || b > 4)
|
if (b < 0 || b > 4)
|
||||||
b = 0;
|
b = 0;
|
||||||
switch (EBeamId(b))
|
switch (EBeamId(b))
|
||||||
{
|
{
|
||||||
case EBeamId::Power:
|
case EBeamId::Power:
|
||||||
default:
|
|
||||||
return x10_powerBeam;
|
return x10_powerBeam;
|
||||||
case EBeamId::Ice:
|
case EBeamId::Ice:
|
||||||
return x14_iceBeam;
|
return x14_iceBeam;
|
||||||
case EBeamId::Plasma:
|
|
||||||
return x1c_plasmaBeam;
|
|
||||||
case EBeamId::Wave:
|
case EBeamId::Wave:
|
||||||
return x18_waveBeam;
|
return x18_waveBeam;
|
||||||
|
case EBeamId::Plasma:
|
||||||
|
return x1c_plasmaBeam;
|
||||||
case EBeamId::Phazon:
|
case EBeamId::Phazon:
|
||||||
return x20_phazonBeam;
|
return x20_phazonBeam;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const ResId* GetWeaponPair(EBeamId beam) const
|
||||||
|
{
|
||||||
|
auto b = int(beam);
|
||||||
|
if (b < 0 || b > 4)
|
||||||
|
return x34_weapons[0];
|
||||||
|
return x34_weapons[b];
|
||||||
|
}
|
||||||
|
|
||||||
void ResolveResources(const urde::IFactory& factory)
|
void ResolveResources(const urde::IFactory& factory)
|
||||||
{
|
{
|
||||||
x4_gunMotion = factory.GetResourceIdByName(GetGunMotion().c_str())->id;
|
x4_gunMotion = factory.GetResourceIdByName(GetGunMotion().c_str())->id;
|
||||||
|
|
|
@ -13,7 +13,8 @@ struct ITweakPlayer : ITweak
|
||||||
virtual float GetX54() const=0;
|
virtual float GetX54() const=0;
|
||||||
virtual float GetX58() const=0;
|
virtual float GetX58() const=0;
|
||||||
virtual float GetX5C() const=0;
|
virtual float GetX5C() const=0;
|
||||||
virtual float GetHardLandingVelocityThreshold() const=0;
|
virtual float GetNormalGravAccel() const=0;
|
||||||
|
virtual float GetFluidGravAccel() const=0;
|
||||||
virtual float GetHudLagAmount() const=0;
|
virtual float GetHudLagAmount() const=0;
|
||||||
virtual float GetOrbitNormalDistance() const=0;
|
virtual float GetOrbitNormalDistance() const=0;
|
||||||
virtual uint32_t GetOrbitScreenBoxHalfExtentX(int zone) const=0;
|
virtual uint32_t GetOrbitScreenBoxHalfExtentX(int zone) const=0;
|
||||||
|
@ -28,6 +29,10 @@ struct ITweakPlayer : ITweak
|
||||||
virtual float GetScanningRange() const=0; // x218
|
virtual float GetScanningRange() const=0; // x218
|
||||||
virtual bool GetScanFreezesGame() const=0; // x21c_25
|
virtual bool GetScanFreezesGame() const=0; // x21c_25
|
||||||
virtual bool GetFiringCancelsCameraPitch() const=0;
|
virtual bool GetFiringCancelsCameraPitch() const=0;
|
||||||
|
virtual bool GetAssistedAimingIgnoreHorizontal() const=0;
|
||||||
|
virtual bool GetAssistedAimingIgnoreVertical() const=0;
|
||||||
|
virtual float GetAimAssistHorizontalAngle() const=0;
|
||||||
|
virtual float GetAimAssistVerticalAngle() const=0;
|
||||||
virtual float GetScanningFrameSenseRange() const=0;
|
virtual float GetScanningFrameSenseRange() const=0;
|
||||||
virtual bool GetGunButtonTogglesHolster() const=0;
|
virtual bool GetGunButtonTogglesHolster() const=0;
|
||||||
virtual bool GetGunNotFiringHolstersGun() const=0;
|
virtual bool GetGunNotFiringHolstersGun() const=0;
|
||||||
|
@ -37,10 +42,18 @@ struct ITweakPlayer : ITweak
|
||||||
virtual float GetX274() const=0; // x274
|
virtual float GetX274() const=0; // x274
|
||||||
virtual float GetX278() const=0; // x278
|
virtual float GetX278() const=0; // x278
|
||||||
virtual float GetPlayerBallHalfExtent() const=0; // x27c
|
virtual float GetPlayerBallHalfExtent() const=0; // x27c
|
||||||
|
virtual float GetGrappleSwingLength() const=0;
|
||||||
virtual float GetGrappleSwingPeriod() const=0;
|
virtual float GetGrappleSwingPeriod() const=0;
|
||||||
|
virtual float GetGrapplePullSpeedMin() const=0;
|
||||||
|
virtual float GetMaxGrappleLockedTurnAlignDistance() const=0;
|
||||||
|
virtual float GetGrapplePullSpeedProportion() const=0;
|
||||||
|
virtual float GetGrapplePullSpeedMax() const=0;
|
||||||
|
virtual float GetGrappleLookCenterSpeed() const=0;
|
||||||
|
virtual float GetMaxGrappleTurnSpeed() const=0;
|
||||||
virtual float GetGrappleJumpForce() const=0;
|
virtual float GetGrappleJumpForce() const=0;
|
||||||
virtual float GetGrappleReleaseTime() const=0;
|
virtual float GetGrappleReleaseTime() const=0;
|
||||||
virtual uint32_t GetGrappleJumpMode() const=0;
|
virtual uint32_t GetGrappleJumpMode() const=0;
|
||||||
|
virtual bool InvertGrappleTurn() const=0;
|
||||||
virtual float GetX124() const=0; // x134
|
virtual float GetX124() const=0; // x134
|
||||||
virtual float GetX184() const=0; // x184
|
virtual float GetX184() const=0; // x184
|
||||||
virtual float GetX1fc() const=0;
|
virtual float GetX1fc() const=0;
|
||||||
|
|
|
@ -103,10 +103,10 @@ void CTweakPlayer::read(athena::io::IStreamReader& __dna_reader)
|
||||||
xa4_[6] = __dna_reader.readFloatBig();
|
xa4_[6] = __dna_reader.readFloatBig();
|
||||||
/* xa4_[7] */
|
/* xa4_[7] */
|
||||||
xa4_[7] = __dna_reader.readFloatBig();
|
xa4_[7] = __dna_reader.readFloatBig();
|
||||||
/* xc4_hardLandingVelocityThreshold */
|
/* xc4_normalGravAccel */
|
||||||
xc4_hardLandingVelocityThreshold = __dna_reader.readFloatBig();
|
xc4_normalGravAccel = __dna_reader.readFloatBig();
|
||||||
/* xc8_ */
|
/* xc8_fluidGravAccel */
|
||||||
xc8_ = __dna_reader.readFloatBig();
|
xc8_fluidGravAccel = __dna_reader.readFloatBig();
|
||||||
/* xcc_ */
|
/* xcc_ */
|
||||||
xcc_ = __dna_reader.readFloatBig();
|
xcc_ = __dna_reader.readFloatBig();
|
||||||
/* xd0_ */
|
/* xd0_ */
|
||||||
|
@ -215,10 +215,10 @@ void CTweakPlayer::read(athena::io::IStreamReader& __dna_reader)
|
||||||
x22a_25_ = __dna_reader.readBool();
|
x22a_25_ = __dna_reader.readBool();
|
||||||
/* x22a_26_ */
|
/* x22a_26_ */
|
||||||
x22a_26_firingCancelsCameraPitch = __dna_reader.readBool();
|
x22a_26_firingCancelsCameraPitch = __dna_reader.readBool();
|
||||||
/* x22a_27_ */
|
/* x22a_27_assistedAimingIgnoreHorizontal */
|
||||||
x22a_27_ = __dna_reader.readBool();
|
x22a_27_assistedAimingIgnoreHorizontal = __dna_reader.readBool();
|
||||||
/* x22a_28_ */
|
/* x22a_28_assistedAimingIgnoreVertical */
|
||||||
x22a_28_ = __dna_reader.readBool();
|
x22a_28_assistedAimingIgnoreVertical = __dna_reader.readBool();
|
||||||
/* x22c_ */
|
/* x22c_ */
|
||||||
x22c_ = __dna_reader.readFloatBig();
|
x22c_ = __dna_reader.readFloatBig();
|
||||||
/* x230_ */
|
/* x230_ */
|
||||||
|
@ -247,10 +247,10 @@ void CTweakPlayer::read(athena::io::IStreamReader& __dna_reader)
|
||||||
x25c_ = __dna_reader.readFloatBig();
|
x25c_ = __dna_reader.readFloatBig();
|
||||||
/* x260_ */
|
/* x260_ */
|
||||||
x260_ = __dna_reader.readFloatBig();
|
x260_ = __dna_reader.readFloatBig();
|
||||||
/* x264_ */
|
/* x264_aimAssistHorizontalAngle */
|
||||||
x264_ = __dna_reader.readFloatBig();
|
x264_aimAssistHorizontalAngle = __dna_reader.readFloatBig();
|
||||||
/* x268_ */
|
/* x268_aimAssistVerticalAngle */
|
||||||
x268_ = __dna_reader.readFloatBig();
|
x268_aimAssistVerticalAngle = __dna_reader.readFloatBig();
|
||||||
/* x158_[0] */
|
/* x158_[0] */
|
||||||
x158_[0] = __dna_reader.readFloatBig();
|
x158_[0] = __dna_reader.readFloatBig();
|
||||||
/* x164_[0] */
|
/* x164_[0] */
|
||||||
|
@ -363,24 +363,24 @@ void CTweakPlayer::read(athena::io::IStreamReader& __dna_reader)
|
||||||
x224_scanningFrameSenseRange = __dna_reader.readFloatBig();
|
x224_scanningFrameSenseRange = __dna_reader.readFloatBig();
|
||||||
/* x2a0_ */
|
/* x2a0_ */
|
||||||
x2a0_ = __dna_reader.readFloatBig();
|
x2a0_ = __dna_reader.readFloatBig();
|
||||||
/* x2a4_ */
|
/* x2a4_grappleSwingLength */
|
||||||
x2a4_ = __dna_reader.readFloatBig();
|
x2a4_grappleSwingLength = __dna_reader.readFloatBig();
|
||||||
/* x2a8_grappleSwingPeriod */
|
/* x2a8_grappleSwingPeriod */
|
||||||
x2a8_grappleSwingPeriod = __dna_reader.readFloatBig();
|
x2a8_grappleSwingPeriod = __dna_reader.readFloatBig();
|
||||||
/* x2ac_ */
|
/* x2ac_grapplePullSpeedMin */
|
||||||
x2ac_ = __dna_reader.readFloatBig();
|
x2ac_grapplePullSpeedMin = __dna_reader.readFloatBig();
|
||||||
/* x2b0_ */
|
/* x2b0_ */
|
||||||
x2b0_ = __dna_reader.readFloatBig();
|
x2b0_ = __dna_reader.readFloatBig();
|
||||||
/* x2b4_ */
|
/* x2b4_maxGrappleLockedTurnAlignDistance */
|
||||||
x2b4_ = __dna_reader.readFloatBig();
|
x2b4_maxGrappleLockedTurnAlignDistance = __dna_reader.readFloatBig();
|
||||||
/* x2b8_ */
|
/* x2b8_grapplePullSpeedProportion */
|
||||||
x2b8_ = __dna_reader.readFloatBig();
|
x2b8_grapplePullSpeedProportion = __dna_reader.readFloatBig();
|
||||||
/* x2bc_ */
|
/* x2bc_grapplePullSpeedMax */
|
||||||
x2bc_ = __dna_reader.readFloatBig();
|
x2bc_grapplePullSpeedMax = __dna_reader.readFloatBig();
|
||||||
/* x2c0_ */
|
/* x2c0_grappleLookCenterSpeed */
|
||||||
x2c0_ = __dna_reader.readFloatBig();
|
x2c0_grappleLookCenterSpeed = __dna_reader.readFloatBig();
|
||||||
/* x2c4_ */
|
/* x2c4_maxGrappleTurnSpeed */
|
||||||
x2c4_ = __dna_reader.readFloatBig();
|
x2c4_maxGrappleTurnSpeed = __dna_reader.readFloatBig();
|
||||||
/* x2c8_grappleJumpForce */
|
/* x2c8_grappleJumpForce */
|
||||||
x2c8_grappleJumpForce = __dna_reader.readFloatBig();
|
x2c8_grappleJumpForce = __dna_reader.readFloatBig();
|
||||||
/* x2cc_grappleReleaseTime */
|
/* x2cc_grappleReleaseTime */
|
||||||
|
@ -390,7 +390,7 @@ void CTweakPlayer::read(athena::io::IStreamReader& __dna_reader)
|
||||||
/* x2d4_ */
|
/* x2d4_ */
|
||||||
x2d4_ = __dna_reader.readBool();
|
x2d4_ = __dna_reader.readBool();
|
||||||
/* x2d5_ */
|
/* x2d5_ */
|
||||||
x2d5_ = __dna_reader.readBool();
|
x2d5_invertGrappleTurn = __dna_reader.readBool();
|
||||||
/* x2d8_ */
|
/* x2d8_ */
|
||||||
x2d8_ = __dna_reader.readFloatBig();
|
x2d8_ = __dna_reader.readFloatBig();
|
||||||
/* x2dc_ */
|
/* x2dc_ */
|
||||||
|
@ -543,10 +543,10 @@ void CTweakPlayer::write(athena::io::IStreamWriter& __dna_writer) const
|
||||||
__dna_writer.writeFloatBig(xa4_[6]);
|
__dna_writer.writeFloatBig(xa4_[6]);
|
||||||
/* xa4_[7] */
|
/* xa4_[7] */
|
||||||
__dna_writer.writeFloatBig(xa4_[7]);
|
__dna_writer.writeFloatBig(xa4_[7]);
|
||||||
/* xc4_hardLandingVelocityThreshold */
|
/* xc4_normalGravAccel */
|
||||||
__dna_writer.writeFloatBig(xc4_hardLandingVelocityThreshold);
|
__dna_writer.writeFloatBig(xc4_normalGravAccel);
|
||||||
/* xc8_ */
|
/* xc8_fluidGravAccel */
|
||||||
__dna_writer.writeFloatBig(xc8_);
|
__dna_writer.writeFloatBig(xc8_fluidGravAccel);
|
||||||
/* xcc_ */
|
/* xcc_ */
|
||||||
__dna_writer.writeFloatBig(xcc_);
|
__dna_writer.writeFloatBig(xcc_);
|
||||||
/* xd0_ */
|
/* xd0_ */
|
||||||
|
@ -655,10 +655,10 @@ void CTweakPlayer::write(athena::io::IStreamWriter& __dna_writer) const
|
||||||
__dna_writer.writeBool(x22a_25_);
|
__dna_writer.writeBool(x22a_25_);
|
||||||
/* x22a_26_ */
|
/* x22a_26_ */
|
||||||
__dna_writer.writeBool(x22a_26_firingCancelsCameraPitch);
|
__dna_writer.writeBool(x22a_26_firingCancelsCameraPitch);
|
||||||
/* x22a_27_ */
|
/* x22a_27_assistedAimingIgnoreHorizontal */
|
||||||
__dna_writer.writeBool(x22a_27_);
|
__dna_writer.writeBool(x22a_27_assistedAimingIgnoreHorizontal);
|
||||||
/* x22a_28_ */
|
/* x22a_28_assistedAimingIgnoreVertical */
|
||||||
__dna_writer.writeBool(x22a_28_);
|
__dna_writer.writeBool(x22a_28_assistedAimingIgnoreVertical);
|
||||||
/* x22c_ */
|
/* x22c_ */
|
||||||
__dna_writer.writeFloatBig(x22c_);
|
__dna_writer.writeFloatBig(x22c_);
|
||||||
/* x230_ */
|
/* x230_ */
|
||||||
|
@ -687,10 +687,10 @@ void CTweakPlayer::write(athena::io::IStreamWriter& __dna_writer) const
|
||||||
__dna_writer.writeFloatBig(x25c_);
|
__dna_writer.writeFloatBig(x25c_);
|
||||||
/* x260_ */
|
/* x260_ */
|
||||||
__dna_writer.writeFloatBig(x260_);
|
__dna_writer.writeFloatBig(x260_);
|
||||||
/* x264_ */
|
/* x264_aimAssistHorizontalAngle */
|
||||||
__dna_writer.writeFloatBig(x264_);
|
__dna_writer.writeFloatBig(x264_aimAssistHorizontalAngle);
|
||||||
/* x268_ */
|
/* x268_aimAssistVerticalAngle */
|
||||||
__dna_writer.writeFloatBig(x268_);
|
__dna_writer.writeFloatBig(x268_aimAssistVerticalAngle);
|
||||||
/* x158_[0] */
|
/* x158_[0] */
|
||||||
__dna_writer.writeFloatBig(x158_[0]);
|
__dna_writer.writeFloatBig(x158_[0]);
|
||||||
/* x164_[0] */
|
/* x164_[0] */
|
||||||
|
@ -803,24 +803,24 @@ void CTweakPlayer::write(athena::io::IStreamWriter& __dna_writer) const
|
||||||
__dna_writer.writeFloatBig(x224_scanningFrameSenseRange);
|
__dna_writer.writeFloatBig(x224_scanningFrameSenseRange);
|
||||||
/* x2a0_ */
|
/* x2a0_ */
|
||||||
__dna_writer.writeFloatBig(x2a0_);
|
__dna_writer.writeFloatBig(x2a0_);
|
||||||
/* x2a4_ */
|
/* x2a4_grappleSwingLength */
|
||||||
__dna_writer.writeFloatBig(x2a4_);
|
__dna_writer.writeFloatBig(x2a4_grappleSwingLength);
|
||||||
/* x2a8_grappleSwingPeriod */
|
/* x2a8_grappleSwingPeriod */
|
||||||
__dna_writer.writeFloatBig(x2a8_grappleSwingPeriod);
|
__dna_writer.writeFloatBig(x2a8_grappleSwingPeriod);
|
||||||
/* x2ac_ */
|
/* x2ac_grapplePullSpeedMin */
|
||||||
__dna_writer.writeFloatBig(x2ac_);
|
__dna_writer.writeFloatBig(x2ac_grapplePullSpeedMin);
|
||||||
/* x2b0_ */
|
/* x2b0_ */
|
||||||
__dna_writer.writeFloatBig(x2b0_);
|
__dna_writer.writeFloatBig(x2b0_);
|
||||||
/* x2b4_ */
|
/* x2b4_maxGrappleLockedTurnAlignDistance */
|
||||||
__dna_writer.writeFloatBig(x2b4_);
|
__dna_writer.writeFloatBig(x2b4_maxGrappleLockedTurnAlignDistance);
|
||||||
/* x2b8_ */
|
/* x2b8_grapplePullSpeedProportion */
|
||||||
__dna_writer.writeFloatBig(x2b8_);
|
__dna_writer.writeFloatBig(x2b8_grapplePullSpeedProportion);
|
||||||
/* x2bc_ */
|
/* x2bc_grapplePullSpeedMax */
|
||||||
__dna_writer.writeFloatBig(x2bc_);
|
__dna_writer.writeFloatBig(x2bc_grapplePullSpeedMax);
|
||||||
/* x2c0_ */
|
/* x2c0_grappleLookCenterSpeed */
|
||||||
__dna_writer.writeFloatBig(x2c0_);
|
__dna_writer.writeFloatBig(x2c0_grappleLookCenterSpeed);
|
||||||
/* x2c4_ */
|
/* x2c4_maxGrappleTurnSpeed */
|
||||||
__dna_writer.writeFloatBig(x2c4_);
|
__dna_writer.writeFloatBig(x2c4_maxGrappleTurnSpeed);
|
||||||
/* x2c8_grappleJumpForce */
|
/* x2c8_grappleJumpForce */
|
||||||
__dna_writer.writeFloatBig(x2c8_grappleJumpForce);
|
__dna_writer.writeFloatBig(x2c8_grappleJumpForce);
|
||||||
/* x2cc_grappleReleaseTime */
|
/* x2cc_grappleReleaseTime */
|
||||||
|
@ -830,7 +830,7 @@ void CTweakPlayer::write(athena::io::IStreamWriter& __dna_writer) const
|
||||||
/* x2d4_ */
|
/* x2d4_ */
|
||||||
__dna_writer.writeBool(x2d4_);
|
__dna_writer.writeBool(x2d4_);
|
||||||
/* x2d5_ */
|
/* x2d5_ */
|
||||||
__dna_writer.writeBool(x2d5_);
|
__dna_writer.writeBool(x2d5_invertGrappleTurn);
|
||||||
/* x2d8_ */
|
/* x2d8_ */
|
||||||
__dna_writer.writeFloatBig(x2d8_);
|
__dna_writer.writeFloatBig(x2d8_);
|
||||||
/* x2dc_ */
|
/* x2dc_ */
|
||||||
|
@ -1013,10 +1013,10 @@ void CTweakPlayer::read(athena::io::YAMLDocReader& __dna_docin)
|
||||||
/* xa4_[7] */
|
/* xa4_[7] */
|
||||||
xa4_[7] = __dna_docin.readFloat("xa4_");
|
xa4_[7] = __dna_docin.readFloat("xa4_");
|
||||||
}
|
}
|
||||||
/* xc4_hardLandingVelocityThreshold */
|
/* xc4_normalGravAccel */
|
||||||
xc4_hardLandingVelocityThreshold = __dna_docin.readFloat("xc4_hardLandingVelocityThreshold");
|
xc4_normalGravAccel = __dna_docin.readFloat("xc4_normalGravAccel");
|
||||||
/* xc8_ */
|
/* xc8_fluidGravAccel */
|
||||||
xc8_ = __dna_docin.readFloat("xc8_");
|
xc8_fluidGravAccel = __dna_docin.readFloat("xc8_fluidGravAccel");
|
||||||
/* xcc_ */
|
/* xcc_ */
|
||||||
xcc_ = __dna_docin.readFloat("xcc_");
|
xcc_ = __dna_docin.readFloat("xcc_");
|
||||||
/* xd0_ */
|
/* xd0_ */
|
||||||
|
@ -1125,10 +1125,10 @@ void CTweakPlayer::read(athena::io::YAMLDocReader& __dna_docin)
|
||||||
x22a_25_ = __dna_docin.readBool("x22a_25_");
|
x22a_25_ = __dna_docin.readBool("x22a_25_");
|
||||||
/* x22a_26_firingCancelsCameraPitch */
|
/* x22a_26_firingCancelsCameraPitch */
|
||||||
x22a_26_firingCancelsCameraPitch = __dna_docin.readBool("x22a_26_firingCancelsCameraPitch");
|
x22a_26_firingCancelsCameraPitch = __dna_docin.readBool("x22a_26_firingCancelsCameraPitch");
|
||||||
/* x22a_27_ */
|
/* x22a_27_assistedAimingIgnoreHorizontal */
|
||||||
x22a_27_ = __dna_docin.readBool("x22a_27_");
|
x22a_27_assistedAimingIgnoreHorizontal = __dna_docin.readBool("x22a_27_assistedAimingIgnoreHorizontal");
|
||||||
/* x22a_28_ */
|
/* x22a_28_assistedAimingIgnoreVertical */
|
||||||
x22a_28_ = __dna_docin.readBool("x22a_28_");
|
x22a_28_assistedAimingIgnoreVertical = __dna_docin.readBool("x22a_28_assistedAimingIgnoreVertical");
|
||||||
/* x22c_ */
|
/* x22c_ */
|
||||||
x22c_ = __dna_docin.readFloat("x22c_");
|
x22c_ = __dna_docin.readFloat("x22c_");
|
||||||
/* x230_ */
|
/* x230_ */
|
||||||
|
@ -1157,10 +1157,10 @@ void CTweakPlayer::read(athena::io::YAMLDocReader& __dna_docin)
|
||||||
x25c_ = __dna_docin.readFloat("x25c_");
|
x25c_ = __dna_docin.readFloat("x25c_");
|
||||||
/* x260_ */
|
/* x260_ */
|
||||||
x260_ = __dna_docin.readFloat("x260_");
|
x260_ = __dna_docin.readFloat("x260_");
|
||||||
/* x264_ */
|
/* x264_aimAssistHorizontalAngle */
|
||||||
x264_ = __dna_docin.readFloat("x264_");
|
x264_aimAssistHorizontalAngle = __dna_docin.readFloat("x264_aimAssistHorizontalAngle");
|
||||||
/* x268_ */
|
/* x268_aimAssistVerticalAngle */
|
||||||
x268_ = __dna_docin.readFloat("x268_");
|
x268_aimAssistVerticalAngle = __dna_docin.readFloat("x268_aimAssistVerticalAngle");
|
||||||
/* x158_ */
|
/* x158_ */
|
||||||
size_t __x158_Count;
|
size_t __x158_Count;
|
||||||
if (auto v = __dna_docin.enterSubVector("x158_", __x158_Count))
|
if (auto v = __dna_docin.enterSubVector("x158_", __x158_Count))
|
||||||
|
@ -1318,24 +1318,24 @@ void CTweakPlayer::read(athena::io::YAMLDocReader& __dna_docin)
|
||||||
x224_scanningFrameSenseRange = __dna_docin.readFloat("x224_scanningFrameSenseRange");
|
x224_scanningFrameSenseRange = __dna_docin.readFloat("x224_scanningFrameSenseRange");
|
||||||
/* x2a0_ */
|
/* x2a0_ */
|
||||||
x2a0_ = __dna_docin.readFloat("x2a0_");
|
x2a0_ = __dna_docin.readFloat("x2a0_");
|
||||||
/* x2a4_ */
|
/* x2a4_grappleSwingLength */
|
||||||
x2a4_ = __dna_docin.readFloat("x2a4_");
|
x2a4_grappleSwingLength = __dna_docin.readFloat("x2a4_grappleSwingLength");
|
||||||
/* x2a8_grappleSwingPeriod */
|
/* x2a8_grappleSwingPeriod */
|
||||||
x2a8_grappleSwingPeriod = __dna_docin.readFloat("x2a8_grappleSwingPeriod");
|
x2a8_grappleSwingPeriod = __dna_docin.readFloat("x2a8_grappleSwingPeriod");
|
||||||
/* x2ac_ */
|
/* x2ac_grapplePullSpeedMin */
|
||||||
x2ac_ = __dna_docin.readFloat("x2ac_");
|
x2ac_grapplePullSpeedMin = __dna_docin.readFloat("x2ac_grapplePullSpeedMin");
|
||||||
/* x2b0_ */
|
/* x2b0_ */
|
||||||
x2b0_ = __dna_docin.readFloat("x2b0_");
|
x2b0_ = __dna_docin.readFloat("x2b0_");
|
||||||
/* x2b4_ */
|
/* x2b4_maxGrappleLockedTurnAlignDistance */
|
||||||
x2b4_ = __dna_docin.readFloat("x2b4_");
|
x2b4_maxGrappleLockedTurnAlignDistance = __dna_docin.readFloat("x2b4_maxGrappleLockedTurnAlignDistance");
|
||||||
/* x2b8_ */
|
/* x2b8_grapplePullSpeedProportion */
|
||||||
x2b8_ = __dna_docin.readFloat("x2b8_");
|
x2b8_grapplePullSpeedProportion = __dna_docin.readFloat("x2b8_grapplePullSpeedProportion");
|
||||||
/* x2bc_ */
|
/* x2bc_grapplePullSpeedMax */
|
||||||
x2bc_ = __dna_docin.readFloat("x2bc_");
|
x2bc_grapplePullSpeedMax = __dna_docin.readFloat("x2bc_grapplePullSpeedMax");
|
||||||
/* x2c0_ */
|
/* x2c0_grappleLookCenterSpeed */
|
||||||
x2c0_ = __dna_docin.readFloat("x2c0_");
|
x2c0_grappleLookCenterSpeed = __dna_docin.readFloat("x2c0_grappleLookCenterSpeed");
|
||||||
/* x2c4_ */
|
/* x2c4_maxGrappleTurnSpeed */
|
||||||
x2c4_ = __dna_docin.readFloat("x2c4_");
|
x2c4_maxGrappleTurnSpeed = __dna_docin.readFloat("x2c4_maxGrappleTurnSpeed");
|
||||||
/* x2c8_grappleJumpForce */
|
/* x2c8_grappleJumpForce */
|
||||||
x2c8_grappleJumpForce = __dna_docin.readFloat("x2c8_grappleJumpForce");
|
x2c8_grappleJumpForce = __dna_docin.readFloat("x2c8_grappleJumpForce");
|
||||||
/* x2cc_grappleReleaseTime */
|
/* x2cc_grappleReleaseTime */
|
||||||
|
@ -1345,7 +1345,7 @@ void CTweakPlayer::read(athena::io::YAMLDocReader& __dna_docin)
|
||||||
/* x2d4_ */
|
/* x2d4_ */
|
||||||
x2d4_ = __dna_docin.readBool("x2d4_");
|
x2d4_ = __dna_docin.readBool("x2d4_");
|
||||||
/* x2d5_ */
|
/* x2d5_ */
|
||||||
x2d5_ = __dna_docin.readBool("x2d5_");
|
x2d5_invertGrappleTurn = __dna_docin.readBool("x2d5_");
|
||||||
/* x2d8_ */
|
/* x2d8_ */
|
||||||
x2d8_ = __dna_docin.readFloat("x2d8_");
|
x2d8_ = __dna_docin.readFloat("x2d8_");
|
||||||
/* x2dc_ */
|
/* x2dc_ */
|
||||||
|
@ -1522,10 +1522,10 @@ void CTweakPlayer::write(athena::io::YAMLDocWriter& __dna_docout) const
|
||||||
/* xa4_[7] */
|
/* xa4_[7] */
|
||||||
__dna_docout.writeFloat("xa4_", xa4_[7]);
|
__dna_docout.writeFloat("xa4_", xa4_[7]);
|
||||||
}
|
}
|
||||||
/* xc4_hardLandingVelocityThreshold */
|
/* xc4_normalGravAccel */
|
||||||
__dna_docout.writeFloat("xc4_hardLandingVelocityThreshold", xc4_hardLandingVelocityThreshold);
|
__dna_docout.writeFloat("xc4_normalGravAccel", xc4_normalGravAccel);
|
||||||
/* xc8_ */
|
/* xc8_fluidGravAccel */
|
||||||
__dna_docout.writeFloat("xc8_", xc8_);
|
__dna_docout.writeFloat("xc8_fluidGravAccel", xc8_fluidGravAccel);
|
||||||
/* xcc_ */
|
/* xcc_ */
|
||||||
__dna_docout.writeFloat("xcc_", xcc_);
|
__dna_docout.writeFloat("xcc_", xcc_);
|
||||||
/* xd0_ */
|
/* xd0_ */
|
||||||
|
@ -1634,10 +1634,10 @@ void CTweakPlayer::write(athena::io::YAMLDocWriter& __dna_docout) const
|
||||||
__dna_docout.writeBool("x22a_25_", x22a_25_);
|
__dna_docout.writeBool("x22a_25_", x22a_25_);
|
||||||
/* x22a_26_firingCancelsCameraPitch */
|
/* x22a_26_firingCancelsCameraPitch */
|
||||||
__dna_docout.writeBool("x22a_26_firingCancelsCameraPitch", x22a_26_firingCancelsCameraPitch);
|
__dna_docout.writeBool("x22a_26_firingCancelsCameraPitch", x22a_26_firingCancelsCameraPitch);
|
||||||
/* x22a_27_ */
|
/* x22a_27_assistedAimingIgnoreHorizontal */
|
||||||
__dna_docout.writeBool("x22a_27_", x22a_27_);
|
__dna_docout.writeBool("x22a_27_assistedAimingIgnoreHorizontal", x22a_27_assistedAimingIgnoreHorizontal);
|
||||||
/* x22a_28_ */
|
/* x22a_28_assistedAimingIgnoreVertical */
|
||||||
__dna_docout.writeBool("x22a_28_", x22a_28_);
|
__dna_docout.writeBool("x22a_28_assistedAimingIgnoreVertical", x22a_28_assistedAimingIgnoreVertical);
|
||||||
/* x22c_ */
|
/* x22c_ */
|
||||||
__dna_docout.writeFloat("x22c_", x22c_);
|
__dna_docout.writeFloat("x22c_", x22c_);
|
||||||
/* x230_ */
|
/* x230_ */
|
||||||
|
@ -1666,10 +1666,10 @@ void CTweakPlayer::write(athena::io::YAMLDocWriter& __dna_docout) const
|
||||||
__dna_docout.writeFloat("x25c_", x25c_);
|
__dna_docout.writeFloat("x25c_", x25c_);
|
||||||
/* x260_ */
|
/* x260_ */
|
||||||
__dna_docout.writeFloat("x260_", x260_);
|
__dna_docout.writeFloat("x260_", x260_);
|
||||||
/* x264_ */
|
/* x264_aimAssistHorizontalAngle */
|
||||||
__dna_docout.writeFloat("x264_", x264_);
|
__dna_docout.writeFloat("x264_aimAssistHorizontalAngle", x264_aimAssistHorizontalAngle);
|
||||||
/* x268_ */
|
/* x268_aimAssistVerticalAngle */
|
||||||
__dna_docout.writeFloat("x268_", x268_);
|
__dna_docout.writeFloat("x268_aimAssistVerticalAngle", x268_aimAssistVerticalAngle);
|
||||||
/* x158_ */
|
/* x158_ */
|
||||||
if (auto v = __dna_docout.enterSubVector("x158_"))
|
if (auto v = __dna_docout.enterSubVector("x158_"))
|
||||||
{
|
{
|
||||||
|
@ -1818,24 +1818,24 @@ void CTweakPlayer::write(athena::io::YAMLDocWriter& __dna_docout) const
|
||||||
__dna_docout.writeFloat("x224_scanningFrameSenseRange", x224_scanningFrameSenseRange);
|
__dna_docout.writeFloat("x224_scanningFrameSenseRange", x224_scanningFrameSenseRange);
|
||||||
/* x2a0_ */
|
/* x2a0_ */
|
||||||
__dna_docout.writeFloat("x2a0_", x2a0_);
|
__dna_docout.writeFloat("x2a0_", x2a0_);
|
||||||
/* x2a4_ */
|
/* x2a4_grappleSwingLength */
|
||||||
__dna_docout.writeFloat("x2a4_", x2a4_);
|
__dna_docout.writeFloat("x2a4_grappleSwingLength", x2a4_grappleSwingLength);
|
||||||
/* x2a8_grappleSwingPeriod */
|
/* x2a8_grappleSwingPeriod */
|
||||||
__dna_docout.writeFloat("x2a8_grappleSwingPeriod", x2a8_grappleSwingPeriod);
|
__dna_docout.writeFloat("x2a8_grappleSwingPeriod", x2a8_grappleSwingPeriod);
|
||||||
/* x2ac_ */
|
/* x2ac_grapplePullSpeedMin */
|
||||||
__dna_docout.writeFloat("x2ac_", x2ac_);
|
__dna_docout.writeFloat("x2ac_grapplePullSpeedMin", x2ac_grapplePullSpeedMin);
|
||||||
/* x2b0_ */
|
/* x2b0_ */
|
||||||
__dna_docout.writeFloat("x2b0_", x2b0_);
|
__dna_docout.writeFloat("x2b0_", x2b0_);
|
||||||
/* x2b4_ */
|
/* x2b4_maxGrappleLockedTurnAlignDistance */
|
||||||
__dna_docout.writeFloat("x2b4_", x2b4_);
|
__dna_docout.writeFloat("x2b4_maxGrappleLockedTurnAlignDistance", x2b4_maxGrappleLockedTurnAlignDistance);
|
||||||
/* x2b8_ */
|
/* x2b8_grapplePullSpeedProportion */
|
||||||
__dna_docout.writeFloat("x2b8_", x2b8_);
|
__dna_docout.writeFloat("x2b8_grapplePullSpeedProportion", x2b8_grapplePullSpeedProportion);
|
||||||
/* x2bc_ */
|
/* x2bc_grapplePullSpeedMax */
|
||||||
__dna_docout.writeFloat("x2bc_", x2bc_);
|
__dna_docout.writeFloat("x2bc_grapplePullSpeedMax", x2bc_grapplePullSpeedMax);
|
||||||
/* x2c0_ */
|
/* x2c0_grappleLookCenterSpeed */
|
||||||
__dna_docout.writeFloat("x2c0_", x2c0_);
|
__dna_docout.writeFloat("x2c0_grappleLookCenterSpeed", x2c0_grappleLookCenterSpeed);
|
||||||
/* x2c4_ */
|
/* x2c4_maxGrappleTurnSpeed */
|
||||||
__dna_docout.writeFloat("x2c4_", x2c4_);
|
__dna_docout.writeFloat("x2c4_maxGrappleTurnSpeed", x2c4_maxGrappleTurnSpeed);
|
||||||
/* x2c8_grappleJumpForce */
|
/* x2c8_grappleJumpForce */
|
||||||
__dna_docout.writeFloat("x2c8_grappleJumpForce", x2c8_grappleJumpForce);
|
__dna_docout.writeFloat("x2c8_grappleJumpForce", x2c8_grappleJumpForce);
|
||||||
/* x2cc_grappleReleaseTime */
|
/* x2cc_grappleReleaseTime */
|
||||||
|
@ -1845,7 +1845,7 @@ void CTweakPlayer::write(athena::io::YAMLDocWriter& __dna_docout) const
|
||||||
/* x2d4_ */
|
/* x2d4_ */
|
||||||
__dna_docout.writeBool("x2d4_", x2d4_);
|
__dna_docout.writeBool("x2d4_", x2d4_);
|
||||||
/* x2d4_ */
|
/* x2d4_ */
|
||||||
__dna_docout.writeBool("x2d5_", x2d5_);
|
__dna_docout.writeBool("x2d5_", x2d5_invertGrappleTurn);
|
||||||
/* x2d8_ */
|
/* x2d8_ */
|
||||||
__dna_docout.writeFloat("x2d8_", x2d8_);
|
__dna_docout.writeFloat("x2d8_", x2d8_);
|
||||||
/* x2dc_ */
|
/* x2dc_ */
|
||||||
|
@ -1913,8 +1913,8 @@ void CTweakPlayer::FixupValues()
|
||||||
x244_ = zeus::degToRad(x244_);
|
x244_ = zeus::degToRad(x244_);
|
||||||
x248_ = zeus::degToRad(x248_);
|
x248_ = zeus::degToRad(x248_);
|
||||||
x250_ = zeus::degToRad(x250_);
|
x250_ = zeus::degToRad(x250_);
|
||||||
x264_ = zeus::degToRad(x264_);
|
x264_aimAssistHorizontalAngle = zeus::degToRad(x264_aimAssistHorizontalAngle);
|
||||||
x268_ = zeus::degToRad(x268_);
|
x268_aimAssistVerticalAngle = zeus::degToRad(x268_aimAssistVerticalAngle);
|
||||||
x17c_ = zeus::degToRad(x17c_);
|
x17c_ = zeus::degToRad(x17c_);
|
||||||
x184_ = zeus::degToRad(x184_);
|
x184_ = zeus::degToRad(x184_);
|
||||||
x188_ = zeus::degToRad(x188_);
|
x188_ = zeus::degToRad(x188_);
|
||||||
|
@ -1925,7 +1925,7 @@ void CTweakPlayer::FixupValues()
|
||||||
x1f0_ = zeus::degToRad(x1f0_);
|
x1f0_ = zeus::degToRad(x1f0_);
|
||||||
x1f4_ = zeus::degToRad(x1f4_);
|
x1f4_ = zeus::degToRad(x1f4_);
|
||||||
x2b0_ = zeus::degToRad(x2b0_);
|
x2b0_ = zeus::degToRad(x2b0_);
|
||||||
x2c0_ = zeus::degToRad(x2c0_);
|
x2c0_grappleLookCenterSpeed = zeus::degToRad(x2c0_grappleLookCenterSpeed);
|
||||||
x280_ = zeus::degToRad(x280_);
|
x280_ = zeus::degToRad(x280_);
|
||||||
x284_ = zeus::degToRad(x284_);
|
x284_ = zeus::degToRad(x284_);
|
||||||
x290_ = zeus::degToRad(x290_);
|
x290_ = zeus::degToRad(x290_);
|
||||||
|
|
|
@ -17,8 +17,8 @@ struct CTweakPlayer : ITweakPlayer
|
||||||
Value<float> x64_[8];
|
Value<float> x64_[8];
|
||||||
Value<float> x84_[8];
|
Value<float> x84_[8];
|
||||||
Value<float> xa4_[8];
|
Value<float> xa4_[8];
|
||||||
Value<float> xc4_hardLandingVelocityThreshold;
|
Value<float> xc4_normalGravAccel;
|
||||||
Value<float> xc8_;
|
Value<float> xc8_fluidGravAccel;
|
||||||
Value<float> xcc_;
|
Value<float> xcc_;
|
||||||
Value<float> xd0_;
|
Value<float> xd0_;
|
||||||
Value<float> xd4_;
|
Value<float> xd4_;
|
||||||
|
@ -116,8 +116,8 @@ struct CTweakPlayer : ITweakPlayer
|
||||||
Value<bool> x22a_24_ : 1;
|
Value<bool> x22a_24_ : 1;
|
||||||
Value<bool> x22a_25_ : 1;
|
Value<bool> x22a_25_ : 1;
|
||||||
Value<bool> x22a_26_firingCancelsCameraPitch : 1;
|
Value<bool> x22a_26_firingCancelsCameraPitch : 1;
|
||||||
Value<bool> x22a_27_ : 1;
|
Value<bool> x22a_27_assistedAimingIgnoreHorizontal : 1;
|
||||||
Value<bool> x22a_28_ : 1;
|
Value<bool> x22a_28_assistedAimingIgnoreVertical : 1;
|
||||||
Value<float> x22c_;
|
Value<float> x22c_;
|
||||||
Value<float> x230_;
|
Value<float> x230_;
|
||||||
Value<float> x234_;
|
Value<float> x234_;
|
||||||
|
@ -132,8 +132,8 @@ struct CTweakPlayer : ITweakPlayer
|
||||||
Value<float> x258_;
|
Value<float> x258_;
|
||||||
Value<float> x25c_;
|
Value<float> x25c_;
|
||||||
Value<float> x260_;
|
Value<float> x260_;
|
||||||
Value<float> x264_;
|
Value<float> x264_aimAssistHorizontalAngle;
|
||||||
Value<float> x268_;
|
Value<float> x268_aimAssistVerticalAngle;
|
||||||
Value<float> x26c_playerHeight;
|
Value<float> x26c_playerHeight;
|
||||||
Value<float> x270_playerXYHalfExtent;
|
Value<float> x270_playerXYHalfExtent;
|
||||||
Value<float> x274_;
|
Value<float> x274_;
|
||||||
|
@ -148,20 +148,20 @@ struct CTweakPlayer : ITweakPlayer
|
||||||
Value<float> x298_;
|
Value<float> x298_;
|
||||||
Value<float> x29c_;
|
Value<float> x29c_;
|
||||||
Value<float> x2a0_;
|
Value<float> x2a0_;
|
||||||
Value<float> x2a4_;
|
Value<float> x2a4_grappleSwingLength;
|
||||||
Value<float> x2a8_grappleSwingPeriod;
|
Value<float> x2a8_grappleSwingPeriod;
|
||||||
Value<float> x2ac_;
|
Value<float> x2ac_grapplePullSpeedMin;
|
||||||
Value<float> x2b0_;
|
Value<float> x2b0_;
|
||||||
Value<float> x2b4_;
|
Value<float> x2b4_maxGrappleLockedTurnAlignDistance;
|
||||||
Value<float> x2b8_;
|
Value<float> x2b8_grapplePullSpeedProportion;
|
||||||
Value<float> x2bc_;
|
Value<float> x2bc_grapplePullSpeedMax;
|
||||||
Value<float> x2c0_;
|
Value<float> x2c0_grappleLookCenterSpeed;
|
||||||
Value<float> x2c4_;
|
Value<float> x2c4_maxGrappleTurnSpeed;
|
||||||
Value<float> x2c8_grappleJumpForce;
|
Value<float> x2c8_grappleJumpForce;
|
||||||
Value<float> x2cc_grappleReleaseTime;
|
Value<float> x2cc_grappleReleaseTime;
|
||||||
Value<atUint32> x2d0_grappleJumpMode;
|
Value<atUint32> x2d0_grappleJumpMode;
|
||||||
Value<bool> x2d4_;
|
Value<bool> x2d4_;
|
||||||
Value<bool> x2d5_;
|
Value<bool> x2d5_invertGrappleTurn;
|
||||||
Value<float> x2d8_;
|
Value<float> x2d8_;
|
||||||
Value<float> x2dc_;
|
Value<float> x2dc_;
|
||||||
Value<float> x2e0_;
|
Value<float> x2e0_;
|
||||||
|
@ -179,7 +179,8 @@ struct CTweakPlayer : ITweakPlayer
|
||||||
float GetX54() const { return x44_[4]; }
|
float GetX54() const { return x44_[4]; }
|
||||||
float GetX58() const { return x44_[5]; }
|
float GetX58() const { return x44_[5]; }
|
||||||
float GetX5C() const { return x44_[6]; }
|
float GetX5C() const { return x44_[6]; }
|
||||||
float GetHardLandingVelocityThreshold() const { return xc4_hardLandingVelocityThreshold; }
|
float GetNormalGravAccel() const { return xc4_normalGravAccel; }
|
||||||
|
float GetFluidGravAccel() const { return xc8_fluidGravAccel; }
|
||||||
float GetHudLagAmount() const { return x138_hudLagAmount; }
|
float GetHudLagAmount() const { return x138_hudLagAmount; }
|
||||||
float GetOrbitNormalDistance() const { return x180_orbitNormalDistance; }
|
float GetOrbitNormalDistance() const { return x180_orbitNormalDistance; }
|
||||||
uint32_t GetOrbitScreenBoxHalfExtentX(int zone) const { return x1a8_orbitScreenBoxHalfExtentX[zone]; }
|
uint32_t GetOrbitScreenBoxHalfExtentX(int zone) const { return x1a8_orbitScreenBoxHalfExtentX[zone]; }
|
||||||
|
@ -197,15 +198,27 @@ struct CTweakPlayer : ITweakPlayer
|
||||||
bool GetGunButtonTogglesHolster() const { return x229_30_gunButtonTogglesHolster; }
|
bool GetGunButtonTogglesHolster() const { return x229_30_gunButtonTogglesHolster; }
|
||||||
bool GetGunNotFiringHolstersGun() const { return x229_31_gunNotFiringHolstersGun; }
|
bool GetGunNotFiringHolstersGun() const { return x229_31_gunNotFiringHolstersGun; }
|
||||||
bool GetFiringCancelsCameraPitch() const { return x22a_26_firingCancelsCameraPitch; }
|
bool GetFiringCancelsCameraPitch() const { return x22a_26_firingCancelsCameraPitch; }
|
||||||
|
bool GetAssistedAimingIgnoreHorizontal() const { return x22a_27_assistedAimingIgnoreHorizontal; }
|
||||||
|
bool GetAssistedAimingIgnoreVertical() const { return x22a_28_assistedAimingIgnoreVertical; }
|
||||||
|
float GetAimAssistHorizontalAngle() const { return x264_aimAssistHorizontalAngle; }
|
||||||
|
float GetAimAssistVerticalAngle() const { return x268_aimAssistVerticalAngle; }
|
||||||
float GetPlayerHeight() const { return x26c_playerHeight; }
|
float GetPlayerHeight() const { return x26c_playerHeight; }
|
||||||
float GetPlayerXYHalfExtent() const { return x270_playerXYHalfExtent; }
|
float GetPlayerXYHalfExtent() const { return x270_playerXYHalfExtent; }
|
||||||
float GetX274() const { return x274_; }
|
float GetX274() const { return x274_; }
|
||||||
float GetX278() const { return x278_; }
|
float GetX278() const { return x278_; }
|
||||||
float GetPlayerBallHalfExtent() const { return x27c_playerBallHalfExtent; }
|
float GetPlayerBallHalfExtent() const { return x27c_playerBallHalfExtent; }
|
||||||
|
float GetGrappleSwingLength() const { return x2a4_grappleSwingLength; }
|
||||||
float GetGrappleSwingPeriod() const { return x2a8_grappleSwingPeriod; }
|
float GetGrappleSwingPeriod() const { return x2a8_grappleSwingPeriod; }
|
||||||
|
float GetGrapplePullSpeedMin() const { return x2ac_grapplePullSpeedMin; }
|
||||||
|
float GetMaxGrappleLockedTurnAlignDistance() const { return x2b4_maxGrappleLockedTurnAlignDistance; }
|
||||||
|
float GetGrapplePullSpeedProportion() const { return x2b8_grapplePullSpeedProportion; }
|
||||||
|
float GetGrapplePullSpeedMax() const { return x2bc_grapplePullSpeedMax; }
|
||||||
|
float GetGrappleLookCenterSpeed() const { return x2c0_grappleLookCenterSpeed; }
|
||||||
|
float GetMaxGrappleTurnSpeed() const { return x2c4_maxGrappleTurnSpeed; }
|
||||||
float GetGrappleJumpForce() const { return x2c8_grappleJumpForce; }
|
float GetGrappleJumpForce() const { return x2c8_grappleJumpForce; }
|
||||||
float GetGrappleReleaseTime() const { return x2cc_grappleReleaseTime; }
|
float GetGrappleReleaseTime() const { return x2cc_grappleReleaseTime; }
|
||||||
uint32_t GetGrappleJumpMode() const { return x2d0_grappleJumpMode; }
|
uint32_t GetGrappleJumpMode() const { return x2d0_grappleJumpMode; }
|
||||||
|
bool InvertGrappleTurn() const { return x2d5_invertGrappleTurn; }
|
||||||
float GetX124() const { return x134_; }
|
float GetX124() const { return x134_; }
|
||||||
float GetX184() const { return x184_; }
|
float GetX184() const { return x184_; }
|
||||||
float GetX1fc() const { return x1fc_; }
|
float GetX1fc() const { return x1fc_; }
|
||||||
|
|
|
@ -248,7 +248,7 @@ void CFirstPersonCamera::UpdateTransform(CStateManager& mgr, float dt)
|
||||||
|
|
||||||
if (player->GetMorphballTransitionState() == CPlayer::EPlayerMorphBallState::Morphed ||
|
if (player->GetMorphballTransitionState() == CPlayer::EPlayerMorphBallState::Morphed ||
|
||||||
player->GetOrbitState() == CPlayer::EPlayerOrbitState::Five ||
|
player->GetOrbitState() == CPlayer::EPlayerOrbitState::Five ||
|
||||||
player->GetGrappleState() == CPlayer::EGrappleState::Zero ||
|
player->GetGrappleState() == CPlayer::EGrappleState::None ||
|
||||||
mgr.GetGameState() == CStateManager::EGameState::SoftPaused ||
|
mgr.GetGameState() == CStateManager::EGameState::SoftPaused ||
|
||||||
mgr.GetCameraManager()->IsInCinematicCamera())
|
mgr.GetCameraManager()->IsInCinematicCamera())
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,7 +27,7 @@ CCollisionActor::CCollisionActor(TUniqueId uid1, TAreaId aId, TUniqueId uid2, co
|
||||||
SetCoefficientOfRestitutionModifier(0.5f);
|
SetCoefficientOfRestitutionModifier(0.5f);
|
||||||
SetCallTouch(false);
|
SetCallTouch(false);
|
||||||
SetMaterialFilter(CMaterialFilter::MakeIncludeExclude(
|
SetMaterialFilter(CMaterialFilter::MakeIncludeExclude(
|
||||||
{EMaterialTypes::Solid}, {EMaterialTypes::CollisionActor, EMaterialTypes::StaticCollision}));
|
{EMaterialTypes::Solid}, {EMaterialTypes::CollisionActor, EMaterialTypes::NoStaticCollision}));
|
||||||
}
|
}
|
||||||
|
|
||||||
CCollisionActor::CCollisionActor(TUniqueId uid1, TAreaId aId, TUniqueId uid2, const zeus::CVector3f& boxSize,
|
CCollisionActor::CCollisionActor(TUniqueId uid1, TAreaId aId, TUniqueId uid2, const zeus::CVector3f& boxSize,
|
||||||
|
@ -39,12 +39,12 @@ CCollisionActor::CCollisionActor(TUniqueId uid1, TAreaId aId, TUniqueId uid2, co
|
||||||
, x25c_owner(uid2)
|
, x25c_owner(uid2)
|
||||||
, x260_boxSize(boxSize)
|
, x260_boxSize(boxSize)
|
||||||
, x280_aaboxPrimitive(new CCollidableAABox(zeus::CAABox(-0.5f * boxSize, 0.5f * boxSize),
|
, x280_aaboxPrimitive(new CCollidableAABox(zeus::CAABox(-0.5f * boxSize, 0.5f * boxSize),
|
||||||
CMaterialList(EMaterialTypes::Solid, EMaterialTypes::StaticCollision)))
|
CMaterialList(EMaterialTypes::Solid, EMaterialTypes::NoStaticCollision)))
|
||||||
{
|
{
|
||||||
SetCoefficientOfRestitutionModifier(0.5f);
|
SetCoefficientOfRestitutionModifier(0.5f);
|
||||||
SetCallTouch(false);
|
SetCallTouch(false);
|
||||||
SetMaterialFilter(CMaterialFilter::MakeIncludeExclude(
|
SetMaterialFilter(CMaterialFilter::MakeIncludeExclude(
|
||||||
{EMaterialTypes::Solid}, {EMaterialTypes::CollisionActor, EMaterialTypes::StaticCollision}));
|
{EMaterialTypes::Solid}, {EMaterialTypes::CollisionActor, EMaterialTypes::NoStaticCollision}));
|
||||||
}
|
}
|
||||||
|
|
||||||
CCollisionActor::CCollisionActor(TUniqueId uid1, TAreaId aId, TUniqueId uid2, bool active, float radius, float mass)
|
CCollisionActor::CCollisionActor(TUniqueId uid1, TAreaId aId, TUniqueId uid2, bool active, float radius, float mass)
|
||||||
|
@ -54,13 +54,13 @@ CCollisionActor::CCollisionActor(TUniqueId uid1, TAreaId aId, TUniqueId uid2, bo
|
||||||
, x258_primitiveType(EPrimitiveType::Sphere)
|
, x258_primitiveType(EPrimitiveType::Sphere)
|
||||||
, x25c_owner(uid2)
|
, x25c_owner(uid2)
|
||||||
, x284_spherePrimitive(new CCollidableSphere(zeus::CSphere(zeus::CVector3f::skZero, radius),
|
, x284_spherePrimitive(new CCollidableSphere(zeus::CSphere(zeus::CVector3f::skZero, radius),
|
||||||
CMaterialList(EMaterialTypes::StaticCollision, EMaterialTypes::Solid)))
|
CMaterialList(EMaterialTypes::NoStaticCollision, EMaterialTypes::Solid)))
|
||||||
, x288_sphereRadius(radius)
|
, x288_sphereRadius(radius)
|
||||||
{
|
{
|
||||||
SetCoefficientOfRestitutionModifier(0.5f);
|
SetCoefficientOfRestitutionModifier(0.5f);
|
||||||
SetCallTouch(false);
|
SetCallTouch(false);
|
||||||
SetMaterialFilter(CMaterialFilter::MakeIncludeExclude(
|
SetMaterialFilter(CMaterialFilter::MakeIncludeExclude(
|
||||||
{EMaterialTypes::Solid}, {EMaterialTypes::CollisionActor, EMaterialTypes::StaticCollision}));
|
{EMaterialTypes::Solid}, {EMaterialTypes::CollisionActor, EMaterialTypes::NoStaticCollision}));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCollisionActor::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
void CCollisionActor::Accept(IVisitor& visitor) { visitor.Visit(this); }
|
||||||
|
|
|
@ -102,7 +102,7 @@ void CGameCollision::MoveAndCollide(CStateManager& mgr, CPhysicsActor& actor, fl
|
||||||
mgr.BuildColliderList(useColliderList, actor, zeus::CAABox(motionVol.min - 1.f, motionVol.max + 1.f));
|
mgr.BuildColliderList(useColliderList, actor, zeus::CAABox(motionVol.min - 1.f, motionVol.max + 1.f));
|
||||||
CAreaCollisionCache cache(motionVol);
|
CAreaCollisionCache cache(motionVol);
|
||||||
if (actor.GetCollisionPrimitive()->GetPrimType() != FOURCC('OBTG') &&
|
if (actor.GetCollisionPrimitive()->GetPrimType() != FOURCC('OBTG') &&
|
||||||
!actor.GetMaterialFilter().GetExcludeList().HasMaterial(EMaterialTypes::StaticCollision))
|
!actor.GetMaterialFilter().GetExcludeList().HasMaterial(EMaterialTypes::NoStaticCollision))
|
||||||
{
|
{
|
||||||
BuildAreaCollisionCache(mgr, cache);
|
BuildAreaCollisionCache(mgr, cache);
|
||||||
zeus::CVector3f pos = actor.GetCollisionPrimitive()->CalculateAABox(actor.GetPrimitiveTransform()).center();
|
zeus::CVector3f pos = actor.GetCollisionPrimitive()->CalculateAABox(actor.GetPrimitiveTransform()).center();
|
||||||
|
@ -434,12 +434,24 @@ float CGameCollision::GetMinExtentForCollisionPrimitive(const CCollisionPrimitiv
|
||||||
return 1.f;
|
return 1.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CGameCollision::DetectCollisionBoolean(CStateManager& mgr, const CCollisionPrimitive& prim,
|
||||||
|
const zeus::CTransform& xf, const CMaterialFilter& filter,
|
||||||
|
const rstl::reserved_vector<TUniqueId, 1024>& nearList)
|
||||||
|
{
|
||||||
|
if (!filter.GetExcludeList().HasMaterial(EMaterialTypes::NoStaticCollision) &&
|
||||||
|
DetectStaticCollisionBoolean(mgr, prim, xf, filter))
|
||||||
|
return true;
|
||||||
|
if (DetectDynamicCollisionBoolean(prim, xf, nearList, mgr))
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool CGameCollision::DetectCollisionBoolean_Cached(CStateManager& mgr, CAreaCollisionCache& cache,
|
bool CGameCollision::DetectCollisionBoolean_Cached(CStateManager& mgr, CAreaCollisionCache& cache,
|
||||||
const CCollisionPrimitive& prim, const zeus::CTransform& xf,
|
const CCollisionPrimitive& prim, const zeus::CTransform& xf,
|
||||||
const CMaterialFilter& filter,
|
const CMaterialFilter& filter,
|
||||||
const rstl::reserved_vector<TUniqueId, 1024>& nearList)
|
const rstl::reserved_vector<TUniqueId, 1024>& nearList)
|
||||||
{
|
{
|
||||||
if (!filter.GetExcludeList().HasMaterial(EMaterialTypes::StaticCollision) &&
|
if (!filter.GetExcludeList().HasMaterial(EMaterialTypes::NoStaticCollision) &&
|
||||||
DetectStaticCollisionBoolean_Cached(mgr, cache, prim, xf, filter))
|
DetectStaticCollisionBoolean_Cached(mgr, cache, prim, xf, filter))
|
||||||
return true;
|
return true;
|
||||||
if (DetectDynamicCollisionBoolean(prim, xf, nearList, mgr))
|
if (DetectDynamicCollisionBoolean(prim, xf, nearList, mgr))
|
||||||
|
@ -552,7 +564,7 @@ bool CGameCollision::DetectCollision_Cached(CStateManager& mgr, CAreaCollisionCa
|
||||||
{
|
{
|
||||||
idOut = kInvalidUniqueId;
|
idOut = kInvalidUniqueId;
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
if (!filter.GetExcludeList().HasMaterial(EMaterialTypes::StaticCollision))
|
if (!filter.GetExcludeList().HasMaterial(EMaterialTypes::NoStaticCollision))
|
||||||
if (DetectStaticCollision_Cached(mgr, cache, prim, xf, filter, infoList))
|
if (DetectStaticCollision_Cached(mgr, cache, prim, xf, filter, infoList))
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
|
@ -574,7 +586,7 @@ bool CGameCollision::DetectCollision_Cached_Moving(CStateManager& mgr, CAreaColl
|
||||||
TUniqueId& idOut, CCollisionInfo& infoOut, double& d)
|
TUniqueId& idOut, CCollisionInfo& infoOut, double& d)
|
||||||
{
|
{
|
||||||
idOut = kInvalidUniqueId;
|
idOut = kInvalidUniqueId;
|
||||||
if (!filter.GetExcludeList().HasMaterial(EMaterialTypes::StaticCollision))
|
if (!filter.GetExcludeList().HasMaterial(EMaterialTypes::NoStaticCollision))
|
||||||
{
|
{
|
||||||
if (CGameCollision::DetectStaticCollision_Cached_Moving(mgr, cache, prim, xf, filter, dir, infoOut, d))
|
if (CGameCollision::DetectStaticCollision_Cached_Moving(mgr, cache, prim, xf, filter, dir, infoOut, d))
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -63,6 +63,9 @@ public:
|
||||||
const zeus::CVector3f& dir, float mag, const CMaterialFilter& filter);
|
const zeus::CVector3f& dir, float mag, const CMaterialFilter& filter);
|
||||||
static void BuildAreaCollisionCache(CStateManager& mgr, CAreaCollisionCache& cache);
|
static void BuildAreaCollisionCache(CStateManager& mgr, CAreaCollisionCache& cache);
|
||||||
static float GetMinExtentForCollisionPrimitive(const CCollisionPrimitive& prim);
|
static float GetMinExtentForCollisionPrimitive(const CCollisionPrimitive& prim);
|
||||||
|
static bool DetectCollisionBoolean(CStateManager& mgr, const CCollisionPrimitive& prim,
|
||||||
|
const zeus::CTransform& xf, const CMaterialFilter& filter,
|
||||||
|
const rstl::reserved_vector<TUniqueId, 1024>& nearList);
|
||||||
static bool DetectCollisionBoolean_Cached(CStateManager& mgr, CAreaCollisionCache& cache,
|
static bool DetectCollisionBoolean_Cached(CStateManager& mgr, CAreaCollisionCache& cache,
|
||||||
const CCollisionPrimitive& prim, const zeus::CTransform& xf,
|
const CCollisionPrimitive& prim, const zeus::CTransform& xf,
|
||||||
const CMaterialFilter& filter,
|
const CMaterialFilter& filter,
|
||||||
|
|
|
@ -45,7 +45,7 @@ enum class EMaterialTypes
|
||||||
Projectile = 35,
|
Projectile = 35,
|
||||||
Bomb = 36,
|
Bomb = 36,
|
||||||
GroundCollider = 37,
|
GroundCollider = 37,
|
||||||
StaticCollision = 38,
|
NoStaticCollision = 38,
|
||||||
Scannable = 39,
|
Scannable = 39,
|
||||||
Target = 40,
|
Target = 40,
|
||||||
Orbit = 41,
|
Orbit = 41,
|
||||||
|
|
|
@ -101,7 +101,14 @@ public:
|
||||||
void AddValue(const T& t)
|
void AddValue(const T& t)
|
||||||
{
|
{
|
||||||
if (this->size() < N)
|
if (this->size() < N)
|
||||||
|
{
|
||||||
this->push_back(t);
|
this->push_back(t);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this->pop_back();
|
||||||
|
this->insert(this->begin(), t);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rstl::optional_object<T> GetAverage() const
|
rstl::optional_object<T> GetAverage() const
|
||||||
|
|
|
@ -25,7 +25,7 @@ public:
|
||||||
};
|
};
|
||||||
private:
|
private:
|
||||||
CModelData x0_modelData;
|
CModelData x0_modelData;
|
||||||
zeus::CTransform x220_;
|
zeus::CTransform x220_xf;
|
||||||
EArmState x334_animState;
|
EArmState x334_animState;
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
|
@ -38,9 +38,10 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CGrappleArm(const zeus::CVector3f& vec);
|
explicit CGrappleArm(const zeus::CVector3f& vec);
|
||||||
void AsyncLoadSuit(CStateManager& mgr);
|
void AsyncLoadSuit(CStateManager& mgr);
|
||||||
void SetX220(const zeus::CTransform& xf) { x220_ = xf; }
|
void SetTransform(const zeus::CTransform& xf) { x220_xf = xf; }
|
||||||
|
const zeus::CTransform& GetTransform() const { return x220_xf; }
|
||||||
void SetAnimState(EArmState state);
|
void SetAnimState(EArmState state);
|
||||||
EArmState GetAnimState() const { return x334_animState; }
|
EArmState GetAnimState() const { return x334_animState; }
|
||||||
bool BeamActive() const { return x3b2_25_beamActive; }
|
bool BeamActive() const { return x3b2_25_beamActive; }
|
||||||
|
|
|
@ -23,6 +23,18 @@ class CActorLights;
|
||||||
class CGunController;
|
class CGunController;
|
||||||
struct CModelFlags;
|
struct CModelFlags;
|
||||||
class CStateManager;
|
class CStateManager;
|
||||||
|
class CWeaponDescription;
|
||||||
|
|
||||||
|
class CVelocityInfo
|
||||||
|
{
|
||||||
|
friend class CGunWeapon;
|
||||||
|
rstl::reserved_vector<zeus::CVector3f, 2> x0_vel;
|
||||||
|
rstl::reserved_vector<bool, 2> x1c_;
|
||||||
|
rstl::reserved_vector<float, 2> x24_;
|
||||||
|
public:
|
||||||
|
const zeus::CVector3f& GetVelocity(int i) const { return x0_vel[i]; }
|
||||||
|
};
|
||||||
|
|
||||||
class CGunWeapon
|
class CGunWeapon
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -37,9 +49,14 @@ protected:
|
||||||
zeus::CVector3f x4_;
|
zeus::CVector3f x4_;
|
||||||
TToken<CAnimCharacterSet> x104_gunCharacter;
|
TToken<CAnimCharacterSet> x104_gunCharacter;
|
||||||
TToken<CAnimCharacterSet> x13c_armCharacter;
|
TToken<CAnimCharacterSet> x13c_armCharacter;
|
||||||
|
rstl::reserved_vector<TCachedToken<CWeaponDescription>, 2> x144_weapons;
|
||||||
|
TToken<CGenDescription> x160_xferEffect;
|
||||||
|
rstl::reserved_vector<TCachedToken<CGenDescription>, 2> x16c_muzzleEffects;
|
||||||
|
rstl::reserved_vector<TCachedToken<CGenDescription>, 2> x188_secondaryEffects;
|
||||||
EWeaponType x1c0_weaponType;
|
EWeaponType x1c0_weaponType;
|
||||||
TUniqueId x1c4_uid;
|
TUniqueId x1c4_uid;
|
||||||
EMaterialTypes x1c8_matType;
|
EMaterialTypes x1c8_matType;
|
||||||
|
CVelocityInfo x1d0_velInfo;
|
||||||
CPlayerState::EBeamId x200_beamId;
|
CPlayerState::EBeamId x200_beamId;
|
||||||
public:
|
public:
|
||||||
CGunWeapon(ResId ancsId, EWeaponType type, TUniqueId uid, EMaterialTypes, const zeus::CVector3f& vec);
|
CGunWeapon(ResId ancsId, EWeaponType type, TUniqueId uid, EMaterialTypes, const zeus::CVector3f& vec);
|
||||||
|
@ -61,6 +78,7 @@ public:
|
||||||
virtual void Load(bool) {}
|
virtual void Load(bool) {}
|
||||||
virtual void Unload(CStateManager&) {}
|
virtual void Unload(CStateManager&) {}
|
||||||
virtual bool IsLoaded() const {return false;}
|
virtual bool IsLoaded() const {return false;}
|
||||||
|
const CVelocityInfo& GetVelocityInfo() const { return x1d0_velInfo; }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,4 +61,11 @@ void CPlayerGun::CancelFiring(CStateManager& mgr)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float CPlayerGun::GetBeamVelocity() const
|
||||||
|
{
|
||||||
|
if (x72c_currentBeam->IsLoaded())
|
||||||
|
return x72c_currentBeam->GetVelocityInfo().GetVelocity(x330_chargeWeaponIdx).y;
|
||||||
|
return 10.f;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,7 +80,7 @@ private:
|
||||||
u32 x324_ = 4;
|
u32 x324_ = 4;
|
||||||
u32 x328_ = 0x2000;
|
u32 x328_ = 0x2000;
|
||||||
u32 x32c_ = 0;
|
u32 x32c_ = 0;
|
||||||
u32 x330_ = 0;
|
u32 x330_chargeWeaponIdx = 0;
|
||||||
u32 x334_ = 0;
|
u32 x334_ = 0;
|
||||||
u32 x338_ = 0;
|
u32 x338_ = 0;
|
||||||
u32 x33c_ = 0;
|
u32 x33c_ = 0;
|
||||||
|
@ -114,7 +114,7 @@ private:
|
||||||
zeus::CTransform x3e8_xf;
|
zeus::CTransform x3e8_xf;
|
||||||
zeus::CTransform x418_;
|
zeus::CTransform x418_;
|
||||||
zeus::CTransform x448_;
|
zeus::CTransform x448_;
|
||||||
zeus::CTransform x478_;
|
zeus::CTransform x478_assistAimXf;
|
||||||
zeus::CTransform x4a8_;
|
zeus::CTransform x4a8_;
|
||||||
zeus::CTransform x4d8_;
|
zeus::CTransform x4d8_;
|
||||||
zeus::CTransform x508_;
|
zeus::CTransform x508_;
|
||||||
|
@ -222,11 +222,13 @@ public:
|
||||||
u32 GetPendingSelectedBeam() const { return x314_pendingSelectedBeam; }
|
u32 GetPendingSelectedBeam() const { return x314_pendingSelectedBeam; }
|
||||||
const CGunMorph& GetGunMorph() const { return x678_morph; }
|
const CGunMorph& GetGunMorph() const { return x678_morph; }
|
||||||
void SetTransform(const zeus::CTransform& xf) { x3e8_xf = xf; }
|
void SetTransform(const zeus::CTransform& xf) { x3e8_xf = xf; }
|
||||||
|
void SetAssistAimTransform(const zeus::CTransform& xf) { x478_assistAimXf = xf; }
|
||||||
CGrappleArm& GetGrappleArm() { return *x740_grappleArm; }
|
CGrappleArm& GetGrappleArm() { return *x740_grappleArm; }
|
||||||
void DamageRumble(const zeus::CVector3f& location, float damage, const CStateManager& mgr);
|
void DamageRumble(const zeus::CVector3f& location, float damage, const CStateManager& mgr);
|
||||||
void ProcessInput(const CFinalInput& input, CStateManager& mgr);
|
void ProcessInput(const CFinalInput& input, CStateManager& mgr);
|
||||||
void ResetIdle(CStateManager& mgr);
|
void ResetIdle(CStateManager& mgr);
|
||||||
void CancelFiring(CStateManager& mgr);
|
void CancelFiring(CStateManager& mgr);
|
||||||
|
float GetBeamVelocity() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,14 +17,16 @@ class CGrappleParameters
|
||||||
float x20_i;
|
float x20_i;
|
||||||
float x24_j;
|
float x24_j;
|
||||||
float x28_k;
|
float x28_k;
|
||||||
bool x2c_l;
|
bool x2c_lockSwingTurn;
|
||||||
public:
|
public:
|
||||||
CGrappleParameters(float a, float b, float c, float d,
|
CGrappleParameters(float a, float b, float c, float d,
|
||||||
float e, float f, float g, float h,
|
float e, float f, float g, float h,
|
||||||
float i, float j, float k, bool l)
|
float i, float j, float k, bool lockSwingTurn)
|
||||||
: x0_a(a), x4_b(b), x8_c(c), xc_d(d),
|
: x0_a(a), x4_b(b), x8_c(c), xc_d(d),
|
||||||
x10_e(e), x14_f(f), x18_g(g), x1c_h(h),
|
x10_e(e), x14_f(f), x18_g(g), x1c_h(h),
|
||||||
x20_i(i), x24_j(j), x28_k(k), x2c_l(l) {}
|
x20_i(i), x24_j(j), x28_k(k), x2c_lockSwingTurn(lockSwingTurn) {}
|
||||||
|
|
||||||
|
bool GetLockSwingTurn() const { return x2c_lockSwingTurn; }
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ CPlayer::CPlayer(TUniqueId uid, const zeus::CTransform& xf, const zeus::CAABox&
|
||||||
SetInertiaTensorScalar(xe8_mass);
|
SetInertiaTensorScalar(xe8_mass);
|
||||||
x1f4_lastNonCollidingState = GetMotionState();
|
x1f4_lastNonCollidingState = GetMotionState();
|
||||||
x490_gun->SetTransform(x34_transform);
|
x490_gun->SetTransform(x34_transform);
|
||||||
x490_gun->GetGrappleArm().SetX220(x34_transform);
|
x490_gun->GetGrappleArm().SetTransform(x34_transform);
|
||||||
|
|
||||||
InitializeBallTransition();
|
InitializeBallTransition();
|
||||||
zeus::CAABox ballTransAABB = x64_modelData->GetBounds();
|
zeus::CAABox ballTransAABB = x64_modelData->GetBounds();
|
||||||
|
@ -379,7 +379,7 @@ void CPlayer::TakeDamage(bool significant, const zeus::CVector3f& location,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x3b8_grappleState != EGrappleState::Zero)
|
if (x3b8_grappleState != EGrappleState::None)
|
||||||
BreakGrapple(EPlayerOrbitRequest::Eleven, mgr);
|
BreakGrapple(EPlayerOrbitRequest::Eleven, mgr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -878,7 +878,7 @@ void CPlayer::Freeze(CStateManager& stateMgr, ResId steamTxtr, u16 sfx, ResId ic
|
||||||
|
|
||||||
CPhysicsActor::Stop();
|
CPhysicsActor::Stop();
|
||||||
ClearForcesAndTorques();
|
ClearForcesAndTorques();
|
||||||
if (x3b8_grappleState != EGrappleState::Zero)
|
if (x3b8_grappleState != EGrappleState::None)
|
||||||
BreakGrapple(EPlayerOrbitRequest::Ten, stateMgr);
|
BreakGrapple(EPlayerOrbitRequest::Ten, stateMgr);
|
||||||
else
|
else
|
||||||
SetOrbitRequest(EPlayerOrbitRequest::Ten, stateMgr);
|
SetOrbitRequest(EPlayerOrbitRequest::Ten, stateMgr);
|
||||||
|
@ -979,7 +979,7 @@ void CPlayer::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId sender, CState
|
||||||
{
|
{
|
||||||
if (x258_movementState != EPlayerMovementState::Falling)
|
if (x258_movementState != EPlayerMovementState::Falling)
|
||||||
{
|
{
|
||||||
float hardThres = 30.f * 2.f * -g_tweakPlayer->GetHardLandingVelocityThreshold();
|
float hardThres = 30.f * 2.f * -g_tweakPlayer->GetNormalGravAccel();
|
||||||
hardThres = (hardThres != 0.f) ? hardThres * std::sqrt(hardThres) : 0.f;
|
hardThres = (hardThres != 0.f) ? hardThres * std::sqrt(hardThres) : 0.f;
|
||||||
float landVol = zeus::clamp(95.f, 1.6f * -x794_.z + 95.f, 127.f) / 127.f;
|
float landVol = zeus::clamp(95.f, 1.6f * -x794_.z + 95.f, 127.f) / 127.f;
|
||||||
u16 landSfx;
|
u16 landSfx;
|
||||||
|
@ -1409,12 +1409,12 @@ void CPlayer::UpdateGunState(const CFinalInput& input, CStateManager& mgr)
|
||||||
bool needsDraw = false;
|
bool needsDraw = false;
|
||||||
if (ControlMapper::GetDigitalInput(ControlMapper::ECommands::FireOrBomb, input) ||
|
if (ControlMapper::GetDigitalInput(ControlMapper::ECommands::FireOrBomb, input) ||
|
||||||
ControlMapper::GetDigitalInput(ControlMapper::ECommands::MissileOrPowerBomb, input) ||
|
ControlMapper::GetDigitalInput(ControlMapper::ECommands::MissileOrPowerBomb, input) ||
|
||||||
x3b8_grappleState == EGrappleState::Zero ||
|
x3b8_grappleState == EGrappleState::None ||
|
||||||
(g_tweakPlayer->GetGunButtonTogglesHolster() &&
|
(g_tweakPlayer->GetGunButtonTogglesHolster() &&
|
||||||
ControlMapper::GetPressInput(ControlMapper::ECommands::ToggleHolster, input)))
|
ControlMapper::GetPressInput(ControlMapper::ECommands::ToggleHolster, input)))
|
||||||
needsDraw = true;
|
needsDraw = true;
|
||||||
|
|
||||||
if (x3b8_grappleState == EGrappleState::Zero &&
|
if (x3b8_grappleState == EGrappleState::None &&
|
||||||
(mgr.GetPlayerState()->GetCurrentVisor() == CPlayerState::EPlayerVisor::Scan ||
|
(mgr.GetPlayerState()->GetCurrentVisor() == CPlayerState::EPlayerVisor::Scan ||
|
||||||
mgr.GetPlayerState()->GetTransitioningVisor() == CPlayerState::EPlayerVisor::Scan ))
|
mgr.GetPlayerState()->GetTransitioningVisor() == CPlayerState::EPlayerVisor::Scan ))
|
||||||
needsDraw = false;
|
needsDraw = false;
|
||||||
|
@ -1581,12 +1581,96 @@ void CPlayer::UpdateGunTransform(const zeus::CVector3f& gunPos, CStateManager& m
|
||||||
|
|
||||||
void CPlayer::UpdateAssistedAiming(const zeus::CTransform& xf, const CStateManager& mgr)
|
void CPlayer::UpdateAssistedAiming(const zeus::CTransform& xf, const CStateManager& mgr)
|
||||||
{
|
{
|
||||||
|
zeus::CTransform assistXf = xf;
|
||||||
|
if (TCastToConstPtr<CActor> target = mgr.GetObjectById(x3f4_aimTarget))
|
||||||
|
{
|
||||||
|
zeus::CVector3f gunToTarget = x480_assistedTargetAim - xf.origin;
|
||||||
|
zeus::CVector3f gunToTargetFlat = gunToTarget;
|
||||||
|
gunToTargetFlat.z = 0.f;
|
||||||
|
float gunToTargetFlatMag = gunToTargetFlat.magnitude();
|
||||||
|
zeus::CVector3f gunDirFlat = xf.basis[1];
|
||||||
|
gunDirFlat.z = 0.f;
|
||||||
|
float gunDirFlatMag = gunDirFlat.magnitude();
|
||||||
|
if (gunToTargetFlat.canBeNormalized() && gunDirFlat.canBeNormalized())
|
||||||
|
{
|
||||||
|
gunToTargetFlat = gunToTargetFlat / gunToTargetFlatMag;
|
||||||
|
gunDirFlat = gunDirFlat / gunDirFlatMag;
|
||||||
|
float vAngleDelta = std::atan2(gunToTarget.z, gunToTargetFlatMag) -
|
||||||
|
std::atan2(xf.basis[1].z, gunDirFlatMag);
|
||||||
|
bool hasVAngleDelta = true;
|
||||||
|
if (!x9c6_27_aimingAtProjectile && std::fabs(vAngleDelta) > g_tweakPlayer->GetAimAssistVerticalAngle())
|
||||||
|
{
|
||||||
|
if (g_tweakPlayer->GetAssistedAimingIgnoreVertical())
|
||||||
|
{
|
||||||
|
vAngleDelta = 0.f;
|
||||||
|
hasVAngleDelta = false;
|
||||||
|
}
|
||||||
|
else if (vAngleDelta > 0.f)
|
||||||
|
{
|
||||||
|
vAngleDelta = g_tweakPlayer->GetAimAssistVerticalAngle();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
vAngleDelta = -g_tweakPlayer->GetAimAssistVerticalAngle();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool targetToLeft = gunDirFlat.cross(gunToTargetFlat).z > 0.f;
|
||||||
|
float hAngleDelta = std::acos(zeus::clamp(-1.f, gunDirFlat.dot(gunToTargetFlat), 1.f));
|
||||||
|
bool hasHAngleDelta = true;
|
||||||
|
if (!x9c6_27_aimingAtProjectile && std::fabs(hAngleDelta) > g_tweakPlayer->GetAimAssistHorizontalAngle())
|
||||||
|
{
|
||||||
|
hAngleDelta = g_tweakPlayer->GetAimAssistHorizontalAngle();
|
||||||
|
if (g_tweakPlayer->GetAssistedAimingIgnoreHorizontal())
|
||||||
|
{
|
||||||
|
hAngleDelta = 0.f;
|
||||||
|
hasHAngleDelta = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (targetToLeft)
|
||||||
|
hAngleDelta = -hAngleDelta;
|
||||||
|
|
||||||
|
if (!hasVAngleDelta || !hasHAngleDelta)
|
||||||
|
{
|
||||||
|
vAngleDelta = 0.f;
|
||||||
|
hAngleDelta = 0.f;
|
||||||
|
}
|
||||||
|
|
||||||
|
gunToTarget.x = std::sin(hAngleDelta) * std::cos(vAngleDelta);
|
||||||
|
gunToTarget.y = std::cos(hAngleDelta) * std::cos(vAngleDelta);
|
||||||
|
gunToTarget.z = std::sin(vAngleDelta);
|
||||||
|
gunToTarget = xf.rotate(gunToTarget);
|
||||||
|
assistXf = zeus::lookAt(zeus::CVector3f::skZero, gunToTarget, zeus::CVector3f::skUp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
x490_gun->SetAssistAimTransform(assistXf);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlayer::UpdateAimTargetPrediction(const zeus::CTransform& xf, const CStateManager& mgr)
|
void CPlayer::UpdateAimTargetPrediction(const zeus::CTransform& xf, const CStateManager& mgr)
|
||||||
{
|
{
|
||||||
|
if (x3f4_aimTarget != kInvalidUniqueId)
|
||||||
|
{
|
||||||
|
if (TCastToConstPtr<CActor> target = mgr.GetObjectById(x3f4_aimTarget))
|
||||||
|
{
|
||||||
|
x9c6_27_aimingAtProjectile = TCastToConstPtr<CGameProjectile>(target);
|
||||||
|
zeus::CVector3f instantTarget = target->GetAimPosition(mgr, 0.f);
|
||||||
|
zeus::CVector3f gunToTarget = instantTarget - xf.origin;
|
||||||
|
float timeToTarget = gunToTarget.magnitude() / x490_gun->GetBeamVelocity();
|
||||||
|
zeus::CVector3f predictTarget = target->GetAimPosition(mgr, timeToTarget);
|
||||||
|
zeus::CVector3f predictOffset = predictTarget - instantTarget;
|
||||||
|
x3f8_targetAimPosition = instantTarget;
|
||||||
|
if (predictOffset.magnitude() < 0.1f)
|
||||||
|
x404_aimTargetAverage.AddValue(zeus::CVector3f::skZero);
|
||||||
|
else
|
||||||
|
x404_aimTargetAverage.AddValue(predictOffset);
|
||||||
|
if (auto avg = x404_aimTargetAverage.GetAverage())
|
||||||
|
x480_assistedTargetAim = instantTarget + *avg;
|
||||||
|
else
|
||||||
|
x480_assistedTargetAim = predictTarget;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlayer::ResetAimTargetPrediction(TUniqueId target)
|
void CPlayer::ResetAimTargetPrediction(TUniqueId target)
|
||||||
|
@ -1621,11 +1705,268 @@ void CPlayer::HolsterGun(CStateManager& mgr)
|
||||||
ResetAimTargetPrediction(kInvalidUniqueId);
|
ResetAimTargetPrediction(kInvalidUniqueId);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPlayer::UpdateGrappleArmTransform(const zeus::CVector3f&, CStateManager& mgr, float) {}
|
void CPlayer::UpdateGrappleArmTransform(const zeus::CVector3f& offset, CStateManager& mgr, float dt)
|
||||||
|
{
|
||||||
|
zeus::CTransform armXf = x34_transform;
|
||||||
|
zeus::CVector3f armPosition = x34_transform.rotate(offset) + x34_transform.origin;
|
||||||
|
armXf.origin = armPosition;
|
||||||
|
if (x2f8_morphTransState != EPlayerMorphBallState::Unmorphed)
|
||||||
|
{
|
||||||
|
x490_gun->GetGrappleArm().SetTransform(armXf);
|
||||||
|
}
|
||||||
|
else if (!x490_gun->GetGrappleArm().IsArmMoving())
|
||||||
|
{
|
||||||
|
zeus::CVector3f lookDir = x34_transform.basis[1];
|
||||||
|
zeus::CVector3f armToTarget = x490_gun->GetGrappleArm().GetTransform().basis[1];
|
||||||
|
if (lookDir.canBeNormalized())
|
||||||
|
{
|
||||||
|
lookDir.normalize();
|
||||||
|
if (x3b8_grappleState != EGrappleState::None)
|
||||||
|
{
|
||||||
|
if (TCastToPtr<CActor> target = mgr.ObjectById(x310_orbitTargetId))
|
||||||
|
{
|
||||||
|
armToTarget = target->GetTranslation() - armPosition;
|
||||||
|
zeus::CVector3f armToTargetFlat = armToTarget;
|
||||||
|
armToTargetFlat.z = 0.f;
|
||||||
|
if (armToTarget.canBeNormalized())
|
||||||
|
armToTarget.normalize();
|
||||||
|
if (armToTargetFlat.canBeNormalized() && x3b8_grappleState != EGrappleState::Firing)
|
||||||
|
{
|
||||||
|
zeus::CQuaternion adjRot =
|
||||||
|
zeus::CQuaternion::lookAt(armToTargetFlat.normalized(), lookDir, 2.f * M_PIF);
|
||||||
|
armToTarget = adjRot.transform(armToTarget);
|
||||||
|
if (x3bc_grappleSwingTimer >= 0.25f * g_tweakPlayer->GetGrappleSwingPeriod() &&
|
||||||
|
x3bc_grappleSwingTimer < 0.75f * g_tweakPlayer->GetGrappleSwingPeriod())
|
||||||
|
armToTarget = x490_gun->GetGrappleArm().GetTransform().basis[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
armXf = zeus::lookAt(zeus::CVector3f::skZero, armToTarget, zeus::CVector3f::skUp);
|
||||||
|
armXf.origin = armPosition;
|
||||||
|
x490_gun->GetGrappleArm().SetTransform(armXf);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CPlayer::ApplyGrappleForces(const CFinalInput& input, CStateManager& mgr, float) {}
|
float CPlayer::GetGravity() const
|
||||||
|
{
|
||||||
|
if (!g_GameState->GetPlayerState()->HasPowerUp(CPlayerState::EItemType::GravitySuit) &&
|
||||||
|
CheckSubmerged())
|
||||||
|
return g_tweakPlayer->GetFluidGravAccel();
|
||||||
|
if (x37c_sidewaysDashing)
|
||||||
|
return -100.f;
|
||||||
|
return g_tweakPlayer->GetNormalGravAccel();
|
||||||
|
}
|
||||||
|
|
||||||
bool CPlayer::ValidateFPPosition(const zeus::CVector3f& pos, CStateManager& mgr) { return false; }
|
void CPlayer::ApplyGrappleForces(const CFinalInput& input, CStateManager& mgr, float dt)
|
||||||
|
{
|
||||||
|
if (TCastToPtr<CScriptGrapplePoint> point = mgr.ObjectById(x310_orbitTargetId))
|
||||||
|
{
|
||||||
|
switch (x3b8_grappleState)
|
||||||
|
{
|
||||||
|
case EGrappleState::Pull:
|
||||||
|
{
|
||||||
|
zeus::CVector3f playerToPoint = point->GetTranslation() - GetTranslation();
|
||||||
|
if (playerToPoint.canBeNormalized())
|
||||||
|
{
|
||||||
|
zeus::CVector3f playerToSwingLow = point->GetTranslation() +
|
||||||
|
zeus::CVector3f(0.f, 0.f, -g_tweakPlayer->GetGrappleSwingLength()) - GetTranslation();
|
||||||
|
if (playerToSwingLow.canBeNormalized())
|
||||||
|
{
|
||||||
|
float distToSwingLow = playerToSwingLow.magnitude();
|
||||||
|
playerToSwingLow.normalize();
|
||||||
|
float timeToLow =
|
||||||
|
zeus::clamp(-1.f, distToSwingLow / g_tweakPlayer->GetGrapplePullSpeedProportion(), 1.f);
|
||||||
|
float pullSpeed = timeToLow * (g_tweakPlayer->GetGrapplePullSpeedMax() -
|
||||||
|
g_tweakPlayer->GetGrapplePullSpeedMin()) + g_tweakPlayer->GetGrapplePullSpeedMin();
|
||||||
|
SetVelocityWR(playerToSwingLow * pullSpeed);
|
||||||
|
|
||||||
|
if (distToSwingLow < g_tweakPlayer->GetMaxGrappleLockedTurnAlignDistance())
|
||||||
|
{
|
||||||
|
x3b8_grappleState = EGrappleState::Swinging;
|
||||||
|
x3bc_grappleSwingTimer = 0.25f * g_tweakPlayer->GetGrappleSwingPeriod();
|
||||||
|
x3d8_grappleJumpTimeout = 0.f;
|
||||||
|
x9c6_28_aligningGrappleSwingTurn = point->GetGrappleParameters().GetLockSwingTurn();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CMotionState mState = PredictMotion(dt);
|
||||||
|
zeus::CVector3f lookDirFlat = x34_transform.basis[1];
|
||||||
|
lookDirFlat.z = 0.f;
|
||||||
|
zeus::CVector3f newPlayerToPointFlat =
|
||||||
|
point->GetTranslation() - (GetTranslation() + mState.x0_translation);
|
||||||
|
newPlayerToPointFlat.z = 0.f;
|
||||||
|
if (lookDirFlat.canBeNormalized())
|
||||||
|
lookDirFlat.normalize();
|
||||||
|
if (newPlayerToPointFlat.canBeNormalized())
|
||||||
|
newPlayerToPointFlat.normalize();
|
||||||
|
float lookToPointAngle =
|
||||||
|
std::acos(zeus::clamp(-1.f, lookDirFlat.dot(newPlayerToPointFlat), 1.f));
|
||||||
|
if (lookToPointAngle > 0.001f)
|
||||||
|
{
|
||||||
|
float deltaAngle = dt * g_tweakPlayer->GetGrappleLookCenterSpeed();
|
||||||
|
if (lookToPointAngle >= deltaAngle)
|
||||||
|
{
|
||||||
|
zeus::CVector3f leftDirFlat(lookDirFlat.y, -lookDirFlat.x, 0.f);
|
||||||
|
if (leftDirFlat.canBeNormalized())
|
||||||
|
leftDirFlat.normalize();
|
||||||
|
if (newPlayerToPointFlat.dot(leftDirFlat) >= 0.f)
|
||||||
|
deltaAngle = -deltaAngle;
|
||||||
|
RotateToOR(zeus::CQuaternion::fromAxisAngle(zeus::CVector3f::skUp, deltaAngle), dt);
|
||||||
|
}
|
||||||
|
else if (std::fabs(lookToPointAngle - M_PIF) > 0.001f)
|
||||||
|
{
|
||||||
|
RotateToOR(zeus::CQuaternion::shortestRotationArc(lookDirFlat,
|
||||||
|
newPlayerToPointFlat), dt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SetAngularVelocityWR(zeus::CAxisAngle::sIdentity);
|
||||||
|
x174_torque = zeus::CAxisAngle::sIdentity;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
x3b8_grappleState = EGrappleState::Swinging;
|
||||||
|
x3bc_grappleSwingTimer = 0.25f * g_tweakPlayer->GetGrappleSwingPeriod();
|
||||||
|
x3d8_grappleJumpTimeout = 0.f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case EGrappleState::Swinging:
|
||||||
|
{
|
||||||
|
float turnAngleSpeed = zeus::degToRad(g_tweakPlayer->GetMaxGrappleTurnSpeed());
|
||||||
|
if (g_tweakPlayer->InvertGrappleTurn())
|
||||||
|
turnAngleSpeed *= -1.f;
|
||||||
|
zeus::CVector3f pointToPlayer = GetTranslation() - point->GetTranslation();
|
||||||
|
float pointToPlayerZProj =
|
||||||
|
zeus::clamp(-1.f, std::fabs(pointToPlayer.z / pointToPlayer.magnitude()), 1.f);
|
||||||
|
|
||||||
|
bool enableTurn = false;
|
||||||
|
if (!point->GetGrappleParameters().GetLockSwingTurn())
|
||||||
|
{
|
||||||
|
if (ControlMapper::GetAnalogInput(ControlMapper::ECommands::TurnLeft, input) > 0.05f)
|
||||||
|
{
|
||||||
|
enableTurn = true;
|
||||||
|
turnAngleSpeed *= -ControlMapper::GetAnalogInput(ControlMapper::ECommands::TurnLeft, input);
|
||||||
|
}
|
||||||
|
if (ControlMapper::GetAnalogInput(ControlMapper::ECommands::TurnRight, input) > 0.05f)
|
||||||
|
{
|
||||||
|
enableTurn = true;
|
||||||
|
turnAngleSpeed *= ControlMapper::GetAnalogInput(ControlMapper::ECommands::TurnRight, input);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (x9c6_28_aligningGrappleSwingTurn)
|
||||||
|
{
|
||||||
|
enableTurn = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
x3bc_grappleSwingTimer += dt;
|
||||||
|
if (x3bc_grappleSwingTimer > g_tweakPlayer->GetGrappleSwingPeriod())
|
||||||
|
x3bc_grappleSwingTimer -= g_tweakPlayer->GetGrappleSwingPeriod();
|
||||||
|
|
||||||
|
zeus::CVector3f swingAxis = x3c0_grappleSwingAxis;
|
||||||
|
if (x3bc_grappleSwingTimer < 0.5f * g_tweakPlayer->GetGrappleSwingPeriod())
|
||||||
|
swingAxis *= zeus::CVector3f::skNegOne;
|
||||||
|
|
||||||
|
float pullSpeed = std::fabs(zeus::clamp(-1.f,
|
||||||
|
std::cos(2.f * M_PIF * (x3bc_grappleSwingTimer / g_tweakPlayer->GetGrappleSwingPeriod()) +
|
||||||
|
(M_PIF / 2.f)), 1.f)) * g_tweakPlayer->GetGrapplePullSpeedMin();
|
||||||
|
zeus::CVector3f pullVec = pointToPlayer.normalized().cross(swingAxis) * pullSpeed;
|
||||||
|
pullVec += pointToPlayer * zeus::clamp(-1.f, (pointToPlayer.magnitude() -
|
||||||
|
g_tweakPlayer->GetGrappleSwingLength()) /
|
||||||
|
g_tweakPlayer->GetGrappleSwingLength(), 1.f) * -32.f * pointToPlayerZProj;
|
||||||
|
zeus::CVector3f backupVel = x138_velocity;
|
||||||
|
SetVelocityWR(pullVec);
|
||||||
|
|
||||||
|
zeus::CTransform backupXf = x34_transform;
|
||||||
|
CMotionState predMotion = PredictMotion(dt);
|
||||||
|
zeus::CVector3f newPos = x34_transform.origin + predMotion.x0_translation;
|
||||||
|
if (ValidateFPPosition(newPos, mgr))
|
||||||
|
{
|
||||||
|
if (enableTurn)
|
||||||
|
{
|
||||||
|
zeus::CQuaternion turnRot;
|
||||||
|
turnRot.rotateZ(turnAngleSpeed * dt);
|
||||||
|
if (point->GetGrappleParameters().GetLockSwingTurn() && x9c6_28_aligningGrappleSwingTurn)
|
||||||
|
{
|
||||||
|
zeus::CVector3f pointDir = point->GetTransform().basis[1].normalized();
|
||||||
|
zeus::CVector3f playerDir = x34_transform.basis[1].normalized();
|
||||||
|
float playerPointProj = zeus::clamp(-1.f, playerDir.dot(pointDir), 1.f);
|
||||||
|
if (std::fabs(playerPointProj) == 1.f)
|
||||||
|
x9c6_28_aligningGrappleSwingTurn = false;
|
||||||
|
if (playerPointProj < 0.f)
|
||||||
|
{
|
||||||
|
playerPointProj = -playerPointProj;
|
||||||
|
pointDir = -pointDir;
|
||||||
|
}
|
||||||
|
float turnAngleAdj = std::acos(playerPointProj) * dt;
|
||||||
|
turnRot = zeus::CQuaternion::lookAt(playerDir, pointDir, turnAngleAdj);
|
||||||
|
}
|
||||||
|
if (pointToPlayer.magSquared() > 0.04f)
|
||||||
|
{
|
||||||
|
zeus::CVector3f pointToPlayerFlat = pointToPlayer;
|
||||||
|
pointToPlayerFlat.z = 0.f;
|
||||||
|
zeus::CVector3f playerToGrapplePlane =
|
||||||
|
point->GetTranslation() + turnRot.transform(pointToPlayerFlat) - GetTranslation();
|
||||||
|
if (playerToGrapplePlane.canBeNormalized())
|
||||||
|
pullVec += playerToGrapplePlane / dt;
|
||||||
|
}
|
||||||
|
zeus::CVector3f swingAxisBackup = x3c0_grappleSwingAxis;
|
||||||
|
x3c0_grappleSwingAxis = turnRot.transform(x3c0_grappleSwingAxis);
|
||||||
|
x3c0_grappleSwingAxis.normalize();
|
||||||
|
zeus::CVector3f swingForward(-x3c0_grappleSwingAxis.y, x3c0_grappleSwingAxis.x, 0.f);
|
||||||
|
x34_transform =
|
||||||
|
zeus::CTransform(x3c0_grappleSwingAxis, swingForward, zeus::CVector3f::skUp, GetTranslation());
|
||||||
|
xe4_27_ = true;
|
||||||
|
xe4_28_ = true;
|
||||||
|
xe4_29_ = true;
|
||||||
|
SetVelocityWR(pullVec);
|
||||||
|
|
||||||
|
if (!ValidateFPPosition(GetTranslation(), mgr))
|
||||||
|
{
|
||||||
|
x3c0_grappleSwingAxis = swingAxisBackup;
|
||||||
|
x34_transform = backupXf;
|
||||||
|
xe4_27_ = true;
|
||||||
|
xe4_28_ = true;
|
||||||
|
xe4_29_ = true;
|
||||||
|
SetVelocityWR(backupVel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
BreakGrapple(EPlayerOrbitRequest::Six, mgr);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case EGrappleState::JumpOff:
|
||||||
|
{
|
||||||
|
zeus::CVector3f gravForce = {0.f, 0.f, GetGravity() * xe8_mass};
|
||||||
|
ApplyForceOR(gravForce, zeus::CAxisAngle::sIdentity);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
zeus::CVector3f newAngVel = {0.f, 0.f, 0.9f * GetAngularVelocityOR().getVector().z};
|
||||||
|
SetAngularVelocityOR(newAngVel);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CPlayer::ValidateFPPosition(const zeus::CVector3f& pos, CStateManager& mgr)
|
||||||
|
{
|
||||||
|
CMaterialFilter solidFilter = CMaterialFilter::MakeInclude({EMaterialTypes::Solid});
|
||||||
|
zeus::CAABox aabb(x2d8_.min - 1.f + pos, x2d8_.max + 1.f + pos);
|
||||||
|
rstl::reserved_vector<TUniqueId, 1024> nearList;
|
||||||
|
mgr.BuildColliderList(nearList, *this, aabb);
|
||||||
|
CCollidableAABox colAABB({GetBaseBoundingBox().min + pos, GetBaseBoundingBox().max + pos}, {});
|
||||||
|
return !CGameCollision::DetectCollisionBoolean(mgr, colAABB, zeus::CTransform::Identity(), solidFilter, nearList);
|
||||||
|
}
|
||||||
|
|
||||||
void CPlayer::UpdateGrappleState(const CFinalInput& input, CStateManager& mgr)
|
void CPlayer::UpdateGrappleState(const CFinalInput& input, CStateManager& mgr)
|
||||||
{
|
{
|
||||||
|
@ -1637,7 +1978,7 @@ void CPlayer::UpdateGrappleState(const CFinalInput& input, CStateManager& mgr)
|
||||||
|
|
||||||
if (x310_orbitTargetId == kInvalidUniqueId)
|
if (x310_orbitTargetId == kInvalidUniqueId)
|
||||||
{
|
{
|
||||||
x3b8_grappleState = EGrappleState::Zero;
|
x3b8_grappleState = EGrappleState::None;
|
||||||
AddMaterial(EMaterialTypes::GroundCollider, mgr);
|
AddMaterial(EMaterialTypes::GroundCollider, mgr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1673,7 +2014,7 @@ void CPlayer::UpdateGrappleState(const CFinalInput& input, CStateManager& mgr)
|
||||||
x3c0_grappleSwingAxis.normalize();
|
x3c0_grappleSwingAxis.normalize();
|
||||||
x3bc_grappleSwingTimer = 0.f;
|
x3bc_grappleSwingTimer = 0.f;
|
||||||
SetOrbitTargetId(x33c_, mgr);
|
SetOrbitTargetId(x33c_, mgr);
|
||||||
x3b8_grappleState = EGrappleState::Two;
|
x3b8_grappleState = EGrappleState::Pull;
|
||||||
x33c_ = kInvalidUniqueId;
|
x33c_ = kInvalidUniqueId;
|
||||||
x490_gun->GetGrappleArm().GrappleBeamConnected();
|
x490_gun->GetGrappleArm().GrappleBeamConnected();
|
||||||
}
|
}
|
||||||
|
@ -1702,8 +2043,8 @@ void CPlayer::UpdateGrappleState(const CFinalInput& input, CStateManager& mgr)
|
||||||
HolsterGun(mgr);
|
HolsterGun(mgr);
|
||||||
switch (x3b8_grappleState)
|
switch (x3b8_grappleState)
|
||||||
{
|
{
|
||||||
case EGrappleState::One:
|
case EGrappleState::Firing:
|
||||||
case EGrappleState::Three:
|
case EGrappleState::Swinging:
|
||||||
switch (g_tweakPlayer->GetGrappleJumpMode())
|
switch (g_tweakPlayer->GetGrappleJumpMode())
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -1742,8 +2083,8 @@ void CPlayer::UpdateGrappleState(const CFinalInput& input, CStateManager& mgr)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EGrappleState::Zero:
|
case EGrappleState::None:
|
||||||
x3b8_grappleState = EGrappleState::One;
|
x3b8_grappleState = EGrappleState::Firing;
|
||||||
x490_gun->GetGrappleArm().Activate(true);
|
x490_gun->GetGrappleArm().Activate(true);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -1776,7 +2117,7 @@ void CPlayer::UpdateGrappleState(const CFinalInput& input, CStateManager& mgr)
|
||||||
switch (g_tweakPlayer->GetGrappleJumpMode())
|
switch (g_tweakPlayer->GetGrappleJumpMode())
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
if (x3b8_grappleState == EGrappleState::Four)
|
if (x3b8_grappleState == EGrappleState::JumpOff)
|
||||||
{
|
{
|
||||||
x3d8_grappleJumpTimeout -= input.DeltaTime();
|
x3d8_grappleJumpTimeout -= input.DeltaTime();
|
||||||
if (x3d8_grappleJumpTimeout <= 0.f)
|
if (x3d8_grappleJumpTimeout <= 0.f)
|
||||||
|
@ -1791,16 +2132,16 @@ void CPlayer::UpdateGrappleState(const CFinalInput& input, CStateManager& mgr)
|
||||||
case 1:
|
case 1:
|
||||||
switch (x3b8_grappleState)
|
switch (x3b8_grappleState)
|
||||||
{
|
{
|
||||||
case EGrappleState::Three:
|
case EGrappleState::Swinging:
|
||||||
if (!ControlMapper::GetDigitalInput(ControlMapper::ECommands::FireOrBomb, input) &&
|
if (!ControlMapper::GetDigitalInput(ControlMapper::ECommands::FireOrBomb, input) &&
|
||||||
x3d8_grappleJumpTimeout <= 0.f)
|
x3d8_grappleJumpTimeout <= 0.f)
|
||||||
{
|
{
|
||||||
x3d8_grappleJumpTimeout = g_tweakPlayer->GetGrappleReleaseTime();
|
x3d8_grappleJumpTimeout = g_tweakPlayer->GetGrappleReleaseTime();
|
||||||
x3b8_grappleState = EGrappleState::Four;
|
x3b8_grappleState = EGrappleState::JumpOff;
|
||||||
ApplyGrappleJump(mgr);
|
ApplyGrappleJump(mgr);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EGrappleState::Four:
|
case EGrappleState::JumpOff:
|
||||||
x3d8_grappleJumpTimeout -= input.DeltaTime();
|
x3d8_grappleJumpTimeout -= input.DeltaTime();
|
||||||
if (x3d8_grappleJumpTimeout <= 0.f)
|
if (x3d8_grappleJumpTimeout <= 0.f)
|
||||||
{
|
{
|
||||||
|
@ -1810,8 +2151,8 @@ void CPlayer::UpdateGrappleState(const CFinalInput& input, CStateManager& mgr)
|
||||||
PreventFallingCameraPitch();
|
PreventFallingCameraPitch();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EGrappleState::One:
|
case EGrappleState::Firing:
|
||||||
case EGrappleState::Two:
|
case EGrappleState::Pull:
|
||||||
if (!ControlMapper::GetDigitalInput(ControlMapper::ECommands::FireOrBomb, input))
|
if (!ControlMapper::GetDigitalInput(ControlMapper::ECommands::FireOrBomb, input))
|
||||||
BreakGrapple(EPlayerOrbitRequest::Zero, mgr);
|
BreakGrapple(EPlayerOrbitRequest::Zero, mgr);
|
||||||
break;
|
break;
|
||||||
|
@ -1870,7 +2211,7 @@ void CPlayer::BeginGrapple(zeus::CVector3f& vec, CStateManager& mgr)
|
||||||
x3c0_grappleSwingAxis.normalize();
|
x3c0_grappleSwingAxis.normalize();
|
||||||
x3bc_grappleSwingTimer = 0.f;
|
x3bc_grappleSwingTimer = 0.f;
|
||||||
SetOrbitState(EPlayerOrbitState::Five, mgr);
|
SetOrbitState(EPlayerOrbitState::Five, mgr);
|
||||||
x3b8_grappleState = EGrappleState::Two;
|
x3b8_grappleState = EGrappleState::Pull;
|
||||||
RemoveMaterial(EMaterialTypes::GroundCollider, mgr);
|
RemoveMaterial(EMaterialTypes::GroundCollider, mgr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1879,17 +2220,17 @@ void CPlayer::BreakGrapple(EPlayerOrbitRequest req, CStateManager& mgr)
|
||||||
{
|
{
|
||||||
x294_jumpCameraPitchTimer = 0.f;
|
x294_jumpCameraPitchTimer = 0.f;
|
||||||
x29c_spaceJumpCameraPitchTimer = 0.f;
|
x29c_spaceJumpCameraPitchTimer = 0.f;
|
||||||
if (g_tweakPlayer->GetGrappleJumpMode() == 2 && x3b8_grappleState == EGrappleState::Three)
|
if (g_tweakPlayer->GetGrappleJumpMode() == 2 && x3b8_grappleState == EGrappleState::Swinging)
|
||||||
{
|
{
|
||||||
ApplyGrappleJump(mgr);
|
ApplyGrappleJump(mgr);
|
||||||
PreventFallingCameraPitch();
|
PreventFallingCameraPitch();
|
||||||
}
|
}
|
||||||
|
|
||||||
SetOrbitRequest(req, mgr);
|
SetOrbitRequest(req, mgr);
|
||||||
x3b8_grappleState = EGrappleState::Zero;
|
x3b8_grappleState = EGrappleState::None;
|
||||||
AddMaterial(EMaterialTypes::GroundCollider, mgr);
|
AddMaterial(EMaterialTypes::GroundCollider, mgr);
|
||||||
x490_gun->GetGrappleArm().SetAnimState(CGrappleArm::EArmState::Eight);
|
x490_gun->GetGrappleArm().SetAnimState(CGrappleArm::EArmState::Eight);
|
||||||
if (!InGrappleJumpCooldown() && x3b8_grappleState != EGrappleState::Four)
|
if (!InGrappleJumpCooldown() && x3b8_grappleState != EGrappleState::JumpOff)
|
||||||
DrawGun(mgr);
|
DrawGun(mgr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2517,7 +2858,7 @@ bool CPlayer::CFailsafeTest::Passes() const
|
||||||
if (posMag >= 1.f / 30.f && posMag >= minVelMag / 30.f)
|
if (posMag >= 1.f / 30.f && posMag >= minVelMag / 30.f)
|
||||||
test1 = false;
|
test1 = false;
|
||||||
|
|
||||||
if (!notEqualStates && x0_stateSamples[0] == EInputState::StartingJump)
|
if (notEqualStates == 0 && x0_stateSamples[0] == EInputState::StartingJump)
|
||||||
{
|
{
|
||||||
float inputMag = (inputAABB.max - inputAABB.min).magnitude();
|
float inputMag = (inputAABB.max - inputAABB.min).magnitude();
|
||||||
zeus::CAABox inputFrom0AABB(inputAABB);
|
zeus::CAABox inputFrom0AABB(inputAABB);
|
||||||
|
@ -2552,7 +2893,7 @@ void CPlayer::IncrementPhazon()
|
||||||
|
|
||||||
bool CPlayer::CheckSubmerged() const
|
bool CPlayer::CheckSubmerged() const
|
||||||
{
|
{
|
||||||
if (!xe6_24_fluidCounter)
|
if (xe6_24_fluidCounter == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return x828_waterLevelOnPlayer >= (x2f8_morphTransState == EPlayerMorphBallState::Morphed ?
|
return x828_waterLevelOnPlayer >= (x2f8_morphTransState == EPlayerMorphBallState::Morphed ?
|
||||||
|
@ -2563,7 +2904,7 @@ void CPlayer::UpdateSubmerged(CStateManager& mgr)
|
||||||
{
|
{
|
||||||
x82c_inLava = false;
|
x82c_inLava = false;
|
||||||
x828_waterLevelOnPlayer = 0.f;
|
x828_waterLevelOnPlayer = 0.f;
|
||||||
if (xe6_24_fluidCounter)
|
if (xe6_24_fluidCounter != 0)
|
||||||
{
|
{
|
||||||
if (TCastToPtr<CScriptWater> water = mgr.ObjectById(xc4_fluidId))
|
if (TCastToPtr<CScriptWater> water = mgr.ObjectById(xc4_fluidId))
|
||||||
{
|
{
|
||||||
|
|
|
@ -143,12 +143,11 @@ public:
|
||||||
|
|
||||||
enum class EGrappleState
|
enum class EGrappleState
|
||||||
{
|
{
|
||||||
Zero,
|
None,
|
||||||
One,
|
Firing,
|
||||||
Two,
|
Pull,
|
||||||
Three,
|
Swinging,
|
||||||
Four,
|
JumpOff
|
||||||
Five
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class EGunHolsterState
|
enum class EGunHolsterState
|
||||||
|
@ -246,7 +245,7 @@ private:
|
||||||
std::vector<TUniqueId> x364_offScreenOrbitObjects;
|
std::vector<TUniqueId> x364_offScreenOrbitObjects;
|
||||||
bool x374_ = false;
|
bool x374_ = false;
|
||||||
float x378_ = 0.f;
|
float x378_ = 0.f;
|
||||||
bool x37c_ = false;
|
bool x37c_sidewaysDashing = false;
|
||||||
float x380_ = 0.f;
|
float x380_ = 0.f;
|
||||||
float x384_ = 0.f;
|
float x384_ = 0.f;
|
||||||
float x388_ = 0.f;
|
float x388_ = 0.f;
|
||||||
|
@ -261,7 +260,7 @@ private:
|
||||||
float x3ac_scanningTime = 0.f;
|
float x3ac_scanningTime = 0.f;
|
||||||
float x3b0_ = 0.f;
|
float x3b0_ = 0.f;
|
||||||
TUniqueId x3b4_scanningObject = kInvalidUniqueId;
|
TUniqueId x3b4_scanningObject = kInvalidUniqueId;
|
||||||
EGrappleState x3b8_grappleState = EGrappleState::Zero;
|
EGrappleState x3b8_grappleState = EGrappleState::None;
|
||||||
float x3bc_grappleSwingTimer = 0.f;
|
float x3bc_grappleSwingTimer = 0.f;
|
||||||
zeus::CVector3f x3c0_grappleSwingAxis = zeus::CVector3f::skRight;
|
zeus::CVector3f x3c0_grappleSwingAxis = zeus::CVector3f::skRight;
|
||||||
float x3cc_ = 0.f;
|
float x3cc_ = 0.f;
|
||||||
|
@ -372,7 +371,7 @@ private:
|
||||||
bool x9c6_25_ : 1;
|
bool x9c6_25_ : 1;
|
||||||
bool x9c6_26_ : 1;
|
bool x9c6_26_ : 1;
|
||||||
bool x9c6_27_aimingAtProjectile : 1;
|
bool x9c6_27_aimingAtProjectile : 1;
|
||||||
bool x9c6_28_ : 1;
|
bool x9c6_28_aligningGrappleSwingTurn : 1;
|
||||||
bool x9c6_29_disableInput : 1;
|
bool x9c6_29_disableInput : 1;
|
||||||
bool x9c6_30_newScanScanning : 1;
|
bool x9c6_30_newScanScanning : 1;
|
||||||
bool x9c6_31_overrideRadarRadius : 1;
|
bool x9c6_31_overrideRadarRadius : 1;
|
||||||
|
@ -496,6 +495,7 @@ public:
|
||||||
EPlayerCameraState GetCameraState() const { return x2f4_cameraState; }
|
EPlayerCameraState GetCameraState() const { return x2f4_cameraState; }
|
||||||
EPlayerMorphBallState GetMorphballTransitionState() const { return x2f8_morphTransState; }
|
EPlayerMorphBallState GetMorphballTransitionState() const { return x2f8_morphTransState; }
|
||||||
void UpdateGrappleArmTransform(const zeus::CVector3f&, CStateManager& mgr, float);
|
void UpdateGrappleArmTransform(const zeus::CVector3f&, CStateManager& mgr, float);
|
||||||
|
float GetGravity() const;
|
||||||
void ApplyGrappleForces(const CFinalInput& input, CStateManager& mgr, float);
|
void ApplyGrappleForces(const CFinalInput& input, CStateManager& mgr, float);
|
||||||
bool ValidateFPPosition(const zeus::CVector3f& pos, CStateManager& mgr);
|
bool ValidateFPPosition(const zeus::CVector3f& pos, CStateManager& mgr);
|
||||||
void UpdateGrappleState(const CFinalInput& input, CStateManager& mgr);
|
void UpdateGrappleState(const CFinalInput& input, CStateManager& mgr);
|
||||||
|
|
|
@ -15,6 +15,7 @@ public:
|
||||||
bool active, const CGrappleParameters& params);
|
bool active, const CGrappleParameters& params);
|
||||||
|
|
||||||
void Accept(IVisitor& visitor);
|
void Accept(IVisitor& visitor);
|
||||||
|
const CGrappleParameters& GetGrappleParameters() const { return x100_parameters; }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ CScriptPlatform::CScriptPlatform(TUniqueId uid, const std::string& name, const C
|
||||||
{
|
{
|
||||||
CActor::SetMaterialFilter(CMaterialFilter::MakeIncludeExclude(
|
CActor::SetMaterialFilter(CMaterialFilter::MakeIncludeExclude(
|
||||||
CMaterialList(EMaterialTypes::Solid),
|
CMaterialList(EMaterialTypes::Solid),
|
||||||
CMaterialList(EMaterialTypes::StaticCollision, EMaterialTypes::Twenty, EMaterialTypes::Platform)));
|
CMaterialList(EMaterialTypes::NoStaticCollision, EMaterialTypes::Twenty, EMaterialTypes::Platform)));
|
||||||
if (x304_treeGroupContainer)
|
if (x304_treeGroupContainer)
|
||||||
x314_treeGroup = std::make_unique<CCollidableOBBTreeGroup>(x304_treeGroupContainer->GetObj(), x68_material);
|
x314_treeGroup = std::make_unique<CCollidableOBBTreeGroup>(x304_treeGroupContainer->GetObj(), x68_material);
|
||||||
}
|
}
|
||||||
|
|
103
Runtime/rstl.hpp
103
Runtime/rstl.hpp
|
@ -60,6 +60,109 @@ ForwardIt binary_find(ForwardIt first, ForwardIt last, const T& value, GetKey ge
|
||||||
first = std::lower_bound(first, last, value, comp);
|
first = std::lower_bound(first, last, value, comp);
|
||||||
return (!(first == last) && !(value < getkey(*first))) ? first : last;
|
return (!(first == last) && !(value < getkey(*first))) ? first : last;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
template <typename _CharTp>
|
||||||
|
class basic_string
|
||||||
|
{
|
||||||
|
struct COWData
|
||||||
|
{
|
||||||
|
uint32_t x0_capacity;
|
||||||
|
uint32_t x4_refCount;
|
||||||
|
_CharTp x8_data[];
|
||||||
|
};
|
||||||
|
|
||||||
|
const _CharTp* x0_ptr;
|
||||||
|
COWData* x4_cow;
|
||||||
|
uint32_t x8_size;
|
||||||
|
|
||||||
|
void internal_allocate(int size)
|
||||||
|
{
|
||||||
|
x4_cow = reinterpret_cast<COWData*>(new uint8_t[size * sizeof(_CharTp) + 8]);
|
||||||
|
x0_ptr = x4_cow->x8_data;
|
||||||
|
x4_cow->x0_capacity = uint32_t(size);
|
||||||
|
x4_cow->x4_refCount = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const _CharTp _EmptyString;
|
||||||
|
|
||||||
|
public:
|
||||||
|
struct literal_t {};
|
||||||
|
|
||||||
|
basic_string(literal_t, const _CharTp* data)
|
||||||
|
{
|
||||||
|
x0_ptr = data;
|
||||||
|
x4_cow = nullptr;
|
||||||
|
|
||||||
|
const _CharTp* it = data;
|
||||||
|
while (*it)
|
||||||
|
++it;
|
||||||
|
|
||||||
|
x8_size = uint32_t((it - data) / sizeof(_CharTp));
|
||||||
|
}
|
||||||
|
|
||||||
|
basic_string(const basic_string& str)
|
||||||
|
{
|
||||||
|
x0_ptr = str.x0_ptr;
|
||||||
|
x4_cow = str.x4_cow;
|
||||||
|
x8_size = str.x8_size;
|
||||||
|
if (x4_cow)
|
||||||
|
++x4_cow->x4_refCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
basic_string(const _CharTp* data, int size)
|
||||||
|
{
|
||||||
|
if (size <= 0 && !data)
|
||||||
|
{
|
||||||
|
x0_ptr = &_EmptyString;
|
||||||
|
x4_cow = nullptr;
|
||||||
|
x8_size = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const _CharTp* it = data;
|
||||||
|
uint32_t len = 0;
|
||||||
|
while (*it)
|
||||||
|
{
|
||||||
|
if (size != -1 && len >= size)
|
||||||
|
break;
|
||||||
|
++it;
|
||||||
|
++len;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal_allocate(len + 1);
|
||||||
|
x8_size = len;
|
||||||
|
for (int i = 0; i < len; ++i)
|
||||||
|
x4_cow->x8_data[i] = data[i];
|
||||||
|
x4_cow->x8_data[len] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
~basic_string()
|
||||||
|
{
|
||||||
|
if (x4_cow && --x4_cow->x4_refCount == 0)
|
||||||
|
delete[] x4_cow;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
template <>
|
||||||
|
const char basic_string<char>::_EmptyString = 0;
|
||||||
|
template <>
|
||||||
|
const wchar_t basic_string<wchar_t>::_EmptyString = 0;
|
||||||
|
|
||||||
|
typedef basic_string<wchar_t> wstring;
|
||||||
|
typedef basic_string<char> string;
|
||||||
|
|
||||||
|
wstring wstring_l(const wchar_t* data)
|
||||||
|
{
|
||||||
|
return wstring(wstring::literal_t(), data);
|
||||||
|
}
|
||||||
|
|
||||||
|
string string_l(const char* data)
|
||||||
|
{
|
||||||
|
return string(string::literal_t(), data);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __RSTL_HPP__
|
#endif // __RSTL_HPP__
|
||||||
|
|
2
hecl
2
hecl
|
@ -1 +1 @@
|
||||||
Subproject commit 204ddd5adf94822abafb25eb0771ddf2a2fa2f65
|
Subproject commit d56b3d0d8b598f522ee25b8fb461ef5426044eea
|
Loading…
Reference in New Issue