diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index a7aed4856..e8acfe8d2 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -4067,7 +4067,7 @@ static void moveactors(void) if (t[3]>0) { - short frames[] = {5,5,6,6,7,7,6,5}; + static char frames[] = {5,5,6,6,7,7,6,5}; s->picnum = GREENSLIME+frames[t[3]]; @@ -4441,7 +4441,7 @@ DETONATEB: // if(lPipeBombControl & PIPEBOMB_TIMER) // { - if (s->picnum == HEAVYHBOMB && hittype[i].temp_data[6] == 1) + if (s->picnum == HEAVYHBOMB && t[6] == 1) { /* if(s->extra >= 1) { @@ -4452,24 +4452,18 @@ DETONATEB: s->lotag=911; */ - if (hittype[i].temp_data[7] >= 1) - { - hittype[i].temp_data[7]--; - } + if (t[7] > 0) + t[7]--; - if (hittype[i].temp_data[7] <= 0) - { - hittype[i].temp_data[6] = 3; - // s->extra = *actorscrptr[s->picnum]; - } + if (t[7] == 0) + t[6] = 3; } // } - if ((l >= 0 && g_player[l].ps->hbomb_on == 0 && hittype[i].temp_data[6] == 2) || t[3] == 1) - hittype[i].temp_data[6] = 3; - - if (hittype[i].temp_data[6] == 3) + if ((l >= 0 && g_player[l].ps->hbomb_on == 0 && t[6] == 2) || t[3] == 1) + t[6] = 3; + if (t[6] == 3) { t[4]++; @@ -4754,8 +4748,6 @@ DETONATEB: goto BOLT; } - - // #ifndef VOLOMEONE if (ud.multimode < 2 && badguy(s)) { if (actor_tog == 1) @@ -4770,7 +4762,7 @@ DETONATEB: s->cstat = 257; } } - // #endif + if (actorscrptr[sprite[i].picnum]) { p = findplayer(s,&x); @@ -4778,7 +4770,6 @@ DETONATEB: } BOLT: - i = nexti; } @@ -5037,13 +5028,8 @@ static void moveexplosions(void) // STATNUM 5 if (s->xvel > 0) s->xvel--; else s->xvel = 0; - if (t[5] < 30*10) - t[5]++; - else - { + if ((t[5]++) == ((30*10)-1)) KILLIT(i); - } - if (s->zvel > 1024 && s->zvel < 1280) { @@ -5051,8 +5037,7 @@ static void moveexplosions(void) // STATNUM 5 sect = s->sectnum; } - l = getflorzofslope(sect,s->x,s->y); - x = getceilzofslope(sect,s->x,s->y); + getzsofslope(sect,s->x,s->y,&x,&l); if (x == l || sect < 0 || sect >= MAXSECTORS) KILLIT(i); if (s->z < l-(2<<8)) diff --git a/polymer/eduke32/source/duke3d.h b/polymer/eduke32/source/duke3d.h index 57600aaa0..af09b0681 100644 --- a/polymer/eduke32/source/duke3d.h +++ b/polymer/eduke32/source/duke3d.h @@ -597,8 +597,6 @@ extern int movefifoplc, vel,svel,angvel,horiz; extern short mirrorwall[64], mirrorsector[64], mirrorcnt; -#define NUMKEYS 19 - #include "funct.h" extern int screencapt; diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index c062038fb..d2f0851e7 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -50,7 +50,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include extern int getversionfromwebsite(char *buffer); -#define BUILDDATE 20080806 // this is checked against http://eduke32.com/VERSION +#define BUILDDATE 20080809 // this is checked against http://eduke32.com/VERSION #define UPDATEINTERVAL 604800 // 1w #else static int usecwd = 0; diff --git a/polymer/eduke32/source/gamevars.c b/polymer/eduke32/source/gamevars.c index 16dd85ef6..b1ce34aed 100644 --- a/polymer/eduke32/source/gamevars.c +++ b/polymer/eduke32/source/gamevars.c @@ -596,10 +596,7 @@ int GetGameVarID(int id, int iActor, int iPlayer) int m = 1; if (id == MAXGAMEVARS) - { -// OSD_Printf("GetGameVarID(): reading gamevar constant\n"); return(*insptr++); - } if (id == g_iThisActorID) return iActor; @@ -610,12 +607,12 @@ int GetGameVarID(int id, int iActor, int iPlayer) { int index=GetGameVarID(*insptr++,iActor,iPlayer); - id ^= (MAXGAMEVARS<<2); + id &= ~(MAXGAMEVARS<<2); if (id&(MAXGAMEVARS<<1)) // negative array access { m = -1; - id ^= (MAXGAMEVARS<<1); + id &= ~(MAXGAMEVARS<<1); } // OSD_Printf("GetGameVarID(): reading from array\n"); @@ -632,7 +629,7 @@ int GetGameVarID(int id, int iActor, int iPlayer) } m = -1; - id ^= (MAXGAMEVARS<<1); + id &= ~(MAXGAMEVARS<<1); } if (aGameVars[id].dwFlags & GAMEVAR_FLAG_PERPLAYER) @@ -652,27 +649,19 @@ int GetGameVarID(int id, int iActor, int iPlayer) { // for the current actor if (iActor >= 0 && iActor <= MAXSPRITES) - { return(m * aGameVars[id].plValues[iActor]); - } return(m * aGameVars[id].lValue); } if (aGameVars[id].dwFlags & GAMEVAR_FLAG_INTPTR) - { return(m * (*((int*)aGameVars[id].lValue))); - } if (aGameVars[id].dwFlags & GAMEVAR_FLAG_SHORTPTR) - { return(m * (*((short*)aGameVars[id].lValue))); - } if (aGameVars[id].dwFlags & GAMEVAR_FLAG_CHARPTR) - { return(m * (*((char*)aGameVars[id].lValue))); - } return(m * aGameVars[id].lValue); } diff --git a/polymer/eduke32/source/mapster32.h b/polymer/eduke32/source/mapster32.h index 34e49030b..41edf183a 100644 --- a/polymer/eduke32/source/mapster32.h +++ b/polymer/eduke32/source/mapster32.h @@ -54,7 +54,6 @@ extern signed char tempshade; static int ototalclock = 0, clockval[AVERAGEFRAMES], clockcnt = 0; #define NUMOPTIONS 9 -#define NUMKEYS 19 char option[NUMOPTIONS] = {0,0,0,0,0,0,1,0,0}; unsigned char keys[NUMBUILDKEYS] = diff --git a/polymer/eduke32/source/player.c b/polymer/eduke32/source/player.c index 6a93ed795..6e43c81a9 100644 --- a/polymer/eduke32/source/player.c +++ b/polymer/eduke32/source/player.c @@ -161,7 +161,8 @@ static void hitscantrail(int x1, int y1, int z1, int x2, int y2, int z2, int ang y1 += y2; z1 += z2; updatesector(x1,y1,§); - if (sect < 0 || z1 > getflorzofslope(sect,x1,y1) || z1 < getceilzofslope(sect,x1,y1)) + getzsofslope(sect,x1,y1,&n,&j); + if (sect < 0 || z1 > j || z1 < n) break; j = EGS(sect,x1,y1,z1,projectile[atwith].trail,-32,projectile[atwith].txrepeat,projectile[atwith].tyrepeat,ang,0,0,g_player[0].ps->i,0); changespritestat(j,1); @@ -3297,10 +3298,14 @@ 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; p->truecz = getceilzofslope(psect,p->posx,p->posy); + */ + getzsofslope(psect,p->posx,p->posy,&p->truecz,&p->truefz); + j = p->truefz; truefdist = klabs(p->posz-j); if ((lz&49152) == 16384 && psectlotag == 1 && truefdist > PHEIGHT+(16<<8)) @@ -4937,7 +4942,10 @@ SHOOTINCODE: p->weapon_pos = 10; } else + { + p->weapon_pos = 10; checkavailweapon(p); + } } } else if (aplWeaponWorksLike[p->curr_weapon][snum] == HANDREMOTE_WEAPON)