mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-09 03:11:04 +00:00
Fix players crashing when joining netgames with active followers
This commit is contained in:
parent
157e3197f3
commit
326b118a20
3 changed files with 9 additions and 2 deletions
|
@ -140,7 +140,7 @@
|
||||||
extern FILE *logstream;
|
extern FILE *logstream;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DEVELOP // Disable this for release builds to remove excessive cheat commands and enable MD5 checking and stuff, all in one go. :3
|
//#define DEVELOP // Disable this for release builds to remove excessive cheat commands and enable MD5 checking and stuff, all in one go. :3
|
||||||
#ifdef DEVELOP
|
#ifdef DEVELOP
|
||||||
#define VERSION 0 // Game version
|
#define VERSION 0 // Game version
|
||||||
#define SUBVERSION 0 // more precise version number
|
#define SUBVERSION 0 // more precise version number
|
||||||
|
|
|
@ -3105,6 +3105,13 @@ static void P_RelinkPointers(void)
|
||||||
if (!P_SetTarget(&mobj->player->awayviewmobj, P_FindNewPosition(temp)))
|
if (!P_SetTarget(&mobj->player->awayviewmobj, P_FindNewPosition(temp)))
|
||||||
CONS_Debug(DBG_GAMELOGIC, "awayviewmobj not found on %d\n", mobj->type);
|
CONS_Debug(DBG_GAMELOGIC, "awayviewmobj not found on %d\n", mobj->type);
|
||||||
}
|
}
|
||||||
|
if (mobj->player && mobj->player->follower)
|
||||||
|
{
|
||||||
|
temp = (UINT32)(size_t)mobj->player->follower;
|
||||||
|
mobj->player->follower = NULL;
|
||||||
|
if (!P_SetTarget(&mobj->player->follower, P_FindNewPosition(temp)))
|
||||||
|
CONS_Debug(DBG_GAMELOGIC, "follower not found on %d\n", mobj->type);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8948,7 +8948,7 @@ static void P_SetFollowerState(mobj_t *f, INT32 state)
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
//P_HandleFllower
|
//P_HandleFollower
|
||||||
//
|
//
|
||||||
//Handle the follower's spawning and moving along with the player. Do note that some of the stuff like the removal if a player doesn't exist anymore is handled in MT_FOLLOWER's thinker.
|
//Handle the follower's spawning and moving along with the player. Do note that some of the stuff like the removal if a player doesn't exist anymore is handled in MT_FOLLOWER's thinker.
|
||||||
static void P_HandleFollower(player_t *player)
|
static void P_HandleFollower(player_t *player)
|
||||||
|
|
Loading…
Reference in a new issue