-
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.
- Also bump version
- Loading branch information
Showing
3 changed files
with
105 additions
and
1 deletion.
There are no files selected for viewing
59 changes: 59 additions & 0 deletions
59
Fika.Core/Coop/ClientClasses/HandsControllers/CoopClientPortableRangeFinderController.cs
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,59 @@ | ||
using EFT; | ||
using EFT.InventoryLogic; | ||
using Fika.Core.Coop.Players; | ||
using Fika.Core.Networking; | ||
|
||
namespace Fika.Core.Coop.ClientClasses | ||
{ | ||
public class CoopClientPortableRangeFinderController : PortableRangeFinderController | ||
{ | ||
protected CoopPlayer player; | ||
|
||
public static CoopClientPortableRangeFinderController Create(CoopPlayer player, Item item) | ||
{ | ||
CoopClientPortableRangeFinderController controller = smethod_6<CoopClientPortableRangeFinderController>(player, item); | ||
controller.player = player; | ||
return controller; | ||
} | ||
|
||
public override void CompassStateHandler(bool isActive) | ||
{ | ||
base.CompassStateHandler(isActive); | ||
UsableItemPacket packet = new(player.NetId) | ||
{ | ||
HasCompassState = true, | ||
CompassState = isActive | ||
}; | ||
player.PacketSender.SendPacket(ref packet); | ||
} | ||
|
||
public override bool ExamineWeapon() | ||
{ | ||
bool flag = base.ExamineWeapon(); | ||
if (flag) | ||
{ | ||
UsableItemPacket packet = new(player.NetId) | ||
{ | ||
ExamineWeapon = true | ||
}; | ||
player.PacketSender.SendPacket(ref packet); | ||
} | ||
return flag; | ||
} | ||
|
||
public override void SetAim(bool value) | ||
{ | ||
bool isAiming = IsAiming; | ||
base.SetAim(value); | ||
if (IsAiming != isAiming) | ||
{ | ||
UsableItemPacket packet = new(player.NetId) | ||
{ | ||
HasAim = value, | ||
AimState = isAiming | ||
}; | ||
player.PacketSender.SendPacket(ref packet); | ||
} | ||
} | ||
} | ||
} |
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