mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-25 05:21:16 +00:00
Re-move bounds checks out of core engine per request
This commit is contained in:
parent
4b3273b229
commit
d9fa7c3894
2 changed files with 2 additions and 3 deletions
|
@ -40,7 +40,6 @@
|
|||
#include "r_sky.h"
|
||||
#include "p_terrain.h"
|
||||
#include "p_effect.h"
|
||||
#include "vm.h"
|
||||
|
||||
#include "hwrenderer/data/buffers.h"
|
||||
|
||||
|
@ -1032,13 +1031,11 @@ public:
|
|||
|
||||
void SetPlaneReflectivity(int pos, double val)
|
||||
{
|
||||
if (pos < 0 || pos > 1) ThrowAbortException(X_ARRAY_OUT_OF_BOUNDS, "pos must be either 0 or 1");
|
||||
reflect[pos] = val;
|
||||
}
|
||||
|
||||
double GetPlaneReflectivity(int pos)
|
||||
{
|
||||
if (pos < 0 || pos > 1) ThrowAbortException(X_ARRAY_OUT_OF_BOUNDS, "pos must be either 0 or 1");
|
||||
return reflect[pos];
|
||||
}
|
||||
|
||||
|
|
|
@ -871,6 +871,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetXOffset, SetXOffset)
|
|||
|
||||
static void SetPlaneReflectivity(sector_t* self, int pos, double val)
|
||||
{
|
||||
if (pos < 0 || pos > 1) ThrowAbortException(X_ARRAY_OUT_OF_BOUNDS, "pos must be either 0 or 1");
|
||||
self->SetPlaneReflectivity(pos, val);
|
||||
}
|
||||
|
||||
|
@ -885,6 +886,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(_Sector, SetXOffset, SetXOffset)
|
|||
|
||||
static double GetPlaneReflectivity(sector_t* self, int pos)
|
||||
{
|
||||
if (pos < 0 || pos > 1) ThrowAbortException(X_ARRAY_OUT_OF_BOUNDS, "pos must be either 0 or 1");
|
||||
return self->GetPlaneReflectivity(pos);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue