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

Solved [L4D2] Anyway to prevent bots teleporting to players?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Edison1318
Senior Member
Join Date: Nov 2015
Location: Peaceful place of the in
Old 02-11-2017 , 06:26   [L4D2] Anyway to prevent bots teleporting to players?
Reply With Quote #1

I had to admit it, i really hate survivor bots teleporting to actual players when they are far away, i changed the cvar sb_unstick 1 to 0 but they still teleporting especially i'm in the saferoom. So is there anyway to prevent this from happening or it's part of the game script?
__________________
EdisonGar

Last edited by Edison1318; 05-23-2018 at 03:55.
Edison1318 is offline
Send a message via Skype™ to Edison1318
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 02-13-2017 , 08:47   Re: [L4D2] Anyway to prevent bots teleporting to players?
Reply With Quote #2

Probably can block with memory patching, find signature to code block, NOP/JMP w/e. But maybe the bots get stuck and don't move, unless you find the logic bit which calls the teleport, and block the logic so it seems like they're close enough. Unless someone has another solution.
__________________
Silvers is offline
Edison1318
Senior Member
Join Date: Nov 2015
Location: Peaceful place of the in
Old 05-21-2018 , 08:43   Re: [L4D2] Anyway to prevent bots teleporting to players?
Reply With Quote #3

Well, I tried my best to find my solution so far.
Detect and delete point_teleport or info_teleport_destination, didn't work.
Looking through DirectorOptions, still no luck finding teleport options.
SDKHook on teleport, nothing.

All i know is that the bots will not teleport on Survival Gamemode. If i can get it's cvar or some sort like a script, i could able to put in coop gamemode.
__________________
EdisonGar
Edison1318 is offline
Send a message via Skype™ to Edison1318
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 05-21-2018 , 09:43   Re: [L4D2] Anyway to prevent bots teleporting to players?
Reply With Quote #4

SurvivorBot::EnforceProximityToHumans(void)
'%3.2f: SurvivorBot %s was too far away and was forcibly relocated'
if ( !(unsigned __int8)CTerrorGameRules::IsSurvivalMode() )
blah

This function. Block it. Simple.
__________________

Last edited by Silvers; 05-21-2018 at 09:43.
Silvers is offline
Edison1318
Senior Member
Join Date: Nov 2015
Location: Peaceful place of the in
Old 05-21-2018 , 10:18   Re: [L4D2] Anyway to prevent bots teleporting to players?
Reply With Quote #5

Quote:
Originally Posted by Silvers View Post
SurvivorBot::EnforceProximityToHumans(void)
'%3.2f: SurvivorBot %s was too far away and was forcibly relocated'
if ( !(unsigned __intCTerrorGameRules::IsSurvivalMode() )
blah

This function. Block it. Simple.
Well, i really hate to admitted it. I'm not really advanced on those extensions, signatures stuff. It means i don't know how to block it.
__________________
EdisonGar
Edison1318 is offline
Send a message via Skype™ to Edison1318
MasterMind420
BANNED
Join Date: Nov 2010
Old 05-21-2018 , 11:06   Re: [L4D2] Anyway to prevent bots teleporting to players?
Reply With Quote #6

I believe there are a couple of convars u can change that will do what u want. You just have to make the bots not get stuck and they won't teleport. Like continuously trying to get to a player while stuck. Mess with the sb_ convars...distance between survivors proximity etc
MasterMind420 is offline
Edison1318
Senior Member
Join Date: Nov 2015
Location: Peaceful place of the in
Old 05-21-2018 , 11:18   Re: [L4D2] Anyway to prevent bots teleporting to players?
Reply With Quote #7

Quote:
Originally Posted by MasterMind420 View Post
I believe there are a couple of convars u can change that will do what u want. You just have to make the bots not get stuck and they won't teleport. Like continuously trying to get to a player while stuck. Mess with the sb_ convars...distance between survivors proximity etc
I believe it is sb_enforce_proximity_lookat_timeout or
sb_enforce_proximity_range?

Edited: I bet it's this cvars.
__________________
EdisonGar

Last edited by Edison1318; 05-21-2018 at 11:20.
Edison1318 is offline
Send a message via Skype™ to Edison1318
MasterMind420
BANNED
Join Date: Nov 2010
Old 05-22-2018 , 08:22   Re: [L4D2] Anyway to prevent bots teleporting to players?
Reply With Quote #8

sm_cvar sb_escort 0
sm_cvar sb_allow_leading 1

sm_cvar sb_neighbor_range 240
sm_cvar sb_follow_stress_factor 70

sm_cvar sb_separation_range 600
sm_cvar sb_separation_danger_min_range 175
sm_cvar sb_separation_danger_max_range 600

sm_cvar sb_battlestation_human_hold_time 0.25
sm_cvar sb_battlestation_give_up_range_from_human 200
sm_cvar sb_max_battlestation_range_from_human 200

sm_cvar sb_enforce_proximity_lookat_timeout 0.0
sm_cvar sb_enforce_proximity_range 10000
sm_cvar sb_reachable_cache_paranoia 0
sm_cvar sb_locomotion_wait_threshold 0

Try messing with some or all of these. Seperation range is what I believe you want I think, or maybe a combination of these. Most of these are all related to distance between players.
MasterMind420 is offline
Edison1318
Senior Member
Join Date: Nov 2015
Location: Peaceful place of the in
Old 05-23-2018 , 03:52   Re: [L4D2] Anyway to prevent bots teleporting to players?
Reply With Quote #9

Quote:
Originally Posted by MasterMind420 View Post
sm_cvar sb_escort 0
sm_cvar sb_allow_leading 1

sm_cvar sb_neighbor_range 240
sm_cvar sb_follow_stress_factor 70

sm_cvar sb_separation_range 600
sm_cvar sb_separation_danger_min_range 175
sm_cvar sb_separation_danger_max_range 600

sm_cvar sb_battlestation_human_hold_time 0.25
sm_cvar sb_battlestation_give_up_range_from_human 200
sm_cvar sb_max_battlestation_range_from_human 200

sm_cvar sb_enforce_proximity_lookat_timeout 0.0
sm_cvar sb_enforce_proximity_range 10000
sm_cvar sb_reachable_cache_paranoia 0
sm_cvar sb_locomotion_wait_threshold 0

Try messing with some or all of these. Seperation range is what I believe you want I think, or maybe a combination of these. Most of these are all related to distance between players.
Sure, i'd really appreciated that you found that cvar, sb_enforce_proximity_range. That's what i was looking for. I'mma use some of your cvars for my server to test then.
Btw, thanks.

I can actually set sb_enforce_proximity_range to 99999999999999999... to prevent bots from teleport to me whether they're quite far away.
__________________
EdisonGar

Last edited by Edison1318; 05-23-2018 at 03:57.
Edison1318 is offline
Send a message via Skype™ to Edison1318
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 05-23-2018 , 19:18   Re: [L4D2] Anyway to prevent bots teleporting to players?
Reply With Quote #10

Quote:
sb_enforce_proximity_range to 99999999999999999
It's a bad idea because theoretically lead to overflow error and possibly will be reset to defaults (Max number here is some of these: 2147483647, 429496729 depending of var. type engine uses).

Edit: I checked this. If you, e.g., set such big value on "z_health" Cvar, it automatically cast to -2147483648 (mean, all bits = 1 in signed int), cause Zombie die at the spawn moment.
The same issues is highly likely will break another CVars.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

Last edited by Dragokas; 05-24-2018 at 09:26.
Dragokas 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 19:34.


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