File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
src/game/server/hl2mp/bot Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 8
8
9
9
extern ConVar falldamage;
10
10
11
+ #ifdef BDSBASE
12
+ ConVar hl2mp_bot_nav_crouch (" hl2mp_bot_nav_crouch" , " 1" , FCVAR_CHEAT);
13
+ #endif
14
+
11
15
// -----------------------------------------------------------------------------------------
12
16
void CHL2MPBotLocomotion::Update ( void )
13
17
{
@@ -23,6 +27,21 @@ void CHL2MPBotLocomotion::Update( void )
23
27
if ( IsOnGround () )
24
28
{
25
29
me->ReleaseCrouchButton ();
30
+
31
+ #ifdef BDSBASE
32
+ if (hl2mp_bot_nav_crouch.GetBool ())
33
+ {
34
+ const PathFollower* path = me->GetCurrentPath ();
35
+ if (path && path->GetCurrentGoal () && path->GetCurrentGoal ()->area )
36
+ {
37
+ if (path->GetCurrentGoal ()->area ->GetAttributes () & NAV_MESH_CROUCH)
38
+ {
39
+ // moving through a crouch area
40
+ me->PressCrouchButton (0 .3f );
41
+ }
42
+ }
43
+ }
44
+ #endif
26
45
}
27
46
else
28
47
{
You can’t perform that action at this time.
0 commit comments