If you have not solved this.. I will tell you quickly how I would approach this.
AI_Player.H
Search
Quote:
// hit marker
float m_HitMarkerFadeout;
r3dTexture* m_HitMarkerTex; // only for local player
Replace
Quote:
// hit marker
float m_HitMarkerFadeout;
int m_HitMarkerType;
r3dTexture* m_HitMarkerTex; // only for local player
r3dTexture* m_HitMarkerHeadTex; // only for local player
AI_Player.CPP
Load()
Search
Quote:
m_HitMarkerFadeout = 0;
m_HitMarkerTex = NULL;
Replace
Quote:
m_HitMarkerFadeout = 0;
m_HitMarkerType = 0;
m_HitMarkerTex = NULL;
m_HitMarkerHeadTex = NULL;
OnCreate()
Search
Quote:
m_HitMarkerTex = r3dRenderer->LoadTexture("data/weapons/hitmarker.dds", D3DFMT_UNKNOWN, false, 1, 0, D3DPOOL_MANAGED, PlayerTexMem );
r3d_assert(m_HitMarkerTex != NULL);
Add Under
Quote:
m_HitMarkerHeadTex = r3dRenderer->LoadTexture("data/weapons/hitmarkerhead.dds", D3DFMT_UNKNOWN, false, 1, 0, D3DPOOL_MANAGED, PlayerTexMem );
r3d_assert(m_HitMarkerHeadTex != NULL);
ResPawnFast()
Search
Quote:
m_HitMarkerTex = r3dRenderer->LoadTexture("data/weapons/hitmarker.dds", D3DFMT_UNKNOWN, false, 1, 0, D3DPOOL_MANAGED, PlayerTexMem );
r3d_assert(m_HitMarkerTex != NULL);
Add Under
Quote:
m_HitMarkerHeadTex = r3dRenderer->LoadTexture("data/weapons/hitmarkerhead.dds", D3DFMT_UNKNOWN, false, 1, 0, D3DPOOL_MANAGED, PlayerTexMem );
r3d_assert(m_HitMarkerHeadTex != NULL);
ProcessBulletHit()
Search
Quote:
if(!trgt->bDead && ownerPlayer) {
ownerPlayer->m_HitMarkerFadeout = 1.0f;
}
Replace
Quote:
Originally Posted by
italofialho
if(!trgt->bDead && ownerPlayer)
{
ownerPlayer->m_HitMarkerType = (trgt->uberAnim_->GetBoneID(hitActorName)== trgt->uberAnim_->GetBoneID("Bip01_Head") ? 1 : 0);
ownerPlayer->m_HitMarkerFadeout = 1.0f;
}
DrawReticle()
Search
Quote:
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);
}
}
Replace
Quote:
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);
}
}
}
Haven't compiled and tested, but this should work fine. You can even use this to add even more types for example, no damage hitmarker for over distance for damage, or even add a penis shot you will need to add "Bip01_Pelvis" to your UberAnim data.