From c2356cceb9be4de098f09ab9da0b911f1e7161dc Mon Sep 17 00:00:00 2001 From: terminx Date: Sun, 10 Aug 2008 13:13:24 +0000 Subject: [PATCH] git-svn-id: https://svn.eduke32.com/eduke32@962 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/actors.c | 4 ++-- polymer/eduke32/source/config.c | 2 +- polymer/eduke32/source/game.c | 8 ++++---- polymer/eduke32/source/gamedef.c | 8 ++++---- polymer/eduke32/source/gameexec.c | 32 ++++++++++++++++++++++++++----- polymer/eduke32/source/player.c | 2 +- 6 files changed, 39 insertions(+), 17 deletions(-) diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index f7c5a3951..69f0a531c 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -537,8 +537,8 @@ int movesprite(int spritenum, int xchange, int ychange, int zchange, unsigned in inline int ssp(int i,unsigned int cliptype) //The set sprite function { return (movesprite(i,(sprite[i].xvel*(sintable[(sprite[i].ang+512)&2047]))>>14, - (sprite[i].xvel*(sintable[sprite[i].ang&2047]))>>14,sprite[i].zvel, - cliptype)==0); + (sprite[i].xvel*(sintable[sprite[i].ang&2047]))>>14,sprite[i].zvel, + cliptype)==0); } #undef deletesprite diff --git a/polymer/eduke32/source/config.c b/polymer/eduke32/source/config.c index 5376a9536..9bf981d2f 100644 --- a/polymer/eduke32/source/config.c +++ b/polymer/eduke32/source/config.c @@ -1010,7 +1010,7 @@ void CONFIG_WriteSetup(void) #endif if (crosshair_colors.r != default_crosshair_colors.r || crosshair_colors.g != default_crosshair_colors.g - || crosshair_colors.b != default_crosshair_colors.b) + || crosshair_colors.b != default_crosshair_colors.b) { Bsprintf(tempbuf,"%d,%d,%d",crosshair_colors.r,crosshair_colors.g,crosshair_colors.b); SCRIPT_PutString(ud.config.scripthandle, "Misc", "CrosshairColor",tempbuf); diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index f75439267..d40624ee0 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -1860,8 +1860,8 @@ static void altdigitalnumber(int x,int y,int n,char s,char cs) for (k=0;kcurr_weapon == HANDREMOTE_WEAPON) i = HANDBOMB_WEAPON; else i = p->curr_weapon; if (p->curr_weapon != KNEE_WEAPON && - (!althud_flashing || totalclock&32 || p->ammo_amount[i] > (p->max_ammo_amount[i]/10))) + (!althud_flashing || totalclock&32 || p->ammo_amount[i] > (p->max_ammo_amount[i]/10))) altdigitalnumber(-20,-(200-22),p->ammo_amount[i],-16,10+16); o = 102; @@ -5420,7 +5420,7 @@ int spawn(int j, int pn) T1 = TRAND&1; sp->z = (3<<8)+g_player[snum].ps->pyoff+g_player[snum].ps->posz- - ((g_player[snum].ps->horizoff+g_player[snum].ps->horiz-100)<<4); + ((g_player[snum].ps->horizoff+g_player[snum].ps->horiz-100)<<4); if (sp->picnum == SHOTGUNSHELL) sp->z += (3<<8); sp->zvel = -(TRAND&255); diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 9bf46fdab..bd79cd583 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -3799,8 +3799,8 @@ static int parsecommand(void) // syntax: addlogvar // prints the line number in the log file. -/* *scriptptr=line_number; - scriptptr++; */ + /* *scriptptr=line_number; + scriptptr++; */ // get the ID of the DEF transvar(); @@ -4217,8 +4217,8 @@ repeatcase: // syntax: addlog // prints the line number in the log file. -/* *scriptptr=line_number; - scriptptr++; */ + /* *scriptptr=line_number; + scriptptr++; */ return 0; case CON_IFPINVENTORY: diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index 0f4ceaee7..b489a540b 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -5343,11 +5343,11 @@ static int parse(void) s1=fta_quotes[q1]; s2=fta_quotes[q2]; while (*s2&&st--)s2++; - while ((*s1=*s2)&&ln--) {s1++;s2++;} - *s1=0; + while ((*s1=*s2)&&ln--) {s1++;s2++;} + *s1=0; + } + break; } - break; - } case CON_GETPNAME: case CON_QSTRCAT: @@ -6111,6 +6111,28 @@ static int parse(void) break; } + case CON_GETTIMEDATE: + insptr++; + { + int v1=*insptr++,v2=*insptr++,v3=*insptr++,v4=*insptr++,v5=*insptr++,v6=*insptr++,v7=*insptr++,v8=*insptr++; + time_t rawtime; + struct tm * ti; + + time(&rawtime); + ti=localtime(&rawtime); + // initprintf("Time&date: %s\n",asctime (ti)); + + SetGameVarID(v1, ti->tm_sec, g_i, g_p); + SetGameVarID(v2, ti->tm_min, g_i, g_p); + SetGameVarID(v3, ti->tm_hour, g_i, g_p); + SetGameVarID(v4, ti->tm_mday, g_i, g_p); + SetGameVarID(v5, ti->tm_mon, g_i, g_p); + SetGameVarID(v6, ti->tm_year+1900, g_i, g_p); + SetGameVarID(v7, ti->tm_wday, g_i, g_p); + SetGameVarID(v8, ti->tm_yday, g_i, g_p); + break; + } + case CON_MOVESPRITE: case CON_SETSPRITE: insptr++; @@ -6745,7 +6767,7 @@ static int parse(void) if ((index < aGameArrays[lVarID].size)&&(index>=0)) { OSD_Printf(OSDTEXT_GREEN "CON_ADDLOGVAR: L=%d %s[%d] =%d\n",line_num, - aGameArrays[lVarID].szLabel,index,m*aGameArrays[lVarID].plValues[index]); + aGameArrays[lVarID].szLabel,index,m*aGameArrays[lVarID].plValues[index]); break; } else diff --git a/polymer/eduke32/source/player.c b/polymer/eduke32/source/player.c index de4518e1a..f125af224 100644 --- a/polymer/eduke32/source/player.c +++ b/polymer/eduke32/source/player.c @@ -3331,7 +3331,7 @@ void processinput(int snum) shrunk = (s->yrepeat < 32); getzrange(p->posx,p->posy,p->posz,psect,&cz,&hz,&fz,&lz,163L,CLIPMASK0); - /* + /* j = getflorzofslope(psect,p->posx,p->posy); p->truefz = j;