Modpacket bug fixed. Libraries updated.
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -8,9 +8,6 @@
|
|||||||
[![Stargazers][stars-shield]][stars-url]
|
[![Stargazers][stars-shield]][stars-url]
|
||||||
[![Issues][issues-shield]][issues-url]
|
[![Issues][issues-shield]][issues-url]
|
||||||
|
|
||||||
| ✅ New updates on 11/20/2021 |
|
|
||||||
| --- |
|
|
||||||
|
|
||||||
| ⚠️ The original GTACoOp can be found [HERE](https://gtacoop.com/) |
|
| ⚠️ The original GTACoOp can be found [HERE](https://gtacoop.com/) |
|
||||||
| --- |
|
| --- |
|
||||||
|
|
||||||
@ -21,7 +18,7 @@
|
|||||||
- .NET Framework 4.8
|
- .NET Framework 4.8
|
||||||
|
|
||||||
# 📚 Libraries
|
# 📚 Libraries
|
||||||
- [ScriptHookVDotNet3](https://github.com/crosire/scripthookvdotnet/tree/9edc0871bd857616a39055cbd31b33f6c2b8160e)
|
- [ScriptHookVDotNet3](https://github.com/crosire/scripthookvdotnet/releases/tag/v3.3.2)
|
||||||
- [LemonUI.SHVDN3](https://github.com/justalemon/LemonUI/tree/1342949cd19eaa4115990793311681ea1568054c)
|
- [LemonUI.SHVDN3](https://github.com/justalemon/LemonUI/tree/1342949cd19eaa4115990793311681ea1568054c)
|
||||||
- Lidgren Network Custom (***PRIVATE***)
|
- Lidgren Network Custom (***PRIVATE***)
|
||||||
- - No new features (only improvements)
|
- - No new features (only improvements)
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<AssemblyVersion>1.1.0.0001</AssemblyVersion>
|
<AssemblyVersion>1.1.1.0001</AssemblyVersion>
|
||||||
<FileVersion>1.0.0.0</FileVersion>
|
<FileVersion>1.0.0.0</FileVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
@ -297,12 +297,12 @@ namespace CoopServer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NetOutgoingMessage outgoingMessage;
|
NetOutgoingMessage outgoingMessage = MainNetServer.CreateMessage();
|
||||||
|
modPacket.PacketToNetOutGoingMessage(outgoingMessage);
|
||||||
|
|
||||||
NetConnection target;
|
|
||||||
if (modPacket.Target != 0)
|
if (modPacket.Target != 0)
|
||||||
{
|
{
|
||||||
target = MainNetServer.Connections.FirstOrDefault(x => x.RemoteUniqueIdentifier == modPacket.Target);
|
NetConnection target = MainNetServer.Connections.FirstOrDefault(x => x.RemoteUniqueIdentifier == modPacket.Target);
|
||||||
if (target == null)
|
if (target == null)
|
||||||
{
|
{
|
||||||
Logging.Error($"[ModPacket] target \"{modPacket.Target}\" not found!");
|
Logging.Error($"[ModPacket] target \"{modPacket.Target}\" not found!");
|
||||||
@ -310,15 +310,13 @@ namespace CoopServer
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Send back to target
|
// Send back to target
|
||||||
outgoingMessage = MainNetServer.CreateMessage();
|
|
||||||
modPacket.PacketToNetOutGoingMessage(outgoingMessage);
|
|
||||||
MainNetServer.SendMessage(outgoingMessage, target, NetDeliveryMethod.ReliableOrdered, 0);
|
MainNetServer.SendMessage(outgoingMessage, target, NetDeliveryMethod.ReliableOrdered, 0);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
// Send back to all players
|
{
|
||||||
outgoingMessage = MainNetServer.CreateMessage();
|
// Send back to all players
|
||||||
modPacket.PacketToNetOutGoingMessage(outgoingMessage);
|
MainNetServer.SendMessage(outgoingMessage, MainNetServer.Connections, NetDeliveryMethod.ReliableOrdered, 0);
|
||||||
MainNetServer.SendMessage(outgoingMessage, MainNetServer.Connections, NetDeliveryMethod.ReliableOrdered, 0);
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user