halflife icon indicating copy to clipboard operation
halflife copied to clipboard

[HL] MP5/M4 bullet hole decals

Open Matthaiks opened this issue 11 years ago • 2 comments

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 

Matthaiks avatar Feb 19 '13 11:02 Matthaiks

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

ghost avatar Mar 12 '13 11:03 ghost

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: https://github.com/ValveSoftware/halflife/blob/c7240b965743a53a29491dd49320c88eecf6257b/dlls/combat.cpp#L1418

But this is clearly not the expected behavior.

It only happens when firing 12MM bullets (func_tank does this): https://github.com/ValveSoftware/halflife/blob/c7240b965743a53a29491dd49320c88eecf6257b/dlls/combat.cpp#L1469-L1476

And when firing MP5 bullets: https://github.com/ValveSoftware/halflife/blob/c7240b965743a53a29491dd49320c88eecf6257b/cl_dll/ev_hldm.cpp#L419-L426

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.

SamVanheer avatar Sep 16 '22 09:09 SamVanheer