summaryrefslogtreecommitdiff
path: root/internal_rewrite/autowall.cpp
diff options
context:
space:
mode:
authornavewindre <boneyaard@gmail.com>2018-08-30 22:58:37 +0200
committernavewindre <boneyaard@gmail.com>2018-08-30 22:58:37 +0200
commit1f3f1ab2a20c6d90189cf1fd03cfbb08077bc02e (patch)
tree04595c6b6bb31b43811270961668dae2f8c9ed61 /internal_rewrite/autowall.cpp
parentc4e18b4e500dc603fb7546b7bc9bc574fb09e0a8 (diff)
dsad
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;