View previous topic :: View next topic |
Author |
Message |
mh

Joined: 12 Jan 2008 Posts: 910
|
Posted: Tue Aug 25, 2009 10:22 am Post subject: |
|
|
avirox wrote: | also tweak the players' FOV by sending a stuffcmd |
Nooooooooooo! Please don't do this.
FOV belongs to the player, who may have selected a particular FOV for their own reasons. Shoving in a stuffcmd is like saying "I don't care how you want to play the game, you're playing it MY way". It's not as evil as stomping all over their keybindings from QC, but it's quite evil nonetheless. At the very least plase ensure that you restore their original FOV (and mouse sensitivity and anything else you change) correctly when you're done. If you can't do that then don't do it at all. _________________ DirectQ Engine - New release 1.8.666a, 9th August 2010
MHQuake Blog (General)
Direct3D 8 Quake Engines |
|
Back to top |
|
 |
Error Inside3D Staff

Joined: 05 Nov 2004 Posts: 558 Location: VA, USA
|
Posted: Tue Aug 25, 2009 10:47 am Post subject: |
|
|
am I the only one that thinks fov changing is a form of cheating?
you can lower it to zoom in to "snipe" shit or raise it to see shit around you. seems cheap and cheating as hell to me.
FOV may belong to the player in Quake, but NOT IN MY MOD  _________________ Inside3D : Knowledge Is Power
Darkplaces Documentation Wiki |
|
Back to top |
|
 |
Downsider

Joined: 16 Sep 2008 Posts: 478
|
Posted: Tue Aug 25, 2009 12:27 pm Post subject: |
|
|
This is your mod? |
|
Back to top |
|
 |
avirox
Joined: 16 Aug 2006 Posts: 109
|
Posted: Tue Aug 25, 2009 1:45 pm Post subject: |
|
|
mh wrote: | avirox wrote: | also tweak the players' FOV by sending a stuffcmd |
Nooooooooooo! Please don't do this.
FOV belongs to the player, who may have selected a particular FOV for their own reasons. Shoving in a stuffcmd is like saying "I don't care how you want to play the game, you're playing it MY way". It's not as evil as stomping all over their keybindings from QC, but it's quite evil nonetheless. At the very least plase ensure that you restore their original FOV (and mouse sensitivity and anything else you change) correctly when you're done. If you can't do that then don't do it at all. |
That's part of what using ironsights is. Actually, using CSQC to adjust the view rather than sending a FOV stuffcmd change is probably better, but either way you can easily restore the player's original FOV granted you use a decent engine that can read user cvars. |
|
Back to top |
|
 |
Wazat
Joined: 15 Oct 2004 Posts: 732 Location: Middle 'o the desert, USA
|
Posted: Wed Aug 26, 2009 5:32 am Post subject: |
|
|
avirox wrote: | That's part of what using ironsights is. Actually, using CSQC to adjust the view rather than sending a FOV stuffcmd change is probably better, but either way you can easily restore the player's original FOV granted you use a decent engine that can read user cvars. |
Actually, you could do it with a couple stuffcmd commands and some alias building, if I remember right. Can't you dynamically create an alias that stores the old value of fov (build the alias just before changing fov to zoom), then call the alias to reset fov?
Maybe that's only new engines that can do that.
alias restorefov "fov $fov"
something like that. I'm too tired to think. _________________ When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work. |
|
Back to top |
|
 |
Spike
Joined: 05 Nov 2004 Posts: 944 Location: UK
|
Posted: Wed Aug 26, 2009 7:23 am Post subject: |
|
|
mh wrote: | At the very least plase ensure that you restore their original FOV (and mouse sensitivity and anything else you change) correctly when you're done. If you can't do that then don't do it at all. |
Also make sure you do this before the user gets disconnected from lag...
Oh? You mean you can't do that?
There's no way to ask a client what fov they prefer, without using extensions. The simplest way is to exec an alias which the user created to reset their fov. And to exec that on map start too.
You can use DP_VIEWZOOM if you want to avoid stuffing fov commands at a client. _________________ What's a signature? |
|
Back to top |
|
 |
Error Inside3D Staff

Joined: 05 Nov 2004 Posts: 558 Location: VA, USA
|
|
Back to top |
|
 |
GiffE
Joined: 08 Oct 2006 Posts: 141 Location: USA, CT
|
Posted: Thu Aug 27, 2009 2:00 pm Post subject: |
|
|
Using DP_VIEWZOOM would be significantly easier than a csqc or fov hack.
Stuffcmds are disgusting. They are the reason why I set my config to read-only. Nothing worse than a mod that completely screws up how you would like to play. fov is cheating as far as I'm concerned aswell. Unless you want everyone to zoom (indefinitely) with every gun. _________________ http://www.giffe-bin.net/ |
|
Back to top |
|
 |
MauveBib

Joined: 04 Nov 2004 Posts: 602
|
Posted: Thu Aug 27, 2009 3:19 pm Post subject: |
|
|
DP_VIEWZOOM is definately the way to go. Easier than CSQC, much cleaner than stuffcmd and has the advantage of also scaling the mouse sensitivity. _________________ Apathy Now! |
|
Back to top |
|
 |
Baker

Joined: 14 Mar 2006 Posts: 1538
|
Posted: Wed Dec 30, 2009 12:22 pm Post subject: Re: Adding iron sights? |
|
|
Biodude wrote: | Hey everyone, I am making a game and I need help on making iron sights in it. Anyone know how? |
My guess without thinking too hard is that the view model needs to be "dead" on and you use this engine tutorial ( http://forums.inside3d.com/viewtopic.php?t=1247 ) and a little bit of "alias" trickery for the side view.
Pretending that an engine using that tutorial is used.
bind mouse1 "r_viewmodeloffset 0" // Straight on view ("iron sight")
bind mouse2 "r_viewmodeloffset 10" // Side view ("weapon on side")
I'm highly impressed by Downsider's creative application of ideas. This is a really good solution to a question I've long been wondering. Although an extension is the ideal way to solve this as all game logic really should be part of the "mod" and not hacked on to the engine and stuffed into a .cfg file --- still we are not in that perfect world yet.
/So yes, unless an extension is used this isn't really a QuakeC answer, but I'm thinking this is a "how'd he do that" question and you were assuming the answer was QuakeC. |
|
Back to top |
|
 |
Downsider

Joined: 16 Sep 2008 Posts: 478
|
Posted: Wed Dec 30, 2009 2:29 pm Post subject: |
|
|
My ironsights use a builtin I made, though, not a viewmodeloffset thingie, although I guess that could work, but the builtin reads the ironsight coords from a text file packaged with the model so you don't have to mess with different numbers in QC :0 |
|
Back to top |
|
 |
|