mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 04:01:31 +00:00
add set/get plane reflectivity
This commit is contained in:
parent
fe28defeca
commit
275635adc5
3 changed files with 38 additions and 0 deletions
|
@ -1029,6 +1029,16 @@ public:
|
|||
return pos == floor? floorplane:ceilingplane;
|
||||
}
|
||||
|
||||
void SetPlaneReflectivity(int pos, double val)
|
||||
{
|
||||
reflect[pos] = val;
|
||||
}
|
||||
|
||||
double GetPlaneReflectivity(int pos)
|
||||
{
|
||||
return reflect[pos];
|
||||
}
|
||||
|
||||
bool isSecret() const
|
||||
{
|
||||
return !!(Flags & SECF_SECRET);
|
||||
|
|
|
@ -869,6 +869,32 @@ DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetXOffset, SetXOffset)
|
|||
ACTION_RETURN_INT(self->GetLightLevel());
|
||||
}
|
||||
|
||||
static void SetPlaneReflectivity(sector_t* self, int pos, double val)
|
||||
{
|
||||
self->SetPlaneReflectivity(pos, val);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetPlaneReflectivity, SetPlaneReflectivity)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
||||
PARAM_INT(pos);
|
||||
PARAM_FLOAT(val)
|
||||
self->SetPlaneReflectivity(pos, val);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static double GetPlaneReflectivity(sector_t* self, int pos)
|
||||
{
|
||||
return self->GetPlaneReflectivity(pos);
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(_Sector, GetPlaneReflectivity, GetPlaneReflectivity)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(sector_t);
|
||||
PARAM_INT(pos);
|
||||
ACTION_RETURN_FLOAT(self->GetPlaneReflectivity(pos));
|
||||
}
|
||||
|
||||
static int PortalBlocksView(sector_t *self, int pos)
|
||||
{
|
||||
return self->PortalBlocksView(pos);
|
||||
|
|
|
@ -553,6 +553,8 @@ struct Sector native play
|
|||
native void ChangeLightLevel(int newval);
|
||||
native void SetLightLevel(int newval);
|
||||
native clearscope int GetLightLevel() const;
|
||||
native void SetPlaneReflectivity(int pos, double val);
|
||||
native clearscope double GetPlaneReflectivity(int pos);
|
||||
native void AdjustFloorClip();
|
||||
native clearscope bool IsLinked(Sector other, bool ceiling) const;
|
||||
|
||||
|
|
Loading…
Reference in a new issue