- changed Polyobject thinkers to operate on the actual polyobjects instead of indices
This also changes the action special interface to pass a Level parameter to the separate functions and makes a few other minor adjustments to the polyobject code.
This commit is contained in:
parent
65750bd7bf
commit
9f8dd66189
15 changed files with 331 additions and 348 deletions
|
|
@ -5654,7 +5654,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, int32_t *args)
|
|||
const char *seqname = level.Behaviors.LookupString(args[1]);
|
||||
if (seqname != NULL)
|
||||
{
|
||||
FPolyObj *poly = PO_GetPolyobj(args[0]);
|
||||
FPolyObj *poly = level.GetPolyobj(args[0]);
|
||||
if (poly != NULL)
|
||||
{
|
||||
SN_StartSequence(poly, seqname, 0);
|
||||
|
|
@ -5665,7 +5665,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, int32_t *args)
|
|||
|
||||
case ACSF_GetPolyobjX:
|
||||
{
|
||||
FPolyObj *poly = PO_GetPolyobj(args[0]);
|
||||
FPolyObj *poly = level.GetPolyobj(args[0]);
|
||||
if (poly != NULL)
|
||||
{
|
||||
return DoubleToACS(poly->StartSpot.pos.X);
|
||||
|
|
@ -5675,7 +5675,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, int32_t *args)
|
|||
|
||||
case ACSF_GetPolyobjY:
|
||||
{
|
||||
FPolyObj *poly = PO_GetPolyobj(args[0]);
|
||||
FPolyObj *poly = level.GetPolyobj(args[0]);
|
||||
if (poly != NULL)
|
||||
{
|
||||
return DoubleToACS(poly->StartSpot.pos.Y);
|
||||
|
|
@ -6817,7 +6817,7 @@ int DLevelScript::RunScript ()
|
|||
|
||||
case SCRIPT_PolyWait:
|
||||
// Wait for polyobj(s) to stop moving, then enter state running
|
||||
if (!PO_Busy (statedata))
|
||||
if (!PO_Busy (&level, statedata))
|
||||
{
|
||||
state = SCRIPT_Running;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue