Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Idealne nachylenie / odchylenie NoSpread
#1
Skopiuj pastersów idź do piekła, sprzedawcy, którzy sprzedają to idź do piekła. Będziesz popękaną, twoje gówno zostanie przeciekające, a będziesz publicznie zawstydzony. Przeznaczone wyłącznie do celów non-profit.       Kod:   double CNoSpread :: GetConstantRemainder (double * Spread) // aka Trap God Constant {double ConstantRemainder = 0; Kierunek wektora, przód, prawo, góra; Vector SpreadAt90Pitch (Spread [1], - Spread [0], - 1); QAngle OutputAngles; QAngle InputAngles (90, 0, 0); InputAngles. AngleVectors (& Forward, & Right, i Up); / * Direction = Forward + (Right * Spread [0]) + (Up * Spread [1]); Direction.Normalize (); * / SpreadAt90Pitch. Normalize (); OutputAngles = SpreadAt90Pitch. ToEulerAngles (& Up); OutputAngles. Normalize (); ConstantRemainder = OutputAngles [1] - OutputAngles [2]; return ConstantRemainder; }     Kod:   double SpreadCone = GetSpreadCone (); podwójne PitchSine, PitchCosine; podwójny PitchAngle, YawAngle, RollAngle; double CosineInput, CosinePitch, InputRoll, PitchBreakingPoint, PitchInput; double ReciprocalYaw_1, ReciprocalYaw_2, ConstantRemainder, UpVal, Yaw_1; QAngle QAdjusterAngles, QAngles, QInputAngles, QInputRoll, QNewAngles, QTestAngles, QOldAngles; Wektor Losowy; Vector Dir, Forward, Right, Up; Vector ReciprocalVector, InputRight, InputRight2; Vector ServerForward, ServerRight, ServerUp; Vector Spread; Vector UnRotatedPitch, RotatedPitch; Random = GetRandom (Seed); Spread = Random * SpreadCone; ConstantRemainder = GetRotationRemainder (Spread); QAngles = (QAngle) 0; QAngles. AngleVectors (& Forward, & Right, i Up); Dir = Forward + (- Spread [0] * Right) + (- Spread [1] * Up); Dir. Normalize (); PitchBreakingPoint = RAD2DEG (atan2 (Dir [1], sqrt ((1 - (Dir [1] * Dir [1]))))); if (PitchBreakingPoint> 180) {PitchBreakingPoint - = 360; } else if (PitchBreakingPoint <- 180) {PitchBreakingPoint + = 360; } If (PitchBreakingPoint <0) {PitchBreakingPoint = 90 + PitchBreakingPoint; } else {PitchBreakingPoint = 90 - PitchBreakingPoint; } QAngles. Init (cmd -> widoki [PITCH], cmd -> widoki [YAW], cmd -> widoki [ROLL]); QOldAngles = QAngles; QAngles = Dir. ToEulerAngles (); QAngles. Normalize (); QAngles. AngleVectors (& Forward, & Right, i Up); UpVal = Up [2]; QAngles = QOldAngles; CosineInput = QAngles [0] * (M_PI * 2/360); CosinePitch = cos (CosineInput); if (CosinePitch! = 0) {Yaw_1 = 1 / CosinePitch; } else {Yaw_1 = 0; } Yaw_1 * = Dir [1]; InputRight [1] = Yaw_1; if (Yaw_1> = 1 || Yaw_1 <= - 1) {InputRight [1] = 1 / Yaw_1; InputRight [0] = 0; } else {InputRight [0] = sqrt ((1 - (InputRight [1] * InputRight [1]))); } InputRight [2] = 0; QAdjusterAngles [1] = (RAD2DEG (atan2 (InputRight [1], InputRight [0]))); QAdjusterAngles. Normalize (); InputRight2 [1] = Dir [1]; if (Dir [1]> = 1 || Dir [1] <= - 1) {InputRight2 [1] = 1 / Dir [1]; InputRight2 [0] = 0; } else {InputRight2 [0] = sqrt ((1 - (InputRight2 [1] * InputRight2 [1]))); } If (InputRight [0]! = 0) {ReciprocalYaw_1 = InputRight [1] / InputRight [0]; } else {ReciprocalYaw_1 = 0; } If (InputRight2 [0]! = 0) {ReciprocalYaw_2 = InputRight2 [1] / InputRight2 [0]; } else {ReciprocalYaw_2 = 0; } PitchInput = 0; if (QAngles [0]! = 0) {if (ReciprocalYaw_1! = 0 && ReciprocalYaw_2! 0) {PitchInput = 1; if (abs (ReciprocalYaw_1) <abs (ReciprocalYaw_2)) {PitchInput = ReciprocayYaw_1 / ReciprocalYaw_2; } else if (abs (ReciprocalYaw_2) <abs (ReciprocalYaw_1)) {PitchInput = ReciprocalYaw_2 / ReciprocalYaw_1; }}} else {PitchInput = 1; } QInputAngles = (QAngle) 0; if (PitchInput> 1 && PitchInput <- 1) {// uwaga: czasami PitchInput jest wyłączony o około 2.e-16 lub tak // to znaczy, Pitchem
Reply
#2
Dobre wydanie od dobrego przyjaciela
Reply
#3
Snipity może teraz w końcu spocząć w pokoju, jego praca jest skończona.
Reply
#4
Naprawdę miło, dzięki za udostępnienie tego wav!
Reply
#5
Zamierzam to zrewanżować i sprzedać na hukfarumzie jak każdy inny pieprzony przegrany. jk nie mam z tego żadnego pożytku
Reply
#6
miły udział wav
Reply
#7
Zacytować: Originally Posted by jlnsrk miły udział wav Dzięki tajnej osobie
Reply
#8
Nice release wav = king jak zawsze lmao
Reply
#9
Refaktoryzowany i oczyszczony kod.
Reply
#10
W końcu został zdetronizowany ... RIP Snipity: '( Dziękuję panu, bardzo doceniany!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)