mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-25 13:35:12 +00:00
Fix cheats (#335)
This commit is contained in:
parent
cdd077c9f8
commit
fe53cdffd1
2 changed files with 11 additions and 11 deletions
|
@ -2006,17 +2006,17 @@ s32 execute_mario_action(UNUSED struct Object *o) {
|
|||
np->fadeOpacity += 2;
|
||||
gMarioState->fadeWarpOpacity = np->fadeOpacity << 3;
|
||||
}
|
||||
}
|
||||
|
||||
if (gServerSettings.enableCheats) {
|
||||
if (gCheats.godMode) {
|
||||
gMarioState->health = 0x880;
|
||||
gMarioState->healCounter = 0;
|
||||
gMarioState->hurtCounter = 0;
|
||||
}
|
||||
if (gServerSettings.enableCheats) {
|
||||
if (gCheats.godMode) {
|
||||
gMarioState->health = 0x880;
|
||||
gMarioState->healCounter = 0;
|
||||
gMarioState->hurtCounter = 0;
|
||||
}
|
||||
|
||||
if (gCheats.infiniteLives && gMarioState->numLives < 100) {
|
||||
gMarioState->numLives = 100;
|
||||
}
|
||||
if (gCheats.infiniteLives && gMarioState->numLives < 100) {
|
||||
gMarioState->numLives = 100;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -338,7 +338,7 @@ s32 perform_ground_step(struct MarioState *m) {
|
|||
|
||||
smlua_call_event_hooks_mario_param(HOOK_BEFORE_PHYS_STEP, m);
|
||||
|
||||
if (gServerSettings.enableCheats && gCheats.superSpeed && m->playerIndex == 0) {
|
||||
if (gServerSettings.enableCheats && gCheats.superSpeed && m->playerIndex == 0 && m->action != ACT_BUBBLED) {
|
||||
m->vel[0] *= SUPER_SPEED_MULTIPLIER;
|
||||
m->vel[2] *= SUPER_SPEED_MULTIPLIER;
|
||||
}
|
||||
|
@ -689,7 +689,7 @@ s32 perform_air_step(struct MarioState *m, u32 stepArg) {
|
|||
|
||||
smlua_call_event_hooks_mario_param(HOOK_BEFORE_PHYS_STEP, m);
|
||||
|
||||
if (gServerSettings.enableCheats && gCheats.superSpeed && m->playerIndex == 0) {
|
||||
if (gServerSettings.enableCheats && gCheats.superSpeed && m->playerIndex == 0 && m->action != ACT_BUBBLED) {
|
||||
m->vel[0] *= SUPER_SPEED_MULTIPLIER;
|
||||
m->vel[2] *= SUPER_SPEED_MULTIPLIER;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue