From 5df367d7fb93c23f18e1993ca2eaf1f16490dc52 Mon Sep 17 00:00:00 2001 From: SNMetamorph <25657591+SNMetamorph@users.noreply.github.com> Date: Sun, 10 Sep 2023 09:34:11 +0400 Subject: [PATCH] server: novodex: fixed wrong maximum linear velocity limit --- server/novodex.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/novodex.cpp b/server/novodex.cpp index 0c1bfcd4..071d83f2 100644 --- a/server/novodex.cpp +++ b/server/novodex.cpp @@ -1057,7 +1057,7 @@ void *CPhysicNovodex :: CreateBodyFromEntity( CBaseEntity *pObject ) } float mat[16]; - float maxSpeed = CVAR_GET_FLOAT("sv_maxspeed"); + float maxVelocity = CVAR_GET_FLOAT("sv_maxvelocity"); matrix4x4(pObject->GetAbsOrigin(), pObject->GetAbsAngles(), 1.0f).CopyToArray(mat); PxTransform pose = PxTransform(PxMat44(mat)); @@ -1067,7 +1067,7 @@ void *CPhysicNovodex :: CreateBodyFromEntity( CBaseEntity *pObject ) pActor->setRigidBodyFlag(PxRigidBodyFlag::eENABLE_CCD, true); pActor->setLinearVelocity(pObject->GetLocalVelocity()); pActor->setAngularVelocity(pObject->GetLocalAvelocity()); - pActor->setMaxLinearVelocity(maxSpeed); + pActor->setMaxLinearVelocity(maxVelocity); pActor->setMaxAngularVelocity(720.0); pActor->userData = pObject->edict(); PxRigidBodyExt::updateMassAndInertia(*pActor, k_DensityFactor);