Limit knockdown distance
This commit is contained in:
parent
6e4f7e6c8c
commit
8fd7a540e3
|
@ -31,6 +31,8 @@
|
|||
#include <limits.h>
|
||||
#include <string.h>
|
||||
|
||||
#define MAX_KNOCKDOWN_DISTANCE 20
|
||||
|
||||
// 0x5106D0
|
||||
int _action_in_explode = 0;
|
||||
|
||||
|
@ -70,6 +72,11 @@ int actionKnockdown(Object* obj, int* anim, int maxDistance, int rotation, int d
|
|||
}
|
||||
}
|
||||
|
||||
// SFALL: Fix to limit the maximum distance for the knockback animation.
|
||||
if (maxDistance > MAX_KNOCKDOWN_DISTANCE) {
|
||||
maxDistance = MAX_KNOCKDOWN_DISTANCE;
|
||||
}
|
||||
|
||||
int distance;
|
||||
int tile;
|
||||
for (distance = 1; distance <= maxDistance; distance++) {
|
||||
|
|
Loading…
Reference in New Issue