Skip to content

Conversation

@jerethk
Copy link
Contributor

@jerethk jerethk commented Jan 25, 2026

I worked out what is going on in the actor collision code. I've renamed members in the CollisionInfo struct that looked like they still had provisional names

botOffset --> stepUpHeight (max step height that can be climbed up by the actor)
yPos --> stepDownHeight (max step height that can be climbed down by the actor)

These have been made moddable.

I worked out that bit 2 of ActorCollisionFlags causes actors to slide along a wall that they collide with, so have named it and also made it moddable.

Also made it possible to set mod logics to use the trooper alert sounds.

- allow usage of the officer and trooper alert sounds
stepUpHeight (formerly botOffset)
stepDownHeight (formerly yPos)

Rename ACTORCOL_BIT2 to ACTORCOL_SLIDE_RESPONSE
ACTORCOL_ALL = ACTORCOL_NO_Y_MOVE | ACTORCOL_GRAVITY | ACTORCOL_BIT2
ACTORCOL_NO_Y_MOVE = FLAG_BIT(0), // When _not_ set, an actor can move vertically. Set for non-flying enemies.
ACTORCOL_GRAVITY = FLAG_BIT(1),
ACTORCOL_SLIDE_RESPONSE = FLAG_BIT(2), // Actor will "slide" along a wall that they collide with. This is generally set for flying enemies and bosses.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I never got around to naming all of the flags properly.

fixed16_16 botOffset;
fixed16_16 yPos;
fixed16_16 height;
fixed16_16 stepUpHeight; // entity will be able to "climb" up this height (same as player's stepHeight)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call with the renames.

@luciusDXL luciusDXL merged commit 5d43c42 into luciusDXL:master Jan 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants