-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
45 changed files
with
967 additions
and
302 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using EFT; | ||
using System; | ||
using UnityEngine; | ||
|
||
namespace Fika.Core.Coop.ClientClasses | ||
{ | ||
public class ClientMovementContext : MovementContext | ||
{ | ||
private bool doGravity; | ||
|
||
public new static ClientMovementContext Create(Player player, Func<IAnimator> animatorGetter, Func<ICharacterController> characterControllerGetter, LayerMask groundMask) | ||
{ | ||
ClientMovementContext movementContext = Create<ClientMovementContext>(player, animatorGetter, characterControllerGetter, groundMask); | ||
return movementContext; | ||
} | ||
|
||
public override void Init() | ||
{ | ||
doGravity = true; | ||
base.Init(); | ||
} | ||
|
||
public override void ApplyGravity(ref Vector3 motion, float deltaTime, bool stickToGround) | ||
{ | ||
if (!doGravity) | ||
{ | ||
return; | ||
} | ||
|
||
base.ApplyGravity(ref motion, deltaTime, stickToGround); | ||
} | ||
|
||
public void SetGravity(bool enabled) | ||
{ | ||
doGravity = enabled; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.