Mac Bombs in Multiplayer don't trigger Golden Spur for non-host players

CandyNim

Tiller
Bug: With the Blessing of Fangs buff, bombs are capable of dealing critical damage. This critical damage triggers the Golden Spur speed boost in singleplayer, or when playing as the host in multiplayer. It does not, however, trigger the speed boost when being a non-host in multiplayer.

(As an aside, while bombs critting doesn't increase damage normally, it does work with Desperado so it is actually kinda nice. Please don't consider bombs critting the bug instead?)

Code Analysis: Bomb explosions are caused by TemporaryAnimatedSprite.update, which calls GameLocation.explode, which calls GameLocation.damageMonster, which, when crit and when the player who owns the bomb has an IridiumSpur (internal name of golden spurs) equipped, runs who.applyBuff(new Buff("iridiumspur", ...blahblah...)).

Now, TemporaryAnimatedSprite.update only calls explode on the host (Game1.IsMasterGame). While the accurate who gets passed along, so the host player probably does say "Guest.applyBuff(new Buff)", I suspect the netcode simply doesn't support getting told that buffs are applied by another player / the authoratative version of each Farmer is held inside the client so the client overwrites the hosts perception of if the buff applies.

Suggested Fix: Honestly, I'm not sure. Presumably there's a good reason that the bombs are exploded on the master game rather than the client game? (I suppose doing that means that even if a farmer disconnects their bombs will still explode; that's definitely more important than ensuring the niche statue of blessing and trinket interaction works. It could be done by the owner of the bomb or, if they're missing, the host?). Multiplayer and netcode is a bit beyond me, so I'm kinda unsure. Adding some netcode command that tells other players to get a buff would work (and might be useful for modding?


Attatched is a save file with two players, a statue of blessings which gives blessing of fangs, and several tiger slimes stuck in fences next to the bed. Both players have cherry bombs to use and golden spur equipped, to demonstrate the bug.
 

Attachments

Top