summaryrefslogtreecommitdiff
path: root/src/code
diff options
context:
space:
mode:
authorengineer124 <47598039+engineer124@users.noreply.github.com>2022-04-04 08:06:25 +1000
committerGitHub <noreply@github.com>2022-04-04 00:06:25 +0200
commit04fb0ac1b1c92b1fa04115b0a73970c789d3f92d (patch)
tree4aae8700834452ba1aa0ea5a4f42664851dfc73e /src/code
parenta9084ad65e272441e838723a9ebade9f4b01d9eb (diff)
Document Pushing Player: Bg Conveyors and Climbing Slopes (#1103)
* Document pushing Player * Cleaner and better names * Tiny cleanup * Add enum to func * PR Feedback * Change conveyor to `IsFloorConveyor` * Small touchup * Attempt at better comments * Clarify comments * Clarify comment further * Fix formatting * PR Feedback
Diffstat (limited to 'src/code')
-rw-r--r--src/code/z_bgcheck.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/code/z_bgcheck.c b/src/code/z_bgcheck.c
index 0620766b5..8c8797641 100644
--- a/src/code/z_bgcheck.c
+++ b/src/code/z_bgcheck.c
@@ -4113,10 +4113,15 @@ s32 SurfaceType_IsIgnoredByProjectiles(CollisionContext* colCtx, CollisionPoly*
}
/**
- * CollisionPoly is conveyor enabled
- * Returns true if `poly` is a conveyor surface, else false
- */
-s32 SurfaceType_IsConveyor(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) {
+ * Checks if poly is a floor conveyor
+ *
+ * A conveyor surface is enabled with non-zero speed.
+ * When enabled, the conveyor will exhibit two types of behaviour depending on the return value:
+ *
+ * If true, then it is a floor conveyor and will push player only while being stood on
+ * If false, then it is a water conveyor and will push player only while in water
+ */
+s32 SurfaceType_IsFloorConveyor(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) {
u32 flags;
if (BgCheck_GetCollisionHeader(colCtx, bgId) == NULL) {