MalachiPyronomicon / Recognition

0 stars 1 forks source link

Payload issues #2

Open CrimsonTautology opened 11 years ago

CrimsonTautology commented 11 years ago

https://github.com/MalachiPyronomicon/Recognition/blob/master/donator.recognition.tf2.sp#L478-485

This function may be deleting random entities including map logic entities on payload maps. I need to dig a little deeper.

CrimsonTautology commented 11 years ago

On map start you should zero out g_EntList. It might still have data from the previous map which it passes to KillSprite()

MalachiPyronomicon commented 11 years ago

Ok, I will add this in for the next build. As you might expect, all plugins are 'frozen' until after testing is complete. Identifying which plugin is causing problems is the first step. This could take through Sunday, but if we get enough errors it might end sooner.

I think you are on the right track here. After you mentioned this I made the connection to dissappearing models. I was going to put in a test to verify the name of the ent to be deleted, and log an error if the name wasn't what we expected.

CrimsonTautology commented 11 years ago

I am now very sure that this is the cause of both the payload and floating entity issues.

MalachiPyronomicon commented 11 years ago

Ok, I'm feeling good about this. I will make a build and put it up for tonight. If we still have glitches we will go from there. And we can always pull the plugin for the weekend, which is our high-volume time in terms of players.

MalachiPyronomicon commented 11 years ago

Ok, it's up. Look at the code if you like and see if this is what you're thinking.

CrimsonTautology commented 11 years ago

Yeah, the issue was here Basically if a donator leaves on map change his sprite index is still in the array but won't get cleared out on the next round start. This index can potentially point to any entity on the new map; a health pack, a cable end point, a view portal, a sentry, the map logic func for payload maps. Your change should fix this.

MalachiPyronomicon commented 11 years ago

The OnClientDisconnect call looks insufficient to my eyes. For one, if a player leaves during the afterround when perks are enabled, no entitiy cleanup is performed (perhaps explaining random sprites I sometimes see sitting around the map). At the least, I'll plan on putting that in for next rev.

According to an old Bailopan post (https://forums.alliedmods.net/showpost.php?p=702899&postcount=9) OnClientDisconnect gets called for map changes, then players reconnect at the beginning of the next map.

Something seems odd about that, though. If I put my finger on it, I'll let you know. Oh - the donator intro banner shows up only on first connect, not on every map change. I checked the code and it uses OnClientPostAdminCheck. Guess this doesn't get called on map change reconnect.

CrimsonTautology commented 11 years ago

Well if we know it is guaranteed to be called it would be best to clear their g_EntList index there instead of clearing out the entire array each map change.

CrimsonTautology commented 11 years ago

https://github.com/MalachiPyronomicon/Recognition/blob/master/donator.recognition.tf2.sp#L198-199

Pull these lines. We don't care if they're in game or a donator or whatever; we want that array cleared.

MalachiPyronomicon commented 11 years ago

OnClientDisconnect/OnClientConnect does appear to be getting called on map change (per Bailopan's post) - the intro banners do show up when a donator joins a class in the new map.

*

Agreed to pull those lines - but I'm going to hold off because I want to do a test first.