Skip to content

Commit 1742df2

Browse files
authored
Merge pull request #280 from SourceDotNET/warnings
Fix some warnings
2 parents fd86793 + e5022d0 commit 1742df2

139 files changed

Lines changed: 330 additions & 304 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Game.Client/BaseViewport.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public class BaseViewport : EditablePanel, IViewPort
4343
readonly Hud HUD = Singleton<Hud>();
4444
readonly IEngineVGui EngineVGui = Singleton<IEngineVGui>();
4545
bool Initialized;
46-
bool HasParent;
46+
new bool HasParent;
4747
InlineArray2<int> OldSize;
4848

4949
public override void OnScreenSizeChanged(int oldWide, int oldTall) {

‎Game.Client/C_BaseAnimating.cs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1640,8 +1640,8 @@ public void InvalidateMdlCache() {
16401640
public bool IsModelScaled() => ModelScale > 1.0f + FLT_EPSILON || ModelScale < 1.0f - FLT_EPSILON;
16411641
public float GetModelScale() => ModelScale;
16421642

1643-
public int GetBody() => Body;
1644-
public int GetSkin() => Skin;
1643+
public override int GetBody() => Body;
1644+
public override int GetSkin() => Skin;
16451645

16461646
public int InternalDrawModel(StudioFlags flags) {
16471647
var model = GetModel();
@@ -1768,7 +1768,7 @@ public int LookupBone(ReadOnlySpan<char> name) {
17681768
return BoneSetup.Studio_BoneIndexByName(GetModelPtr(), name);
17691769
}
17701770

1771-
public int LookupAttachment(ReadOnlySpan<char> attachmentName) {
1771+
public override int LookupAttachment(ReadOnlySpan<char> attachmentName) {
17721772
StudioHdr? hdr = GetModelPtr();
17731773
if (hdr == null)
17741774
return -1;

‎Game.Client/C_BaseEntity.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,7 @@ public ReadOnlySpan<char> GetSubMaterialOverride(int index) {
10071007

10081008

10091009

1010-
public int GetTeamNumber() => TeamNum;
1010+
public virtual int GetTeamNumber() => TeamNum;
10111011

10121012
public ref readonly Vector3 WorldAlignMins() {
10131013
Assert(!CollisionProp().IsBoundsDefinedInEntitySpace());

‎Game.Client/C_FuncSmokeVolume.cs‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
using Game.Shared;
22

3-
using Game.Shared;
4-
53
using Source;
64
using Source.Common;
75

‎Game.Client/C_ParticleSmokeGrenade.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public partial class C_ParticleSmokeGrenade : C_BaseParticleEntity
1515
];
1616

1717
[NetworkVar("m_flSpawnTime")]
18-
public float SpawnTime;
18+
public new float SpawnTime;
1919
[NetworkVar("m_FadeStartTime")]
2020
public float FadeStartTime;
2121
[NetworkVar("m_FadeEndTime")]

‎Game.Client/C_TEBeamFollow.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public partial class C_TEBeamFollow : C_BaseBeam
1212
];
1313

1414
[NetworkVar("m_iEntIndex")]
15-
public int EntIndex;
15+
public new int EntIndex;
1616
}
1717

1818
public static partial class TempEnts

‎Game.Client/C_Team.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public static void Recv(ref readonly RecvProxyData data, object instance, IField
9090
public void RemoveAllPlayers() => Players.Clear();
9191
public override void PreDataUpdate(DataUpdateType updateType) => base.PreDataUpdate(updateType);
9292
public C_BasePlayer? GetPlayer(int idx) => (C_BasePlayer?)cl_entitylist.GetEnt(Players[idx]);
93-
public int GetTeamNumber() => TeamNum;
93+
public override int GetTeamNumber() => TeamNum;
9494
public ReadOnlySpan<char> Get_Name() => ((Span<char>)Teamname).SliceNullTerminatedString();
9595
public int Get_Score() => Score;
9696
public int Get_Deaths() => Deaths;

‎Game.Client/ClientEntityList.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ public void RemoveListenerEntity(IClientEntityListener listener) {
218218

219219
}
220220

221-
public BaseHandle InvalidHandle() => new(Constants.INVALID_EHANDLE_INDEX);
221+
public new BaseHandle InvalidHandle() => new(Constants.INVALID_EHANDLE_INDEX);
222222

223223
public IClientThinkable? GetClientThinkableFromHandle(in BaseHandle hEnt) {
224224
IClientUnknown? pEnt = GetClientUnknownFromHandle(hEnt);

‎Game.Client/ClientModeShared.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,9 +444,9 @@ static void MsgFunc_VGUIMenu(bf_read msg) {
444444

445445
if (count > 0) {
446446
KeyValues keys = new("data");
447+
Span<char> name = stackalloc char[256];
448+
Span<char> data = stackalloc char[255];
447449
for (int i = 0; i < count; i++) {
448-
Span<char> name = stackalloc char[256];
449-
Span<char> data = stackalloc char[255];
450450
msg.ReadString(name);
451451
msg.ReadString(data);
452452
keys.SetString(name, data);

‎Game.Client/GarrysMod/C_GMOD_Player.cs‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ public virtual void SetWeaponColor(in Vector3 color) {
9595
public EHANDLE Hands = new();
9696
[NetworkVar("m_iMaxArmor")]
9797
public int MaxArmor;
98-
[NetworkVar("m_flGravity")]
99-
public float Gravity;
10098
[NetworkVar("m_bSprintEnabled")]
10199
public bool SprintEnabled;
102100

0 commit comments

Comments
 (0)