New Build (2011-09-08) - No More Breakdancing

Moderators: GSH, Ultraken

Post Reply
User avatar
Ultraken
Patch Creator
Posts: 373
Joined: Fri Feb 18, 2011 6:06 pm
Contact:

New Build (2011-09-08) - No More Breakdancing

Post by Ultraken »

It took about two months (!) but the unit "breakdancing" bug should be gone. It was caused by a seemingly-innocuous change that ran afoul of how the Anet send function works. When the next object's state won't fit into the current packet, the original code copied it to a temporary buffer, sent the packet, and copied the temporary buffer to the head of the next packet. I cut out that middle step to avoid all the copying. The problem is that the Anet send function appends a six-byte packet "envelope" containing the source, destination, and session identifiers onto the packet. The "envelope" would stomp the next object's orientation and make the remote copy "glitch". The object's orientation is the most-obvious and least-disruptive element in the object state header, though, so it could have been a lot worse.


Downloads:

Testing Executable and Symbols
Updated Assets (updated 2011-09-03)


What's New:

* Airborne units don't apply terrain avoidance forces
- They still take cliffs into account when path planning, though
- This lets pilots hopping out of a Barracks escape properly

* Pilot only goes to an empty unit if it won't overfill the category
- ...a teammate that has been abandoned or sniped (grey in the command menu)
- ...a non-teammate in a category with an available slot

* Network debug (Alt+N) shows stats for object state sent each update
- Pkts: number of packets
- Objs: number of objects
- Comp: total compressed size of the packets
- Orig: total uncompressed size of the packets

* Disabled EXIT_SIM_FAIL (Ctrl+X) in multiplayer
- EXIT_SIM_SUCCEED already worked this way

* Fixed the "breakdancing units" bug (finally!)
- When a packet got full, the next object's orientation got stomped by the send function
- Moving the next object's state into a temporary buffer like the original code solved this :)

* Take remaining bandwidth into account when building state packets
- It previously built a packet but discarded it if it didn't have bandwidth left
- It now sends the packet when the next object would exceed the limit
- This should even out the traffic and avoid wasting effort

* Producer checks to make sure its geyser power source is valid
- This should help with constantly deploying/undeploying producer units in multiplayer
- The producer would choose the wrong geyser before getting moved into position

* Fixed remote Gun Towers not marking terrain hazard
- Moving the hazard update from the AI process to the Gun Tower unit fixed it

* Reduced calculated range of Proximity mine to 50m (like 1.4)
- It probably shouldn't contribute range at all...

* Prevented Minelayers from dropping mines while following
- Basically, FollowTask won't try to fire using a dispenser weapon
Post Reply