When a surgeon replaces a joint, the condition of the soft tissues around the joint is always evaluated carefully. Muscles, ligaments, and joint capsule may all be contributing to the problem and can be corrected.
The surgeon will carefully take steps to restore full motion during the operation. Removing any and all bone spurs called osteophytes is important. Osteophytes can act as a bony block to the joint, preventing it from moving all the way. These bone spurs can also keep the soft tissues from moving smoothly and freely with the same result.
If removing the osteophytes still doesn't restore your motion while in the operating room, then the surgeon can remove some of the bone at the bottom of the femur (thighbone). If this doesn't gain the needed motion, then one of several other steps can be taken.
First, the joint capsule may be cut or released. Then the gastrocnemius (calf muscle) may be released. Finally, a hamstring tenotomy can be performed. A tenotomy is the surgical cutting or division of a tendon.
Most often these last steps aren't needed. Just removing the osteophytes and balancing the soft tissues around the knee is enough to restore your motion. It may take awhile, but with rehab you should be able to resume walking normally after your knee replacement.