jecrell / DoorsExpanded

Door expansion pack for RImWorld.
MIT License
11 stars 10 forks source link

Combat Extended fragmentation charge slowdown #4

Closed jecrell closed 5 years ago

jecrell commented 6 years ago

Issue (As reported by TC_One) TC_One: @Jecrell Got an incompatibility with Doors Expanded to report. I've not a single idea what can possible cause this, but whenever a frag grenade or mortar shell in Combat Extended explodes game freezes for ~10 seconds or so, to precess all the schrapnel. Without Doors Expanded processing takes milliseconds and lag is little to not notable at all. There are no errors or warnings in console, so I can't help pinpointing the issue, just know that it's Doors Expanded for sure. Tried with and without DE and performance with explosions changes a LOT.

Proposed Solution Investigate Combat Extended code. Find fragmentation damage handler. Find all Door references.

Maeyanie commented 5 years ago

I also noticed this, and oddly, it happens even on a freshly-spawned map without any doors existing. Unless they spawn in ruins, which I don't think they do.

The code for spawning the fragmentation is (I think) here: CompExplosiveCE.cs The projectile code is here: ProjectileCE.cs

Maeyanie commented 5 years ago

The CE developer had a few ideas on what might cause this, but I'm not sure if any of it would happen without a door even being placed on the map. Details here.