Hi, sorry but i have not much experience with MP.
The code below works fine in the server, but in the clients the movement of the ball its not smooth and when is created the sprite splash, it appears first with its normal size, and then scales down like it should at first.
What do i need so send to the clients in order the movement and entity creation be allright?
Thanks.
Code:
vec_for_vertex (MY._SHOT_POS_X, my._weapon, 1465);
you = ent_create ("ball0.055.mdl", MY._SHOT_POS_X, PAINT_moveBall);
you.scale_x = 3;
you.scale_y = 3;
you.scale_z = 3;
Code:
function PAINT_moveBall()
{
var bullet_speed;
my.enable_impact = on;
my.enable_entity = on;
my.enable_block = on;
my.event = PAINT_removeBall;
my.pan = camera.pan;
my.tilt = camera.tilt;
bullet_speed.y = 0;
bullet_speed.x = 170 * time_step;
bullet_speed.z = 0;
while (my != null)
{
c_move (my, bullet_speed.x, nullvector, ignore_passable);
bullet_speed.z - = 0.5 * time_step;//0.08
SEND_SKILL( my.x, send_vec + send_all);
SEND_SKILL( my.pan, null);
wait (1);
}
}
Code:
function PAINT_removeBall()
{
VEC_ADD (TARGET.X, normal.X);
you = ent_create ("splat.tga", target.x, PAINT_createSplat);
VEC_TO_ANGLE (you.PAN, normal.x);
my.passable = on;
my.invisible = on;
SEND_SKILL (you.x, send_vec + send_all);
SEND_SKILL (you.pan, null);
sleep (2);
ent_remove (my);
}
Code:
function PAINT_createSplat()
{
my.oriented = on;
my.facing = off;
my.passable = on;
my.scale_x = 0.15;
my.scale_y = my.scale_x;
my.flare = on;
my.ambient = 50;
my.transparent = on;
my.alpha = 100;
}