Cheat Protected Commands


Hi guys,

Well, I’ve tested this engine and this is the most flawessly that all others source ports (Berserker 3, iouake 3, OpenArena, etc).

Finally, a source port that correct’s the Aspect correct wide screen FOV and HUD in Q3A!

However, I like to use some of more of FOV (cg_fov 100), and when I do this, the Weapon HUD still begin to streching.

The maner that I fix this, is changin the values of 3 variables:


Sadly, I don’t know why, the developers block this variables with the “Cheat Protected” restriction.

In this same way, ioquake (Spearmint too), blocks a newer variables that correspond with the graphics part, I mean:



Why the developer block this variables if this variables are really AWESOME!

The only way to play with this variables is through devmap command, but is not the optimus way to probe this engine.

Well, resuming, there’s a way to unlock the following variables? (compiling a new engine, modifing the current Spearmint engine, etc):


Graphics Part
seta r_znear
seta r_lodcurveerror

HUD Part


Graphics Part

Well, I hope that changing this aspect of this engine may be possible.

See ya!


Any suggestions? Thank’s before hand :slight_smile:


I think cg_gun[XYZ] are originally/mainly for use with testgun <modename> developer command. Though I don’t why these are a cheat since cg_drawGun 0 isn’t a cheat.

r_znear can be used to see through walls. What is your reason for changing it? What do you change it to? iirc I had issues with it clipping Elite Force view weapons when it was set to 5 so it’s unlikely I can increase the default.

I don’t really know much about r_lodCurveError so I can’t guess the logic behind why it’s a cheat. It’s not a cheat in Enemy Territory so I’m guessing there isn’t a strong reason for keeping it a cheat.

r_forcesun and r_ambientscale OpenGL2 renderer cvars are meant for testing; the map should add shader commands to enable the settings automatically. I don’t think this is a good idea but that’s how it is. The OpenGL2 renderer is developed by SmileTheory at ioquake3 so that would be the person to ask about changing it. (I don’t really want to have Spearmint’s OpenGL2 renderer deviate from ioquake3 unless necessary for new features I add.)

devmap is the only option for changing cheat cvars without code changes. Explaining how to remove cheat protection doesn’t really seem like a great idea. :zipper_mouth:

Spearmint Quake 3 does some correction for view weapon position for non-90 FOV but I don’t know of an exact way to fixing it. It may be possible to improve it. What values do you use for cg_gun[XYZ] cvars with 100 FOV? What resolution do you use?

I’m just thinking aloud but if a person wants the gun model to look the same regardless of FOV, then it would be better solved by drawing the weapon with a different FOV than the world. It’s not possible without code changes though and I’m not sure of the complexity involved.


SORRY, but the forum does not allow me to post two or more images, so here’s my onedrive with all explained images:!AIKAPzGjyJ7v1qQ&id=B277173D46915BE1!4730&cid=B277173D46915BE1

Thanks for you great reply zturtleman! I apreciate it a lot! :grinning:

Well, this are my reasons to want change the cvars mentioned above:

Render OpenGL 1 part: In this section I’ll explain what is my intention and a little idea of how can solve it:

r_znear = 4

The default value is 4, and I know that this variable can be used for cheat. But here’s an example of what happens when you try to correct the Weapon HUD perspective:

The r__znear 4 cvar is cutting/droping a part of the weapon model

And here’s how we can solve with r__znear 1 value

The only problem with this aspect, is about of the cheating issue that you mentioned. But, what about of making the r__znear cvar locked between predefined values? (like Quake Live does)

An example of this in Quake Live is the cg__gunZ cvar, that only can be changed between -10 and 0 values.

Well, the next step is explaining the r__lodCurveError cvar, the images has all the information that you need to understand it.

But resuming:

r_lodCurveError = 250

This cvar work in conjunction with r__suvdivisions cvar, and his default value is 4.

The r__lodCurveError cvar controls the LOD of the 3D Map environment (specially for the curved zones).
And the r_suvdivisions cvar controls the amount of poly density of the curved sufaces (applied for the 3D Map too)

Here’s an very well examples:

r__lodCurveError = 250 and r__suvdivisions = 4

r__lodCurveError = 2000 and r__suvdivisions = 1

Render OpenGL 2 part: In this final part, I want to explain the aspect of the graphics tuning. Is annoying to see that this cvars are blocked, because this cvars only controls a brigthness of HUD Weapon model, you can see:

The HUD Weapons are too brigth, but this can be corrected changin the r_ambientscale cvar. Look:

r__ambientscale = 0.6 Too brigth

r__ambientscale = 0.3 Correct brigth

Awesome Shadows part:
As you can see, the impressive shadows with r__forcesun = 1 are beautiful. Thanks for tell me about the SmileTheory developer, I’ll try to contact with him. But, I think that I can’t do much, all depends of this guy :frowning:

