mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
Rearrange the offset cheat prevention.
Rather than (expensively) setting the cvars to 0 every frame, just ignore their values in multiplayer mode.
This commit is contained in:
parent
e7c3ae911f
commit
65bb35509f
1 changed files with 7 additions and 11 deletions
|
@ -649,10 +649,13 @@ V_CalcRefdef (void)
|
|||
|
||||
AngleVectors (angles, forward, right, up);
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
r_data->refdef->vieworg[i] += scr_ofsx->value * forward[i] +
|
||||
scr_ofsy->value * right[i] +
|
||||
scr_ofsz->value * up[i];
|
||||
// don't allow cheats in multiplayer
|
||||
if (cl.maxclients == 1) {
|
||||
for (i = 0; i < 3; i++) {
|
||||
r_data->refdef->vieworg[i] += scr_ofsx->value * forward[i] +
|
||||
scr_ofsy->value * right[i] +
|
||||
scr_ofsz->value * up[i];
|
||||
}
|
||||
}
|
||||
|
||||
V_BoundOffsets ();
|
||||
|
@ -729,13 +732,6 @@ V_RenderView (void)
|
|||
if (cls.state != ca_active)
|
||||
return;
|
||||
|
||||
// don't allow cheats in multiplayer
|
||||
if (cl.maxclients > 1) {
|
||||
Cvar_Set (scr_ofsx, "0");
|
||||
Cvar_Set (scr_ofsy, "0");
|
||||
Cvar_Set (scr_ofsz, "0");
|
||||
}
|
||||
|
||||
if (cl.intermission) { // intermission / finale rendering
|
||||
V_CalcIntermissionRefdef ();
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue