diff --git a/extras/conf/udb/Includes/SRB222_linedefs.cfg b/extras/conf/udb/Includes/SRB222_linedefs.cfg index ad7109769..d00321707 100644 --- a/extras/conf/udb/Includes/SRB222_linedefs.cfg +++ b/extras/conf/udb/Includes/SRB222_linedefs.cfg @@ -952,6 +952,11 @@ doom title = "Stop Timer/Exit Stage in Record Attack"; prefix = "(462)"; } + 463 + { + title = "Dye Object"; + prefix = "(463)"; + } 466 { title = "Set Level Failure State"; @@ -3028,6 +3033,17 @@ udmf prefix = "(462)"; } + 463 + { + title = "Dye Object"; + prefix = "(463)"; + stringarg0 + { + title = "Skin color"; + type = 2; + } + } + 466 { title = "Set Level Failure State"; diff --git a/src/p_setup.c b/src/p_setup.c index c05fa5aae..92b425665 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -1294,7 +1294,6 @@ static void P_LoadSidedefs(UINT8 *data) case 336: // Trigger linedef executor: Object dye - Once case 434: // Custom Power case 461: // Spawns an object on the map based on texture offsets - case 463: // Colorizes an object { char process[8*3+1]; memset(process,0,8*3+1); @@ -1318,6 +1317,7 @@ static void P_LoadSidedefs(UINT8 *data) case 442: // Calls P_SetMobjState on mobjs of a given type in the tagged sectors case 443: // Calls a named Lua function case 459: // Control text prompt (named tag) + case 463: // Colorizes an object { char process[8*3+1]; memset(process,0,8*3+1); @@ -3948,6 +3948,13 @@ static void P_ConvertBinaryMap(void) lines[i].args[0] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS; lines[i].args[1] = sides[lines[i].sidenum[0]].rowoffset >> FRACBITS; break; + case 463: //Dye object + if (sides[lines[i].sidenum[0]].text) + { + lines[i].stringargs[0] = Z_Malloc(strlen(sides[lines[i].sidenum[0]].text) + 1, PU_LEVEL, NULL); + M_Memcpy(lines[i].stringargs[0], sides[lines[i].sidenum[0]].text, strlen(sides[lines[i].sidenum[0]].text) + 1); + } + break; case 466: //Set level failure state lines[i].args[0] = !!(lines[i].flags & ML_NOCLIMB); break; diff --git a/src/p_spec.c b/src/p_spec.c index 14363bb1d..2527c57c3 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -3565,10 +3565,10 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec) case 463: // Dye object { - INT32 color = sides[line->sidenum[0]].toptexture; - if (mo) { + INT32 color = line->stringargs[0] ? get_number(line->stringargs[0]) : SKINCOLOR_NONE; + if (color < 0 || color >= numskincolors) return;