ValveSoftware / halflife

Half-Life 1 engine based games
Other
3.6k stars 598 forks source link

Does MOVETYPE_FLYMISSILE actually work? #1751

Open ghost opened 7 years ago

ghost commented 7 years ago

This is definitely an engine issue, but there's no repo for the engine so I'll write down everything I know here!

I noticed the only place MOVETYPE_FLYMISSILE is used in the SDK code is in DMC (nails, rockets). This seems to have been done to mimic the original Quake code for nails/rockets.

I tried putting it on some projectiles in my mod, and it did not seem to affect hit registration at all.

It did, however, make my projectiles stop having gravity and friction applied (which seems like a pretty arbitrary and weird thing to do).

If the xash3d code is to be believed, flymissile only changes the clipsize of moving things after they have already collided with something.

In other words, it's not "// extra size to monsters" as the SDK says. Its size is whatever you had set, and then the clipsize changes after it already hit or did not hit (using the regular size to trace against monster hulls).

The xash3d code also shows that friction and gravity are not applied.

In Quake this code actually works because it changes the size of projectiles whether they have already collided or not. I bet it does nothing in DMC, and Quake probably has better nail/rocket registration than DMC because of it.

Welp that's all folks!

SamVanheer commented 7 years ago

The engine's version of this code appears to be identical to that of Xash, so your assertions are correct. My guess is they changed how it works for some reason we'll never know, but since they don't use those move types for any new stuff nobody ever noticed that anything was different.