วันเสาร์ที่ 25 มีนาคม พ.ศ. 2560

ยิ่งหัวเป้าแดง ดูดีๆนะ

ไฟล์เป้า เอาไปว่าง bin/data/weapons/hitmarker.dds
https://drive.google.com/file/d/0B1mr-qG-LpkEbkctVllveDNvZk0/view?usp=sharing
//////////////////////////////////////////////////////////////////////////////////////////


WarZ.sln
หา
float        m_HitMarkerFadeout;
r3dTexture*    m_HitMarkerTex; // only for local player

int m_HitMarkerType;
r3dTexture* m_HitMarkerHeadTex; // only for local player


m_HitMarkerFadeout = 0;
m_HitMarkerTex = NULL;

m_HitMarkerType = 0;
m_HitMarkerHeadTex = NULL;


m_HitMarkerTex = r3dRenderer->LoadTexture("data/weapons/hitmarker.dds", D3DFMT_UNKNOWN, false, 1, 0, D3DPOOL_MANAGED, PlayerTexMem );
r3d_assert(m_HitMarkerTex != NULL);


m_HitMarkerHeadTex = r3dRenderer->LoadTexture("data/weapons/hitmarkerheadshot.dds", D3DFMT_UNKNOWN, false, 1, 0, D3DPOOL_MANAGED, PlayerTexMem );
r3d_assert(m_HitMarkerHeadTex != NULL);

if(!trgt->bDead && ownerPlayer)
{
   ownerPlayer->m_HitMarkerFadeout = 1.0f;
}

if(!trgt->bDead && ownerPlayer)

{
    int isHeadShot = strcmp("Bip01_Head", hitActorName) == 0 ? 1:0;
    ownerPlayer->m_HitMarkerType = (isHeadShot);
    ownerPlayer->m_HitMarkerFadeout = 1.0f;
}

if(m_HitMarkerFadeout>0)

{
        float rw = (float)m_HitMarkerTex->GetWidth();
        float rh = (float)m_HitMarkerTex->GetHeight();
        r3dColor clr = r3dColor::white; clr.A = BYTE(m_HitMarkerFadeout*255.0f);
        if(m_isInScope)
            r3dDrawBox2D(float(cx-(rw/2)), float(cy-(rh/2)), rw, rh, r3dColor::white, m_HitMarkerTex);
        else
        {
            float yy = g_camera_mode->GetInt() == 1?cy2:cy;
            r3dDrawBox2D(float(cx-(rw/2)), float(yy-(rh/2)), rw, rh, r3dColor::white, m_HitMarkerTex);
        }
    }



if(m_HitMarkerFadeout>0)
{
        if(m_HitMarkerType == 0)
        {
            float rw = (float)m_HitMarkerTex->GetWidth();
            float rh = (float)m_HitMarkerTex->GetHeight();
            r3dColor clr = r3dColor::white; clr.A = BYTE(m_HitMarkerFadeout*255.0f);


            if(m_isInScope)
            {
                r3dDrawBox2D(float(cx-(rw/2)), float(cy-(rh/2)), rw, rh, r3dColor::white, m_HitMarkerTex);
            }
            else
            {
                float yy = g_camera_mode->GetInt() == 1?cy2:cy;
                r3dDrawBox2D(float(cx-(rw/2)), float(yy-(rh/2)), rw, rh, r3dColor::white, m_HitMarkerTex);
            }
        }
        else
        {
            float rw = (float)m_HitMarkerHeadTex->GetWidth();
            float rh = (float)m_HitMarkerHeadTex->GetHeight();
            r3dColor clr = r3dColor::white; clr.A = BYTE(m_HitMarkerFadeout*255.0f);


            if(m_isInScope)
            {
                r3dDrawBox2D(float(cx-(rw/2)), float(cy-(rh/2)), rw, rh, r3dColor::white, m_HitMarkerHeadTex);
            }
            else
            {
                float yy = g_camera_mode->GetInt() == 1?cy2:cy;
                r3dDrawBox2D(float(cx-(rw/2)), float(yy-(rh/2)), rw, rh, r3dColor::white, m_HitMarkerHeadTex);
            }
        }
    }


ไม่มีความคิดเห็น:

แสดงความคิดเห็น