Skip to content

Commit

Permalink
server: novodex: fixed wrong maximum linear velocity limit
Browse files Browse the repository at this point in the history
  • Loading branch information
SNMetamorph committed Sep 10, 2023
1 parent d8b5779 commit 569c951
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/novodex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand All @@ -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);
Expand Down

0 comments on commit 569c951

Please sign in to comment.