QuentinGruber / h1z1-server

Library used to emulate h1z1 game servers
https://h1emu.com
GNU General Public License v3.0
97 stars 56 forks source link

fix_unoptimized_code #2166

Closed QuentinGruber closed 1 month ago

resinate commented 1 month ago

i did some checking client.character.state.position = packet.data.position; = black screen when relog the packet only sends 3 values NOT 4

  i did find bandaid fix
  this.state.position = new Float32Array([0,0,0]);
  had to force this in char.ts

  for new code to fix black screen
QuentinGruber commented 1 month ago

Yep we saw that it's fixed now

resinate commented 1 month ago

this.state.position = new Float32Array([0,0,0]); has to be 4 0s kept getting stupid black screen again LOL i found that movement packet executes too much code for how fast it spams it, so i broke code that didnt need to be spammed into delayed async kept simple pos spammable. same mod can be applied to rotation and lookat as well

only other massive issue i found was game sends 1 packet PER object for hide/show wander if theres a way to batch them into single group packet