roflmuffin / CounterStrikeSharp

CounterStrikeSharp allows you to write server plugins in C# for Counter-Strike 2/Source2/CS2
https://docs.cssharp.dev
Other
709 stars 110 forks source link

Fix TerminateRound AGAIN #490

Closed Yarukon closed 17 hours ago

Yarukon commented 3 weeks ago

as the title said fix #489

linux users can test if it works or not

windows moved delay to second argument void **fastcall sub_180537940(__int64 g_pGameRules, float flDelay, unsigned int iEndReason, int64 a4, unsigned int a5)

linux's delay is at 5th int64 fastcall sub_B60D90(__int64 g_pGameRules, unsigned int iEndReason, __int64 a3, unsigned int a4, float flDelay)

TitaniumLithium commented 3 weeks ago

Tested this, and it did terminate round. Howerver, RoundStatus is not updating. For example: I killed all Ts and Win Round 1, it looks like this: (ended automaticly) round1 Then in Round 2, I Excute (Terminate Round) Manually with reason CTWin Round 1 result disapeered round2 And next round should be Round 3, but RoundStatus show that it is still round 2, score of teams is not updating too.

Yarukon commented 2 weeks ago

Tested this, and it did terminate round. Howerver, RoundStatus is not updating. For example: I killed all Ts and Win Round 1, it looks like this: (ended automaticly) round1 Then in Round 2, I Excute (Terminate Round) Manually with reason CTWin Round 1 result disapeered round2 And next round should be Round 3, but RoundStatus show that it is still round 2, score of teams is not updating too.

the a4 and a5 on windows should be handling this, but we don't know the struct yet for the team score, you need to add them manually for now if you are using this function

zakriamansoor47 commented 1 day ago

TerminateRound Crashing Linux Servers