Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Spatison committed Nov 20, 2024
1 parent d70275a commit fd7b592
Show file tree
Hide file tree
Showing 5 changed files with 317 additions and 321 deletions.
3 changes: 2 additions & 1 deletion Content.Client/_White/Overlays/BaseSwitchableOverlay.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Numerics;
using Content.Shared._White.Overlays;
using Robust.Client.Graphics;
using Robust.Client.Player;
Expand Down Expand Up @@ -38,7 +39,7 @@ protected override void Draw(in OverlayDrawArgs args)

var worldHandle = args.WorldHandle;

worldHandle.SetTransform(Matrix3.Identity);
worldHandle.SetTransform(Matrix3x2.Identity);
worldHandle.UseShader(_shader);
worldHandle.DrawRect(args.WorldBounds, component.Color);
worldHandle.UseShader(null);
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/_White/Overlays/ThermalVisionOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ protected override void Draw(in OverlayDrawArgs args)
Render(entry.Ent, entry.Map, worldHandle, entry.EyeRot);
}

worldHandle.SetTransform(Matrix3.Identity);
worldHandle.SetTransform(Matrix3x2.Identity);
}

private void Render(Entity<SpriteComponent, TransformComponent, BodyComponent> ent,
Expand Down
6 changes: 6 additions & 0 deletions Content.Shared/CCVar/CCVars.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2073,6 +2073,12 @@ public static readonly CVarDef<string>
public static readonly CVarDef<bool> RulesExemptLocal =
CVarDef.Create("rules.exempt_local", true, CVar.SERVERONLY);

/// <summary>
/// The next time the rules will popup for this client, expressed in minutes
/// </summary>
public static readonly CVarDef<string> RulesNextPopupTime =
CVarDef.Create("rules.next_popup_time", "Jan 1, 1997", CVar.CLIENTONLY | CVar.ARCHIVE);


/*
* Autogeneration
Expand Down
29 changes: 9 additions & 20 deletions Content.Shared/Item/ItemToggle/SharedItemToggleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,11 @@ private void Activate(EntityUid uid, ItemToggleComponent itemToggle, bool predic
/// </summary>
private void Deactivate(EntityUid uid, ItemToggleComponent itemToggle, bool predicted, EntityUid? user = null)
{
if (_netManager.IsClient) // WD EDIT
return;

var soundToPlay = itemToggle.SoundDeactivate;
if (predicted)
_audio.PlayPredicted(soundToPlay, uid, user);
else
_audio.PlayPvs(soundToPlay, uid);
_audio.PlayPvs(soundToPlay, uid);
// END FIX HARDCODING

var toggleUsed = new ItemToggledEvent(predicted, Activated: false, user);
Expand Down Expand Up @@ -240,27 +240,16 @@ private void OnIsHotEvent(EntityUid uid, ItemToggleHotComponent itemToggleHot, I
/// </summary>
private void UpdateActiveSound(EntityUid uid, ItemToggleActiveSoundComponent activeSound, ref ItemToggledEvent args)
{
if (_netManager.IsClient) // WD EDIT
return;

if (args.Activated)
{
if (activeSound.ActiveSound != null && activeSound.PlayingStream == null)
{
if (args.Predicted)
{
var playingStream = _audio.PlayPredicted(activeSound.ActiveSound, uid, args.User, AudioParams.Default.WithLoop(true));

if (playingStream == null)
return;

activeSound.PlayingStream = playingStream!.Value.Entity;
} else
{
var playingStream = _audio.PlayPvs(activeSound.ActiveSound, uid, AudioParams.Default.WithLoop(true));

if (playingStream == null)
return;
var playingStream = _audio.PlayPvs(activeSound.ActiveSound, uid, AudioParams.Default.WithLoop(true));

activeSound.PlayingStream = playingStream!.Value.Entity;
}
activeSound.PlayingStream = playingStream!.Value.Entity;
}
}
else
Expand Down
Loading

0 comments on commit fd7b592

Please sign in to comment.