mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 20:21:26 +00:00
- fixed: group teleporters must always preserve orientation.
This commit is contained in:
parent
a25ba16755
commit
a40b1f1934
1 changed files with 2 additions and 1 deletions
|
@ -662,10 +662,11 @@ bool DoGroupForOne (AActor *victim, AActor *source, AActor *dest, bool floorz, b
|
|||
DAngle offAngle = victim->Angles.Yaw - source->Angles.Yaw;
|
||||
DVector2 newp = { off.X * an.Cos() - off.Y * an.Sin(), off.X * an.Sin() + off.Y * an.Cos() };
|
||||
double z = floorz ? ONFLOORZ : dest->Z() + victim->Z() - source->Z();
|
||||
int flags = fog ? (TELF_DESTFOG | TELF_SOURCEFOG | TELF_KEEPORIENTATION) : TELF_KEEPORIENTATION;
|
||||
|
||||
bool res =
|
||||
P_Teleport (victim, DVector3(dest->Pos().XY() + newp, z),
|
||||
0., fog ? (TELF_DESTFOG | TELF_SOURCEFOG) : TELF_KEEPORIENTATION);
|
||||
0., flags);
|
||||
// P_Teleport only changes angle if fog is true
|
||||
victim->Angles.Yaw = (dest->Angles.Yaw + victim->Angles.Yaw - source->Angles.Yaw).Normalized360();
|
||||
|
||||
|
|
Loading…
Reference in a new issue