Much simpler, thank you (although it's not libcod-free, it shouldn't be a problem for most people).
Here is the code
PHP Code:
botdelay = 150;
extrapolationfactor = botdelay / 1000;
velocity = target getVelocity();
deltapos = [];
for(k = 0; k < 3; k++)
{
deltapos[k] = velocity[k] * extrapolationfactor;
}
vtarget = vectorNormalize((target_mark[0] + deltapos[0], target_mark[1] + deltapos[1], target_mark[2] + deltapos[2]) - eye);