This reverts commit3033fafaa7. Revert "Improved ZScript interface for morphing" This reverts commit6c64a4403c. Revert "Further morphing clean up" This reverts commit12dc5c1506. Revert "Fixed inconsistencies between player and monster morphing" This reverts commit30730647fe. Revert "Reworked Morphing" This reverts commit2c09a443b4. - fix compile
51 lines
1.6 KiB
C++
51 lines
1.6 KiB
C++
//-----------------------------------------------------------------------------
|
|
//
|
|
// Copyright 2018 Christoph Oelckers
|
|
//
|
|
// This program is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
//
|
|
// This program is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with this program. If not, see http://www.gnu.org/licenses/
|
|
//
|
|
//-----------------------------------------------------------------------------
|
|
//
|
|
|
|
#include "info.h"
|
|
#include "actor.h"
|
|
#include "vm.h"
|
|
|
|
bool P_MorphActor(AActor *activator, AActor *victim, PClassActor *ptype, PClassActor *mtype, int duration, int style, PClassActor *enter_flash, PClassActor *exit_flash)
|
|
{
|
|
IFVIRTUALPTR(victim, AActor, Morph)
|
|
{
|
|
VMValue params[] = { victim, activator, ptype, mtype, duration, style, enter_flash, exit_flash };
|
|
int retval;
|
|
VMReturn ret(&retval);
|
|
VMCall(func, params, countof(params), &ret, 1);
|
|
return !!retval;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
bool P_UnmorphActor(AActor *activator, AActor *morphed, int flags, bool force)
|
|
{
|
|
IFVIRTUALPTR(morphed, AActor, UnMorph)
|
|
{
|
|
VMValue params[] = { morphed, activator, flags, force };
|
|
int retval;
|
|
VMReturn ret(&retval);
|
|
VMCall(func, params, countof(params), &ret, 1);
|
|
return !!retval;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
|