View Angles (Part 1 - Redux) (#1002)
* Added ViewAngle/Pitch/Roll properties to actors. - These are offsets for camera angles that allow turning the camera without affecting aim or movement direction. - Added A_SetView<Angle/Pitch/Roll>, which will set the view direction. - Added ABSVIEWANGLES flag, used to make the view absolute instead of an offset. * Converted functions to be direct-native.
This commit is contained in:
parent
c57e669044
commit
eaba63e13b
10 changed files with 203 additions and 35 deletions
|
|
@ -804,7 +804,17 @@ void R_SetupFrame (FRenderViewpoint &viewpoint, FViewWindow &viewwindow, AActor
|
|||
viewpoint.sector = viewpoint.camera->Sector;
|
||||
viewpoint.showviewer = false;
|
||||
}
|
||||
iview->New.Angles = viewpoint.camera->Angles;
|
||||
|
||||
// [MC] Apply the view angles first, which is the offsets. If the absolute isn't desired,
|
||||
// add the standard angles on top of it.
|
||||
viewpoint.Angles = viewpoint.camera->ViewAngles;
|
||||
|
||||
if (!(viewpoint.camera->flags8 & MF8_ABSVIEWANGLES))
|
||||
{
|
||||
viewpoint.Angles += viewpoint.camera->Angles;
|
||||
}
|
||||
|
||||
iview->New.Angles = viewpoint.Angles;
|
||||
if (viewpoint.camera->player != 0)
|
||||
{
|
||||
player = viewpoint.camera->player;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue