(Note: This is for Deus Ex)
I'm trying to get the player's desired resolution from script code in order to automatically adjust FOV based on aspect ratio.
Right now I'm doing this in PreTravel() for the player pawn class used:
I can't use it in Possess(), or in TravelPostAccept(), because in those cases, the root window is not properly initialized yet when the function is called. This is, unfortunately, also sometimes the case in PreTravel(), but only rarely (it seems to only happen when I click through the intro so fast it doesn't quite load the intro map fully or initialize the player in it, or something like that).
So my question is: Is there a better way to access the desired resolution? Presumably the game gets it somehow in order to set the default FOV in the first place, but I'm not sure how to go about doing it.
I'm trying to get the player's desired resolution from script code in order to automatically adjust FOV based on aspect ratio.
Right now I'm doing this in PreTravel() for the player pawn class used:
//G-Flex: make sure we have the right FOV angle
newDefaultFOV = class'Tools'.static.AspectCorrectHFOV(75.000,4.0000/3.0000,rootWindow.width/rootWindow.height);
DefaultFOV = newDefaultFOV;
desiredFOV = newDefaultFOV;
//G-Flex: I really hate changing default values, but couldn't think of anything better
//G-Flex: blame the devs for using default.desiredFOV so much instead of defaultFOV
default.DefaultFOV = newDefaultFOV;
default.desiredFOV = newDefaultFOV;
I can't use it in Possess(), or in TravelPostAccept(), because in those cases, the root window is not properly initialized yet when the function is called. This is, unfortunately, also sometimes the case in PreTravel(), but only rarely (it seems to only happen when I click through the intro so fast it doesn't quite load the intro map fully or initialize the player in it, or something like that).
So my question is: Is there a better way to access the desired resolution? Presumably the game gets it somehow in order to set the default FOV in the first place, but I'm not sure how to go about doing it.
Last edited: