AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Solved [L4D2] Anyway to prevent bots teleporting to players? (https://forums.alliedmods.net/showthread.php?t=293802)

Edison1318 02-11-2017 06:26

[L4D2] Anyway to prevent bots teleporting to players?
 
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?

Silvers 02-13-2017 08:47

Re: [L4D2] Anyway to prevent bots teleporting to players?
 
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.

Edison1318 05-21-2018 08:43

Re: [L4D2] Anyway to prevent bots teleporting to players?
 
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.

Silvers 05-21-2018 09:43

Re: [L4D2] Anyway to prevent bots teleporting to players?
 
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.

Edison1318 05-21-2018 10:18

Re: [L4D2] Anyway to prevent bots teleporting to players?
 
Quote:

Originally Posted by Silvers (Post 2593095)
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.

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.

MasterMind420 05-21-2018 11:06

Re: [L4D2] Anyway to prevent bots teleporting to players?
 
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

Edison1318 05-21-2018 11:18

Re: [L4D2] Anyway to prevent bots teleporting to players?
 
Quote:

Originally Posted by MasterMind420 (Post 2593118)
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.

MasterMind420 05-22-2018 08:22

Re: [L4D2] Anyway to prevent bots teleporting to players?
 
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.

Edison1318 05-23-2018 03:52

Re: [L4D2] Anyway to prevent bots teleporting to players?
 
Quote:

Originally Posted by MasterMind420 (Post 2593272)
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.

Dragokas 05-23-2018 19:18

Re: [L4D2] Anyway to prevent bots teleporting to players?
 
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.


All times are GMT -4. The time now is 09:39.

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