With r__forcesun = 1

With r__forcesun = 0

Finally, responding about the Aspect correct wide screen FOV HUD I can tell you that this work well only with cg__fov = 90.

Changin the cg__fov = 90 parameter causes the Weapon model begin to hidding through bottom of the screen.

Weapon HUD with cg__fov = 100; cg__gunz = 0; res = 1920x1080

Weapon HUD with cg__fov = 100; cg__gunz = 2; res = 1920x1080

Resuming, I’m using the following values:
HUD Part: This values are for almost weapons…
cg_gunx = 0
cg_guny = 2
cg_gunz = 0

For the Lightgun I like to view some of more of the Weapon HUD 3D model like appears in Quake 3 XBOX 360 version, take a Look:

cg_gunx = 1.2
cg_guny = 2
cg_gunz = 0

XBOX 360 Lightgun view

Quake 3 Spearmint Lightgun corrected view

I can comment you that I’m thinking about other engines, I know that Quake 3 are a very old engine, but we can obtain the better ideas from other engines. I mean, for example:

The Serious Engine 2 (for Serious Sam 2), have a FOV cvar too, but I noticed that the weapon always mantain the correct aspect view, no matter what FOV you are using…

Well, I’m not a programmer, but I think that you say “It would be better solved by drawing the weapon with a different FOV” so, you are right. The Croteam team solved this problem with this very good idea.

Again, I think that to make this possible, you need to add code… much code? I fell that yes, and this is not good for a programmer :smile:

However, I’ think that weapon hud model make the personality of a FPS Game. Without this, I feel that game are empty, is not a FPS completely. By this reason I’dont like games like Penumbra, or Amnesia, because this games hide the hand when open a door, or grep an objet. And in some aspect Quake Live has the same problem, this make that all Weapons HUD appears very small and streched with the intention to make this game more competitive for tournaments (too see more through the screen). But I think that this aspect may be leaved to be controlled by the gamer, and not obligate to gamers accept something that they don’t like.

If you play Unreal Tournament 3, Overwatch, Paladins, Counter Strike (with Source engine), or any other arena FPS game, the Weapon HUD model look in his correct aspect, size and position.

So, the path that follow Quake Live in this case, are wrong for me, and is why I want to able to play Quake III Arena classic (with Spearmint) in his correct looking way.

Only needs some of effort to achieve this.

Thanks and I’ll apreciate your soon response.
See ya! :slight_smile:


Thanks for your feedback. r_lodCurveError cvar is no longer cheat protected and is set by Geometry Quality in Q3’s Graphics menu so people will use it. r_forceSun is no longer cheat protected. There is now a cg_weaponFov cvar that controls the view weapon’s field of view (defaults to 90, 0 uses value from cg_fov). I think the view weapon being too bright was already fixed.

Test build for Windows: Put the files in your existing Spearmint 0.4 install. You may want to backup the spearmint exe and renderer dll files first. Please test and let me know if things are good now or if there are still problems.


Hello zturtleman!

Nice to see that you’re still there!
Just a small note: I think the latest changes to the mint-arena code, concerning the weapon fov you guys are talking about, causes the weapon model to be no longer lit correctly.
It’s easy to test: start any map, roam around an have a look at your currently held weapon. You’ll notice that the weapon model doesn’t reflect the color/brightness of the lightmap. In other words, the color and brightness of the weapon will always stay the same, regardless if you are in a very dark or bright area.
This is the case at least on my PC, I’m not sure if this is an issue for you guys as well…


Oh, I forgot that would affect the lighting. I didn’t notice in the outside area in q3dm1. Thanks for reporting it. I fixed it using an engine feature I added for Enemy Territory’s HUD head model. If this was a mod for ioquake3 it would not be possible to fix. :sweat_smile:

Test build for Windows:


Fixed, well done Zack! :+1:


Sorry to reopen this topic, but I think the changes concerning the weapon fov still causes a bug. At least I can’t see the weapon flash dlight in 1st person view anymore. In 3rd person view the dlight while firing a weapon works correct, but not in first person view. Is this caused by:
What do I wrong, can someone try to confirm this, please?


Yes, you’re correct. View weapon flash dynamic light doesn’t affect world and dynamic lights in world don’t affect view weapon. They are separate scenes now so this is the correct behavior. I had forgotten about it.

I either need to add dynamic lights to a list in CGame and add them to both of the world and view weapon scenes or change the engine so that I can control view weapon FOV with view weapon still being part of the world scene.


