Skip to content

Commit

Permalink
fix(server): error as rpc answer
Browse files Browse the repository at this point in the history
  • Loading branch information
Doxoh committed Feb 23, 2024
2 parents fa14e4c + 2d72bf7 commit 68aa112
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 8 deletions.
4 changes: 3 additions & 1 deletion api/AltV.Net.Async/AsyncCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -986,12 +986,14 @@ public override void OnScriptRPCEvent(IntPtr eventpointer, IPlayer target, strin

if (!ScriptRpcAsyncEventHandler.HasEvents()) return;

Task.Run(async () =>
var task = Task.Run(async () =>
{
var clientScriptRPCEvent = new AsyncScriptRpcEvent(target, answerId);
await ScriptRpcAsyncEventHandler.CallAsync(@delegate => @delegate(clientScriptRPCEvent, target, name, objects, answerId));
});

Task.WaitAll(task);

if (UnansweredServerRpcRequest.Contains(answerId))
{
target.EmitRPCAnswer(answerId, null, "Answer not handled");
Expand Down
30 changes: 24 additions & 6 deletions api/AltV.Net.Shared/Elements/Entities/CheckpointType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ public enum CheckpointType : byte
CylinderTripleArrow,
CylinderCycleArrow,
CylinderCheckerboard,
CylinderWrench,
CylinderSingleArrow2,
CylinderDoubleArrow2,
CylinderTripleArrow2,
CylinderCycleArrow2,
CylinderCheckerboard2,
CylinderWrench2,
RingSingleArrow,
RingDoubleArrow,
RingTripleArrow,
Expand Down Expand Up @@ -44,12 +46,28 @@ public enum CheckpointType : byte
Empty,
Ring,
Empty2,

//CylinderCustomShape,
//CylinderCustomShape2,
//CylinderCustomShape3,
Cylinder = 45,
Cylinder,
Cylinder1,
Cylinder2,
Cylinder3
Cylinder3,
Cylinder4,
Cylinder5,
Empty3,
Empty4,
Empty5,
Empty6,
RingDollar,
RingWolf,
RingQuestionMark,
RingPlane,
RingChopper,
RingBoat,
RingCar,
RingBike,
RingBicycle,
RingTruck,
RingParachute,
RingJetpack,
RingWhirl
}
}
2 changes: 1 addition & 1 deletion runtime
Submodule runtime updated 1 files
+8 −2 c-api/core.cpp

0 comments on commit 68aa112

Please sign in to comment.