mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-18 10:11:11 +00:00
- fixed: MF3_DONTSPLASH disabled all terrain effects, not just the splash.
Untested for now because the report came without any example to check it with.
This commit is contained in:
parent
58f4af6ded
commit
0c5a47ac90
1 changed files with 33 additions and 36 deletions
|
@ -6504,9 +6504,6 @@ DEFINE_ACTION_FUNCTION(AActor, GetFloorTerrain)
|
||||||
|
|
||||||
bool P_HitWater (AActor * thing, sector_t * sec, const DVector3 &pos, bool checkabove, bool alert, bool force)
|
bool P_HitWater (AActor * thing, sector_t * sec, const DVector3 &pos, bool checkabove, bool alert, bool force)
|
||||||
{
|
{
|
||||||
if (thing->flags3 & MF3_DONTSPLASH)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (thing->player && (thing->player->cheats & CF_PREDICTING))
|
if (thing->player && (thing->player->cheats & CF_PREDICTING))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -6595,48 +6592,51 @@ foundone:
|
||||||
if (thing->Mass < 10)
|
if (thing->Mass < 10)
|
||||||
smallsplash = true;
|
smallsplash = true;
|
||||||
|
|
||||||
if (smallsplash && splash->SmallSplash)
|
if (!(thing->flags3 & MF3_DONTSPLASH))
|
||||||
{
|
{
|
||||||
mo = Spawn (splash->SmallSplash, pos, ALLOW_REPLACE);
|
if (smallsplash && splash->SmallSplash)
|
||||||
if (mo) mo->Floorclip += splash->SmallSplashClip;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (splash->SplashChunk)
|
|
||||||
{
|
{
|
||||||
mo = Spawn (splash->SplashChunk, pos, ALLOW_REPLACE);
|
mo = Spawn(splash->SmallSplash, pos, ALLOW_REPLACE);
|
||||||
mo->target = thing;
|
if (mo) mo->Floorclip += splash->SmallSplashClip;
|
||||||
if (splash->ChunkXVelShift != 255)
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (splash->SplashChunk)
|
||||||
{
|
{
|
||||||
mo->Vel.X = (pr_chunk.Random2() << splash->ChunkXVelShift) / 65536.;
|
mo = Spawn(splash->SplashChunk, pos, ALLOW_REPLACE);
|
||||||
|
mo->target = thing;
|
||||||
|
if (splash->ChunkXVelShift != 255)
|
||||||
|
{
|
||||||
|
mo->Vel.X = (pr_chunk.Random2() << splash->ChunkXVelShift) / 65536.;
|
||||||
|
}
|
||||||
|
if (splash->ChunkYVelShift != 255)
|
||||||
|
{
|
||||||
|
mo->Vel.Y = (pr_chunk.Random2() << splash->ChunkYVelShift) / 65536.;
|
||||||
|
}
|
||||||
|
mo->Vel.Z = splash->ChunkBaseZVel + (pr_chunk() << splash->ChunkZVelShift) / 65536.;
|
||||||
}
|
}
|
||||||
if (splash->ChunkYVelShift != 255)
|
if (splash->SplashBase)
|
||||||
{
|
{
|
||||||
mo->Vel.Y = (pr_chunk.Random2() << splash->ChunkYVelShift) / 65536.;
|
mo = Spawn(splash->SplashBase, pos, ALLOW_REPLACE);
|
||||||
|
}
|
||||||
|
if (thing->player && !splash->NoAlert && alert)
|
||||||
|
{
|
||||||
|
P_NoiseAlert(thing, thing, true);
|
||||||
}
|
}
|
||||||
mo->Vel.Z = splash->ChunkBaseZVel + (pr_chunk() << splash->ChunkZVelShift) / 65536.;
|
|
||||||
}
|
}
|
||||||
if (splash->SplashBase)
|
if (mo)
|
||||||
{
|
{
|
||||||
mo = Spawn (splash->SplashBase, pos, ALLOW_REPLACE);
|
S_Sound(mo, CHAN_ITEM, smallsplash ?
|
||||||
|
splash->SmallSplashSound : splash->NormalSplashSound,
|
||||||
|
1, ATTN_IDLE);
|
||||||
}
|
}
|
||||||
if (thing->player && !splash->NoAlert && alert)
|
else
|
||||||
{
|
{
|
||||||
P_NoiseAlert (thing, thing, true);
|
S_Sound(pos, CHAN_ITEM, smallsplash ?
|
||||||
|
splash->SmallSplashSound : splash->NormalSplashSound,
|
||||||
|
1, ATTN_IDLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mo)
|
|
||||||
{
|
|
||||||
S_Sound (mo, CHAN_ITEM, smallsplash ?
|
|
||||||
splash->SmallSplashSound : splash->NormalSplashSound,
|
|
||||||
1, ATTN_IDLE);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
S_Sound (pos, CHAN_ITEM, smallsplash ?
|
|
||||||
splash->SmallSplashSound : splash->NormalSplashSound,
|
|
||||||
1, ATTN_IDLE);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Don't let deep water eat missiles
|
// Don't let deep water eat missiles
|
||||||
return plane == &sec->floorplane ? Terrains[terrainnum].IsLiquid : false;
|
return plane == &sec->floorplane ? Terrains[terrainnum].IsLiquid : false;
|
||||||
|
@ -6676,9 +6676,6 @@ bool P_HitFloor (AActor *thing)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (thing->flags3 & MF3_DONTSPLASH)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// don't splash if landing on the edge above water/lava/etc....
|
// don't splash if landing on the edge above water/lava/etc....
|
||||||
DVector3 pos;
|
DVector3 pos;
|
||||||
for (m = thing->touching_sectorlist; m; m = m->m_tnext)
|
for (m = thing->touching_sectorlist; m; m = m->m_tnext)
|
||||||
|
|
Loading…
Reference in a new issue