Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HL] MP5/M4 bullet hole decals #383

Open
Matthaiks opened this issue Feb 19, 2013 · 2 comments
Open

[HL] MP5/M4 bullet hole decals #383

Matthaiks opened this issue Feb 19, 2013 · 2 comments

Comments

@Matthaiks
Copy link

Two shots, but only one bullet hole is visible. Other guns are fine.

http://youtu.be/AiL51bQnCMY

Exe version 1.1.2.2/Stdio (valve)
Exe build: 12:05:47 Feb 18 2013 (5961)

Processor Information:
Vendor: AuthenticAMD
Speed: 3214 Mhz
4 logical processors
4 physical processors
HyperThreading: Unsupported
FCMOV: Supported
SSE2: Supported
SSE3: Supported
SSSE3: Supported
SSE4a: Supported
SSE41: Unsupported
SSE42: Unsupported

Network Information:
Network Speed:

Operating System Version:
Windows 7 (64 bit)
NTFS: Supported
Crypto Provider Codes: Supported 311 0x0 0x0 0x0

Video Card:
Driver: ATI Radeon HD 5700 Series

DirectX Driver Name:  aticfx32.dll
Driver Version:  9.12.0.0
DirectX Driver Version:  8.17.10.1172
Driver Date: 19 Dec 2012
Desktop Color Depth: 32 bits per pixel
Monitor Refresh Rate: 60 Hz
DirectX Card: ATI Radeon HD 5700 Series
VendorID:  0x1002
DeviceID:  0x68b8
Number of Monitors:  1
Number of Logical Video Cards:  1
No SLI or Crossfire Detected
Primary Display Resolution:  1920 x 1200
Desktop Resolution: 1920 x 1200
Primary Display Size: 26.65" x 16.65"  (31.42" diag)
                                        67.7cm x 42.3cm  (79.8cm diag)
Primary Bus Type Not Detected
Primary VRAM: 1024 MB
Supported MSAA Modes:  2x 4x 8x 
@ghost ghost self-assigned this Feb 19, 2013
@ghost
Copy link

ghost commented Mar 12, 2013

This bug is very old. I can reproduce it in WON version (Build 893. Exe: 12:20:12 Apr 5 1999)

@SamVanheer
Copy link

This happens because the game deliberately doesn't create decals if the tracer count for bullets being fired is > 0.

This comment implies it's intentional:

if ( iTracerFreq != 1 ) // guns that always trace also always decal

But this is clearly not the expected behavior.

It only happens when firing 12MM bullets (func_tank does this):

halflife/dlls/combat.cpp

Lines 1469 to 1476 in c7240b9

case BULLET_MONSTER_12MM:
pEntity->TraceAttack(pevAttacker, gSkillData.monDmg12MM, vecDir, &tr, DMG_BULLET);
if ( !tracer )
{
TEXTURETYPE_PlaySound(&tr, vecSrc, vecEnd, iBulletType);
DecalGunshot( &tr, iBulletType );
}
break;

And when firing MP5 bullets:

halflife/cl_dll/ev_hldm.cpp

Lines 419 to 426 in c7240b9

case BULLET_PLAYER_MP5:
if ( !tracer )
{
EV_HLDM_PlayTextureSound( idx, &tr, vecSrc, vecEnd, iBulletType );
EV_HLDM_DecalGunshot( &tr, iBulletType );
}
break;

Opposing Force has similar checks for NPC fired 556 and 762 bullets.

The fix is to remove the tracer variable check. Then decals are always applied. You don't need the tracer variable at all so it can be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants