mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-16 09:31:14 +00:00
- added missing null pointer checks to cheat code.
This commit is contained in:
parent
5c248053f3
commit
91c8177406
1 changed files with 4 additions and 0 deletions
|
@ -561,6 +561,7 @@ FString cht_Morph(player_t *player, PClassActor *morphclass, bool quickundo)
|
|||
|
||||
void cht_SetInv(player_t *player, const char *string, int amount, bool beyond)
|
||||
{
|
||||
if (!player->mo) return;
|
||||
IFVIRTUALPTR(player->mo, APlayerPawn, CheatTakeInv)
|
||||
{
|
||||
FString message = string;
|
||||
|
@ -571,6 +572,7 @@ void cht_SetInv(player_t *player, const char *string, int amount, bool beyond)
|
|||
|
||||
void cht_Give (player_t *player, const char *name, int amount)
|
||||
{
|
||||
if (!player->mo) return;
|
||||
IFVIRTUALPTR(player->mo, APlayerPawn, CheatGive)
|
||||
{
|
||||
FString namestr = name;
|
||||
|
@ -581,6 +583,7 @@ void cht_Give (player_t *player, const char *name, int amount)
|
|||
|
||||
void cht_Take (player_t *player, const char *name, int amount)
|
||||
{
|
||||
if (!player->mo) return;
|
||||
IFVIRTUALPTR(player->mo, APlayerPawn, CheatTake)
|
||||
{
|
||||
FString namestr = name;
|
||||
|
@ -591,6 +594,7 @@ void cht_Take (player_t *player, const char *name, int amount)
|
|||
|
||||
void cht_Takeweaps(player_t *player)
|
||||
{
|
||||
if (!player->mo) return;
|
||||
IFVIRTUALPTR(player->mo, APlayerPawn, CheatTakeWeaps)
|
||||
{
|
||||
VMValue params[3] = { player->mo };
|
||||
|
|
Loading…
Reference in a new issue