Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!
pointcontents
From Quake Wiki
float pointcontents(vector pos)
Contents
Usage
Gets what kind of contents exist at the given point. Only the world is taken into account for this, entities like monsters are ignored.
Parameters
- pos
- The position to get the contents from.
Return
One of the following:
CONTENT_EMPTY
- Not inside anything.
CONTENT_SOLID
- Inside of solid level geometry.
CONTENT_WATER
- Inside of water.
CONTENT_SLIME
- Inside of slime.
CONTENT_LAVA
- Inside of lava.
CONTENT_SKY
- Inside the sky.
Example
// If there's something at the given location, this function won't place the entity there float CheckMove(vector pos) { float contents = pointcontents(pos); if (contents != CONTENT_EMPTY) return FALSE; setorigin(self, pos); return TRUE; }