Add some animals basic mechanics (#5132)

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
FoLoKe
2021-11-13 04:48:05 +03:00
committed by GitHub
parent 2353d340d0
commit 5f3ae602ed
49 changed files with 522 additions and 163 deletions

View File

@@ -79,7 +79,10 @@ namespace Content.Server.Climbing.Components
if (velocity <= 0.0f) return;
Body.ApplyLinearImpulse((to - from).Normalized * velocity * 400);
// Since there are bodies with different masses:
// mass * 5 seems enough to move entity
// instead of launching cats like rockets against the walls with constant impulse value.
Body.ApplyLinearImpulse((to - from).Normalized * velocity * Body.Mass * 5);
OwnerIsTransitioning = true;
Owner.SpawnTimer((int) (BufferTime * 1000), () =>