Added per-actor camera FOV.

This commit is contained in:
nashmuhandes 2017-08-28 10:07:32 +08:00 committed by Rachael Alexanderson
parent 27dfebdb7d
commit 42db31b816
4 changed files with 7 additions and 1 deletions

View file

@ -1086,6 +1086,7 @@ public:
double projectilepassheight; // height for clipping projectile movement against this actor
double CameraHeight; // Height of camera when used as such
double CameraFOV;
double RadiusDamageFactor; // Radius damage factor
double SelfDamageFactor;

View file

@ -685,7 +685,7 @@ void D_Display ()
if (viewactive)
{
R_SetFOV (r_viewpoint, players[consoleplayer].camera && players[consoleplayer].camera->player ?
players[consoleplayer].camera->player->FOV : 90.f);
players[consoleplayer].camera->player->FOV : players[consoleplayer].camera->CameraFOV);
}
// [RH] change the screen mode if needed

View file

@ -346,6 +346,7 @@ DEFINE_FIELD(AActor, Conversation)
DEFINE_FIELD(AActor, DecalGenerator)
DEFINE_FIELD(AActor, fountaincolor)
DEFINE_FIELD(AActor, CameraHeight)
DEFINE_FIELD(AActor, CameraFOV)
DEFINE_FIELD(AActor, RadiusDamageFactor)
DEFINE_FIELD(AActor, SelfDamageFactor)
DEFINE_FIELD(AActor, StealthAlpha)
@ -520,6 +521,7 @@ void AActor::Serialize(FSerializer &arc)
A("spriterotation", SpriteRotation)
("alternative", alternative)
A("cameraheight", CameraHeight)
A("camerafov", CameraFOV)
A("tag", Tag)
A("visiblestartangle",VisibleStartAngle)
A("visibleendangle",VisibleEndAngle)

View file

@ -194,6 +194,7 @@ class Actor : Thinker native
native voidptr /*DecalBase*/ DecalGenerator;
native uint8 fountaincolor;
native double CameraHeight; // Height of camera when used as such
native double CameraFOV;
native double RadiusDamageFactor; // Radius damage factor
native double SelfDamageFactor;
native double StealthAlpha;
@ -276,6 +277,7 @@ class Actor : Thinker native
property SelfDamageFactor: SelfDamageFactor;
property StealthAlpha: StealthAlpha;
property CameraHeight: CameraHeight;
property CameraFOV: CameraFOV;
property VSpeed: velz;
property SpriteRotation: SpriteRotation;
property VisibleAngles: VisibleStartAngle, VisibleEndAngle;
@ -359,6 +361,7 @@ class Actor : Thinker native
VisiblePitch 0, 0;
DefaultStateUsage SUF_ACTOR|SUF_OVERLAY;
CameraHeight int.min;
CameraFOV 90.f;
FastSpeed -1;
RadiusDamageFactor 1;
SelfDamageFactor 1;