Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const float flConeStatic[ 50 ] =
- {
- 0.00f, // 0 none
- 2.00f, // 1 deagle
- 2.00f, // 2 elite
- 2.00f, // 3 fiveseven
- 2.00f, // 4 glock
- 0.00f, // 5 none
- 0.00f, // 6 none
- 0.60f, // 7 ak47
- 0.50f, // 8 aug
- 0.20f, // 9 awp
- 0.60f, // 10 famas
- 0.30f, // 11 g3sg1
- 0.00f, // 12 none
- 0.60f, // 13 galilar
- 2.00f, // 14 m249
- 0.00f, // 15 none
- 0.60f, // 16 m4a1
- 1.00f, // 17 mac10
- 0.00f, // 18 none
- 1.00f, // 19 p90
- 0.00f, // 20 none
- 0.00f, // 21 none
- 0.00f, // 22 none
- 0.00f, // 23 none
- 1.00f, // 24 ump45
- 40.00f, // 25 xm1014
- 1.00f, // 26 bizon
- 40.00f, // 27 mag7
- 2.00f, // 28 negev
- 60.00f, // 29 sawedoff
- 2.00f, // 30 tec9
- 2.00f, // 31 tazer
- 2.00f, // 32 hkp2000
- 1.00f, // 33 mp7
- 0.75f, // 34 mp9
- 40.00f, // 35 nova
- 2.00f, // 36 p250
- 0.00f, // 37 none
- 0.30f, // 38 scar20
- 0.50f, // 39 sg556
- 0.30f, // 40 ssg08
- 0.00f, // 41 none
- 0.00f, // 42 none
- 0.00f, // 43 none
- 0.00f, // 44 none
- 0.00f, // 45 none
- 0.00f, // 46 none
- 0.00f, // 47 none
- 0.00f, // 48 none
- 0.00f, // 49 none
- };
- static float flInaccuracyMove[ 50 ] =
- {
- 0.00f, // 0
- 48.10f, // 1
- 17.85f, // 2
- 13.41f, // 3
- 12.00f, // 4
- 0.00f, // 5
- 0.00f, // 6
- 175.06f,// 7
- 135.45f,// 8
- 176.48f,// 9
- 99.34f, // 10
- 150.48f,// 11
- 0.00f, // 12
- 123.56f,// 13
- 156.25f,// 14
- 0.00f, // 15
- 137.88f,// 16
- 24.99f, // 17
- 0.00f, // 18
- 31.00f, // 19
- 0.00f, // 20
- 0.00f, // 21
- 0.00f, // 22
- 0.00f, // 23
- 28.76f, // 24
- 36.03f, // 25
- 27.57f, // 26
- 15.99f, // 27
- 159.14f,// 28
- 16.80f, // 29
- 13.81f, // 30
- 1.00f, // 31
- 13.00f, // 32
- 39.86f, // 33
- 19.04f, // 34
- 36.75f, // 35
- 13.41f, // 36
- 0.00f, // 37
- 150.48f,// 38
- 136.01f,// 39
- 123.45f,// 40
- 0.00f, // 41
- 0.00f, // 42
- 0.00f, // 43
- 0.00f, // 44
- 0.00f, // 45
- 0.00f, // 46
- 0.00f, // 47
- 0.00f, // 48
- 0.00f // 49
- };
- float CEntity::GetInaccuracy ( void )
- {
- int weapon = hl2->read<int> ( m_baseWeaponPointer + HL2::NetVar::Weapon::m_fAccuracyPenalty + 0x1C );
- float cone = 0.0f;
- if ( m_velocity.Length2D () > 140.0f )
- cone = flConeStatic[weapon] * 0.001000000047497451f;
- return cone;
- }
- float CEntity::GetSpread ( void )
- {
- int weapon = hl2->read<int> ( m_baseWeaponPointer + HL2::NetVar::Weapon::m_fAccuracyPenalty + 0x1C );
- float spread = hl2->read<float> ( m_baseWeaponPointer + HL2::NetVar::Weapon::m_fAccuracyPenalty );
- if ( m_velocity.Length2D () > 140.0f )
- spread += flInaccuracyMove[weapon] * 0.001000000047497451f;
- return spread;
- }
Advertisement
Add Comment
Please, Sign In to add comment