From ZDoom Wiki
Jump to navigation Jump to search
Note: This feature is for ZScript only.

void CheckSplash(double distance)


Checks to see if the Actor is on a liquid floor. If so, creates a splash that won't alert monsters. Mainly used with explosions.


  • distance - The additional height the Actor is allowed to be above the floor for a splash to be created.


Nuvolachalk.png Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please add them. This will make it easier to understand for future authors seeking assistance. Your contributions are greatly appreciated.

Internal Code

void CheckSplash(double distance)
    double floorh;
    sector floorsec;
    [floorh, floorsec] = curSector.LowestFloorAt(pos.XY);

    if (pos.Z <= floorz + distance && floorsector == floorsec && curSector.GetHeightSec() == NULL && floorsec.heightsec == NULL)
        // Explosion splashes never alert monsters. This is because A_Explode has
        // a separate parameter for that so this would get in the way of proper 
        // behavior.
        Vector3 pos = PosRelative(floorsec);
        pos.Z = floorz;
        HitWater (floorsec, pos, false, false);