by Graf Zahl » Fri Dec 26, 2003 1:18 pm
I found my problem. Aside from the level having a bug there is a serious bug in the teleporting code which prevents the angle of the teleported thing being set if the teleport exit does not face in the same direction as the teleport line:
Code: Select all
if (P_Teleport (thing, searcher->x, searcher->y, z, searcher->angle, fog,keeporientation))
{
return true;
}
// [RH] Lee Killough's changes for silent teleporters from BOOM
if (!fog && line && keeporientation)
{
// Rotate thing according to difference in angles
thing->angle += angle;
// Rotate thing's momentum to come out of exit just like it entered
thing->momx = FixedMul(momx, c) - FixedMul(momy, s);
thing->momy = FixedMul(momy, c) + FixedMul(momx, s);
}
return false;
The angle adjustment code is never executed because it is skipped by the return above.
(I hate this kind of bug!

)
I found my problem. Aside from the level having a bug there is a serious bug in the teleporting code which prevents the angle of the teleported thing being set if the teleport exit does not face in the same direction as the teleport line:
[code]
if (P_Teleport (thing, searcher->x, searcher->y, z, searcher->angle, fog,keeporientation))
{
return true;
}
// [RH] Lee Killough's changes for silent teleporters from BOOM
if (!fog && line && keeporientation)
{
// Rotate thing according to difference in angles
thing->angle += angle;
// Rotate thing's momentum to come out of exit just like it entered
thing->momx = FixedMul(momx, c) - FixedMul(momy, s);
thing->momy = FixedMul(momy, c) + FixedMul(momx, s);
}
return false;
[/code]
The angle adjustment code is never executed because it is skipped by the return above.
(I hate this kind of bug! :( )