2023-11-22 16:29:49 +00:00
|
|
|
Class VisualThinker : Thinker native
|
2023-09-24 02:48:00 +00:00
|
|
|
{
|
2024-01-06 23:45:40 +00:00
|
|
|
native Vector3 Pos,
|
|
|
|
Prev;
|
2024-01-08 04:30:51 +00:00
|
|
|
native FVector3 Vel;
|
2024-01-06 23:45:40 +00:00
|
|
|
native Vector2 Scale,
|
|
|
|
Offset;
|
2024-01-08 04:30:51 +00:00
|
|
|
native float Roll,
|
|
|
|
PrevRoll,
|
|
|
|
Alpha;
|
2024-01-06 23:45:40 +00:00
|
|
|
native TextureID Texture;
|
2023-11-18 15:54:23 +00:00
|
|
|
native TranslationID Translation;
|
2024-01-06 23:45:40 +00:00
|
|
|
native uint16 Flags;
|
|
|
|
native int16 LightLevel;
|
|
|
|
native bool bXFlip,
|
|
|
|
bYFlip,
|
|
|
|
bDontInterpolate,
|
|
|
|
bAddLightLevel;
|
|
|
|
native Color scolor;
|
2023-09-24 02:48:00 +00:00
|
|
|
|
2024-01-06 23:45:40 +00:00
|
|
|
native Sector CurSector; // can be null!
|
2023-09-24 02:48:00 +00:00
|
|
|
|
|
|
|
native void SetTranslation(Name trans);
|
|
|
|
native void SetRenderStyle(int mode); // see ERenderStyle
|
|
|
|
native bool IsFrozen();
|
|
|
|
|
2023-11-22 16:29:49 +00:00
|
|
|
static VisualThinker Spawn(Class<VisualThinker> type, TextureID tex, Vector3 pos, Vector3 vel, double alpha = 1.0, int flags = 0,
|
2023-11-18 17:05:11 +00:00
|
|
|
double roll = 0.0, Vector2 scale = (1,1), Vector2 offset = (0,0), int style = STYLE_Normal, TranslationID trans = 0)
|
2023-09-24 02:48:00 +00:00
|
|
|
{
|
|
|
|
if (!Level) return null;
|
|
|
|
|
2023-11-22 16:29:49 +00:00
|
|
|
let p = level.SpawnVisualThinker(type);
|
2023-09-24 02:48:00 +00:00
|
|
|
if (p)
|
|
|
|
{
|
|
|
|
p.Texture = tex;
|
|
|
|
p.Pos = pos;
|
|
|
|
p.Vel = vel;
|
|
|
|
p.Alpha = alpha;
|
|
|
|
p.Roll = roll;
|
|
|
|
p.Scale = scale;
|
|
|
|
p.Offset = offset;
|
|
|
|
p.SetRenderStyle(style);
|
2023-11-18 17:05:11 +00:00
|
|
|
p.Translation = trans;
|
2023-09-24 02:48:00 +00:00
|
|
|
p.Flags = flags;
|
|
|
|
}
|
|
|
|
return p;
|
|
|
|
}
|
|
|
|
}
|