[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - Get player's field of view (fov)?

Get player's field of view (fov)?

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Get player's field of view (fov)?

Postby Slackhead » Mon Sep 22, 2014 3:33 am

Hi, I've not managed to find anything on this, but I want to make a zoom function on a weapon and I would like to first find the player's normal FOV so i can restore it afterwards to whatever they had set it as.

Possible?
Slackhead
 
Posts: 2
Joined: Tue Sep 09, 2014 10:58 pm

Re: Get player's field of view (fov)?

Postby Spike » Mon Sep 22, 2014 3:38 am

no. not possible.
just use .viewzoom instead.

long answer:
stuffcmd(player, "cmd foo $fov\n");
void(string s)SV_ParseClientCommand=
{
tokenize(s);
if (argv(0) == "foo")
sprint(self, "your fov is \"", argv(1), "\"\n");
else
clientcommand(s);
};
of course, as this requires both client and server extensions, both of which basically require an engine that already supports .viewzoom, its generally just better to use .viewzoom instead and not fuck with the client's cvars. those things should be owned by the client and you fucking them up will break configs or whatever if they quit at a bad time.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Get player's field of view (fov)?

Postby Slackhead » Mon Sep 22, 2014 8:39 am

Thanks, I'll look into that.
Slackhead
 
Posts: 2
Joined: Tue Sep 09, 2014 10:58 pm

Re: Get player's field of view (fov)?

Postby Cobalt » Mon Sep 22, 2014 5:57 pm

FOV, always been to me in MP sense, a cheat / advantage. Set to > 90 the default, and you have a larger view perspective of the map than someone who does not know or want to use a greater FOV. Accoirding to Wikipedia, we all have approx 95 degree FOV -

http://en.wikipedia.org/wiki/Human_eye
User avatar
Cobalt
 
Posts: 445
Joined: Wed Jun 10, 2009 2:58 am
Location: New England, USA

Re: Get player's field of view (fov)?

Postby r00k » Tue Sep 23, 2014 5:14 pm

i prefer fov 110 anything less than 100 looks like im running around with reading glasses on.

@Slack:
So if each player's starting FOV value is variable, and all you are really doing is making a Zoom effect, then the best alternative would be to take the difference on your end.

Meaning, decrement the fov value X number of times when zooming, then increment the fov value THAT many times when returning. All you are controlling is the distance from out to in. (slider bar)

Use .viewzoom to change the fov
or
You could simply *cough* stuffcmd to the client "inc fov 1", "dec fov 1"... x number of times in a loop. I know this is not the best option. But would only require a client that has those console commands, which i think most do.
r00k
 
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest