Skip to content

Commit

Permalink
Fixed an issue with CigarettePack teleporting Cigs into Host's Hand
Browse files Browse the repository at this point in the history
  • Loading branch information
HerpDerpinstine committed Dec 3, 2024
1 parent d3e9159 commit a40526e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Patches/Patch_CigarettePack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Il2CppMirror;
using Il2CppProps.Scripts;
using Il2CppProps.Smoking;
using UnityEngine;

namespace DDSS_LobbyGuard.Patches
{
Expand Down Expand Up @@ -56,7 +57,11 @@ private static bool InvokeUserCode_CmdSmokeCigarette__NetworkIdentity__NetworkCo
return false;

// Run Game Command
cigarettePack.UserCode_CmdSmokeCigarette__NetworkIdentity__NetworkConnectionToClient(sender, __2);
cigarettePack.UserCode_CmdStopUse__NetworkIdentity__NetworkConnectionToClient(sender, __2);
GameObject gameObject = GameObject.Instantiate(cigarettePack.cigarettePrefab, cigarettePack.transform.position, cigarettePack.transform.rotation);
NetworkServer.Spawn(gameObject, sender.connectionToClient);
Usable usable = gameObject.GetComponent<Usable>();
usable.UserCode_CmdUseNoTypeVerification__NetworkIdentity(sender);

// Prevent Original
return false;
Expand Down

0 comments on commit a40526e

Please sign in to comment.