His whole reasoning for being mad at Ranma is grounded in his selfishness, and even then, Ranma is way too nice.
He has a bad sense of direction. Ranma knows this and even waits three whole days for him. Instead of appreciating that, Ryoga gets angry at Ranma for not waiting a fourth day (taking actions as granted as usual throughout the show). Rather than accepting that, or even thanking for at least the three days (the only reason ranma didn't wait a forth day is probably because he had to make his journey to china), he follows Ranma out for revenge (which he had no right to) and gets turned into a pig, which he also faults ranma for (even tho it was his fault for even chasing ranma, since there was no reason for revenge).
Eventually, it is revealed that he is a pig and becomes P-chan, acting cutesy around Akane because he knows that as a person, he has no chance. Even though it would be the right thing to tell Akane, Ryoga doesn't because he wants to sleep in her bed, which is even more creepy and disgusting.
Ranma doesn't want to embarrass him further and doesn't tell Akane, something Ryoga never thanks him for. Instead taking that action as granted while trying to break Akane and Ranma apart, while Ranma still keeps a secret he doesn't have to keep.
Even when he actually saved Akane he gives the credit to P-chan and Ryoga before himself, which again Ryoga never thanks him for.
Ranma even takes losses because of this, looking like a lunatic angry at a pig sleeping with Akane, even though he is actually angry at a pervert.
Onto that he saves and shows care for the guy (when shampoo tried to serve him as food or when he got captured), while at no point in time it was the other way around.
The worst thing is tho, that Ryoga never gets punished or tries to be a better person and move on, it doesn't matter what ranma does for him he will always try to backstab him.
Edit: right now best example, im watching the Shampoo amnesia arc, Akane gets angry at Ranma because of shampoo, Ranma says that this isn't fair because of Ryoga being P-chan but drops the argument instead of revealing who P-Chan really is. Ryoga never appreciates this and instead tries to be the one in a relationship with akane after she looses her memory and all this happened after Ranma gave credit to Ryoga and P-chan in saving Akane which he didn't deserve.
Ryoga is deeply selfish and has no sense of appeaciating what ranma does for him, wether he is a human or not he always stays a rat.