Hello guys, im trying to do this, but never works.
I already try to do a simple code, like you can see below
But only loads the red hitmarker.Code:if(boneId_Bip01_Head) { m_HitMarkerTex = r3dRenderer->LoadTexture("data/hitmarkers/headshot.dds", D3DFMT_UNKNOWN, false, 1, 0, D3DPOOL_MANAGED, PlayerTexMem ); r3d_assert(m_HitMarkerTex != NULL); } else { m_HitMarkerTex = r3dRenderer->LoadTexture("data/hitmarkers/normal.dds", D3DFMT_UNKNOWN, false, 1, 0, D3DPOOL_MANAGED, PlayerTexMem ); r3d_assert(m_HitMarkerTex != NULL); }
I also tried to change where to place the code, change to
Code:void obj_Player::ApplyDamage(const r3dPoint3D& dmgPos, float damage, GameObject* fromObj, int bodyBone, int dmgType)
And put this code. (in this void). (i think you also see which what i based to make this)
And, with the "same" code i already try thisCode:if (fromObj == gClientLogic().localPlayer_) { if(bodyBone == uberAnim_->GetBoneID("Bip01_Head")) { m_HitMarkerTex = r3dRenderer->LoadTexture("data/hitmarkers/headshot.dds", D3DFMT_UNKNOWN, false, 1, 0, D3DPOOL_MANAGED, PlayerTexMem ); r3d_assert(m_HitMarkerTex != NULL); } else { m_HitMarkerTex = r3dRenderer->LoadTexture("data/hitmarkers/normal.dds", D3DFMT_UNKNOWN, false, 1, 0, D3DPOOL_MANAGED, PlayerTexMem ); r3d_assert(m_HitMarkerTex != NULL); } }
Code:// look for player if (fromObj == gClientLogic().localPlayer_) { // call player head if(bodyBone == boneId_Bip01_Head) { // show headshot hitmarker m_HitMarkerTex = r3dRenderer->LoadTexture("data/hitmarkers/headshot.dds", D3DFMT_UNKNOWN, false, 1, 0, D3DPOOL_MANAGED, PlayerTexMem ); r3d_assert(m_HitMarkerTex != NULL); } else { // if not headshot, use normal hitmarker m_HitMarkerTex = r3dRenderer->LoadTexture("data/hitmarkers/normal.dds", D3DFMT_UNKNOWN, false, 1, 0, D3DPOOL_MANAGED, PlayerTexMem ); r3d_assert(m_HitMarkerTex != NULL); } }
In the last 2 codes always appears white hitmaker even headshot.
If anyone can help me.
Thanks


Reply With Quote![[HELP]Red hitmarker when headshot!?](http://ragezone.com/hyper728.png)


