From 27615bdb1aaf2188bb70f0766c0cf4e4611dcf93 Mon Sep 17 00:00:00 2001 From: jenzur Date: Sat, 3 Oct 2020 02:28:36 +0200 Subject: [PATCH] further ceiling adjustments --- AutismBotIngame/python/ingamefollowct.py | 4 +- AutismBotIngame/scripting/autism_bot_info.sp | 47 +++++++++----------- 2 files changed, 22 insertions(+), 29 deletions(-) diff --git a/AutismBotIngame/python/ingamefollowct.py b/AutismBotIngame/python/ingamefollowct.py index 845d6768..ad15bfda 100644 --- a/AutismBotIngame/python/ingamefollowct.py +++ b/AutismBotIngame/python/ingamefollowct.py @@ -202,8 +202,8 @@ if __name__ == '__main__': #./steam.sh -applaunch 240 -textmode -textmessagedebug -novid -nosound -noipx -nojoy -noshaderapi #cd /home/gameservers/ze_runner_files -#./play.sh -#screen -A -d -m -S ze_runner ./play.sh +#python3 ingamefollowct.py +#screen -d -m -S ze_runner python3 ingamefollowct.py #before steam login: export SDL_VIDEO_X11_VISUALID=0x074 #to find correct SDL_VIDEO_X11_VISUALID use glxinfo in X2GO diff --git a/AutismBotIngame/scripting/autism_bot_info.sp b/AutismBotIngame/scripting/autism_bot_info.sp index 7bc1da00..18505777 100644 --- a/AutismBotIngame/scripting/autism_bot_info.sp +++ b/AutismBotIngame/scripting/autism_bot_info.sp @@ -317,22 +317,15 @@ public void trace_hulling_bot() mins[ij] -= BOUNDINGBOX_INFLATION_OFFSET; maxs[ij] += BOUNDINGBOX_INFLATION_OFFSET; } - float blocking_jump = 73.0; - feet_origin[2] += blocking_jump; + //acts as full body check + feet_origin[2] += BOUNDINGBOX_INFLATION_OFFSET; TR_TraceHullFilter(feet_origin, feet_origin, mins, maxs, MASK_SOLID, TraceRayDontHitSelf); if (TR_DidHit()) { - //make it not hit when 48 units free for crouching GetClientAbsOrigin(present, feet_origin); - float maxs_edit[3]; - maxs_edit[0] = maxs[0]; - maxs_edit[1] = maxs[1]; - maxs_edit[2] = 48.0; - float mins_edit[3]; - mins_edit[0] = mins[0]; - mins_edit[1] = mins[1]; - mins_edit[2] = 0.0; - TR_TraceHullFilter(feet_origin, feet_origin, mins_edit, maxs_edit, MASK_SOLID, TraceRayDontHitSelf); + mins[2] = 0.0; + maxs[2] = 48.0; + TR_TraceHullFilter(feet_origin, feet_origin, mins, maxs, MASK_SOLID, TraceRayDontHitSelf); if (!(TR_DidHit())) { Format(message, sizeof(message), "hull info:crouch"); @@ -340,12 +333,23 @@ public void trace_hulling_bot() } else { - GetClientAbsOrigin(present, feet_origin); - feet_origin[2] += BOUNDINGBOX_INFLATION_OFFSET; + mins[2] = 75.0; + maxs[2] = 100.0; TR_TraceHullFilter(feet_origin, feet_origin, mins, maxs, MASK_SOLID, TraceRayDontHitSelf); - if (TR_DidHit()) + if (!(TR_DidHit())) { - //ran into wall + mins[2] = 0.0; + maxs[2] = 75.0; + TR_TraceHullFilter(feet_origin, feet_origin, mins, maxs, MASK_SOLID, TraceRayDontHitSelf); + if (TR_DidHit()) + { + Format(message, sizeof(message), "hull info:jump"); + send_socket_msg(message, strlen(message)); + } + } + else + { + //hit wall float move_angles[3]; GetClientEyeAngles(present, move_angles); move_angles[0] = 0.0; @@ -355,17 +359,6 @@ public void trace_hulling_bot() } } } - else - { - GetClientAbsOrigin(present, feet_origin); - feet_origin[2] += BOUNDINGBOX_INFLATION_OFFSET; - TR_TraceHullFilter(feet_origin, feet_origin, mins, maxs, MASK_SOLID, TraceRayDontHitSelf); - if (TR_DidHit()) - { - Format(message, sizeof(message), "hull info:jump"); - send_socket_msg(message, strlen(message)); - } - } } //TODO implement surfing again but differently