summaryrefslogtreecommitdiff
path: root/internal_rewrite/autowall.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'internal_rewrite/autowall.cpp')
-rw-r--r--internal_rewrite/autowall.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/internal_rewrite/autowall.cpp b/internal_rewrite/autowall.cpp
index d402ee1..72236cd 100644
--- a/internal_rewrite/autowall.cpp
+++ b/internal_rewrite/autowall.cpp
@@ -92,16 +92,16 @@ namespace features
CTraceFilter filter;
Ray_t ray, ray_2;
+ float step = 4.f;
+ if( g_settings.rage.preserve_fps( ) && util::is_low_fps( ) )
+ step = 8.f;
+
while( dist <= 90.f ) {
// This may seem retarded to you, but it will help frame-rate a lot
// and the accuracy loss is almost negligible. You can remove this if
// you want to.
- if ( !util::is_low_fps( ) && g_settings.rage.autowall_fps( ) ) {
- dist += 4.f;
- }
- else {
- dist += 8.0f;
- }
+
+ dist += step;
out_end = start + dir * dist;
@@ -110,7 +110,7 @@ namespace features
if( contents & MASK_SHOT_HULL && !( contents & CONTENTS_HITBOX ) )
continue;
- ray.Init( out_end, out_end - dir * 4.f );
+ ray.Init( out_end, out_end - dir * step );
g_csgo.m_trace( )->TraceRay( ray, MASK_SHOT_HULL | CONTENTS_HITBOX, 0, exit_trace );
if( exit_trace->startsolid && exit_trace->surface.flags & SURF_HITBOX ) {
@@ -135,7 +135,7 @@ namespace features
else if( ( ( exit_trace->surface.flags >> 7 ) & 1 ) && !( ( tr.surface.flags >> 7 ) & 1 ) )
continue;
else if( exit_trace->plane.normal.dot( dir ) <= 1.0f ) {
- auto fraction = exit_trace->fraction * 4.0f;
+ auto fraction = exit_trace->fraction * step;
out_end = out_end - dir * fraction;
return true;