Ann0ying
I'm still not sure of the cause of this issue. I do remember it not always being a problem and believe it started happening sometime in 2020.
I did remove everything that was added to the server since then one by one for a day or more until the problem was confirmed to still exist. The only changes other than those packages, since that time, were ACE 1.2 and v469. I might still try disabling ACE for a day or so to rule it out. I will post when I do that so we can see if the issue still exists.
I don't think the gibs are the issue for two reasons: As others have said, it happens on more than just tight quarters maps. I distinctly recall it happening on Fragwhore also, which is pretty open. Additionally, if it was the gibs it would at least happen sometime when you are in congested areas and haven't just spawned. It seems this issue only happens immediately after spawning.
When I looked at the code previously I was concentrating on the player spawning and receiving the weapon which is done like this at every spawn in GrapMut.uc:
function ModifyPlayer(Pawn Other)
{
local Weapon Grap;
if(Other.IsA('PlayerPawn') && !Other.IsA('Spectator'))
{
Grap=Spawn(class'NDgrap49c.Grappling', Other);
Grap.GiveTo(Other);
}
if ( NextMutator != None )
NextMutator.ModifyPlayer(Other);
}
But everything there seems to be okay except for maybe a check to see if Grap is not None before the call to GiveTo? Unless this Grappling spawn is somehow delayed it shouldn't cause any problems that I can see.
This time, I looked closer into Grappling.uc and found that all the functions that are needed to use the grapple (JumpRel, HookFire, HookOffHandFire) are done through client to server replication.
replication
{
reliable if( Role < ROLE_Authority )
JumpRel, HookFire, HookOffhandFire;
reliable if(Role == ROLE_Authority)
HookSpeed, FlySpeed, FFlySpeed, Range, SpeedFactor, bFlagFly, HookKillMode, bFlagNoAttach, bFlagTeamTravel;
}
So, my theory is that something is delaying this replication over the network immediately upon the player spawning but seemingly only when there are either lots of players, greater than 10, or lots of spawning going on. Maybe some replication constraints were introduced in v469 that I'm unaware of?
There currently isn't a way to interact with the grapple on the client-side only and I'm not sure if it would even work if the functions for client-side firing of the grapple were set to call the altfiring function etc.
I've put the grapple hook code on github in case anyone wants to take a look and possibly provide some insight. I can't find an author or license given in any of the NDgrap releases so I figured it was okay to extract the source and upload it. https://github.com/negruler/NDgrap49c
Maybe we can devise some changes to the grapple that will help debug the issue.