TGEA 1.7.1 ai players warping constantly
by Michael Gingerich · in Torque Game Engine Advanced · 07/31/2008 (6:34 am) · 0 replies
This bug is due to delta.move not being transferred properly to the client.
in Player::packUpdate you have this statement:
delta.move.pack(stream);
and Player::unpackUpdate has this corresponding statement:
delta.move.unpack(stream);
However, for AI players, delta.move.x & y do not get transferred to the client because AIPlayer::getAIMove() sets move.x,y without setting move.px,py
This was my fix near the beginning of Player::processTick (added the clamp call):
if (!move && isServerObject() && getAIMove(&aiMove))
{
aiMove.clamp(); // for net traffic
move = &aiMove;
}
in Player::packUpdate you have this statement:
delta.move.pack(stream);
and Player::unpackUpdate has this corresponding statement:
delta.move.unpack(stream);
However, for AI players, delta.move.x & y do not get transferred to the client because AIPlayer::getAIMove() sets move.x,y without setting move.px,py
This was my fix near the beginning of Player::processTick (added the clamp call):
if (!move && isServerObject() && getAIMove(&aiMove))
{
aiMove.clamp(); // for net traffic
move = &aiMove;
}