[Fixed] Teleporter bugs

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: [Fixed] Teleporter bugs

by randi » Wed Jan 21, 2004 7:41 pm

Fixed everything except the last post.

by Graf Zahl » Fri Dec 26, 2003 1:37 pm

Ok, now it seems to work as in Boom. However, I have the feeling that the rotation is done in the wrong direction. If I do a rotation of 90 degrees with these teleporters I have to make the teleport destination face toward the teleport line not away from it. Since this was the same in Boom (at least PrBoom has the same problem) I don't think this should be fixed unless it has a compatibility option because I have no idea how many maps use this incorrect behavior.

by Graf Zahl » Fri Dec 26, 2003 1:25 pm

Yet another problem with this (again in EV_Teleport):

Code: Select all

		angle = R_PointToAngle2 (0, 0, line->dx, line->dy) - thing->angle + ANG90;

This code to calculate the exit angle uses the teleported thing's, not the teleport destination's angle.

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! :( )

by Graf Zahl » Fri Dec 26, 2003 12:43 pm

Cyb wrote:using teleport_nofog with a second argument of 1 (teleport_nofog(tid, 1)) will cause the player to face the direction of the teleport destination's angle rather than the angle they were facing when they were teleported

Yes, it turned out the level I was using had the things placed wrong. You should think at least a mapper tests his level sufficiently. :( I changed the bug report accordingly.

by Cyb » Fri Dec 26, 2003 12:36 pm

using teleport_nofog with a second argument of 1 (teleport_nofog(tid, 1)) will cause the player to face the direction of the teleport destination's angle rather than the angle they were facing when they were teleported

Teleporter bugs

by Graf Zahl » Fri Dec 26, 2003 12:33 pm

While investigating some teleporter problems I discovered that several calls to P_Teleport swap the z and angle parameter in the function call. (in a_korax.cpp and a_teleportother.cpp)

Top