Raised This Month: $99 Target: $400
 24% 

Solved [TF2] Client is not in game bug


Post New Thread Reply   
 
Thread Tools Display Modes
Mitchell
~lick~
Join Date: Mar 2010
Old 08-15-2019 , 15:33   Re: [TF2] Client is not in game bug
Reply With Quote #21

I also saw this issue, gonna be honest I stoped reading these comments since they didn't seem to read the code you posted.
If a player disconnects and reconnects they are given a new userId, this means this error should theoretically only show up if a player joins then a map change happens. (Disconnect/Connect forwards still fire etc). GetClientOfUserId I don't think does an in-game or connecting check since they are still technically 'connected'. In TF2 the server hibernates, meaning if a player joins they would spawn in and then the map would change, meaning the timer could still trigger.

TL;DR: Put the TIMER_FLAG_NO_MAPCHANGE flag on the timer.

I assume this is the issue but you can confirm in the logs and the timestamps of the map change log.
__________________

Last edited by Mitchell; 08-15-2019 at 15:43.
Mitchell is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 08-15-2019 , 15:42   Re: [TF2] Client is not in game bug
Reply With Quote #22

Quote:
Originally Posted by Whai View Post
You have to do that :
PHP Code:
if ( iClient )
   if ( !
IsPlayerAliveiClient ) )
      
TF2_RespawnPlayeriClient ); 
Because your code checks the client index is not equal to 0 BUT also checks at the SAME TIME if the player is alive
Imagine the pain of developing a program if conditional's boolean checks were asynchronous.
__________________
Mitchell is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 08-15-2019 , 22:50   Re: [TF2] Client is not in game bug
Reply With Quote #23

Quote:
Originally Posted by Mitchell View Post
Imagine the pain of developing a program if conditional's boolean checks were asynchronous.
See also: Race conditions in multi-threaded programming.
__________________
Am I back? Well, we'll see.
Powerlord is offline
MAGNAT2645
Senior Member
Join Date: Nov 2015
Location: AlliedMods.net
Old 08-16-2019 , 08:10   Re: [TF2] Client is not in game bug
Reply With Quote #24

So, thank you all for answers.

Quote:
TL;DR: Put the TIMER_FLAG_NO_MAPCHANGE flag on the timer.
I think this will be the only right solution.
I'll take note of that.

Thank you for your help.
__________________
MAGNAT2645 is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 08-16-2019 , 18:25   Re: [TF2] Client is not in game bug
Reply With Quote #25

Quote:
Originally Posted by Powerlord View Post
See also: Race conditions in multi-threaded programming.
I think the one off the top of my head from a bug I've introduced is:
System.out.format().println();
(Except System.out was interchangeable output stream)
Essentially the format could happen twice before the next line character would be called and make one long line of unparseable data for splunk and an extra empty line)
__________________
Mitchell is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:33.


Powered by vBulletin®
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Theme made by Freecode