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

[CS:S] Bot2Player


Post New Thread Reply   
 
Thread Tools Display Modes
Bittersweet
Veteran Member
Join Date: May 2012
Old 05-14-2013 , 22:40   Re: [CS:S] Bot2Player
Reply With Quote #11

I have added to known issues #3, which is about error log entries regarding weapon entities. I don't know what causes these, so I can't resolve them - but they shouldn't spam at any such rate as DoPe^ linked to in post #9. Occasional errors are expected. I think the error is occurring when the engine has destroyed a weapon I am trying to strip from a player.
__________________
Thank you in advance for your help

My plugins:
[CS:S] BOT Swat | [ANY] CVAR Randomizer | [CS:S] SM CS:S Tag Beta | [CS:S] Bot2Player
Awesome & Crucial plugins by other people:
[CS:S/CS:GO] GunGame | [UMC3] Ultimate Mapchooser | [ANY] Server Crontab | [ANY] SM ForceCamera
Bittersweet is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 05-14-2013 , 22:55   Re: [CS:S] Bot2Player
Reply With Quote #12

And so speakith the drunkith pandith.

You should never pass a client index within a timer if the delay is greater than 0.1 seconds and you are not caching the handle (even 0.1 seconds has a margin for error, but the possibility is so remote it's overlooked). For example, you delay StripWeapons by 4.7 seconds; that's more than enough time for a client to disconnect and then a new one reconnect. In such instances, you should always pass the client's userid and retrive their client within the timer.

CreateTimer(blah, blah, GetClientUserId(client));
Action:blah(Handle:timer, any:userid)
{
new client = GetClientOfUserId(userid);
if(!client || !IsClientInGame(client)) return Plugin_Continue;
}
__________________
thetwistedpanda is offline
TheGame980
Member
Join Date: Apr 2012
Old 05-15-2013 , 04:37   Re: [CS:S] Bot2Player
Reply With Quote #13

A Problem I have is that if you take over a Bot after the roundtime you don't get teleported and will still have this weapon after the round ended.
I don't know if it's the problem of the round_delay Plugin I installed or if it's a Plugin which exists also if this Plugin isn't installed.
TheGame980 is offline
DoPe^
Veteran Member
Join Date: Jul 2008
Location: Denmark / Copenhagen
Old 05-15-2013 , 06:40   Re: [CS:S] Bot2Player
Reply With Quote #14

Quote:
Originally Posted by Bittersweet View Post
I put some checks for the client being connected in, and uploaded a compiled version. I didn't realize the web compiler wasn't working on with that source.

Edit: And thanks for the feedback DoPe^. I appreciate it.
np :p anything to get this awesome plugin to run properly
DoPe^ is offline
Bittersweet
Veteran Member
Join Date: May 2012
Old 05-15-2013 , 06:48   Re: [CS:S] Bot2Player
Reply With Quote #15

Quote:
Originally Posted by thetwistedpanda View Post
And so speakith the drunkith pandith.

You should never pass a client index within a timer if the delay is greater than 0.1 seconds and you are not caching the handle (even 0.1 seconds has a margin for error, but the possibility is so remote it's overlooked). For example, you delay StripWeapons by 4.7 seconds; that's more than enough time for a client to disconnect and then a new one reconnect. In such instances, you should always pass the client's userid and retrive their client within the timer.

CreateTimer(blah, blah, GetClientUserId(client));
Action:blah(Handle:timer, any:userid)
{
new client = GetClientOfUserId(userid);
if(!client || !IsClientInGame(client)) return Plugin_Continue;
}
I'll have to take a look at that. Depending on several things, it might be a good idea to pass both the client and the userid, and then recompare them in the timer, or perhaps pass SteamID.
__________________
Thank you in advance for your help

My plugins:
[CS:S] BOT Swat | [ANY] CVAR Randomizer | [CS:S] SM CS:S Tag Beta | [CS:S] Bot2Player
Awesome & Crucial plugins by other people:
[CS:S/CS:GO] GunGame | [UMC3] Ultimate Mapchooser | [ANY] Server Crontab | [ANY] SM ForceCamera
Bittersweet is offline
Bittersweet
Veteran Member
Join Date: May 2012
Old 05-15-2013 , 06:59   Re: [CS:S] Bot2Player
Reply With Quote #16

Quote:
Originally Posted by TheGame980 View Post
A Problem I have is that if you take over a Bot after the roundtime you don't get teleported and will still have this weapon after the round ended.
I don't know if it's the problem of the round_delay Plugin I installed or if it's a Plugin which exists also if this Plugin isn't installed.
That's actually a known issue, but it shouldn't be happening all of the time. This should be only on the rare occasion. The teleport doesn't work on some maps, but the timer to strip the weapons was tweaked to do it right before the next round starts. If this is happening on a regular basis, I'll need suggestions/have to come up with a way to keep it from happening. This rarely occurs on my server...like I said, it is a "known issue", but it happens so rarely that I didn't think it needed fixing really. I'll add something to the known issues about it. Thanks for the report, and if you have any ideas on how to fix it...
__________________
Thank you in advance for your help

My plugins:
[CS:S] BOT Swat | [ANY] CVAR Randomizer | [CS:S] SM CS:S Tag Beta | [CS:S] Bot2Player
Awesome & Crucial plugins by other people:
[CS:S/CS:GO] GunGame | [UMC3] Ultimate Mapchooser | [ANY] Server Crontab | [ANY] SM ForceCamera
Bittersweet is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 05-15-2013 , 07:49   Re: [CS:S] Bot2Player
Reply With Quote #17

You only need to pass the userid, then you can retrieve their client index if they're still in-game. Otherwise client will end up as 0 if they've left. Userids are unique for all intents and purposes, as they're only recycled after reaching ~65k, where as client indexes are recycled on disconnect/connect. Also, don't forget there's cvar that controls the time between round_end and round_start, so hard coding 4.7 seconds won't work. If memory serves it's mp_round_restart_delay.
__________________
thetwistedpanda is offline
TheGame980
Member
Join Date: Apr 2012
Old 05-15-2013 , 08:37   Re: [CS:S] Bot2Player
Reply With Quote #18

Quote:
Originally Posted by Bittersweet View Post
That's actually a known issue, but it shouldn't be happening all of the time. This should be only on the rare occasion. The teleport doesn't work on some maps, but the timer to strip the weapons was tweaked to do it right before the next round starts. If this is happening on a regular basis, I'll need suggestions/have to come up with a way to keep it from happening. This rarely occurs on my server...like I said, it is a "known issue", but it happens so rarely that I didn't think it needed fixing really. I'll add something to the known issues about it. Thanks for the report, and if you have any ideas on how to fix it...
For me it happens everytime I take over a Bot (saw it like 10 times).
Also one time the Person who took over the Bot didn't recieve the weapons (in the middle of the round, not after it). But this just happened one time.
TheGame980 is offline
Bittersweet
Veteran Member
Join Date: May 2012
Old 05-15-2013 , 14:29   Re: [CS:S] Bot2Player
Reply With Quote #19

Quote:
Originally Posted by thetwistedpanda View Post
You only need to pass the userid, then you can retrieve their client index if they're still in-game. Otherwise client will end up as 0 if they've left. Userids are unique for all intents and purposes, as they're only recycled after reaching ~65k, where as client indexes are recycled on disconnect/connect. Also, don't forget there's cvar that controls the time between round_end and round_start, so hard coding 4.7 seconds won't work. If memory serves it's mp_round_restart_delay.
Right, so I need I added pretty much what you have in your last post to deal with that.

I thought Valve did away with that cvar in one of the updates, but I see now that it is still valid. I'll read that in and base the delay on whatever the cvar is set to.
__________________
Thank you in advance for your help

My plugins:
[CS:S] BOT Swat | [ANY] CVAR Randomizer | [CS:S] SM CS:S Tag Beta | [CS:S] Bot2Player
Awesome & Crucial plugins by other people:
[CS:S/CS:GO] GunGame | [UMC3] Ultimate Mapchooser | [ANY] Server Crontab | [ANY] SM ForceCamera
Bittersweet is offline
Bittersweet
Veteran Member
Join Date: May 2012
Old 05-15-2013 , 14:35   Re: [CS:S] Bot2Player
Reply With Quote #20

Quote:
Originally Posted by TheGame980 View Post
For me it happens everytime I take over a Bot (saw it like 10 times).
Also one time the Person who took over the Bot didn't recieve the weapons (in the middle of the round, not after it). But this just happened one time.
Hopefully the first thing is related to what Panda said, which I am fixing now.

On the second item, it's hard to say. Some weapons, like the tmp, have what seems like an extremely long delay before spawning. This delay is not part of my plugin. I have no idea why this is or if there is any way to fix it.
__________________
Thank you in advance for your help

My plugins:
[CS:S] BOT Swat | [ANY] CVAR Randomizer | [CS:S] SM CS:S Tag Beta | [CS:S] Bot2Player
Awesome & Crucial plugins by other people:
[CS:S/CS:GO] GunGame | [UMC3] Ultimate Mapchooser | [ANY] Server Crontab | [ANY] SM ForceCamera
Bittersweet 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 12:53.


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