Twenty years after graduating high school, Calvin (Kevin Hart), left, hooks back up with Bob (Dwayne Johnson), who has a few surprises in store, in “Central Intelligence.” (Claire Folger/Warner Bros. Pictures)

Dwayne Johnson is so winning in “Central Intelligence” that the action comedy is worth a watch despite its familiar buddy-comedy beats. The actor’s character is unlike any he’s played before. He looks the same: He’s a colossally muscular CIA agent. But he’s also a complete dork.

“I’m big-time into ’corns,” he tells a confused acquaintance while pointing to the unicorn riding a rainbow across his T-shirt above the words “Always be you.” He wears a fanny pack, even to bed, and makes “Twilight” references. He’s earnest and guileless, which may not make for a believable undercover agent, but who cares? It’s highly entertaining.

Johnson plays Bob Stone, a super spy who wasn’t always so physically intimidating. Back in high school, he was overweight with a mouth full of metal, but he was no less sincere, making him a prime target for bullies. In the flashback opening scene — during which Johnson’s face is impressively superimposed onto someone else’s body — we see a group of kids grab a naked Robbie (as he was called back then) from the locker room and throw him in front of a gymnasium assembly.

Everyone dissolves into hysterics, except Calvin Joyner (Kevin Hart), the most popular guy in school. Stricken with pity, Calvin takes off his letter jacket and offers it to the tearfully mortified Robbie.

Danielle Nicolet, left, stars as Calvin’s wife Maggie. (Claire Folger/Warner Bros. Pictures)

Bob turns out to be a CIA Agent and tricks Calvin into helping him on a mission. (Courtesy of Warner Bros. Pictures)

Fast-forward a couple of decades, and Calvin is dreading his 20th high school reunion. Although he married the prom queen, the lovely, funny Maggie (Danielle Nicolet), Cal is otherwise embarrassed about his life. The kid most likely to succeed is now a boring accountant.

Just then, Bob resurfaces. One Facebook friend request later, the two men catch up over drinks. The meeting is just a ruse, though: Bob — now unrecognizable, thanks to his daily multi-hour gym routinetricks Calvin into helping him intercept some valuable data from foreign spies, and pretty soon the pair is on the run from all kinds of dangerous people, including a CIA big shot (Amy Ryan), who believes Bob murdered his last partner. It doesn’t take long for the panicky Calvin to start missing his banal former existence.

It’s refreshing to see the always funny Hart play the straight man for a change. Usually he’s the one chewing the scenery, and he does some of that here. But “Central Intelligence” is really a showcase for the Rock to flex his comedic muscles. Hart’s job is to react.

The jokes are nonstop. Punch lines come so fast they’re hard to catch when the audience is still recovering from the last laugh. No doubt some of this was improvised, but the script, by Ike Barinholtz and David Stassen, is also efficient and light, revelling in its broad comedy, complete with bathroom humor and pratfalls.

The violence, meanwhile, is more cartoonish than that of recent action comedies, which have gotten increasingly brutal. (Think: “Pineapple Express” and “Deadpool.”) Guns might be involved, but rivals end up scratched and bruised instead of bleeding out.

The direction, by Rawson Marshall Thurber (“Dodgeball,” “We’re the Millers”), is more adept at comedy than action. Chase scenes and shootouts get confusing, but there’s an inspired choice to zero in on Hart’s face while Johnson spins him around an office in a mail cart, which allows the audience to appreciate the actor’s hilarious facial expressions.

The two actors have great chemistry, and the movie makes the most of their very different heights. That joke might seem like low-hanging fruit, and it is. “Central Intelligence” won’t win any points for originality, but that doesn’t make it any less funny.

PG-13. At area theaters. Contains crude and suggestive humor, some nudity, action violence and brief strong language. 107 minutes.