bool CTargetDirectionFX::RenderCallback( IEffectUnit* pUnit, CMatrix& matWorld, uint32 uCurTime, RenderObjStyle* pRORS ) { IEffectUnitProp* pProp = pUnit->GetProp(); if(/* !bAlphaBlend ||*/ !pUnit->IsInRenderTime() ) { return false; } CEntityClient* pEntity = CEntityClientManager::GetInst()->GetEntityByID( CEntityClientManager::GetInst()->GetDirectorID()); CFPos Pos = pEntity->GetPixelPos(); CVector2f vec2f(m_Pos.x-Pos.x,m_Pos.y-Pos.y); CDir dir; dir.Set(vec2f); float fRotate = dir.uDir* CMath::pi *2/256; CVector3f vec3f =matWorld.GetAxis(3); matWorld.SetRotateY(fRotate); matWorld._41 = vec3f.x; matWorld._42 = vec3f.y; matWorld._43 = vec3f.z; return true; }