further ceiling adjustments

This commit is contained in:
jenzur 2020-10-03 02:28:36 +02:00
parent 21b8c8c933
commit 27615bdb1a
2 changed files with 22 additions and 29 deletions

View File

@ -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

View File

@ -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