Made slide-kick minimum speed a bit more reasonable (#38)

* Made slide-kick minimum speed a bit more reasonable

* Changed the speed minimum to 15

* Minor adjustment

* Fix spelling and punctuation.
This commit is contained in:
Isaac 2022-03-23 12:51:25 +10:00 committed by GitHub
parent a89aa6ced8
commit 989e304552
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

View file

@ -1,5 +1,5 @@
-- name: Mario RUN!
-- description: Mario Is contantly runing
-- description: Mario is constantly running.
Threshold = 50 --set Threshold to 50

View file

@ -1369,10 +1369,16 @@ u32 interact_player(struct MarioState* m, UNUSED u32 interactType, struct Object
Vec3f velDiff;
vec3f_dif(velDiff, m->vel, m2->vel);
if (vec3f_length(velDiff) < 40) {
if (m->action == ACT_SLIDE_KICK_SLIDE || m->action == ACT_SLIDE_KICK) {
if (vec3f_length(m->vel) < 15) {
return FALSE;
}
} else {
if (vec3f_length(m->vel) < 40) {
// the difference vectors are not different enough, do not attack
return FALSE;
}
}
if (vec3f_length(m2->vel) > vec3f_length(m->vel)) {
// the one being attacked is going faster, do not attack
return FALSE;