diff --git a/src/actor.h b/src/actor.h index 9f1f9b5bf..0c92db400 100644 --- a/src/actor.h +++ b/src/actor.h @@ -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; diff --git a/src/d_main.cpp b/src/d_main.cpp index 431f55e8a..96ad3c97d 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -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 diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index f907ba12f..74f7683d1 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -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) diff --git a/wadsrc/static/zscript/actor.txt b/wadsrc/static/zscript/actor.txt index 9dce485db..509dd39e3 100644 --- a/wadsrc/static/zscript/actor.txt +++ b/wadsrc/static/zscript/actor.txt @@ -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;