dragonriding

This commit is contained in:
luis
2026-03-17 22:39:51 -03:00
parent b06857173c
commit 01cf332cfa
2 changed files with 12 additions and 1 deletions
+11 -1
View File
@@ -9040,6 +9040,7 @@ void Unit::SetFlightCapabilityID(int32 flightCapabilityId, bool clientUpdate)
UpdateAdvFlyingSpeed(ADV_FLYING_SURFACE_FRICTION, clientUpdate);
UpdateAdvFlyingSpeed(ADV_FLYING_OVER_MAX_DECELERATION, clientUpdate);
UpdateAdvFlyingSpeed(ADV_FLYING_LAUNCH_SPEED_COEFFICIENT, clientUpdate);
CalculateAdvFlyingSpeeds();
}
void Unit::UpdateAdvFlyingSpeed(AdvFlyingRateTypeSingle speedType, bool clientUpdate)
@@ -13888,7 +13889,7 @@ bool Unit::SetCanAdvFly(bool enable)
if (enable)
AddExtraUnitMovementFlag2(MOVEMENTFLAG3_CAN_ADV_FLY);
else
RemoveExtraUnitMovementFlag2(MOVEMENTFLAG3_CAN_ADV_FLY | MOVEMENTFLAG3_ADV_FLYING);
RemoveExtraUnitMovementFlag2(MOVEMENTFLAG3_CAN_ADV_FLY);
static OpcodeServer const advFlyOpcodeTable[2] =
{
@@ -14638,3 +14639,12 @@ void Unit::CalculateAdvFlyingSpeeds()
// m_advFlyingSpeed[ADV_FLYING_TURN_VELOCITY_THRESHOLD_MIN] = flightCapabilityEntry->TurnVelocityThresholdMin;
// m_advFlyingSpeed[ADV_FLYING_TURN_VELOCITY_THRESHOLD_MAX] = flightCapabilityEntry->TurnVelocityThresholdMax;
}
float Unit::GetAdvFlyingVelocity() const
{
Optional<MovementInfo::AdvFlying> const& advFlying = m_movementInfo.advFlying;
if (!advFlying)
return .0f;
return std::sqrt(advFlying->forwardVelocity * advFlying->forwardVelocity + advFlying->upVelocity * advFlying->upVelocity);
}
+1
View File
@@ -1885,6 +1885,7 @@ class TC_GAME_API Unit : public WorldObject
void SendAddImpulse(Position const& direction);
int32 GetDriveCapabilityID() const { return m_unitData->DriveCapabilityID; }
void SetDriveCapabilityID(int32 driveCapabilityId, bool clientUpdate);
float GetAdvFlyingVelocity() const;
//WowCommunity
protected: