From 4e2fdddbcf0e7b40afa907d4d078ef1b8ab35d68 Mon Sep 17 00:00:00 2001 From: flowtron Date: Mon, 31 May 2010 19:44:48 +0000 Subject: [PATCH] avoid error message on lowest sensitivity going to scoped git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5125 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- config/scripts.cfg | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/config/scripts.cfg b/config/scripts.cfg index 835624e7..eb1a1b0d 100644 --- a/config/scripts.cfg +++ b/config/scripts.cfg @@ -129,8 +129,14 @@ alias zoom [ if (= $arg1 1) [ if (=f $sensitivity (scopesens)) [] [ alias oldsens $sensitivity - sensitivity (scopesens) - setscope 1 + // avoid error if using 0.001 as sensitivity + newsens = (scopesens) + if (> (*f 1 1000) $newsens) [ + if (< 1000 $newsens) [ + sensitivity (scopesens) + ] [] + ] [] + setscope 1 ] ] [ sensitivity $oldsens