Desperate for Advice

Kendr
I dated this guy for 8 months. We broke up, because we fought over stupid things. I'm still in touch with this guy and he's very close to me. We work together also. The thing is, I still mess around with him. Sexually and I know it's a bad thing, but there is a reason to it. He acts different when we're are in front of certain friends of his, he'll act like we are together, but when we are at work he acts like he doesn't even know me... He barely wants to talk to me while we are there, but when it comes to us hanging out with friends ,outside work, he'll talk up a storm. I don't know what I'm doing, I'm so lost, stuck, and over all hurt. I need some help... He gets mad when other guys talk to me... He's still over protective of me as well... Help? Suggestions?? Ideas???