ValveSoftware / halflife

Half-Life 1 engine based games
Other
3.68k stars 624 forks source link

Client Crash with TE_DLIGHT #1676

Open SpannerSpammer opened 8 years ago

SpannerSpammer commented 8 years ago

I've discovered an error in the Half-Life SDK in the common\const.h file, line 324. This is the list of parameters for the TE_DLIGHT effect. Someone at VALVe added an extra BRIGHTNESS parameter to the list. The TE_DLIGHT effect takes only NINE parameters:

define TE_DLIGHT 27

coord (origin x) coord (origin y) coord (origin z) byte (radius in 10's) byte (color r) byte (color g) byte (color b) byte (life in 10's) byte (decay rate in 10's)

The effect is used properly in the HL game code, (in islave.cpp) its only the parameter list that is listed incorrectly in const.h

If you USE the TE_DLIGHT effect in your code with the incorrect (10) parameters with certain values, it will cause the clients to CRASH with one of those SVC_BAD errors when the effect is triggered. This potentially affects all current goldsrc games that use this effect.

JoelTroch commented 8 years ago

If I remember correctly, this has been mentioned in Spirit of Half-Life's source code by Laurie Cheers.