mirror of
https://github.com/fallout2-ce/fallout2-ce.git
synced 2026-07-27 16:47:11 -07:00
Limit knockdown distance
This commit is contained in:
@@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user