Skip to content

Commit

Permalink
Update 1.DZ.2
Browse files Browse the repository at this point in the history
-Fixed some IO crash. Workaround, need -> roflmuffin/CounterStrikeSharp#569
  • Loading branch information
darkerz7 authored Dec 22, 2024
1 parent 4d26b43 commit ae19827
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/EntityFix.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,26 @@
using CounterStrikeSharp.API.Modules.Memory.DynamicFunctions;
using CounterStrikeSharp.API.Modules.Timers;
using CounterStrikeSharp.API.Modules.Utils;
using System.Runtime.InteropServices;
using static CounterStrikeSharp.API.Core.Listeners;

namespace CS2_EntityFix
{
public class CUtlSymbolLarge : NativeObject
/*public class CUtlSymbolLarge : NativeObject
{
public CUtlSymbolLarge(IntPtr pointer) : base(pointer) { }
public string KeyValue => Utilities.ReadStringUtf8(Handle + 0);
}*/
public class CUtlSymbolLarge : NativeObject
{
public CUtlSymbolLarge(IntPtr pointer) : base(pointer)
{
IntPtr ptr = Marshal.ReadIntPtr(pointer);
//KeyValue = ptr.ToString();
if (ptr == IntPtr.Zero || ptr < 200000000000) return;
KeyValue = Marshal.PtrToStringUTF8(ptr);
}
public string? KeyValue;
}
public class CGameUI
{
Expand Down Expand Up @@ -143,7 +155,7 @@ public class EntityFix : BasePlugin
public override string ModuleName => "Entity Fix";
public override string ModuleDescription => "Fixes game_player_equip, game_ui, point_viewcontrol, IgniteLifeTime";
public override string ModuleAuthor => "DarkerZ [RUS]";
public override string ModuleVersion => "1.DZ.1";
public override string ModuleVersion => "1.DZ.2";
public override void Load(bool hotReload)
{
RegisterListener<OnServerPrecacheResources>(OnPrecacheResources);
Expand Down

0 comments on commit ae19827

Please sign in to comment.