- moved DisplayName, the last remaining PlayerPawn meta property, to PClassActor so that PClassPlayerPawn could be removed.
Now all actors have the same metaclass and therefore it will always be the same size which will finally allow some needed changes to the type system which couldn't be done because it was occasionally necessary to replace tentatively created classes due to size mismatches.
This commit is contained in:
parent
68e9918ed5
commit
17a2666bd4
20 changed files with 49 additions and 86 deletions
|
|
@ -170,7 +170,7 @@ void cht_DoCheat (player_t *player, int cheat)
|
|||
break;
|
||||
|
||||
case CHT_MORPH:
|
||||
msg = cht_Morph (player, static_cast<PClassPlayerPawn *>(PClass::FindClass (gameinfo.gametype == GAME_Heretic ? NAME_ChickenPlayer : NAME_PigPlayer)), true);
|
||||
msg = cht_Morph (player, PClass::FindActor (gameinfo.gametype == GAME_Heretic ? NAME_ChickenPlayer : NAME_PigPlayer), true);
|
||||
break;
|
||||
|
||||
case CHT_NOTARGET:
|
||||
|
|
@ -548,13 +548,13 @@ void cht_DoCheat (player_t *player, int cheat)
|
|||
Printf ("%s cheats: %s\n", player->userinfo.GetName(), msg);
|
||||
}
|
||||
|
||||
const char *cht_Morph (player_t *player, PClassPlayerPawn *morphclass, bool quickundo)
|
||||
const char *cht_Morph (player_t *player, PClassActor *morphclass, bool quickundo)
|
||||
{
|
||||
if (player->mo == NULL)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
PClassPlayerPawn *oldclass = player->mo->GetClass();
|
||||
auto oldclass = player->mo->GetClass();
|
||||
|
||||
// Set the standard morph style for the current game
|
||||
int style = MORPH_UNDOBYTOMEOFPOWER;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue