Raised This Month: $12 Target: $400
 3% 

Sourcemod bug?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NikolaTesla
Junior Member
Join Date: May 2018
Location: Brazil
Old 05-09-2018 , 09:15   Sourcemod bug?
Reply With Quote #1

Hey guys. I think I detected a bug in sourcemod. Not quite sure yet but let's see what you guys think.

The problem happens like this:

I hook this event in CSGO on Windows. (Sourcemod 1.8 updated etc...)

HookEvent("player_spawn", Event_PlayerSpawn);

Event_PlayerSpawn will be forwarded as soon as the player connects to the server. So the player didn't spawn yet.

Log evidence:

Code:
L 05/09/2018 - 12:57:46: "Rabscuttle<788><STEAM_1:0:11101><Unassigned>" disconnected (reason "Disconnect")
L 05/09/2018 - 12:57:48: "Rabscuttle<789><STEAM_1:0:11101><>" connected, address ""
L 05/09/2018 - 12:57:49: "Rabscuttle<789><STEAM_1:0:11101><>" STEAM USERID validated
 >>>>> SDKHOOKS forwards the event here <<<<<<
L 05/09/2018 - 12:57:52: "Rabscuttle<789><STEAM_1:0:11101>" switched from team <Unassigned> to <TERRORIST> < Plugin determines that the player should join the terrorist team
L 05/09/2018 - 12:57:52: "Rabscuttle<789><STEAM_1:0:11101>" switched from team <TERRORIST> to <Unassigned> < Maybe the engine or the client moves back? 
L 05/09/2018 - 12:57:52: "Rabscuttle<789><STEAM_1:0:11101><>" entered the game
L 05/09/2018 - 12:57:54: "Rabscuttle<789><STEAM_1:0:11101><Unassigned>" triggered "clantag" (value "Valve")
As you may have already noticed the player bounced between Unassigned team and Terrorist team twice!

Event_PlayerSpawn is being forwarded before the player spawn. Really before as you can see... then my plugin tries to do its stuff which consists into moving the player to the terrorist team (the reasons are irrelevant...) then somehow the game moves the player back to <unassigned> team and now the player cannot change teams or whatever (I've seen a lot of people complaining about this btw...)

Finally: This probable weird call is causing a huge problem! I already managed to do a workaround to circumvent this but if it really is a bug I think it's valid to report to the sourcemod dev team.
NikolaTesla is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 05-09-2018 , 10:11   Re: Sourcemod bug?
Reply With Quote #2

SourceMod doesn't handle firing events, this is not a SourceMod issue.
__________________
asherkin is offline
NikolaTesla
Junior Member
Join Date: May 2018
Location: Brazil
Old 05-09-2018 , 11:34   Re: Sourcemod bug?
Reply With Quote #3

Quote:
Originally Posted by asherkin View Post
SourceMod doesn't handle firing events, this is not a SourceMod issue.
I'm sorry I didn't know... So it's more like valve is responsible for this right?
NikolaTesla is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 05-09-2018 , 11:55   Re: Sourcemod bug?
Reply With Quote #4

player_spawn has always fired when a player connects, what ever plugin you have that is changing the clients team on player_spawn you might want to check if the player is not on team 0 or is alive first.
Mitchell is offline
NikolaTesla
Junior Member
Join Date: May 2018
Location: Brazil
Old 05-09-2018 , 12:01   Re: Sourcemod bug?
Reply With Quote #5

Quote:
Originally Posted by Mitchell View Post
player_spawn has always fired when a player connects, what ever plugin you have that is changing the clients team on player_spawn you might want to check if the player is not on team 0 or is alive first.
I just thought it was strange because in my knowledge about the CS franchise "player_spawn" could mean that the player became alive on spawn point but I was wrong. Thank you guys for clarifying this.
NikolaTesla is offline
Reply



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 17:16.


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