CabConModding
Facebook
Twitter
youtube
Discord
Contact us
RSS
Menu
CabConModding
Home
New
Top
Premium
Rules
FAQ - Frequently Asked Questions
Games
Fornite
Call of Duty: Black Ops 3
Clash of Clans
Grand Theft Auto 5
Apex Legends
Assassin’s Creed Origins
Forums
Premium
Latest posts
What's new
Latest posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Log in
Register
What's new
Premium
Latest posts
Menu
Log in
Register
Navigation
Install the app
Install
More options
Dark Theme
Contact us
Close Menu
Forums
Gaming
Call of Duty Classics
Call of Duty: Modern Warfare 3
SPRX Help Plez XD Rawr KKK
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Harry" data-source="post: 30929" data-attributes="member: 35"><p>Using the RefDef structure, you could use these:</p><p>[CODE]float getScreenPercentX(float percent) {</p><p> Get_cgs()->refdef.Width*percent;</p><p>}</p><p>float getScreenPercentY(float percent) {</p><p> Get_cgs()->refdef.Height*percent;</p><p>}[/CODE]</p><p></p><p>Call like:</p><p>[CODE]getScreenPercentX(0.5); //50%</p><p>or</p><p>getScreenPercentX(0.25) //25%[/CODE]</p><p></p><p>The structure:</p><p>[CODE]typedef struct</p><p>{</p><p> /* 0000 */ int X;</p><p> /* 0004 */ int Y;</p><p> /* 0008 */ int Width;</p><p> /* 000C */ int Height;</p><p> /* 0010 */ Vector2 Fov;</p><p> /* 0018 */ Vector3 viewOrigin;</p><p> /* 0024 */ Vector3 viewAxis[3];</p><p> /* 0048 */</p><p>} RefDef_s;[/CODE]</p><p></p><p>You'll need to fill the structure, but you should be able to do this easily, with all the sources that have been released for MW3</p></blockquote><p></p>
[QUOTE="Harry, post: 30929, member: 35"] Using the RefDef structure, you could use these: [CODE]float getScreenPercentX(float percent) { Get_cgs()->refdef.Width*percent; } float getScreenPercentY(float percent) { Get_cgs()->refdef.Height*percent; }[/CODE] Call like: [CODE]getScreenPercentX(0.5); //50% or getScreenPercentX(0.25) //25%[/CODE] The structure: [CODE]typedef struct { /* 0000 */ int X; /* 0004 */ int Y; /* 0008 */ int Width; /* 000C */ int Height; /* 0010 */ Vector2 Fov; /* 0018 */ Vector3 viewOrigin; /* 0024 */ Vector3 viewAxis[3]; /* 0048 */ } RefDef_s;[/CODE] You'll need to fill the structure, but you should be able to do this easily, with all the sources that have been released for MW3 [/QUOTE]
Verification
Post reply
Forums
Gaming
Call of Duty Classics
Call of Duty: Modern Warfare 3
SPRX Help Plez XD Rawr KKK
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top