mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-24 05:03:34 -04:00
majorly reduce memory allocations during physics update. turns out it was still creating a local variable behind the scenes.
This commit is contained in:
parent
8f6a9a12c6
commit
0ffc6fa4c2
@ -148,7 +148,9 @@ namespace MCGalaxy {
|
||||
try {
|
||||
if (PhysicsUpdate != null)
|
||||
PhysicsUpdate(x, y, z, C.data, this);
|
||||
OnPhysicsUpdateEvent.Call(x, y, z, C.data, this);
|
||||
if (OnPhysicsUpdateEvent.handlers.Count > 0)
|
||||
OnPhysicsUpdateEvent.Call(x, y, z, C.data, this);
|
||||
|
||||
if ((C.data.Raw & mask) == 0 || extraHandler(this, ref C)) {
|
||||
HandlePhysics handler = handlers[blocks[C.b]];
|
||||
if (handler != null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user