text
stringlengths 0
451
|
|---|
{
|
WormMoveDir = TempDir;
|
}
|
break;
|
}
|
if (AtkTimer > 0)
|
{
|
AtkTimer--;
|
}
|
if (JumpTimer > 0)
|
{
|
JumpTimer--;
|
if (WormMoveMode == WMM_FLEE)
|
{
|
JumpTimer--;
|
}
|
}
|
double spd = Speed;
|
if (bFrightened == true)
|
{
|
spd *= 0.65;
|
}
|
WormAngle(WormMoveDir);
|
Vel.XY = ( cos(angle), sin(angle) ) * spd * Scale.X;
|
// make active sound
|
// (This RNG is OK because it's not gameplay impacting!)
|
if (random[snap_decor](0, 255) < 3)
|
{
|
PlayActiveSound();
|
}
|
return true;
|
}
|
override void BeginPlay()
|
{
|
super.BeginPlay();
|
for (uint i = 0; i < NumRecordedPos; i++)
|
{
|
RecordedPos[i] = Pos;
|
}
|
AtkSeg = -1;
|
AtkTimer = WORMFIREFREQ;
|
JumpTimer = WORMJUMPFREQ;
|
for (uint i = 0; i < NUMWORMSEGS; i++)
|
{
|
SegList[i] = Spawn("LargeWormSeg", Pos, ALLOW_REPLACE);
|
if (SegList[i] == null)
|
{
|
break;
|
}
|
SegList[i].angle = self.angle;
|
SegList[i].master = self;
|
let sa = SnapActor(SegList[i]);
|
if (sa)
|
{
|
sa.SetHitstunParent(self);
|
}
|
}
|
}
|
void SegTick(SnapActor Seg, Actor MoveToward, uint i)
|
{
|
if (i > NUMWORMSEGS)
|
{
|
return;
|
}
|
uint RecordIndex = (PositionLag * (i+1)) - 1;
|
Vector3 NewPos = RecordedPos[RecordIndex];
|
Vector3 NewAng = RecordedAng[RecordIndex];
|
Seg.SetOrigin(NewPos, true);
|
Seg.Angle = NewAng.X;
|
Seg.Pitch = NewAng.Y;
|
Seg.Roll = NewAng.Z;
|
}
|
override void Tick()
|
{
|
super.Tick();
|
if (TickPaused() == true)
|
{
|
return;
|
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.