Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; CCSGameMovement::DecayAimPunchAngle(void)
- __text:0010B580 __ZN15CCSGameMovement18DecayAimPunchAngleEv proc near
- __text:0010B580 ; DATA XREF: __const:00BB649Co
- __text:0010B580
- __text:0010B580 tickInterval = dword ptr -44h
- __text:0010B580 expDecay = dword ptr -40h
- __text:0010B580 linDecay = dword ptr -3Ch
- __text:0010B580 punchYaw = dword ptr -38h
- __text:0010B580 punchPitch = dword ptr -34h
- __text:0010B580 punchRoll = dword ptr -30h
- __text:0010B580 punchPitchVel = dword ptr -2Ch
- __text:0010B580 punchYawVel = dword ptr -28h
- __text:0010B580 punchRollVel = dword ptr -24h
- __text:0010B580 velDecayExpResult= dword ptr -20h
- __text:0010B580 var_1C = dword ptr -1Ch
- __text:0010B580 expDecayResult = dword ptr -18h
- __text:0010B580 var_14 = dword ptr -14h
- __text:0010B580 var_10 = dword ptr -10h
- __text:0010B580 this = dword ptr 8
- __text:0010B580
- __text:0010B580 push ebp
- __text:0010B581 mov ebp, esp
- __text:0010B583 push ebx
- __text:0010B584 push edi
- __text:0010B585 push esi
- __text:0010B586 sub esp, 4Ch
- __text:0010B589 call $+5
- __text:0010B58E pop edi
- __text:0010B58F mov esi, [ebp+this]
- __text:0010B592 mov eax, [esi+0E5Ch] ; local player
- __text:0010B598 movss xmm0, dword ptr [eax+1354h] ; Roll Vel
- __text:0010B5A0 movss [ebp+punchRollVel], xmm0
- __text:0010B5A5 movss xmm0, dword ptr [eax+1350h] ; Yaw Vel
- __text:0010B5AD movss [ebp+punchYawVel], xmm0
- __text:0010B5B2 movss xmm0, dword ptr [eax+134Ch] ; Pitch Vel
- __text:0010B5BA movss [ebp+punchPitchVel], xmm0
- __text:0010B5BF movss xmm0, dword ptr [eax+1348h] ; punchRoll
- __text:0010B5C7 movss xmm1, dword ptr [eax+1340h] ; punchPitch
- __text:0010B5CF movss xmm2, dword ptr [eax+1344h] ; punchYaw
- __text:0010B5D7 mov ecx, ds:(_weapon_recoil_decay2_exp_ptr - 10B58Eh)[edi] ; 18.0f
- __text:0010B5DD mov eax, [ecx+1Ch]
- __text:0010B5E0 cmp eax, ecx
- __text:0010B5E2 jnz short loc_10B5FA
- __text:0010B5E4 movss [ebp+punchYaw], xmm2
- __text:0010B5E9 movss [ebp+punchPitch], xmm1
- __text:0010B5EE movss [ebp+punchRoll], xmm0
- __text:0010B5F3 movss xmm0, dword ptr [ecx+2Ch]
- __text:0010B5F8 jmp short loc_10B619
- __text:0010B5FA ; ---------------------------------------------------------------------------
- __text:0010B5FA
- __text:0010B5FA loc_10B5FA: ; CODE XREF: CCSGameMovement::DecayAimPunchAngle(void)+62j
- __text:0010B5FA movss [ebp+punchYaw], xmm2
- __text:0010B5FF movss [ebp+punchPitch], xmm1
- __text:0010B604 movss [ebp+punchRoll], xmm0
- __text:0010B609 mov ecx, [eax]
- __text:0010B60B mov [esp], eax
- __text:0010B60E call dword ptr [ecx+3Ch]
- __text:0010B611 fstp [ebp+var_10]
- __text:0010B614 movss xmm0, [ebp+var_10]
- __text:0010B619
- __text:0010B619 loc_10B619: ; CODE XREF: CCSGameMovement::DecayAimPunchAngle(void)+78j
- __text:0010B619 movss [ebp+expDecay], xmm0
- __text:0010B61E mov ecx, ds:(_weapon_recoil_decay2_lin_ptr - 10B58Eh)[edi] ; 8.0f
- __text:0010B624 mov eax, [ecx+1Ch]
- __text:0010B627 cmp eax, ecx
- __text:0010B629 jnz short loc_10B632
- __text:0010B62B movss xmm0, dword ptr [ecx+2Ch]
- __text:0010B630 jmp short loc_10B642
- __text:0010B632 ; ---------------------------------------------------------------------------
- __text:0010B632
- __text:0010B632 loc_10B632: ; CODE XREF: CCSGameMovement::DecayAimPunchAngle(void)+A9j
- __text:0010B632 mov ecx, [eax]
- __text:0010B634 mov [esp], eax ; float
- __text:0010B637 call dword ptr [ecx+3Ch]
- __text:0010B63A fstp [ebp+var_14]
- __text:0010B63D movss xmm0, [ebp+var_14]
- __text:0010B642
- __text:0010B642 loc_10B642: ; CODE XREF: CCSGameMovement::DecayAimPunchAngle(void)+B0j
- __text:0010B642 movss [ebp+linDecay], xmm0
- __text:0010B647 mov ebx, ds:(_gpGlobals_ptr - 10B58Eh)[edi]
- __text:0010B64D mov eax, [ebx]
- __text:0010B64F movss xmm1, dword ptr [eax+1Ch] ; interval_per_tick
- __text:0010B654 movss [ebp+tickInterval], xmm1
- __text:0010B659 movss xmm0, [ebp+expDecay]
- __text:0010B65E mulss xmm0, xmm1 ; expDecay * tickInterval
- __text:0010B662 xorps xmm0, ds:(xmmword_A0FC00 - 10B58Eh)[edi] ; negate xmm0
- __text:0010B669 movss dword ptr [esp], xmm0
- __text:0010B66E call _expf
- __text:0010B673 fstp [ebp+expDecayResult] ; = exp(-(expDecay * tickInterval))
- __text:0010B676 movss xmm0, [ebp+expDecayResult]
- __text:0010B67B movss xmm6, [ebp+punchYaw]
- __text:0010B680 mulss xmm6, xmm0 ; xmm6 = punchYaw * expDecayResult
- __text:0010B684 movaps xmm2, xmm6 ; xmm2 = xmm6
- __text:0010B687 mulss xmm2, xmm2 ; xmm2 *= xmm2 (square)
- __text:0010B68B movss xmm5, [ebp+punchPitch] ; xmm5 = punchPitch
- __text:0010B690 mulss xmm5, xmm0 ; xmm5 = punchPitch * expDecayResult
- __text:0010B694 movaps xmm1, xmm5 ; xmm1 = xmm5
- __text:0010B697 mulss xmm1, xmm1 ; square xmm1
- __text:0010B69B addss xmm1, xmm2 ; xmm1 = (punchYaw * expDecayResult)^2 + (punchPitch * expDecayResult)^2
- __text:0010B69F movss xmm4, [ebp+punchRoll]
- __text:0010B6A4 mulss xmm4, xmm0 ; xmm4 = punchRoll * expDecayResult
- __text:0010B6A8 movaps xmm0, xmm4 ; xmm0 = xmm4
- __text:0010B6AB mulss xmm0, xmm0 ; square xmm0
- __text:0010B6AF addss xmm0, xmm1 ; xmm0 = (punchRoll * expDecayResult)^2 + xmm1 (above)
- __text:0010B6B3 xorps xmm1, xmm1 ; clear xmm1
- __text:0010B6B6 movss xmm1, xmm0 ; copy single precision from xmm0 to xmm1
- __text:0010B6BA sqrtss xmm3, xmm1 ; xmm3 = sqrt[(punchYaw * expDecayResult)^2 + (punchPitch * expDecayResult)^2 + (punchRoll * expDecayResult)^2] = vectorLength(punchAngle)
- __text:0010B6BE movss xmm7, [ebp+linDecay]
- __text:0010B6C3 mulss xmm7, [ebp+tickInterval] ; xmm7 = linDecay * tickInterval
- __text:0010B6C8 pxor xmm1, xmm1 ; clear xmm1
- __text:0010B6CC ucomiss xmm3, xmm7 ; compare xmm3(expdecay) to xmm1(lindecay)
- __text:0010B6CF pxor xmm0, xmm0 ; clear xmm0
- __text:0010B6D3 pxor xmm2, xmm2 ; clear xmm2
- __text:0010B6D7 jbe short loc_10B6FE ; jump if xmm3 <= xmm7
- __text:0010B6D9 divss xmm7, xmm3 ; xmm7 = linDecayTick / punchAngleExpDecayVectorLength
- __text:0010B6DD
- __text:0010B6DD loc_10B6DD: ; DATA XREF: CCSGameMovement::CheckParameters(void)+3FEr
- __text:0010B6DD movss xmm0, ds:(dword_A0F7D8 - 10B58Eh)[edi] ; 1.0f
- __text:0010B6E5
- __text:0010B6E5 loc_10B6E5: ; DATA XREF: CCSGameMovement::CheckParameters(void)+3F6r
- __text:0010B6E5 subss xmm0, xmm7 ; xmm0 = 1.0f - (linDecayTick / punchAngleExpDecayVectorLength)
- __text:0010B6E9
- __text:0010B6E9 loc_10B6E9: ; DATA XREF: CCSGameMovement::CheckParameters(void)+3EEr
- __text:0010B6E9 mulss xmm4, xmm0 ; punchRollExpDecay *= xmm0
- __text:0010B6ED mulss xmm6, xmm0 ; punchYawExpDecay *= xmm0
- __text:0010B6F1 mulss xmm5, xmm0 ; punchPitchExpDecay *= xmm0
- __text:0010B6F5 movaps xmm1, xmm6 ; xmm1 = xmm6 (punchYawExpDecay_Lin)
- __text:0010B6F8 movaps xmm0, xmm5 ; xmm0 = xmm5 (punchPitchExpDecay_Lin)
- __text:0010B6FB movaps xmm2, xmm4 ; xmm2 = xmm4 (punchRollExpDecay_Lin)
- __text:0010B6FE
- __text:0010B6FE loc_10B6FE: ; CODE XREF: CCSGameMovement::DecayAimPunchAngle(void)+157j
- __text:0010B6FE mov eax, [ebx] ; ebx = gpGlobals
- __text:0010B700 movss xmm5, dword ptr [eax+1Ch] ; xmm5 = tick_interval
- __text:0010B705 movss [ebp+expDecay], xmm5 ; expDecay = tick_interval
- __text:0010B70A movss xmm3, [ebp+punchRollVel]
- __text:0010B70F mulss xmm3, xmm5 ; xmm3 = punchRollVel * tick_interval
- __text:0010B713 movss xmm4, ds:(dword_A055E0 - 10B58Eh)[edi] ; 0.50
- __text:0010B71B movss [ebp+linDecay], xmm4 ; linDecay = 0.50f
- __text:0010B720 mulss xmm3, xmm4 ; xmm3 *= 0.5;
- __text:0010B724 addss xmm3, xmm2 ; xmm3 += punchRollExpDecay_Lin
- __text:0010B728 movss [ebp+punchRoll], xmm3 ; punchRoll = xmm3 (punchRollVel * tick_interval * 0.5f) + punchRollExpDecay_Lin
- __text:0010B72D movss xmm2, [ebp+punchYawVel]
- __text:0010B732 mulss xmm2, xmm5 ; xmm2 = punchYawVel * tick_interval
- __text:0010B736 mulss xmm2, xmm4 ; xmm3 *= 0.5f;
- __text:0010B73A addss xmm2, xmm1 ; xmm2 += punchYawExpDecay_Lin
- __text:0010B73E movss [ebp+punchPitch], xmm2 ; punchPitch = xmm3 (punchYawVel * tick_interval * 0.5f) + punchYawExpDecay_Lin
- __text:0010B743 movss xmm1, [ebp+punchPitchVel]
- __text:0010B748 mulss xmm1, xmm5 ; xmm1 = punchPitchVel * tick_interval
- __text:0010B74C mulss xmm1, xmm4 ; xmm1 *= 0.5f;
- __text:0010B750 addss xmm1, xmm0 ; xmm1 += punchPitchExpDecay_Lin
- __text:0010B754 movss [ebp+punchYaw], xmm1 ; punchYaw = xmm3 (punchPitchVel * tick_interval * 0.5f) + punchPitchExpDecay_Lin
- __text:0010B759 mov ecx, ds:(_weapon_recoil_vel_decay_ptr - 10B58Eh)[edi] ; 4.50f
- __text:0010B75F mov eax, [ecx+1Ch]
- __text:0010B762 cmp eax, ecx
- __text:0010B764 jnz short loc_10B76D
- __text:0010B766 movss xmm0, dword ptr [ecx+2Ch]
- __text:0010B76B jmp short loc_10B77D ; xmm0 = -4.50f
- __text:0010B76D ; ---------------------------------------------------------------------------
- __text:0010B76D
- __text:0010B76D loc_10B76D: ; CODE XREF: CCSGameMovement::DecayAimPunchAngle(void)+1E4j
- __text:0010B76D mov ecx, [eax]
- __text:0010B76F mov [esp], eax ; float
- __text:0010B772 call dword ptr [ecx+3Ch]
- __text:0010B775 fstp [ebp+var_1C]
- __text:0010B778 movss xmm0, [ebp+var_1C]
- __text:0010B77D
- __text:0010B77D loc_10B77D: ; CODE XREF: CCSGameMovement::DecayAimPunchAngle(void)+1EBj
- __text:0010B77D xorps xmm0, ds:(xmmword_A0FC00 - 10B58Eh)[edi] ; xmm0 = -4.50f
- __text:0010B784 movss xmm1, [ebp+expDecay] ; xmm1 = tick_interval
- __text:0010B789 mulss xmm1, xmm0 ; xmm1 = tick_interval * -4.50
- __text:0010B78D movss dword ptr [esp], xmm1
- __text:0010B792 call _expf
- __text:0010B797 fstp [ebp+velDecayExpResult] ; velDecayExpResult = exp(tickinterval * -4.50)
- __text:0010B79A movss xmm1, [ebp+velDecayExpResult]
- __text:0010B79F movss xmm2, [ebp+punchRollVel]
- __text:0010B7A4 mulss xmm2, xmm1 ; xmm2 = punchRollVel * velDecayExpResult
- __text:0010B7A8 movss [ebp+punchRollVel], xmm2 ; punchRollVel *= velDecayExpResult
- __text:0010B7AD mov eax, [ebx]
- __text:0010B7AF movss xmm0, dword ptr [eax+1Ch] ; xmm0 = tick_interval
- __text:0010B7B4 mulss xmm2, xmm0 ; xmm2 *= tick_interval
- __text:0010B7B8 movss xmm5, [ebp+linDecay] ; xmm5 = 0.5;
- __text:0010B7BD mulss xmm2, xmm5 ; xmm2 *= 0.5
- __text:0010B7C1 movss xmm3, [ebp+punchRoll] ; xmm3 = punchRoll
- __text:0010B7C6 addss xmm3, xmm2 ; xmm3 = punchRoll + xmm2 (punchRollVel * velDecayExpResult * tick_interval * 0.5)
- __text:0010B7CA movss xmm2, [ebp+punchYawVel]
- __text:0010B7CF mulss xmm2, xmm1 ; xmm2 = punchYawVel * velDecayExpResult
- __text:0010B7D3 movss [ebp+punchYawVel], xmm2 ; punchYawVel *= velDecayExpResult
- __text:0010B7D8 mulss xmm2, xmm0 ; xmm2 *= tick_interval
- __text:0010B7DC mulss xmm2, xmm5 ; xmm2 *= 0.5
- __text:0010B7E0 movss xmm4, [ebp+punchPitch]
- __text:0010B7E5 addss xmm4, xmm2 ; xmm4 = punchPitch + (punchYawVel * velDecayExpResult * tick_interval * 0.5)
- __text:0010B7E9 movss xmm2, [ebp+punchPitchVel]
- __text:0010B7EE mulss xmm2, xmm1
- __text:0010B7F2 movss [ebp+punchPitchVel], xmm2
- __text:0010B7F7 mulss xmm0, xmm2
- __text:0010B7FB mulss xmm0, xmm5
- __text:0010B7FF movss xmm1, [ebp+punchYaw]
- __text:0010B804 addss xmm1, xmm0
- __text:0010B808 movss [ebp+punchYaw], xmm1
- __text:0010B80D mov edi, [esi+0E5Ch]
- __text:0010B813 ucomiss xmm1, dword ptr ds:(loc_10C8CD+1 - 10B58Eh)[edi]
- __text:0010B81A jnz short loc_10B834
- __text:0010B81C jp short loc_10B834
- __text:0010B81E ucomiss xmm4, dword ptr ds:(loc_10C8CD+5 - 10B58Eh)[edi]
- __text:0010B825 jnz short loc_10B834
- __text:0010B827 jp short loc_10B834
- __text:0010B829 ucomiss xmm3, dword ptr ds:(loc_10C8D3+3 - 10B58Eh)[edi]
- __text:0010B830 jnz short loc_10B834
- __text:0010B832 jnp short loc_10B884
- __text:0010B834
- __text:0010B834 loc_10B834: ; CODE XREF: CCSGameMovement::DecayAimPunchAngle(void)+29Aj
- __text:0010B834 ; CCSGameMovement::DecayAimPunchAngle(void)+29Cj ...
- __text:0010B834 lea eax, (loc_10C8CD+1 - 10B58Eh)[edi]
- __text:0010B83A mov ecx, dword ptr ds:(loc_10C85E - 10B58Eh)[edi]
- __text:0010B840 mov [esp+4], eax
- __text:0010B844 add eax, 0FFFFFF90h
- __text:0010B847 mov [esp], eax
- __text:0010B84A movss [ebp+punchRoll], xmm3
- __text:0010B84F movss [ebp+punchPitch], xmm4
- __text:0010B854 call dword ptr [ecx+8]
- __text:0010B857 movss xmm0, [ebp+punchYaw]
- __text:0010B85C movss dword ptr ds:(loc_10C8CD+1 - 10B58Eh)[edi], xmm0
- __text:0010B864 movss xmm0, [ebp+punchPitch]
- __text:0010B869 movss dword ptr ds:(loc_10C8CD+5 - 10B58Eh)[edi], xmm0
- __text:0010B871 movss xmm0, [ebp+punchRoll]
- __text:0010B876 movss dword ptr ds:(loc_10C8D3+3 - 10B58Eh)[edi], xmm0
- __text:0010B87E mov edi, [esi+0E5Ch]
- __text:0010B884
- __text:0010B884 loc_10B884: ; CODE XREF: CCSGameMovement::DecayAimPunchAngle(void)+2B2j
- __text:0010B884 movss xmm0, [ebp+punchPitchVel]
- __text:0010B889 ucomiss xmm0, dword ptr ds:(loc_10C8D9+1 - 10B58Eh)[edi]
- __text:0010B890 jnz short loc_10B8B4
- __text:0010B892 jp short loc_10B8B4
- __text:0010B894 movss xmm0, [ebp+punchYawVel]
- __text:0010B899 ucomiss xmm0, dword ptr ds:(loc_10C8DD+1 - 10B58Eh)[edi]
- __text:0010B8A0 jnz short loc_10B8B4
- __text:0010B8A2 jp short loc_10B8B4
- __text:0010B8A4 movss xmm0, [ebp+punchRollVel]
- __text:0010B8A9 ucomiss xmm0, dword ptr ds:(loc_10C8DD+5 - 10B58Eh)[edi]
- __text:0010B8B0 jnz short loc_10B8B4
- __text:0010B8B2 jnp short loc_10B8F4
- __text:0010B8B4
- __text:0010B8B4 loc_10B8B4: ; CODE XREF: CCSGameMovement::DecayAimPunchAngle(void)+310j
- __text:0010B8B4 ; CCSGameMovement::DecayAimPunchAngle(void)+312j ...
- __text:0010B8B4 lea eax, (loc_10C8D9+1 - 10B58Eh)[edi]
- __text:0010B8BA mov ecx, dword ptr ds:(loc_10C85E - 10B58Eh)[edi]
- __text:0010B8C0 mov [esp+4], eax
- __text:0010B8C4 add eax, 0FFFFFF84h
- __text:0010B8C7 mov [esp], eax
- __text:0010B8CA call dword ptr [ecx+8]
- __text:0010B8CD movss xmm0, [ebp+punchPitchVel]
- __text:0010B8D2 movss dword ptr ds:(loc_10C8D9+1 - 10B58Eh)[edi], xmm0
- __text:0010B8DA movss xmm0, [ebp+punchYawVel]
- __text:0010B8DF movss dword ptr ds:(loc_10C8DD+1 - 10B58Eh)[edi], xmm0
- __text:0010B8E7 movss xmm0, [ebp+punchRollVel]
- __text:0010B8EC movss dword ptr ds:(loc_10C8DD+5 - 10B58Eh)[edi], xmm0
- __text:0010B8F4
- __text:0010B8F4 loc_10B8F4: ; CODE XREF: CCSGameMovement::DecayAimPunchAngle(void)+332j
- __text:0010B8F4 add esp, 4Ch
- __text:0010B8F7 pop esi
- __text:0010B8F8 pop edi
- __text:0010B8F9 pop ebx
- __text:0010B8FA pop ebp
- __text:0010B8FB retn
- __text:0010B8FB __ZN15CCSGameMovement18DecayAimPunchAngleEv endp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement