Implement timed Invisible gadget and shared energy warnings
This commit is contained in:
1 parent
3527d33810
commit
1897dd2b90
44 files changed
+2466
-39
No files matched your search
@@ -52,12 +52,11 @@ public sealed class SceneGadgets : IDisposable
|
||||
player.SetShooting(player.Grounded);
|
||||
if (!loop) { Sound?.Invoke(0,true); loop = true; }
|
||||
const float dt = FixedStepClock.Step;
|
||||
if (!(player.LevelCode.Length == 4 && player.LevelCode.StartsWith("VR0",StringComparison.Ordinal)
|
||||
&& player.LevelCode[3] is >= '1' and <= '8')) player.Energy = Math.Clamp(player.Energy - dt,0,100);
|
||||
player.AdjustEnergy(-dt);
|
||||
//Bridge modern signed float yaw to the source's nonnegative Euler domain.
|
||||
var yaw = (player.Yaw % 360 + 360) % 360;
|
||||
var hits = Ray.Fire(player.ActorRoot,yaw,dt,
|
||||
Soldiers.Select(s => new ShrinkCandidate(s.Actor.Tag,s.Actor.Position,Shrunk:s.Shrunk)),
|
||||
Soldiers.Select(s => new ShrinkCandidate(s.Actor.Tag,s.Actor.Position,BodyEnabled:s.Actor.BodyEnabled,Shrunk:s.Shrunk)),
|
||||
(start,end) => geometry.TraceGeometry(start,end));
|
||||
foreach (var tag in hits)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user