diff --git a/src/info.c b/src/info.c index 49f6d4c8f5b271e08249b5795b96b8be9c3aed60..3b98021d706bfd860868c930a40963ce12790764 100644 --- a/src/info.c +++ b/src/info.c @@ -3190,8 +3190,8 @@ state_t states[NUMSTATES] = {SPR_SSWB, 1, 1, {NULL}, 0, 0, S_BHORIZ1}, // S_BHORIZ8 // Rain - {SPR_RAIN, FF_TRANS50, -1, {NULL}, 0, 0, S_NULL}, // S_RAIN1 - {SPR_RAIN, FF_TRANS50, 1, {NULL}, 0, 0, S_RAIN1}, // S_RAINRETURN + {SPR_RAIN, FF_FULLBRIGHT|FF_TRANS50, -1, {NULL}, 0, 0, S_NULL}, // S_RAIN1 + {SPR_RAIN, FF_FULLBRIGHT|FF_TRANS50, 1, {NULL}, 0, 0, S_RAIN1}, // S_RAINRETURN // Snowflake {SPR_SNO1, 0, -1, {NULL}, 0, 0, S_NULL}, // S_SNOW1 @@ -16118,7 +16118,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_NULL, // deathstate S_NULL, // xdeathstate sfx_None, // deathsound - -24*FRACUNIT, // speed + -72*FRACUNIT, // speed 1*FRACUNIT, // radius 8*FRACUNIT, // height 0, // display offset diff --git a/src/p_floor.c b/src/p_floor.c index 4a03f70c0d929df8894288523c716f66ee709655..ed2afd13d6ee6e06afeb64e813ed317c2bd59a37 100644 --- a/src/p_floor.c +++ b/src/p_floor.c @@ -3130,7 +3130,7 @@ void EV_CrumbleChain(sector_t *sec, ffloor_t *rover) // no longer exists (can't collide with again) rover->flags &= ~FF_EXISTS; rover->master->frontsector->moved = true; - sec->moved = true; + P_RecalcPrecipInSector(sec); } // Used for bobbing platforms on the water diff --git a/src/p_mobj.c b/src/p_mobj.c index 46f3ef49f2819d926b298677b4b07f603577ce97..bfc22ee589aed8fa292af545ca35f9381f07282f 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -9601,12 +9601,12 @@ consvar_t cv_flagtime = {"flagtime", "30", CV_NETVAR|CV_CHEAT, flagtime_cons_t, void P_SpawnPrecipitation(void) { - INT32 i /*, j*/, mrand; + INT32 i, mrand; fixed_t basex, basey, x, y, height; subsector_t *precipsector = NULL; precipmobj_t *rainmo = NULL; - if (dedicated || /*!cv_precipdensity*/!cv_drawdist_precip.value || curWeather == PRECIP_NONE) + if (dedicated || !(cv_drawdist_precip.value) || curWeather == PRECIP_NONE) return; // Use the blockmap to narrow down our placing patterns @@ -9615,50 +9615,47 @@ void P_SpawnPrecipitation(void) basex = bmaporgx + (i % bmapwidth) * MAPBLOCKSIZE; basey = bmaporgy + (i / bmapwidth) * MAPBLOCKSIZE; - //for (j = 0; j < cv_precipdensity.value; ++j) -- density is 1 for us always - { - x = basex + ((M_RandomKey(MAPBLOCKUNITS<<3)<<FRACBITS)>>3); - y = basey + ((M_RandomKey(MAPBLOCKUNITS<<3)<<FRACBITS)>>3); - - precipsector = R_IsPointInSubsector(x, y); + x = basex + ((M_RandomKey(MAPBLOCKUNITS<<3)<<FRACBITS)>>3); + y = basey + ((M_RandomKey(MAPBLOCKUNITS<<3)<<FRACBITS)>>3); - // No sector? Stop wasting time, - // move on to the next entry in the blockmap - if (!precipsector) - break; + precipsector = R_IsPointInSubsector(x, y); - // Exists, but is too small for reasonable precipitation. - if (!(precipsector->sector->floorheight <= precipsector->sector->ceilingheight - (32<<FRACBITS))) - continue; + // No sector? Stop wasting time, + // move on to the next entry in the blockmap + if (!precipsector) + continue; - // Don't set height yet... - height = precipsector->sector->ceilingheight; + // Exists, but is too small for reasonable precipitation. + if (!(precipsector->sector->floorheight <= precipsector->sector->ceilingheight - (32<<FRACBITS))) + continue; - if (curWeather == PRECIP_SNOW) - { - // Not in a sector with visible sky -- exception for NiGHTS. - if (!(maptol & TOL_NIGHTS) && precipsector->sector->ceilingpic != skyflatnum) - continue; + // Don't set height yet... + height = precipsector->sector->ceilingheight; - rainmo = P_SpawnSnowMobj(x, y, height, MT_SNOWFLAKE); - mrand = M_RandomByte(); - if (mrand < 64) - P_SetPrecipMobjState(rainmo, S_SNOW3); - else if (mrand < 144) - P_SetPrecipMobjState(rainmo, S_SNOW2); - } - else // everything else. - { - // Not in a sector with visible sky. - if (precipsector->sector->ceilingpic != skyflatnum) - continue; + if (curWeather == PRECIP_SNOW) + { + // Not in a sector with visible sky -- exception for NiGHTS. + if (!(maptol & TOL_NIGHTS) && precipsector->sector->ceilingpic != skyflatnum) + continue; - rainmo = P_SpawnRainMobj(x, y, height, MT_RAIN); - } + rainmo = P_SpawnSnowMobj(x, y, height, MT_SNOWFLAKE); + mrand = M_RandomByte(); + if (mrand < 64) + P_SetPrecipMobjState(rainmo, S_SNOW3); + else if (mrand < 144) + P_SetPrecipMobjState(rainmo, S_SNOW2); + } + else // everything else. + { + // Not in a sector with visible sky. + if (precipsector->sector->ceilingpic != skyflatnum) + continue; - // Randomly assign a height, now that floorz is set. - rainmo->z = M_RandomRange(rainmo->floorz>>FRACBITS, rainmo->ceilingz>>FRACBITS)<<FRACBITS; + rainmo = P_SpawnRainMobj(x, y, height, MT_RAIN); } + + // Randomly assign a height, now that floorz is set. + rainmo->z = M_RandomRange(rainmo->floorz>>FRACBITS, rainmo->ceilingz>>FRACBITS)<<FRACBITS; } if (curWeather == PRECIP_BLANK) diff --git a/src/p_spec.c b/src/p_spec.c index 3c81552d86c49cffb7c0c486ae493ff0c6beca0b..3dd3b22bb5a6ddc749024f1185b8a4472300e524 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -3389,7 +3389,10 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec) // if flags changed, reset sector's light list if (rover->flags != oldflags) + { sec->moved = true; + P_RecalcPrecipInSector(sec); + } } } @@ -7878,6 +7881,7 @@ void T_Disappear(disappear_t *d) } } sectors[s].moved = true; + P_RecalcPrecipInSector(§ors[s]); } if (d->exists)