mcdonaldduncan / Freebooter

Columbia College Chicago Senior Capstone
4 stars 0 forks source link

Fix bug that prevents swarmer models from resetting on respawn #274

Closed Sebp23 closed 1 year ago

Sebp23 commented 1 year ago

There are some times when the swarmer model is stretched abnormally on respawn.

Reproduction Steps:

  1. Go to the last part of the bookstore area in Venice-1054
  2. Shoot enemies, and as soon as one is ragdolling, pause the game as they are in midair
  3. Click "Reload Checkpoint"
  4. Go back to the area and observe that the swarmer that was ragdolling in midair when "Reload Checkpoint" was clicked is now abnormally stretched.
Sebp23 commented 1 year ago

The stretching bug has been fixed! The issue was that if the player respawned while a swarmer ragdoll was stretched, the ragdoll would be disabled but the specific limb that was stretched wasn't properly set back to its original rotation. I have since fixed this by using a dictionary to get the limb and their original transform values at the start of the level, and then whenever a player respawns or a swarmer's ragdoll is disabled, I reset the transform values of each limb in the dictionary back to their original values. In the video, I am unable to reproduce the bug, despite following the repro steps and respawning with stretched swarmers in mid-air.

https://user-images.githubusercontent.com/57201896/233494265-a6344452-ac0b-4b12-89dd-7abefcf01389.mp4