Skip to content

Commit

Permalink
- Exported PickNewWeapon function from PlayerPawn to ZScript.
Browse files Browse the repository at this point in the history
  • Loading branch information
player701 authored and coelckers committed Oct 13, 2018
1 parent ec7e855 commit 6dc0268
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/p_user.cpp
Expand Up @@ -1195,6 +1195,12 @@ AWeapon *APlayerPawn::PickNewWeapon(PClassActor *ammotype)
return best;
}

DEFINE_ACTION_FUNCTION(APlayerPawn, PickNewWeapon)
{
PARAM_SELF_PROLOGUE(APlayerPawn);
PARAM_CLASS(ammo, AActor);
ACTION_RETURN_POINTER(self->PickNewWeapon(ammo));
}
//===========================================================================
//
// APlayerPawn :: GiveDeathmatchInventory
Expand Down
1 change: 1 addition & 0 deletions wadsrc/static/zscript/shared/player.txt
Expand Up @@ -1277,6 +1277,7 @@ class PlayerPawn : Actor native
native void CheckUse();
native void CheckWeaponButtons();
native Weapon BestWeapon(class<Ammo> ammotype);
native Weapon PickNewWeapon(class<Ammo> ammotype);

}

Expand Down

0 comments on commit 6dc0268

Please sign in to comment.