It’s wasting to practice if your mind is in bad state though you are trying to sit resisting with painful legs
What kind of motivation you should have for that kind of activity. We, practitioners, understand Dharma is good intention, pure motivation. When there is negative thought, negative intention in your mind then that destroys purity of everything. Therefore, we need to check our motivation. To check your mind as much as possible. And to keep your mind in quiet position, in peaceful position as much as possible. Only in this way you can accumulate some good merit. When your mind is in bad thought, even though you are sitting there, your legs in pain killing you and you still try to sit there, but your mind is in bad state, then result is bad, still. Therefore, everyone should have a very fruitful, good trip, meaningful trip. So we have to understand what conditions make trip meaningful, and [people] the real practitioners.
Hungkar Dorje Rinpoche, “What Makes a Trip Meaningful?“