Menu

[RESOLVED] Multiplayer missions do not end properly upon destruction of airfields

bbosen
2023-01-09
2023-01-10
  • bbosen

    bbosen - 2023-01-09

    Sometimes when a team's last remaining airfield is destroyed, the player that caused the destruction sees the airfield explode, hears the expected fanfare music, sees confirmation of victory in the SystemMessage Panel on his cockpit, and hears the 13-second audio countdown warning before the mission terminates and explodes his aircraft, but other players get no notification of the event. Instead, they all explode within a few seconds without warning.

    This bug isn't seen very frequently because it is so difficult to win any of our offline missions unless several players cooperate.

    Extensive run-time diagnostics are generated during all of these events. As usual, those diagnostics accumulate in "logfile.txt" which is stored in the hidden .LAC folder beneath each user's home directory. We really need to get a group of players together online to help us debug this. Each needs to email their own logfile.txt to webmaster@AskMisterWizard.com so I can dig deeper into the logic and figure out what's wrong. I need the contents of that file immediately after the mission ends. Just exit from LAC and immediately make a copy of that file to send to me please.

    To start this off, I have determined that the chain of events begins in the computer that issued the final bit of airfield destruction, within aiobject.cpp's "DynamicObj::checkDurability()" function. When that function determines that the player has destroyed an airfield, it sets the global "MissionEndingTimer" to 13000 milliseconds, and the downward progression of that timer within each of the various "MissionNetworkBattleXX.cpp" files then drives the mission to its conclusion.

     

    Last edit: bbosen 2023-01-10
  • bbosen

    bbosen - 2023-01-09

    Just a thought: This kind of buggy mission-ending behavior is to be EXPECTED with all versions of LAC prior to 8.95. New logic in version 8.95 was intended to fix very similar mission-ending misbehavior. Perhaps if just ONE player among those participating when a mission ends has not updated to at least version 8.95, this bug might get triggered.

    All players participating in the diagnostic exercise described above must update to version 8.95 or higher.

     

    Last edit: bbosen 2023-01-10
  • bbosen

    bbosen - 2023-01-10

    After examining the code from the latest version (8.95), I am pretty sure that this bug is fixed. I think those that still experience this bug are probably still using an older version.

    The cause of the problem is interesting: Every few seconds, the "RepairDamagedAirfields()" function (found in mission.cpp) is invoked by mission timers. It briefly examines the damage status of all of the mission airfields, and gradually makes repairs according to a complex set of rules that were contrived to keep all of our missions interesting. Among the things that earlier versions of LAC had been doing, if it found an airfield that was EXTREMELY damaged beyond the point of likely repair, it ensured that the associated RADAR antenna was also destroyed, by diminishing its "Durability" attribute by 10,000.

    However, for reasons that I've never understood, if that RADAR antenna had already been destroyed, the damage was inflicted on the PLAYER's aircraft instead, causing it to explode in flight.

    It is, of course, commonplace for extremely damaged airfields to have no functioning RADAR antenna remaining. Accordingly, when flying in a version prior to 8.95, within a few seconds after any airfield suffered extreme damage, the player's aircraft would explode.

    Version 8.95 eliminates that portion of "RepairDamagedAirfields()". It makes no effort to destroy the RADAR antennas associated with extremely damaged airfields. Problem solved.

     

    Last edit: bbosen 2023-01-10

Log in to post a comment.

MongoDB Logo MongoDB