diff --git a/polymer/eduke32/build/include/build.h b/polymer/eduke32/build/include/build.h index 6ad212dd4..dd0305d28 100644 --- a/polymer/eduke32/build/include/build.h +++ b/polymer/eduke32/build/include/build.h @@ -476,6 +476,7 @@ void drawline256(int32_t x1, int32_t y1, int32_t x2, int32_t y2, char col); int32_t printext16(int32_t xpos, int32_t ypos, int16_t col, int16_t backcol, const char *name, char fontsize); void printext256(int32_t xpos, int32_t ypos, int16_t col, int16_t backcol, const char *name, char fontsize); +extern int32_t clipmoveboxtracenum; int32_t clipmove(vec3_t *vect, int16_t *sectnum, int32_t xvect, int32_t yvect, int32_t walldist, int32_t ceildist, int32_t flordist, uint32_t cliptype); int32_t clipinsidebox(int32_t x, int32_t y, int16_t wallnum, int32_t walldist); int32_t clipinsideboxline(int32_t x, int32_t y, int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t walldist); diff --git a/polymer/eduke32/build/src/build.c b/polymer/eduke32/build/src/build.c index e8e33b2dc..104bfc067 100644 --- a/polymer/eduke32/build/src/build.c +++ b/polymer/eduke32/build/src/build.c @@ -406,8 +406,6 @@ int32_t app_main(int32_t argc, const char **argv) } //Bcanonicalisefilename(boardfilename,0); - loadnames(); // should be before ExtInit() because of auto 'Y' tile group - if ((i = ExtInit()) < 0) return -1; #if defined RENDERTYPEWIN || (defined RENDERTYPESDL && !defined __APPLE__ && defined HAVE_GTK2) if (i || forcesetup || cmdsetup) @@ -420,6 +418,8 @@ int32_t app_main(int32_t argc, const char **argv) } #endif + loadnames(); + if (initinput()) return -1; // if (option[3] != 0) moustat = initmouse(); diff --git a/polymer/eduke32/samples/a.m32 b/polymer/eduke32/samples/a.m32 index 7d342a3bc..3e1eaa9f1 100644 --- a/polymer/eduke32/samples/a.m32 +++ b/polymer/eduke32/samples/a.m32 @@ -1,7 +1,7 @@ // m32 script editor extensions. // to load, enter "include samples/a" (without quotes) in the console // or into a file named m32_autoexec.cfg for automatic loading on startup. -// to enable all events, "enableevents all" +// to enable all events, "enableevent all" ////////// USER SETTINGS ////////// diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 37ed9b85f..50ae861ca 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -8644,7 +8644,7 @@ static int32_t loadtilegroups(const char *fn) Bmemcpy(&s_TileGroups[i], &blank, sizeof(blank)); } tile_groups = 0; - +#if 0 // ---------- Init hardcoded tile group consisting of all named tiles s_TileGroups[0].szText = Bstrdup("All named"); s_TileGroups[0].pIds = Bmalloc(MAXTILES * sizeof(s_TileGroups[0].pIds[0])); @@ -8662,7 +8662,7 @@ static int32_t loadtilegroups(const char *fn) tile_groups++; } // -------------------- - +#endif parsetilegroups(script); scriptfile_close(script); diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index f64961fc2..b2bbc6bd5 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -556,6 +556,7 @@ const char *keyw[] = "lineintersect", // 356 "rayintersect", // 357 "calchypotenuse", // 358 + "clipmovenoslide", // 359 "" }; @@ -4473,6 +4474,7 @@ static int32_t C_ParseCommand(void) break; case CON_CLIPMOVE: + case CON_CLIPMOVENOSLIDE: // ,,,z,, xvect,yvect,walldist,floordist,ceildist,clipmask C_GetManyVarsType(GAMEVAR_READONLY,3); C_GetNextVar(); diff --git a/polymer/eduke32/source/gamedef.h b/polymer/eduke32/source/gamedef.h index 931562c26..e7b90b534 100644 --- a/polymer/eduke32/source/gamedef.h +++ b/polymer/eduke32/source/gamedef.h @@ -932,6 +932,7 @@ enum ScriptKeywords_t CON_LINEINTERSECT, // 356 CON_RAYINTERSECT, // 357 CON_CALCHYPOTENUSE, // 358 + CON_CLIPMOVENOSLIDE, // 359 CON_END }; #endif diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index cf1568938..0a55020a7 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -2544,13 +2544,14 @@ nullquote: } case CON_CLIPMOVE: + case CON_CLIPMOVENOSLIDE: insptr++; { vec3_t vect; int32_t retvar=*insptr++, xvar=*insptr++, yvar=*insptr++, z=Gv_GetVarX(*insptr++), sectnumvar=*insptr++; int32_t xvect=Gv_GetVarX(*insptr++), yvect=Gv_GetVarX(*insptr++); int32_t walldist=Gv_GetVarX(*insptr++), floordist=Gv_GetVarX(*insptr++), ceildist=Gv_GetVarX(*insptr++); - int32_t clipmask=Gv_GetVarX(*insptr++); + int32_t clipmask=Gv_GetVarX(*insptr++), oclipmoveboxtracenum=clipmoveboxtracenum; int16_t sectnum; vect.x = Gv_GetVarX(xvar); @@ -2565,7 +2566,11 @@ nullquote: continue; } + if (tw==CON_CLIPMOVENOSLIDE) + clipmoveboxtracenum = 1; Gv_SetVarX(retvar, clipmove(&vect, §num, xvect, yvect, walldist, floordist, ceildist, clipmask)); + if (tw==CON_CLIPMOVENOSLIDE) + clipmoveboxtracenum = oclipmoveboxtracenum; Gv_SetVarX(sectnumvar, sectnum); Gv_SetVarX(xvar, vect.x); Gv_SetVarX(yvar, vect.y);