From 2f99dd111bcd3e8f81d6e37dbcd53ddf4ac08535 Mon Sep 17 00:00:00 2001 From: terminx Date: Tue, 2 May 2006 21:36:09 +0000 Subject: [PATCH] Increase vertical aiming precision git-svn-id: https://svn.eduke32.com/eduke32@142 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/build/src/mmulti.c | 4 ++++ polymer/eduke32/source/game.c | 15 ++++++++++++--- polymer/eduke32/source/jmact/control.c | 2 +- polymer/eduke32/source/player.c | 3 +-- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/polymer/build/src/mmulti.c b/polymer/build/src/mmulti.c index 894d9a6b6..229fe658c 100644 --- a/polymer/build/src/mmulti.c +++ b/polymer/build/src/mmulti.c @@ -660,6 +660,9 @@ const char *getexternaladdress(void) char *host = "checkip.dyndns.org"; char *req = "GET / HTTP/1.0\r\n\r\n"; + if(ipaddr[0]) + return(ipaddr); + #ifdef _WIN32 WSADATA ws; @@ -668,6 +671,7 @@ const char *getexternaladdress(void) return(0); } #endif + if ((h=gethostbyname(host)) == NULL) { initprintf("mmulti: gethostbyname() error in getexternaladdress() (%d)\n",h_errno); return(0); diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index c9a2de0e2..e07c6d06f 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -7634,10 +7634,19 @@ void checkcommandline(int argc,char **argv) j = 0; break; } - if((Bstrcmp(tmp,"192") == 0) || (Bstrcmp(tmp,"172") == 0)) + else if(Bstrcmp(tmp,"192") == 0) { Bstrcpy(tmp,strtok(NULL,".")); - if((Bstrcmp(tmp,"168") == 0) || (Bstrcmp(tmp,"16") == 0)) + if(Bstrcmp(tmp,"168") == 0) + { + j = 0; + break; + } + } + else if(Bstrcmp(tmp,"172") == 0) + { + Bstrcpy(tmp,strtok(NULL,".")); + if(Bstrcmp(tmp,"16") == 0) { j = 0; break; @@ -9815,7 +9824,7 @@ FAKEHORIZONLY: } if(p->aim_mode) - myhoriz += syn->horz>>1; + myhoriz += syn->horz; else { if( myhoriz > 95 && myhoriz < 105) myhoriz = 100; diff --git a/polymer/eduke32/source/jmact/control.c b/polymer/eduke32/source/jmact/control.c index 7c7ab7c80..0a85c4fe6 100644 --- a/polymer/eduke32/source/jmact/control.c +++ b/polymer/eduke32/source/jmact/control.c @@ -73,7 +73,7 @@ void CONTROL_GetMouseDelta(void) */ CONTROL_MouseAxes[0].analog = (x * (CONTROL_MouseSensitivity<<1)); - CONTROL_MouseAxes[1].analog = (y * (CONTROL_MouseSensitivity<<1))<<2; + CONTROL_MouseAxes[1].analog = (y * (CONTROL_MouseSensitivity<<1))<<1; } int32 CONTROL_GetMouseSensitivity(void) diff --git a/polymer/eduke32/source/player.c b/polymer/eduke32/source/player.c index f987ae7a2..2c56827d7 100644 --- a/polymer/eduke32/source/player.c +++ b/polymer/eduke32/source/player.c @@ -2833,7 +2833,6 @@ void getinput(short snum) else horiz = (info.dz+lastinfo.dz)/(314-128); lastinfo.dz = (lastinfo.dz+info.dz) % (314-128); - if(horiz <= 0) horiz++; info.dz = 0; } else { lastinfo.dz = info.dz % (1<<6); @@ -4389,7 +4388,7 @@ HORIZONLY: } if(p->aim_mode) - p->horiz += sync[snum].horz>>1; + p->horiz += sync[snum].horz; else { if( p->horiz > 95 && p->horiz < 105) p->horiz = 100;