
Quake DeveLS - Gun Scope
Author: Rick Kerry of Immersive Worlds
Difficulty: My God This is Simple
Lets make a scope for our
guns. With this little mod, you'll be able to target people from all the way
across a level with just a right-click of the mouse. Imagine the backshooting
possibilities.
Ed's note : It is possible
to alter fov using macros, so you may be wondering why we are bothering to code
it up. Well, then the zoom command is available to all players, even newbies !
[/SumFuka]
For this mod, we'll only have to make changes to the g_cmds.c file. Go to just after the gameversion command and add this 'else if' block:
else if (Q_stricmp (cmd, "gameversion") == 0) { gi.cprintf (ent, PRINT_HIGH, "%s : %s\n", GAMEVERSION, __DATE__); } + else if (Q_stricmp (cmd, "zoom") == 0) +{ + int zoomtype=atoi(gi.argv(1)); + if (zoomtype==0) + { + ent->client->ps.fov = 90; + } + else if (zoomtype==1) + { + if (ent->client->ps.fov == 90) ent->client->ps.fov = 40; + else if (ent->client->ps.fov == 40) ent->client->ps.fov = 20; + else if (ent->client->ps.fov == 20) ent->client->ps.fov = 10; + else ent->client->ps.fov = 90; + } +} else if (Q_stricmp (cmd, "fov") == 0) { ent->client->ps.fov = atoi(gi.argv(1));
Now, when
you play the game, go to the console and type
bind mouse2 "cmd zoom 1"
bind space "cmd zoom 0"
Whenever you want to zoom
in now, right click the mouse button and cycle through all the zoom states. If
you have a panic attack, press the space bar to return to normal view.
Hope you like the tutorial and find it fun. Tutorial by Rick Kerry of Immersive Worlds
|
This
site, and all content and graphics displayed on it, |