Generalized the psprites implementation
This commit is contained in:
parent
bd396ccb7c
commit
1966b61b8f
25 changed files with 744 additions and 478 deletions
|
|
@ -274,7 +274,7 @@ static void CopyPlayer (player_t *dst, player_t *src, const char *name)
|
|||
|
||||
dst->cheats |= chasecam;
|
||||
|
||||
if (dst->Bot != NULL)
|
||||
if (dst->Bot != nullptr)
|
||||
{
|
||||
botinfo_t *thebot = bglobal.botinfo;
|
||||
while (thebot && stricmp (name, thebot->name))
|
||||
|
|
@ -296,10 +296,23 @@ static void CopyPlayer (player_t *dst, player_t *src, const char *name)
|
|||
dst->userinfo.SkinNumChanged(R_FindSkin(skins[dst->userinfo.GetSkin()].name, dst->CurrentPlayerClass));
|
||||
|
||||
// Make sure the player pawn points to the proper player struct.
|
||||
if (dst->mo != NULL)
|
||||
if (dst->mo != nullptr)
|
||||
{
|
||||
dst->mo->player = dst;
|
||||
}
|
||||
|
||||
// Same for the psprites.
|
||||
DPSprite *pspr = dst->psprites;
|
||||
while (pspr)
|
||||
{
|
||||
pspr->Owner = dst;
|
||||
|
||||
pspr = pspr->Next;
|
||||
}
|
||||
|
||||
// Don't let the psprites be destroyed when src is destroyed.
|
||||
src->psprites = nullptr;
|
||||
|
||||
// These 2 variables may not be overwritten.
|
||||
dst->attackdown = attackdown;
|
||||
dst->usedown = usedown;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue