Allow Getting Portal Group Offsets
This commit is contained in:
parent
e8d7e0227b
commit
ad80593cb7
2 changed files with 18 additions and 0 deletions
|
|
@ -2419,6 +2419,23 @@ DEFINE_ACTION_FUNCTION_NATIVE(FLevelLocals, Vec3Diff, Vec3Diff)
|
|||
ACTION_RETURN_VEC3(VecDiff(self, DVector3(x1, y1, z1), DVector3(x2, y2, z2)));
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(FLevelLocals, GetDisplacement)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(FLevelLocals);
|
||||
PARAM_INT(pg1);
|
||||
PARAM_INT(pg2);
|
||||
|
||||
DVector2 ofs(0, 0);
|
||||
if (pg1 != pg2)
|
||||
{
|
||||
int i = pg1 + self->Displacements.size * pg2;
|
||||
if (i < self->Displacements.data.Size())
|
||||
ofs = self->Displacements.data[i].pos;
|
||||
}
|
||||
|
||||
ACTION_RETURN_VEC2(ofs);
|
||||
}
|
||||
|
||||
void SphericalCoords(FLevelLocals *self, double vpX, double vpY, double vpZ, double tX, double tY, double tZ, double viewYaw, double viewPitch, int absolute, DVector3 *result)
|
||||
{
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue