1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-04 15:04:31 +00:00

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
This commit is contained in:
engineer124 2022-04-04 08:06:25 +10:00 committed by GitHub
parent a9084ad65e
commit 04fb0ac1b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 101 additions and 86 deletions

View file

@ -4113,10 +4113,15 @@ s32 SurfaceType_IsIgnoredByProjectiles(CollisionContext* colCtx, CollisionPoly*
}
/**
* CollisionPoly is conveyor enabled
* Returns true if `poly` is a conveyor surface, else false
* 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_IsConveyor(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) {
s32 SurfaceType_IsFloorConveyor(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) {
u32 flags;
if (BgCheck_GetCollisionHeader(colCtx, bgId) == NULL) {