The function returns the amount of distance covered. If the entity could not
move at all due to being blocked by obstacles, it returns a negative value or
0. If collision events are enabled, they are triggered for the entity as well
as for the obstacle. During a collision event, several predefined variables
are set to indicate the type of collision (see below). They can be evaluated
in the event function for setting collision or ricocheting behavior of any kind.
| IGNORE_YOU |
Ignores the
you entity on collision detection (see remark).
|
|
IGNORE_FLAG2 |
A7.05 Ignores all
entities with FLAG2 set. |
| IGNORE_PASSABLE |
Ignores all passable blocks and entities, including all water entities. |
| IGNORE_PASSENTS |
Ignores passable model and sprite entities, but still detects water entities (rectangular
passable maps, or passable terrain). It sets the predefined flags in_passable and on_passable .
The predefined passable_ent pointer is set to the detected water entity.
This can be used, for example, to switch the player behavior to swimming. |
| IGNORE_WORLD |
Ignores all level blocks and terrains. |
| IGNORE_MAPS |
Ignores all map entities. |
| IGNORE_MODELS |
Ignores all models. |
| IGNORE_SPRITES |
Ignores all sprites. |
| IGNORE_PUSH |
Ignores all entities with lower push values
than the
given
entity,
and triggers the EVENT_PUSH collision
event on those entities. |
| IGNORE_CONTENT |
Ignores the content of the move origin. The function is
faster, but water entities (see above) are not detected. |
| ACTIVATE_TRIGGER |
Enables EVENT_TRIGGER during
the motion. Can be slow. |
|
ACTIVATE_PUSH |
A7.05 Triggers the EVENT_PUSH collision
event on the hit entity, regardless of the push value. If the event function returns
1, the hit entity is considered an obstacle; if the event function returns
0, it is ignored. This way individual collision groups can be defined. |
|
ACTIVATE_SHOOT |
A7.07 Enables EVENT_SHOOT triggering of the hit entity, and prevents all other collision events. This flag lets c_move behave similar to c_trace. |
|
ACTIVATE_SONAR |
A7.07 Enables EVENT_SONAR triggering of the hit entity, and prevents all other collision events. This flag lets c_move behave similar to c_trace. |
| USE_AABB |
Uses an axis aligned bounding box
(AABB) for collision, rather than an oriented bounding box (OBB). The AABB system
is faster, but ignores the entity orientation on USE_BOX, treats models
and sprites as boxes, and requires a BSP level. See collision for
the difference between both systems. |
| GLIDE |
Glides along walls and entities on impact. |
| target |
Position of the collision contact. |
| normal |
Normal vector of the colliding surface. |
| bounce |
Bounce off direction vector. |
|
trace_hit |
Set to nonzero when something was hit. |
in_passable
|
Set to nonzero when the starting or ending point is inside
a water entity. |
| on_passable |
Set to nonzero when the hit target is a water entity. |
| passable_ent |
When in_passable or on_passable is set, this
pointer is set to the detected water terrain (OBB system only). |
| event_type |
Type of event when one was triggered. |