ZeroK-RTS / Zero-K

Open source RTS game running on the Spring/Recoil engine
https://zero-k.info
GNU General Public License v2.0
689 stars 206 forks source link

Updating callin inside itself skips the next wupget #4917

Open GoogleFrog opened 1 year ago

GoogleFrog commented 1 year ago

Zenith broke within the last few months because its unending spawn meteor thread ended. See #4901 for replays.

GoogleFrog commented 1 year ago

image

This caused https://github.com/ZeroK-RTS/Zero-K/issues/4900 as well. https://zero-k.info/Battles/Detail/1622594

Both units suddenly have an immortal thread stopped. There is a third unit to the right in construction that also has its thread killed. Happens at skip 330.

GoogleFrog commented 1 year ago

image

Frame is the wake up frame of the thread and curFrame is the current game frame. LUS is skipping a frame.

GoogleFrog commented 1 year ago
9990 | 9991 -- | -- Save/Load | Save/Load No Friendly Fire | No Friendly Fire UnitPriority | UnitPriority Mex Control with energy link | Mex Control with energy link Attributes | Attributes Attributes Generic | Attributes Generic Boolean Disable | Boolean Disable Impulse Float Toggle | Impulse Float Toggle Shield Charge | Shield Charge StartSetup | StartSetup Stockpile | Stockpile Teleport Throw | Teleport Throw UnitMorph | UnitMorph AirTransport_SeaPickup | AirTransport_SeaPickup Aircraft Command | Aircraft Command Aircraft Crashing | Aircraft Crashing Area Guard | Area Guard Capture | Capture Carrier Drones | Carrier Drones Command Raw Move | Command Raw Move Constructor Auto Assist | Constructor Auto Assist Decloak when damaged | Decloak when damaged Factory Anti Slacker | Factory Anti Slacker Factory Plate | Factory Plate Fall Damage | Fall Damage GameRules Events | GameRules Events Grey Goo | Grey Goo Gunship Oscillate | Gunship Oscillate Instant Self Destruct | Instant Self Destruct Jumpjets | Jumpjets LUS | Lag Monitor Lag Monitor | Missile Silo Controller Missile Silo Controller | Mod statistics Mod statistics | Prevent Lab Hax Prevent Lab Hax | Projectile Gravity Projectile Gravity | Projectile Radar Homing Projectile Radar Homing | Projectile Retarget Projectile Retarget | Proximity Targetting Proximity Targetting | Puppy Handler Puppy Handler | Reclaim HP changer Reclaim HP changer | Refuel Pad Handler Refuel Pad Handler | Regeneration Regeneration | Remove Wait Remove Wait | Repair Speed Changer Repair Speed Changer | Retreat Command Retreat Command | Rezz Hp changer + effect Rezz Hp changer + effect | Shield Link Shield Link | Show Shooter Show Shooter | Spherical LOS Spherical LOS | Static Con Unsticker Static Con Unsticker | Synced LOD Synced LOD | Tactical Unit AI Tactical Unit AI | Target Features Target Features | Target Priority Target Priority | Target on the move Target on the move | Teleporter Teleporter | Terraformers Terraformers | Time slow v2 Time slow v2 | Torpedo Stay Underwater Torpedo Stay Underwater | Units on fire Units on fire | Wade Effects Wade Effects | Ward Fire Ward Fire | Water Effects Water Effects | Weapon Impulse Weapon Impulse | Center Offset and Growth Scale Center Offset and Growth Scale | Game Over Game Over | UnitCloakShield UnitCloakShield | Windmill Control Windmill Control | Energy Drain Energy Drain | Share mode Share mode | Area Denial Area Denial | Unit Explosion Spawner Unit Explosion Spawner | Map Border Map Border | Lups Shield Lups Shield | Endgame Graphs Endgame Graphs | Gameframe Orders

These are the gadgets that are called by GameFrame on these two frames. I dug into why LUS is missing.

JumpJets somehow causes GG.DelegateOrder which caused the Gameframe Orders gadget to insert itself to the GameFrame list. But JJ caused this during GameFrame, and the GameFrame list is iterated backwards, so the item after JJ (LUS) is skipped