Added InfiniteStamina:Packet for Waverider(Boat)

This commit is contained in:
Joaquin 2022-08-09 03:21:37 -06:00
parent 8e9e75e938
commit 1811b3b46f

View File

@ -79,36 +79,41 @@ namespace cheat::feature
static bool afterDash = false; static bool afterDash = false;
auto& manager = game::EntityManager::instance(); auto& manager = game::EntityManager::instance();
if (manager.avatar()->runtimeID() != entityId) auto entity = manager.entity(entityId);
return; if (entity->type() == app::EntityType__Enum_1::Vehicle || entity->isAvatar())
// LOG_DEBUG("Movement packet: %s", magic_enum::enum_name(syncInfo->fields.motionState).data());
if (f_Enabled && f_PacketReplacement)
{ {
auto state = syncInfo->fields.motionState; // LOG_DEBUG("Movement packet: %s", magic_enum::enum_name(syncInfo->fields.motionState).data());
switch (state) if (f_Enabled && f_PacketReplacement)
{ {
case app::MotionState__Enum::MotionDash: auto state = syncInfo->fields.motionState;
case app::MotionState__Enum::MotionClimb: switch (state)
case app::MotionState__Enum::MotionClimbJump: {
case app::MotionState__Enum::MotionStandbyToClimb: case app::MotionState__Enum::MotionDash:
case app::MotionState__Enum::MotionSwimDash: case app::MotionState__Enum::MotionClimb:
case app::MotionState__Enum::MotionSwimIdle: case app::MotionState__Enum::MotionClimbJump:
case app::MotionState__Enum::MotionSwimMove: case app::MotionState__Enum::MotionStandbyToClimb:
case app::MotionState__Enum::MotionSwimJump: case app::MotionState__Enum::MotionSwimDash:
case app::MotionState__Enum::MotionFly: case app::MotionState__Enum::MotionSwimIdle:
case app::MotionState__Enum::MotionFight: case app::MotionState__Enum::MotionSwimMove:
case app::MotionState__Enum::MotionDashBeforeShake: case app::MotionState__Enum::MotionSwimJump:
case app::MotionState__Enum::MotionDangerDash: case app::MotionState__Enum::MotionFly:
syncInfo->fields.motionState = app::MotionState__Enum::MotionRun; case app::MotionState__Enum::MotionFight:
break; case app::MotionState__Enum::MotionDashBeforeShake:
case app::MotionState__Enum::MotionJump: case app::MotionState__Enum::MotionDangerDash:
if (afterDash)
syncInfo->fields.motionState = app::MotionState__Enum::MotionRun; syncInfo->fields.motionState = app::MotionState__Enum::MotionRun;
break; break;
case app::MotionState__Enum::MotionJump:
if (afterDash)
syncInfo->fields.motionState = app::MotionState__Enum::MotionRun;
break;
case app::MotionState__Enum::MotionSkiffDash:
case app::MotionState__Enum::MotionSkiffPoweredDash:
syncInfo->fields.motionState = app::MotionState__Enum::MotionSkiffNormal;
break;
}
if (state != app::MotionState__Enum::MotionJump && state != app::MotionState__Enum::MotionFallOnGround)
afterDash = state == app::MotionState__Enum::MotionDash;
} }
if (state != app::MotionState__Enum::MotionJump && state != app::MotionState__Enum::MotionFallOnGround)
afterDash = state == app::MotionState__Enum::MotionDash;
} }
} }