Oh! Both solutions seems no easy task! Tbh, I would not even know where to start in order to fix this issue :cold_sweat:
But I’m sure you’ll choose the right way to fix this! By the way, which one of the above solutions is more suitable to add so called ‘weapon sway’?
On Quake 3 World someone asked for it, and he is true. Weapon sway was never implemented with idtech3, afaik! Yes, yes TF is Source engine, and Source is Quake etc.,… but I mean, for the Q series I only know Q1 mods and Q2 (Berserker) and everything beyond Q3 has at least one released mod with swaying view weapons, but not Q3.
Here is what is meant:

So, is there any solution of the two solutions you mentioned, that would make implementing weapon sway easier for modders?
And, wouldn’t weapon sway fit for Mint-Games? The best idtech3 game, with Mint-Arena to be the first idtech3 game with weapon-sway?

Well, sorry, I don’t know much about ‘view weapon code’ eventually weapon-sway is a bit off-topic, anyways, whats your thoughts?


It’s possible to add weapon sway either way. I would like weapon sway but it’s not a high priority for me personally to program it.


I added flash dlight to world but there is still the issue of world dlights not affecting the view weapon…


Hi there!
Sorry for the late, I’ve some problems in my personal life, but now I’m fine.

So, let’s continue with this incredible engine.
Here’s all the pics that complement all that I say in this post, take a look:!AkWq1oczfEQG8hMsmPVKKsXmAZpT

I’ve have done a little research and I’ve found some little things to be revised.

Take a look:

Antialiasing with OpenGL 2 mode doesn’t work
When I turn OpenGL 2 mode, the AA filter doesn’t apply to the weapon model, neither to the head model of the HUD. I think that all the 3D objets from the HUD needs to be revised. I’ve already readed the discover from KuehnhamTobias about the LIT for the Weapon HUD. And I think that the AA effect correspond to the same aspect in some way.
So, modifying some part of the engine, causes that the other problems appears, ha!
But I want to say that I’m glad to help, research and contribute with this incredibly engine. Sincerely.

The translucents skyboxes in OpenGL 2 and Z-Buffer fight light problem into the mirror of Q3DM0
Well, while played this great modified idtech3 engine, I’ve noticed that in some maps, appears a slightly line that follows my movements…

So, after some time vieweing like a impressed cat following a lasser light, I’ve founded that’s the skybox map! You can see the translucent skybox in the 0:12 min, and the 1:32 min.

The other aspect viewed in the video is an extrange Z-Buffer Fight with the lights into the mirror in Q3DM0 map (The Introduction Map). You can see in the min 0:40, when I move the X axis, the lights into the mirror are cutted. I think that light work like a 2D sprite billboard from Doom. But correctme if I’m wrong.

I think that this little things contribute the FPS drops (I suspect, I’m not sure).

