Skip to content

FAQ: Add mention about ghost shots in clients #45

@rtxa

Description

@rtxa

According to latest HLSDK 25th anniversary, there was a client issue with ghost shots

		// JoshA: Changed from PM_STUDIO_BOX to PM_NORMAL in prediction code as otherwise if you hit an NPC or player's
		// bounding box but not one of their hitboxes, the shot won't hit on the server but it will
		// play a hit sound on the client and not make a decal (as if it hit the NPC/player).
		// We should mirror the way the server does the test here as close as possible.
		//
		// I initially thought I was just fixing some stupid Half-Life bug but no,
		// this is *the* root cause of all the ghost shot bad prediction bugs in Half-Life Deathmatch!
		//
		// Also... CStrike was always using PM_NORMAL for all of these so it didn't have the problem.
		gEngfuncs.pEventAPI->EV_PlayerTrace( vecSrc, vecEnd, PM_NORMAL, -1, &tr );

https://github.com/ValveSoftware/halflife/blob/master/cl_dll/ev_hldm.cpp#L424

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Backlog/Ideas 🤔

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions