Skip to content

Commit 99c19c2

Browse files
committed
v1.0.4.5 Fixed Game.GenerateHash, Fixed entity handle returning 0
v1.0.4.5 Fixed Game.GenerateHash Fixed entity handle returning 0
1 parent 24f20a0 commit 99c19c2

5 files changed

Lines changed: 7 additions & 12 deletions

File tree

source/core/Script.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,10 @@ public void Start()
139139

140140
unsafe
141141
{
142-
if (!firstTime) { }
143-
else
142+
while (firstTime)
144143
{
145144
NativeFunc.Invoke(0x4170B650590B3B00, 0.1f, 0.1f);
146-
var res = NativeFunc.Invoke(0xFA925AC00EB830B9, 10, "LITERAL_STRING", "ScriptHookRDR2 .NET Loaded...");
145+
var res = NativeFunc.Invoke(0xFA925AC00EB830B9, 10, "LITERAL_STRING", " ");
147146
NativeFunc.Invoke(0xD79334A4BB99BAD1, *res, 0.0f, 0.0f);
148147
firstTime = false;
149148
}

source/scripting_v3/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@
2828
// Build Number
2929
// Revision
3030
//
31-
[assembly: AssemblyVersion("1.0.4.4")]
32-
[assembly: AssemblyFileVersion("1.0.4.4")]
31+
[assembly: AssemblyVersion("1.0.4.5")]
32+
[assembly: AssemblyFileVersion("1.0.4.5")]

source/scripting_v3/RDR2/Entities/Entity.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ public static Entity FromHandle(int handle)
3737
return null;
3838
}
3939

40-
public virtual int Handle
41-
{
42-
get;
43-
}
4440

4541

4642
public bool IsDead => Function.Call<bool>(Hash.IS_ENTITY_DEAD, Handle);

source/scripting_v3/RDR2/Game.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ public static int GenerateHash(string input)
249249
return 0;
250250
}
251251

252-
return unchecked((int)RDR2DN.NativeMemory.GetHashKey(input));
252+
return Function.Call<int>(Hash.GET_HASH_KEY, input);
253253
}
254254

255255
public static string GetGXTEntry(string entry)

source/scripting_v3/RDR2/World.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ public static Vehicle GetClosestVehicle(Vector3 position, float radius)
291291

292292
}
293293

294-
public static Ped CreatePed(Model model, Vector3 position)
294+
/*public static Ped CreatePed(Model model, Vector3 position)
295295
{
296296
return CreatePed(model, position, 0.0f);
297297
}
@@ -303,7 +303,7 @@ public static Ped CreatePed(Model model, Vector3 position, float heading)
303303
}
304304
305305
return Function.Call<Ped>(Hash.CREATE_PED, model.Hash, position.X, position.Y, position.Z, heading, false, false, 0);
306-
}
306+
}*/
307307

308308
#endregion
309309

0 commit comments

Comments
 (0)