Team Arena Main Menu is not work now
With this change (from the Weapon HUD the support for Team Arena Main Menu was lost.
So, there is, another little bug to fix. :grin:

2k and 4k ressolutions don’t downsampling into the monitor
Well, I’ve a Radeon RX470 video card, and this let me to create Virtual Super Resolutions like 2k (2560x1440) and 4k (3840x2160). Many games run it without problems:

  • Paladins
  • GZDoom
  • Etc

However, Vanilla Quake 3, and Spearmint, don’t fit (downsample) the scale of these resolutions causing the screen oversising. Watch the following video:

Well, this is all the bugs that I founded.
I hope that help to make this engine, a better engine.

Thanks zturtleman, thanks KuehnhammerTobias.

See ya! :sunglasses:


Hi SolivaN!

Glad you’re still there and you are fine!

Just a few quick things that came into my mind while I was reading your “bug report”:

  1. Unfortunately it’s hard to see the effect of “appears a slightly line that follows my movements…” on the videos (they are a bit blurry). Probably you see the seam of the cube maps, you can try to get rid of this seam by enabling seamless cube maps (go to a place where you see the line, bring down the console, set your r_arb_seamless_cube_map cvar to 1, do a vid_restart and see if the line will vanish)… in the past I saw this line also before I switched the cvar!
  2. About the 2560x1440 resolution, well, it works on my system, so I’m in doubt it’s only game related, even if other games run fine in 2560x1440 on your computer… eventually try to set the width and height manually (the cvars are called r_customwidth/r_customheight followed by the value for your monitors resolution.

Well, as already said I’m not sure if this well help, but it would be interesting if this will help you.
I didn’t check the things you mentioned in detail at the moment. I’m no expert!

For the OpenGL2 renderer in common:
mirrors do still have more bugs, check q3dm8 with r_forceSun enabled, the sun light is shining through the ceiling mirror…
zturtleman added a lot of incredible amazing things to the renderer(s), TrueType font Support, rain and snow atmospheric effects, enhanced sky/water fog, corona entities and whatnot, but all in all the OpenGL2 renderer is made by another author that ripped out parts from Xreal renderer (made by Robert Beckebans).
Most (not to say all) bugs concerning the renders aren’t introduced by zturtleman. As far as I know only the tone effect doesn’t work well with splitscreen mode…
Also lightning/shadowing is broken but not by Spearmint. For some lightning bugs a fix is already there (without the need of rewriting all the shaders). Check this: I don’t understand the goal/policy of ioquake3 authors anymore and why they don’t fix things a bugfix is already available for. So you have to apply them for yourself (coding skills are needed)…if you are interestend in fixing the renderer.
What I want to say is, that as far as I know all the rendering bugs you’ll find, will also be seen with ioquake3!

I hope we will hear more from you, and your problems will be solved, especially the 2k/4k resolution problem seems serious to me…I never heard of this problem! Btw, what is your monitor manufacturer/type?

EDIT: Sometimes I can’t even find my own things, but here we are, concerning the mirrors, I think the problem is somehow related to framebuffer multisampling. I made an issue ticket here: Though, I didn’t find a fix for it ever, and I’m not even sure if the flares are the problem or the mirrors! Or if both issues related at all!
Merde, this world needs some good (open source) rendering experts too!


Hahaha, sure! This world of opensource needs a lot of work. But with the help from us, we can apport a little bit more with this hard work.

So, all the tips that you say I’ll try when arrive at my home.

The skybox problem can be seen turning the Full HD mode in youtube. So don’t forget to watch the videos in Full HD mode.

The other way to see the slightly line is viewing the screenshots that I made. So, take a look too.

In the other hand we have the downsampling problem. I think that this limitation/bug are inherit from vanilla q3 engine.
So, is a good time to fix this. I think so.

My monitor is a common Samsung Syncmaster S23B370 of 23" inch, with a max res of 1920x1080.
However, the problem is not in the monitor neither the video card. Like a say recently, other games like STALKER, Paladins, etc can downsampling perfectly on my monitor.

I’ll try the r_customwidth and r_customheight and I’ll comment you.

So, thanks for your comments and reply.

See ya soon!


Wow! the r_arb_seamless_cube_map cvar work flawlessly! It has been corrected the the seam of the cube maps (or the edge of the skyboxes? are the same?)

Well, I’ve tested the r_customwidth/r_customheight, with r_mode -1, but the same problem happens.



Nice to hear that r_arb_seamless_cube_map did solve your problem! :relaxed:

About the Team Arena menu, what exactly did not work for you? I try do as much as possible in mint-arena’s Team Arena menu and I can’t find anything that didn’t work, or behave differently than before. I mean does the menu not appear/start or is there something you can’t click with your mouse anymore, or are there any graphical glitches?

And about the 2k/4k problem: just to make it clear, even 2560x1440 doesn’t work correct? Or does only 3840x2160 resulting in the bug your video is showing? Unfortunately atm nobody I know has a monitor with a native resolution of about 3840x2160 (just to check how it should look like). On everything below that resolution (2560x1440, 1920x1080 etc.) Spearmint behaves correct for us. Thats why I’m asking if the bug you are showing is only on 3840x2160 settings or even with lower values?
Hopefully I can have access to a Dell 4k this weekend, though I’m not sure if this will help us.
Maybe zturtleman knows more about 4k resolutions? OTOH 4k gaming is still rare I think, I don’t really know many people with 4k experience…


Is the Team Arena menu issue that I did not include Team Arena (missionpack) files in the test builds I posted in this thread?

The render and display size are not set separately. Using a resolution large than the monitor will not fit on the screen. This is regular OpenGL behavior.

I would like to separate them eventually by rendering to a frame buffer and then scaling to window size. Primarily for fullscreen desktop support where fullscreen mode is just a window the size of the screen without changing the system video mode to the game resolution. I don’t know when I’ll get around to adding it though.


Hi KuehnhammerTobias!

The Team Arena Menu don’t appears, that’s it simply, only appears the default Q3 Arena menu, with only the menu sound effects from TA.

Yea, the 2k an 4k res don’t work. I don’t know how it work well on your system. The OpenGL games seems have this problems frecuently. I’ve seen the same problem on Heretic II, Hexen II, Quake Live, etc (Except Doom 4).

The case of Doom 4 are different, because this uses Vulkan render. I suppose that Vulkan are similar to DirectX render in the support of downsampling.

I want to try Doom 4 in OpenGL 4.2 mode and I’ll comment you at respect.

So, I think that is a general problem of older OpenGL renders (from OpenGL 1.1 to OpenGL 2.1 I think)

The OpenGL 3.0 to the actually OpenGL 4.5 I think have solved this problem. I don’t made a tests yet with differents versions of OpenGL. But is a thing that I want to made soon.