Sauerworld Forum

Sauerbraten Content => Scripts => Topic started by: tenshi on March 28, 2020, 02:58:19 AM

Title: Quake style zoomscript
Post by: tenshi on March 28, 2020, 02:58:19 AM
Hi all,

this is my autoexec.cfg:

Code: [Select]
tenshizoomcalc = [
zoomautosens 0
zoomsens (*f $sensitivity (divf (atan (*f (divf $scr_h $scr_w) (tan (divf $zoomfov 2)))) (atan (*f (divf $scr_h $scr_w) (tan (divf $fov 2))))))
]

bind "LSHIFT" [tenshizoomcalc; zoom 1; onrelease [zoom 0]]

Have fun with it!