(fdc038d5d) Keymapping and UX test: - Map use to "E" and Select to "Left Mouse". - Introduce a dedicated key for deselecting ("Right Mouse"). - Introduce a dedicated key for shooting ("Left Mouse"). - Define certain objects as shootables, which simply means that they use the "Shoot" key instead of using the "Use" key. This required the least amount of refactoring the existing code. - TODO: don't register the "Select" input when aiming or when an interface is open -> should prevent interacting through UI elements. - TODO: sync the new input types with the server.
This commit is contained in:
@@ -543,19 +543,19 @@ namespace Barotrauma
|
||||
if (ForceVelocityLimit < 1000.0f)
|
||||
body.ApplyForce(Force * currentForceFluctuation * distFactor, ForceVelocityLimit);
|
||||
else
|
||||
body.ApplyForce(Force * currentForceFluctuation * distFactor, maxVelocity: NetConfig.MaxPhysicsBodyVelocity);
|
||||
body.ApplyForce(Force * currentForceFluctuation * distFactor);
|
||||
break;
|
||||
case TriggerForceMode.Acceleration:
|
||||
if (ForceVelocityLimit < 1000.0f)
|
||||
body.ApplyForce(Force * body.Mass * currentForceFluctuation * distFactor, ForceVelocityLimit);
|
||||
else
|
||||
body.ApplyForce(Force * body.Mass * currentForceFluctuation * distFactor, maxVelocity: NetConfig.MaxPhysicsBodyVelocity);
|
||||
body.ApplyForce(Force * body.Mass * currentForceFluctuation * distFactor);
|
||||
break;
|
||||
case TriggerForceMode.Impulse:
|
||||
if (ForceVelocityLimit < 1000.0f)
|
||||
body.ApplyLinearImpulse(Force * currentForceFluctuation * distFactor, maxVelocity: ForceVelocityLimit);
|
||||
body.ApplyLinearImpulse(Force * currentForceFluctuation * distFactor, ForceVelocityLimit);
|
||||
else
|
||||
body.ApplyLinearImpulse(Force * currentForceFluctuation * distFactor, maxVelocity: NetConfig.MaxPhysicsBodyVelocity);
|
||||
body.ApplyLinearImpulse(Force * currentForceFluctuation * distFactor);
|
||||
break;
|
||||
case TriggerForceMode.LimitVelocity:
|
||||
float maxVel = ForceVelocityLimit * currentForceFluctuation * distFactor;
|
||||
@@ -563,8 +563,7 @@ namespace Barotrauma
|
||||
{
|
||||
body.ApplyForce(
|
||||
Vector2.Normalize(-body.LinearVelocity) *
|
||||
Force.Length() * body.Mass * currentForceFluctuation * distFactor,
|
||||
maxVelocity: NetConfig.MaxPhysicsBodyVelocity);
|
||||
Force.Length() * body.Mass * currentForceFluctuation * distFactor);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user