PDA

View Full Version : bulletHitEffect()



voron00
24th October 2017, 08:20
https://github.com/voron00/libcod/commit/76cdc787999489f9f108a52b3ffaf678990d12a6

This is similar to grenadeExplosionEffect(). You can play a surface-based bullet hit without precaching all that .fx. The first argument is an origin of the effect and second is the 'normal' vector.
You can use in combination with bullettrace for example:


trace = bulletTrace(target, maps\mp\gametypes\_utility::vectorScale(anglesToFo rward(self getPlayerAngles()), 10000), true, self);

if (trace["fraction"] < 1)
bulletHitEffect(trace["position"], trace["normal"]);