- fixed: FraggleScript's SetCamera function must call SetOrigin to set the camera's z. This needs updating of floorz and ceilingz, in case the camera is moved past a 3D floor.

This commit is contained in:
Christoph Oelckers 2016-08-14 23:33:31 +02:00
parent 6deb185b46
commit df0f06a5ce

View file

@ -1452,7 +1452,8 @@ void FParser::SF_SetCamera(void)
newcamera->specialf1 = newcamera->Angles.Yaw.Degrees;
newcamera->specialf2 = newcamera->Z();
newcamera->SetZ(t_argc < 3 ? newcamera->Z() + 41 : floatvalue(t_argv[2]));
double z = t_argc < 3 ? newcamera->Sector->floorplane.ZatPoint(newcamera) + 41 : floatvalue(t_argv[2]);
newcamera->SetOrigin(newcamera->PosAtZ(z), false);
newcamera->Angles.Yaw = angle;
if (t_argc < 4) newcamera->Angles.Pitch = 0.;
else newcamera->Angles.Pitch = clamp(floatvalue(t_argv[3]), -50., 50.) * (20. / 32.);