Generalized the psprites implementation
This commit is contained in:
parent
bd396ccb7c
commit
1966b61b8f
25 changed files with 744 additions and 478 deletions
|
|
@ -314,7 +314,7 @@ void cht_DoCheat (player_t *player, int cheat)
|
|||
|
||||
// [GRB]
|
||||
case CHT_RESSURECT:
|
||||
if (player->playerstate != PST_LIVE && player->mo != NULL)
|
||||
if (player->playerstate != PST_LIVE && player->mo != nullptr)
|
||||
{
|
||||
if (player->mo->IsKindOf(RUNTIME_CLASS(APlayerChunk)))
|
||||
{
|
||||
|
|
@ -343,9 +343,9 @@ void cht_DoCheat (player_t *player, int cheat)
|
|||
player->mo->Translation = TRANSLATION(TRANSLATION_Players, BYTE(player-players));
|
||||
}
|
||||
player->mo->DamageType = NAME_None;
|
||||
if (player->ReadyWeapon != NULL)
|
||||
if (player->ReadyWeapon != nullptr)
|
||||
{
|
||||
P_SetPsprite(player, ps_weapon, player->ReadyWeapon->GetUpState());
|
||||
player->GetPSprite(ps_weapon)->SetState(player->ReadyWeapon->GetUpState());
|
||||
}
|
||||
|
||||
if (player->morphTics > 0)
|
||||
|
|
@ -932,10 +932,10 @@ void cht_Take (player_t *player, const char *name, int amount)
|
|||
if (weapon)
|
||||
weapon->Destroy ();
|
||||
|
||||
player->ReadyWeapon = NULL;
|
||||
player->ReadyWeapon = nullptr;
|
||||
player->PendingWeapon = WP_NOCHANGE;
|
||||
player->psprites[ps_weapon].state = NULL;
|
||||
player->psprites[ps_flash].state = NULL;
|
||||
player->GetPSprite(ps_weapon)->SetState(nullptr);
|
||||
player->GetPSprite(ps_flash)->SetState(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue