- scriptified ASoundEnvironment.

This also exposes the functionality as a member function of Sector for easier script access.
This commit is contained in:
Christoph Oelckers 2017-01-14 11:43:08 +01:00
commit 386c00f17e
5 changed files with 44 additions and 76 deletions

View file

@ -1837,6 +1837,22 @@ DEFINE_ACTION_FUNCTION(_Sector, NextLowestFloorAt)
ACTION_RETURN_INT(ndx);
}
DEFINE_ACTION_FUNCTION(_Sector, SetEnvironmentID)
{
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
PARAM_INT(envnum);
Zones[self->ZoneNumber].Environment = S_FindEnvironment(envnum);
return 0;
}
DEFINE_ACTION_FUNCTION(_Sector, SetEnvironment)
{
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
PARAM_STRING(env);
Zones[self->ZoneNumber].Environment = S_FindEnvironment(env);
return 0;
}
//===========================================================================
//
// line_t exports