![]() Find the reference vector which will be the center of the allowed angle range If (vKillerToTarget.GetNormalizedSafe().Dot(vKillerDir) = 0.f)Ĭonst float referenceAngle = killAnim.targetToKillerAngle Vec2 vKillerDir(killerTransform.GetColumn1()) // In decoupled catchup mode we need the animated character's orientation ![]() The killer needs to be facing the target within cosLookToConeHalfAngleRadians angle _str(), optimalDistance, distance, skCVars.maxDistanceError) SK_DEBUG_LOG("GetValidAnim - %s is not valid: Distance between actors should be %.2f, is %.2f (max error is %f)", PPersistantDebug->AddLine(vKillerPos, vKillerPos + Vec3(0.f, 0.f, 5.0f), Col_Red, 6.f) PPersistantDebug->AddPlanarDisc(vTargetPos, killAnim.optimalDist - skCVars.maxDistanceError, killAnim.optimalDist + skCVars.maxDistanceError, Col_Coral, 6.0f) IPersistantDebug* pPersistantDebug = m_spectacularKill.BeginPersistantDebug() Ĭonst float fConeHeight = killAnim.optimalDist + skCVars.maxDistanceError If ((optimalDistance > 0.0f) & (fabs_tpl(distance - optimalDistance) > skCVars.maxDistanceError)) Vec2 vKillerToTarget = Vec2(vTargetPos) - Vec2(vKillerPos) įloat distance = vKillerToTarget.GetLength() Ĭonst float optimalDistance = killAnim.optimalDist IEntity* pKillerEntity = pOwner->GetEntity() Ĭonst QuatT& killerTransform = pOwner->GetAnimatedCharacter()->GetAnimLocation() Ĭonst QuatT& targetTransform = m_pTarget->GetAnimatedCharacter()->GetAnimLocation() Ĭonst Vec3& vKillerPos = killerTransform.t Ĭonst Vec3& vTargetPos = targetTransform.t IEntity* pTargetEntity = m_pTarget->GetEntity() the killer needs to be within a certain distance from the target If (((gEnv->pTimer->GetFrameStartTime().GetSeconds() - s_lastKillInfo.timeStamp) pTimer->GetFrameStartTime().GetSeconds() - s_lastKillInfo.timeStamp), skCVars.minTimeBetweenSameKills) assert((rr&(0x00ffffff))=(rgba&(0x00ffffff))) īool operator() (const SSpectacularKillAnimation& killAnim) constĬonst SSpectacularKillCVars& skCVars = g_pGameCVars->g_spectacularKill Ĭonst CActor* pOwner = m_spectacularKill.m_pOwner M_animQuickMenu.CheckedInvoke("", autosnapItem) M_animQuickMenu.CheckedSetVariable("._rotation",szAngle) M_fAutosnapCursorRelativeY = s_vCursor.y*fRadius M_fAutosnapCursorRelativeX = s_vCursor.x*fRadius If(m_bOnCircle & s_vCursor.GetLength() fRadius) S_vCursor.y = m_fAutosnapCursorRelativeY S_vCursor.x = m_fAutosnapCursorRelativeX S_vCursor.y = m_fAutosnapCursorControllerY * 30.0f ![]() ![]() S_vCursor.x = m_fAutosnapCursorControllerX * 30.0f If(fabsf(m_fAutosnapCursorControllerX)>0.1 || fabsf(m_fAutosnapCursorControllerY)>0.1) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |