mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-31 04:20:42 +00:00
- Warp wrappers
This commit is contained in:
parent
55ade2eda4
commit
1f96b4eac6
1 changed files with 14 additions and 0 deletions
|
@ -20,7 +20,21 @@ int32_t CONFIG_ReadSetup(void);
|
|||
|
||||
bool WarpSectorInfo(sectortype* sect, DSWActor** sp_warp);
|
||||
DSWActor* Warp(int32_t* x, int32_t* y, int32_t* z, sectortype** sect);
|
||||
inline DSWActor* Warp(DVector3& pos, sectortype** sect)
|
||||
{
|
||||
vec3_t vv = { int(pos.X * worldtoint), int(pos.Y * worldtoint), int(pos.Z * zworldtoint) };
|
||||
auto act = Warp(&vv.X, &vv.Y, &vv.Z, sect);
|
||||
pos = { vv.X * inttoworld, vv.Y * inttoworld, vv.Z * zinttoworld };
|
||||
return act;
|
||||
}
|
||||
DSWActor* WarpPlane(int32_t* x, int32_t* y, int32_t* z, sectortype** sect);
|
||||
inline DSWActor* WarpPlane(DVector3& pos, sectortype** sect)
|
||||
{
|
||||
vec3_t vv = { int(pos.X * worldtoint), int(pos.Y * worldtoint), int(pos.Z * zworldtoint) };
|
||||
auto act = WarpPlane(&vv.X, &vv.Y, &vv.Z, sect);
|
||||
pos = { vv.X * inttoworld, vv.Y * inttoworld, vv.Z * zinttoworld };
|
||||
return act;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue