CMorphBall: Convert TCastToPtr to TCastToConstPtr

Same behavior, but makes the read-only intent explicit.
This commit is contained in:
Lioncash 2020-05-11 14:23:12 -04:00
parent a73a7b22e7
commit 37138fb584
1 changed files with 1 additions and 1 deletions

View File

@ -2190,7 +2190,7 @@ float CMorphBall::ComputeMaxSpeed() const {
constexpr CDamageInfo kBallDamage = {CWeaponMode(EWeaponType::BoostBall), 50000.f, 0.f, 0.f};
void CMorphBall::Touch(CActor& actor, CStateManager& mgr) {
if (const TCastToPtr<CPhysicsActor> act = actor) {
if (const TCastToConstPtr<CPhysicsActor> act = actor) {
if (x1de4_24_inBoost && (act->GetVelocity() - x0_player.GetVelocity()).magnitude() >
g_tweakBall->GetBoostBallMinRelativeSpeedForDamage()) {
mgr.ApplyDamage(x0_player.GetUniqueId(), actor.GetUniqueId(), x0_player.GetUniqueId(), kBallDamage,