mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
Exposed P_GetMidTexturePosition() to ZScript.
This commit is contained in:
parent
212adabe2b
commit
f3d44f8131
2 changed files with 16 additions and 0 deletions
|
@ -44,6 +44,7 @@
|
|||
#include "g_levellocals.h"
|
||||
#include "actor.h"
|
||||
#include "texturemanager.h"
|
||||
#include "vm.h"
|
||||
|
||||
|
||||
//============================================================================
|
||||
|
@ -258,6 +259,20 @@ bool P_GetMidTexturePosition(const line_t *line, int sideno, double *ptextop, do
|
|||
return true;
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(_Line, GetMidTexturePosition)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(line_t);
|
||||
PARAM_INT(side);
|
||||
double top = 0.0;
|
||||
double bottom = 0.0;
|
||||
|
||||
bool res = P_GetMidTexturePosition(self,side,&top,&bottom);
|
||||
if (numret > 2) ret[2].SetFloat(bottom);
|
||||
if (numret > 1) ret[1].SetFloat(top);
|
||||
if (numret > 0) ret[0].SetInt(int(res));
|
||||
return numret;
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// P_LineOpening_3dMidtex
|
||||
|
|
|
@ -238,6 +238,7 @@ struct Line native play
|
|||
native clearscope int Index() const;
|
||||
native bool Activate(Actor activator, int side, int type);
|
||||
native bool RemoteActivate(Actor activator, int side, int type, Vector3 pos);
|
||||
native bool, double, double GetMidTexturePosition (int side);
|
||||
|
||||
clearscope int GetUDMFInt(Name nm) const
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue