Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forfeit Match for not showing up issue #152

Open
TandelK opened this issue May 13, 2019 · 2 comments
Open

Forfeit Match for not showing up issue #152

TandelK opened this issue May 13, 2019 · 2 comments

Comments

@TandelK
Copy link
Contributor

TandelK commented May 13, 2019

As per what i have tested i can see that if both the teams did not show up on given time, it was having state of pending on panel as it did not start on START Time update. But the issue with the plugin is that it checks for team 1 first and team 2 later on. So as per database i can see that it auto declared team 2 as winner even if they did not show up. So there might be need to rewrite for both the team not showing up for auto forfeit .

Team 1 --> Forfeit match for not showing up , team 2 if present get auto winner with update on panel as Winner but Start Time is not updated and set to Null by default which makes the website and panel showing Pending state. If tried to cancel match ,it says match is already finished as Database is updated for time defined in cvar and end time is automatically added.

Both Team does not show up. --> As per CVAR the teams condition is kept on checking but first team 1 will be checked and than team 2 is checked , given time gets completed for joining match and match is forfeited by default for not showing up. Database automatically gets updates to make team 2 as winner as team 1 timer is first completed. Still match status will be shown as pending as Time Start is set to Null and End time is set to CVAR time from checking . Now no team information is sent to database which team did forfeit here and is still 0 and cannot cancel the match as match is finished here.

@TandelK
Copy link
Contributor Author

TandelK commented May 13, 2019

Understanding the issue step by step
CVAR get5_time_to_start 600
Auto Forfeit if not shown up in 10 mins from the match created time.

Only 1 Team Shows up

  1. Created a match between 2 teams
  2. Team 1 joins but team 2 does not shows up and after 10 minutes the message is sent to server that match is forfeited as team 2 did not show up or start the match.
  3. Database action - as match did not start the value of Start_Time is not updated and set to NULL by default and not updated and the condition checking of auto forfeit time that is 10 mins it will send Database update End Time as 10 minutes from the joining and ready time of Team 1 .
  4. Forfeit column gets updated to team id of team 2 for not showing up making team 1 as winner.

Issues here :
Panel does not get updated status of forfeit even the database has set the value of team 2 in forfeit column. It will still show match as pending as the START_TIME is still Null which leads to showing status of Pending on Panel

Both Teams not joined in given time or started match

  1. Created a match between team 1 and team 2
  2. Its been 10 minutes and no teams have ready up or joined the match . It will send message in game that team 1 forfeited the match first and just a second later sending team 2 forfeited the match message.
  3. Database has same issue START_TIME is set to NULL by default and after 10 times the match gets end and send update to database END_TIME that is 10 minutes. For Winner section it will automatically set Team 2 to winner as Team 1 condition of not showing up is calculated first automatically setting Team 2 winner even if it did not join the server.

Issues here :

  1. As the Start_time is still Null - Match Status is still Pending
  2. Cannot Cancel the match as End_Time is auto updated to 10 Mins as per CVAR and making the match as Completed Match status
  3. Winner is set to Team 2 even for not showing up as Team 1 condition of checking time is completed first before team 2 which set automatically team 2 as the winner.
  4. Forfeit is still set to 0 which database has no idea which team forfeited and why .

@tloesch
Copy link
Contributor

tloesch commented Aug 18, 2019

That start_time is still null is the correct behavior in this case.
The match didnt started.

The forfeit features seems not to be implemented completely.
Just look into models.py and look at the status functions.
There is no check for forfeit.

Then go into api.py and look at the match_finish function.
There is a forfeit implementation.
But you will not get any forfeit information in this function.

This is caused by the apistats plugin.
Look into the file get5_apistats.sp and the function Get5_OnMapResult.
The function doesnt send the forfeit information to any endpoint like get5-web.

So there some tasks to do:

  • implement the forfeit status check in models.py
  • implement forfeit information transportation into the get5_apistats.sp

Maybe you also need to modify the main get5 plugin to transport the forfeit information to the apistats plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants