Small changes (#60)

Prevented camera mode from being reset when someone else bubbles
+ more
This commit is contained in:
Isaac 2022-04-12 14:25:58 +10:00 committed by GitHub
parent b230d63b25
commit f75cffb158
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 10 deletions

View File

@ -1534,6 +1534,8 @@ void update_mario_inputs(struct MarioState *m) {
gCurrActStarNum = 0;
gCurrActNum = 0;
gChangeLevel = 16;
m->health = 0x880;
play_transition(0x09, 0x14, 0x00, 0x00, 0x00);
}
if (m->playerIndex == 0) {

View File

@ -929,7 +929,9 @@ static void bubbled_offset_visual(struct MarioState* m) {
}
s32 act_bubbled(struct MarioState* m) {
set_camera_mode(m->area->camera, CAMERA_MODE_FREE_ROAM, 1);
if (m->playerIndex == 0) {
set_camera_mode(m->area->camera, CAMERA_MODE_FREE_ROAM, 1);
}
struct MarioState* targetMarioState = nearest_mario_state_to_object(m->marioObj);
struct Object* target = targetMarioState->marioObj;
s32 angleToPlayer = obj_angle_to_object(m->marioObj, target);

View File

@ -600,7 +600,7 @@ s32 act_debug_free_move(struct MarioState *m) {
u32 action = ACT_IDLE;
#ifndef DEVELOPMENT
if (gNetworkType == NT_SERVER && configEnableCheats == 0 && m->action == ACT_DEBUG_FREE_MOVE) {
if (gNetworkType == NT_SERVER && gServerSettings.enableCheats == 0 && m->action == ACT_DEBUG_FREE_MOVE) {
if (m->pos[1] <= m->waterLevel - 100) {
action = ACT_WATER_IDLE;
} else {

View File

@ -362,14 +362,10 @@ void network_receive_player(struct Packet* p) {
}
#ifndef DEVELOPMENT
if (gNetworkType == NT_SERVER && configEnableCheats == 0) {
for (int i = 0; i < MAX_PLAYERS; i++) {
struct NetworkPlayer* np = &gNetworkPlayers[i];
struct MarioState* m = &gMarioStates[np->localIndex];
if (m->action == ACT_DEBUG_FREE_MOVE) {
network_send_kick(np->localIndex, EKT_CLOSE_CONNECTION);
network_player_disconnected(np->localIndex);
}
if (gNetworkType == NT_SERVER && gServerSettings.enableCheats == 0) {
if (m->action == ACT_DEBUG_FREE_MOVE) {
network_send_kick(np->localIndex, EKT_CLOSE_CONNECTION);
network_player_disconnected(np->localIndex);
}
}
#endif