Comments (1)
I took a look at the root cause for this issue, and here is the relevant code (the source file is Celeste/Holdable.cs
, some variables were renamed for clarity)
public void Release(Vector2 force)
{
if (base.Entity.CollideCheck<Solid>())
{
if (force.X != 0f)
{
bool collideFlag = false;
int sign = Math.Sign(force.X);
int increment = 0;
// 1)
while (!collideFlag && increment++ < 10)
{
if (!base.Entity.CollideCheck<Solid>(base.Entity.Position + sign * increment * Vector2.UnitX))
{
collideFlag = true;
}
}
if (collideFlag)
{
base.Entity.X += sign * increment;
}
// end 1)
}
while (base.Entity.CollideCheck<Solid>())
{
base.Entity.Position += Vector2.UnitY; // 2)
}
}
// ... more code not relevant to the issue ...
}
This method Release
is called whenever a Holdable
is either thrown or released on the ground; its parameter force
contains the direction of the throw in it's X
property; and base.Entity
refers to the Holdable
.
All vanilla Holdables
have a collider with a width of at most 8 units, which is the width of a tile too.
As they are aligned with Madeline's sprite, they will never collide with side walls on release in vanilla.
So in vanilla, the condition actually only checks for ceilings, and the code:
- attempts to move the
Holdable
forward a bit to see if it can fit further after the ceiling; - and if this fails, proceeds to move the
Holdable
down so it doesn't get stuck in the ceiling.
However, with modded, wider Holdables
, it goes through the same processes with sidewalls as well, because the hitbox of the Holdable
extends into the wall (here is a TheoCrystal with a modded width of 12 units):
- doesn't do anything, because it keeps pushing the entity in the wall so it will keep on colliding;
- and proceeds to keep moving the entity down until it doesn't collide with solids (which does warp the Holdable either to a below floor or out of bounds below the level).
In our example, here is where the TheoCrystal
ends up after a release (the bottom of the screenshot corresponds to the bottom of the room):
I'm not sure if there is a fix that would work for any given width, and until then I would recommend that modders re-implement this method to fit their needs.
from everest.
Related Issues (20)
- Delayed Mod Loading HOT 5
- DecalRegistry.AddPropertyHandler not adding the property HOT 2
- Automatic mod downloading from steam cloud data
- Map scarfs for modded campaigns don't move out of the screen correctly HOT 1
- The 4465 release broke building stable releases on Linux HOT 6
- Remove/Cleanup binary blobs from the repository
- Linux crash on everest versions after 4449 HOT 2
- FN key on MSI laptop activiating the f6 key.
- (Linux) Use relative rather than absolute symlinks HOT 2
- Can't launch itch.io version from Steam (Linux) HOT 4
- Enhancements on Mod Dependencies
- Allow customizing tileset dust particles
- Add option to skip checking for updates on startup
- Crash with ArmCord open HOT 1
- FakeWall hides TalkComponentUI
- Game crashed when a zipped mod trying to load native library HOT 3
- Saving to non-mod files in Mods/ messes up the main menu HOT 1
- Closing Everest loading screen will cause celeste.exe to get stuck in the background.
- Chapter-specific postcard texture replacement
- The game crashed while disconnecting Bluetooth earphones on Windows HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from everest.