- removed the 'caller' parameter from the CCMD dispatcher.
This can never be anything but players[consoleplayer].mo, so there is no need to pass it through the interface.
This commit is contained in:
parent
603ad755ab
commit
d63a6baa5d
5 changed files with 34 additions and 34 deletions
|
|
@ -423,11 +423,11 @@ DEFINE_ACTION_FUNCTION_NATIVE(AActor, DisplayNameTag, DisplayNameTag)
|
|||
|
||||
CCMD (invnext)
|
||||
{
|
||||
if (who != NULL)
|
||||
if (players[consoleplayer].mo != nullptr)
|
||||
{
|
||||
IFVM(PlayerPawn, InvNext)
|
||||
{
|
||||
VMValue param = who;
|
||||
VMValue param = players[consoleplayer].mo;
|
||||
VMCall(func, ¶m, 1, nullptr, 0);
|
||||
}
|
||||
}
|
||||
|
|
@ -435,11 +435,11 @@ CCMD (invnext)
|
|||
|
||||
CCMD(invprev)
|
||||
{
|
||||
if (who != NULL)
|
||||
if (players[consoleplayer].mo != nullptr)
|
||||
{
|
||||
IFVM(PlayerPawn, InvPrev)
|
||||
{
|
||||
VMValue param = who;
|
||||
VMValue param = players[consoleplayer].mo;
|
||||
VMCall(func, ¶m, 1, nullptr, 0);
|
||||
}
|
||||
}
|
||||
|
|
@ -470,9 +470,9 @@ CCMD(invquery)
|
|||
|
||||
CCMD (use)
|
||||
{
|
||||
if (argv.argc() > 1 && who != NULL)
|
||||
if (argv.argc() > 1 && players[consoleplayer].mo != NULL)
|
||||
{
|
||||
SendItemUse = ((AActor*)who)->FindInventory(argv[1]);
|
||||
SendItemUse = players[consoleplayer].mo->FindInventory(argv[1]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -493,19 +493,19 @@ CCMD (weapdrop)
|
|||
|
||||
CCMD (drop)
|
||||
{
|
||||
if (argv.argc() > 1 && who != NULL)
|
||||
if (argv.argc() > 1 && players[consoleplayer].mo != NULL)
|
||||
{
|
||||
SendItemDrop = ((AActor*)who)->FindInventory(argv[1]);
|
||||
SendItemDrop = players[consoleplayer].mo->FindInventory(argv[1]);
|
||||
SendItemDropAmount = argv.argc() > 2 ? atoi(argv[2]) : -1;
|
||||
}
|
||||
}
|
||||
|
||||
CCMD (useflechette)
|
||||
{
|
||||
if (who == nullptr) return;
|
||||
IFVIRTUALPTRNAME(((AActor*)who), NAME_PlayerPawn, GetFlechetteItem)
|
||||
if (players[consoleplayer].mo == nullptr) return;
|
||||
IFVIRTUALPTRNAME(players[consoleplayer].mo, NAME_PlayerPawn, GetFlechetteItem)
|
||||
{
|
||||
VMValue params[] = { who };
|
||||
VMValue params[] = { players[consoleplayer].mo };
|
||||
AActor *cls;
|
||||
VMReturn ret((void**)&cls);
|
||||
VMCall(func, params, 1, &ret, 1);
|
||||
|
|
@ -516,7 +516,8 @@ CCMD (useflechette)
|
|||
|
||||
CCMD (select)
|
||||
{
|
||||
auto user = ((AActor*)who);
|
||||
if (!players[consoleplayer].mo) return;
|
||||
auto user = players[consoleplayer].mo;
|
||||
if (argv.argc() > 1)
|
||||
{
|
||||
auto item = user->FindInventory(argv[1]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue