C++ Old gamesense autowall

Кто гей

  • Я гей

    Голосов: 18 19.4%
  • Ты гей

    Голосов: 18 19.4%
  • Он гей

    Голосов: 15 16.1%
  • Изотерик разлогинься

    Голосов: 42 45.2%

  • Всего проголосовало
    93
他妈的你nn狗
Забаненный
Статус
Оффлайн
Регистрация
16 Авг 2019
Сообщения
274
Реакции[?]
76
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Старый автоволл скита, не фикс и вообще ещё во-времена фейк спина сделан. НО ЗАТО СКИТА!!!!
  1. struct FireBulletData
  2. {
  3. FireBulletData( const Vector &eye_pos )
  4. : src( eye_pos )
  5. {
  6. }
  7. Vector src;
  8. trace_t enter_trace;
  9. Vector direction;
  10. tracefilter_t filter;
  11. float trace_length;
  12. float trace_length_remaining;
  13. float current_damage;
  14. int penetrate_count;
  15. };
  16. void ScaleDamage( int hitgroup, C_CSPlayer *enemy, float weapon_armor_ratio, float &current_damage )
  17. {
  18. current_damage *= GetHitgroupDamageMult( hitgroup );
  19. if( enemy->m_ArmorValue() > 0 )
  20. {
  21. if( hitgroup == HITGROUP_HEAD )
  22. {
  23. if( enemy->m_bHasHelmet() )
  24. current_damage *= ( weapon_armor_ratio * .5f );
  25. }
  26. else
  27. {
  28. current_damage *= ( weapon_armor_ratio * .5f );
  29. }
  30. }
  31. }
  32. bool SimulateFireBullet( C_CSPlayer *local, C_WeaponCSBase *weapon, FireBulletData &data )
  33. {
  34. data.penetrate_count = 4;
  35. data.trace_length = 0.0f;
  36. auto *wpn_data = weapon->GetCSWpnData();
  37. data.current_damage = (float)wpn_data->damage();
  38. while( ( data.penetrate_count > 0 ) && ( data.current_damage >= 1.0f ) )
  39. {
  40. data.trace_length_remaining = wpn_data->range() - data.trace_length;
  41. Vector end = data.src + data.direction * data.trace_length_remaining;
  42. TraceLine( data.src, end, 0x4600400B, local, &data.enter_trace );
  43. UTIL_ClipTraceToPlayers( data.src, end + data.direction * 40.f, 0x4600400B, &data.filter, &data.enter_trace );
  44. if( data.enter_trace.fraction == 1.0f )
  45. break;
  46. if( ( data.enter_trace.hitgroup <= 7 )
  47. && ( data.enter_trace.hitgroup > 0 )
  48. && ( config.rage.target_friendly_fire || AreEnemies( local, data.enter_trace.m_pEnt ) )
  49. && ( DoesRayTouchHitbox( end, &data ) ) )
  50. {
  51. data.trace_length += data.enter_trace.fraction * data.trace_length_remaining;
  52. data.current_damage *= pow( wpn_data->range_modifier(), data.trace_length * 0.002 );
  53. ScaleDamage( data.enter_trace.hitgroup, data.enter_trace.m_pEnt, wpn_data->armor_ratio(), data.current_damage );
  54. return true;
  55. }
  56. if( !config.rage.aim_auto_wall )
  57. break;
  58. if( !HandleBulletPenetration( wpn_data, data ) )
  59. break;
  60. }
  61. return false;
  62. }
  63. bool TraceToExit( Vector &end, trace_t *enter_trace, Vector start, Vector dir, trace_t *exit_trace )
  64. {
  65. float distance = 0.0f;
  66. while( distance <= 90.0f )
  67. {
  68. distance += 4.0f;
  69. end = start + dir * distance;
  70. auto point_contents = csgo()->enginetrace->GetPointContents( end, MASK_SHOT_HULL | CONTENTS_HITBOX, NULL );
  71. if( point_contents & MASK_SHOT_HULL && ( !( point_contents & CONTENTS_HITBOX ) ) )
  72. continue;
  73. auto new_end = end - ( dir * 4.0f );
  74. TraceLine( end, new_end, 0x4600400B, 0, exit_trace );
  75. // bool allsolid; @ TR + 54
  76. // bool startsolid; @ TR + 55
  77. if( exit_trace->startsolid && exit_trace->surface.flags & SURF_HITBOX )
  78. {
  79. TraceLine( end, start, 0x600400B, exit_trace->m_pEnt, exit_trace );
  80. if( ( exit_trace->fraction < 1.0f || exit_trace->allsolid ) && !exit_trace->startsolid )
  81. {
  82. end = exit_trace->endpos;
  83. return true;
  84. }
  85. continue;
  86. }
  87. if( !( exit_trace->fraction < 1.0 || exit_trace->allsolid || exit_trace->startsolid ) || exit_trace->startsolid )
  88. {
  89. if( exit_trace->m_pEnt )
  90. {
  91. if( enter_trace->DidHitNonWorldEntity() && csgo()->IsBreakableEntity( enter_trace->m_pEnt ) )
  92. return true;
  93. }
  94. continue;
  95. }
  96. if( ( ( exit_trace->surface.flags >> 7 ) & 1 ) && !( ( enter_trace->surface.flags >> 7 ) & 1 ) )
  97. continue;
  98. if( exit_trace->plane.normal.Dot( dir ) <= 1.0f )
  99. {
  100. auto fraction = exit_trace->fraction * 4.0f;
  101. end = end - ( dir * fraction );
  102. return true;
  103. }
  104. }
  105. return false;
  106. }
  107. bool HandleBulletPenetration( CCSWeaponInfo *wpn_data, FireBulletData &data )
  108. {
  109. surfacedata_t *enter_surface_data = csgo()->physprops->GetSurfaceData( data.enter_trace.surface.surfaceProps );
  110. int enter_material = enter_surface_data->game.material;
  111. float enter_surf_penetration_mod = enter_surface_data->game.penetration_modifier;
  112. data.trace_length += data.enter_trace.fraction * data.trace_length_remaining;
  113. data.current_damage *= pow( wpn_data->range_modifier(), ( data.trace_length * 0.002 ) );
  114. if( ( data.trace_length > 3000.f ) || ( enter_surf_penetration_mod < 0.1f ) )
  115. data.penetrate_count = 0;
  116. if( data.penetrate_count <= 0 )
  117. return false;
  118. Vector dummy;
  119. trace_t trace_exit;
  120. if( !TraceToExit( dummy, &data.enter_trace, data.enter_trace.endpos, data.direction, &trace_exit ) )
  121. return false;
  122. surfacedata_t *exit_surface_data = csgo()->physprops->GetSurfaceData( trace_exit.surface.surfaceProps );
  123. int exit_material = exit_surface_data->game.material;
  124. float exit_surf_penetration_mod = exit_surface_data->game.penetration_modifier;
  125. float final_damage_modifier = 0.16f;
  126. float combined_penetration_modifier = 0.0f;
  127. if( ( ( data.enter_trace.contents & CONTENTS_GRATE ) != 0 ) || ( enter_material == 89 ) || ( enter_material == 71 ) )
  128. {
  129. combined_penetration_modifier = 3.0f;
  130. final_damage_modifier = 0.05f;
  131. }
  132. else
  133. {
  134. combined_penetration_modifier = ( enter_surf_penetration_mod + exit_surf_penetration_mod ) * 0.5f;
  135. }
  136. if( enter_material == exit_material )
  137. {
  138. if( exit_material == 87 || exit_material == 85 )
  139. combined_penetration_modifier = 3.0f;
  140. else if( exit_material == 76 )
  141. combined_penetration_modifier = 2.0f;
  142. }
  143. float v34 = fmaxf( 0.f, 1.0f / combined_penetration_modifier );
  144. float v35 = ( data.current_damage * final_damage_modifier ) + v34 * 3.0f * fmaxf( 0.0f, ( 3.0f / wpn_data->penetration() ) * 1.25f );
  145. float thickness = VectorLength( trace_exit.endpos - data.enter_trace.endpos );
  146. thickness *= thickness;
  147. thickness *= v34;
  148. thickness /= 24.0f;
  149. float lost_damage = fmaxf( 0.0f, v35 + thickness );
  150. if( lost_damage > data.current_damage )
  151. return false;
  152. if( lost_damage >= 0.0f )
  153. data.current_damage -= lost_damage;
  154. if( data.current_damage < 1.0f )
  155. return false;
  156. data.src = trace_exit.endpos;
  157. data.penetrate_count--;
  158. return true;
  159. }
  160. bool aimbot::CanHit( const Vector &point, float *damage_given )
  161. {
  162. auto *local = LocalPlayer();
  163. auto data = FireBulletData( local->EyePosition() );
  164. data.filter = tracefilter_t( local );
  165. QAngle angles;
  166. CalcAngle( data.src, point, angles );
  167. AngleVectors( angles, &data.direction );
  168. VectorNormalize( data.direction );
  169. if( SimulateFireBullet( local, local->GetActiveWeapon(), data ) )
  170. {
  171. *damage_given = data.current_damage;
  172. return true;
  173. }
  174. return false;
  175. }
 
Сверху Снизу