mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 20:19:38 +00:00
Fix paper shredder crash
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
#include "Play.h"
|
#include "Play.h"
|
||||||
#include "RectUtils.h"
|
#include "RectUtils.h"
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
#define kGravity 3
|
#define kGravity 3
|
||||||
#define kHImpulse 2
|
#define kHImpulse 2
|
||||||
@@ -1301,6 +1302,10 @@ void MoveGliderShredding (gliderPtr thisGlider)
|
|||||||
{
|
{
|
||||||
AddAShreddedGlider(&thisGlider->dest);
|
AddAShreddedGlider(&thisGlider->dest);
|
||||||
thisGlider->frame = kShredderCountdown;
|
thisGlider->frame = kShredderCountdown;
|
||||||
|
|
||||||
|
thisGlider->dest.bottom = thisGlider->dest.top;
|
||||||
|
thisGlider->src.bottom = thisGlider->src.top;
|
||||||
|
thisGlider->mask.bottom = thisGlider->mask.top;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1309,6 +1314,8 @@ void MoveGliderShredding (gliderPtr thisGlider)
|
|||||||
thisGlider->mask.bottom = thisGlider->mask.top + vNotClipped;
|
thisGlider->mask.bottom = thisGlider->mask.top + vNotClipped;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert(thisGlider->src.bottom - thisGlider->src.top == thisGlider->dest.bottom - thisGlider->dest.top);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user