You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Avoid mirroring to go negative to fix crash, closes #4036
This commit is contained in:
@@ -85,6 +85,11 @@ void ParallaxLayer::_update_mirroring() {
|
||||
void ParallaxLayer::set_mirroring(const Size2& p_mirroring) {
|
||||
|
||||
mirroring=p_mirroring;
|
||||
if (mirroring.x<0)
|
||||
mirroring.x=0;
|
||||
if (mirroring.y<0)
|
||||
mirroring.y=0;
|
||||
|
||||
_update_mirroring();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user