I'm trying to create a new block for necro's bm, I've already create a few new blocks but I can't get one of the blocks to work. I want the block to return the user velocity. e.g. you jump off a high platform, you bounce back as high as you jumped.
this compiles but it won't work:
Code:
new Float:velocity[3], Float:origin[3], Float:oFar[3], Float:oRetNormal[3];
entity_get_vector(id, EV_VEC_velocity, velocity);
entity_get_vector(id, EV_VEC_origin, origin);
oFar[0] = origin[0] + (velocity[0] * 8192.0);
oFar[1] = origin[1] + (velocity[1] * 8192.0);
oFar[2] = origin[2] + (velocity[2] * 8192.0);
trace_normal(id, origin, oFar, oRetNormal);
velocity[0] = -2.0 * (velocity[0]*oRetNormal[0])*oRetNormal[0] + velocity[0];
velocity[1] = -2.0 * (velocity[1]*oRetNormal[1])*oRetNormal[1] + velocity[1];
velocity[2] = -2.0 * (velocity[2]*oRetNormal[2])*oRetNormal[2] + velocity[2];