You are viewing a potentially older version of this package. View all versions.
Goorakh-PizzaClientLagFix-1.2.0 icon

PizzaClientLagFix

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

Date uploaded 4 months ago
Version 1.2.0
Download link Goorakh-PizzaClientLagFix-1.2.0.zip
Downloads 12406
Dependency string Goorakh-PizzaClientLagFix-1.2.0

This mod requires the following mods to function

RiskofThunder-HookGenPatcher-1.2.3 icon
RiskofThunder-HookGenPatcher

MMHOOK generation at runtime.

Preferred version: 1.2.3
bbepis-BepInExPack-5.4.2113 icon
bbepis-BepInExPack

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

Preferred version: 5.4.2113

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

CHANGELOG

1.2.0 Changes:

  • Fixed Kjaro's band not dealing any damage (and probably some other edge cases)
1.1.0 Changes:
  • Added the lag fix to Mithrix shockwaves
1.0.0 Changes:
  • First release