Goorakh-PizzaClientLagFix icon

PizzaClientLagFix

Fixes unpredictable multiplayer lag for Mithrix's pizza (big spinny) attack

Last updated 21 hours ago
Total downloads 142147
Total rating 15 
Categories Mods Tweaks Client-side Server-side Survivors of the Void Seekers of the Storm Update
Dependency string Goorakh-PizzaClientLagFix-1.3.2
Dependants 59 other packages depend on this package

This mod requires the following mods to function

bbepis-BepInExPack-5.4.2113 icon
bbepis-BepInExPack

Unified BepInEx all-in-one modding pack - plugin framework, detour library

Preferred version: 5.4.2113
RiskofThunder-HookGenPatcher-1.2.4 icon
RiskofThunder-HookGenPatcher

MMHOOK generation at runtime.

Preferred version: 1.2.4

README

PizzaClientLagFix

What it do??

If you've ever played multiplayer, you may have noticed extreme lag with Mithrix's pizza (big spinny) attack. This mod aims to fix that.

The problem

The rotation of the attack is technically simulated on clients, but badly, it does not take network delay into consideration at all, and since the damage check is serverside, this results in potentially massive desyncs between the visual position and where the damage is actually applied.

Vanilla sequence of events:

  • Attack starts, spinnies are spawned
  • Non-host dodges attack on their end
  • Host has a completely different rotation, so the non-host gets hit anyway
  • Everyone is sad :(

How fix????

This mod makes the damage check clientside, so whether you take damage or not will always match with the visuals. But because damage is still serverside, this does introduce a slight delay before the damage is actually applied.

Mod sequence of events:

  • Attack starts, spinnies are spawned
  • Either, A:
    • Non-host dodges attack on their end
    • Host runs damage check, hits non-host player, but this is ignored, no damage is dealt
  • B:
    • Non-host gets hit on their end
    • Non-host sends message to host, signaling that they were hit
    • Noticeable, but slight delay for the damage message to be received, depending on ping
    • Host receives damage message, deals damage, regardless of normal damage check
  • Everyone is happy :)

Mithrix's shockwaves are also given this same fix

Credits:

Nuxlar: testing and mod icon

Me: the rest