diff --git a/polymer/eduke32/build/Makefile.shared b/polymer/eduke32/build/Makefile.shared index fb0bd36a5..21e71b827 100644 --- a/polymer/eduke32/build/Makefile.shared +++ b/polymer/eduke32/build/Makefile.shared @@ -3,7 +3,8 @@ ENGINELIB=libengine.a EDITORLIB=libbuild.a -SDLCONFIG = /usr/local/bin/sdl-config +# SDLCONFIG = /usr/local/bin/sdl-config +SDLCONFIG = sdl-config ifeq ($(wildcard $(SDLCONFIG)),$(SDLCONFIG)) SDLROOT = /usr/local diff --git a/polymer/eduke32/build/include/build.h b/polymer/eduke32/build/include/build.h index 093f684eb..3ae6a7c23 100644 --- a/polymer/eduke32/build/include/build.h +++ b/polymer/eduke32/build/include/build.h @@ -485,7 +485,7 @@ int32_t insertsprite(int16_t sectnum, int16_t statnum); int32_t deletesprite(int16_t spritenum); int32_t changespritesect(int16_t spritenum, int16_t newsectnum); int32_t changespritestat(int16_t spritenum, int16_t newstatnum); -int32_t setsprite(int16_t spritenum, vec3_t *new); +int32_t setsprite(int16_t spritenum, const vec3_t *new); int32_t screencapture(char *filename, char inverseit); diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index 8620c6cfd..0d4b1a156 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -8265,18 +8265,13 @@ int32_t krecip(int32_t num) // // setsprite // -int32_t setsprite(int16_t spritenum, vec3_t *new) +int32_t setsprite(int16_t spritenum, const vec3_t *new) { - int16_t tempsectnum; + int16_t tempsectnum = sprite[spritenum].sectnum; - Bmemcpy(&sprite[spritenum], new, sizeof(vec3_t)); -/* - sprite[spritenum].x = newx; - sprite[spritenum].y = newy; - sprite[spritenum].z = newz; -*/ + if ((void *)new != (void *)&sprite[spritenum]) + Bmemcpy(&sprite[spritenum], new, sizeof(vec3_t)); - tempsectnum = sprite[spritenum].sectnum; updatesector(new->x,new->y,&tempsectnum); if (tempsectnum < 0) @@ -8287,13 +8282,13 @@ int32_t setsprite(int16_t spritenum, vec3_t *new) return(0); } -int32_t setspritez(int16_t spritenum, vec3_t *new) +int32_t setspritez(int16_t spritenum, const vec3_t *new) { - int16_t tempsectnum; + int16_t tempsectnum = sprite[spritenum].sectnum; - Bmemcpy(&sprite[spritenum], new, sizeof(vec3_t)); + if ((void *)new != (void *)&sprite[spritenum]) + Bmemcpy(&sprite[spritenum], new, sizeof(vec3_t)); - tempsectnum = sprite[spritenum].sectnum; updatesectorz(new->x,new->y,new->z,&tempsectnum); if (tempsectnum < 0) diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index 6a701c7b4..84607f63d 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -1400,17 +1400,11 @@ static void G_MoveStandables(void) } else if (s->owner == -2) { - vec3_t vect; - g_player[p].ps->oposx = g_player[p].ps->posx = s->x-(sintable[(g_player[p].ps->ang+512)&2047]>>6); g_player[p].ps->oposy = g_player[p].ps->posy = s->y-(sintable[g_player[p].ps->ang&2047]>>6); g_player[p].ps->oposz = g_player[p].ps->posz = s->z+(2<<8); - vect.x = g_player[p].ps->posx; - vect.y = g_player[p].ps->posy; - vect.z = g_player[p].ps->posz; - - setsprite(g_player[p].ps->i,&vect); + setsprite(g_player[p].ps->i,(vec3_t *)g_player[p].ps); g_player[p].ps->cursectnum = sprite[g_player[p].ps->i].sectnum; } } @@ -6752,19 +6746,15 @@ static void G_MoveEffectors(void) //STATNUM 3 TRAVERSE_CONNECT(p) if (g_player[p].ps->cursectnum == s->sectnum && g_player[p].ps->on_ground) { - vec3_t vect; - g_player[p].ps->posx += x; g_player[p].ps->posy += l; g_player[p].ps->oposx = g_player[p].ps->posx; g_player[p].ps->oposy = g_player[p].ps->posy; - vect.x = g_player[p].ps->posx; - vect.y = g_player[p].ps->posy; - vect.z = g_player[p].ps->posz+PHEIGHT; - - setsprite(g_player[p].ps->i,&vect); + g_player[p].ps->posz += PHEIGHT; + setsprite(g_player[p].ps->i,(vec3_t *)g_player[p].ps); + g_player[p].ps->posz -= PHEIGHT; } sc->floorxpanning-=x>>3; diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index bfcee871e..7115b5a2c 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -2968,6 +2968,8 @@ static int32_t X_DoExecute(void) case CON_IFGAPZL: insptr++; X_DoConditional(((ActorExtra[vm.g_i].floorz - ActorExtra[vm.g_i].ceilingz) >> 8) < *insptr); + if (sprite[vm.g_i].sectnum == g_player[vm.g_p].ps->cursectnum) + OSD_Printf("%d %d\n",ActorExtra[vm.g_i].floorz,ActorExtra[vm.g_i].ceilingz); break; case CON_IFHITSPACE: