
26 Cal.App.3d 374 (1972)
102 Cal. Rptr. 705
CHARLES A. FERRELL, Plaintiff and Appellant,
v.
CITY OF SANTA MONICA et al., Defendants and Appellants.
Docket No. 38305.
Court of Appeals of California, Second District, Division Two.
June 26, 1972.
*375 COUNSEL
Caidin, Kalman, Hartman & Sampson and Newton Kalman for Plaintiff and Appellant.
Richard L. Knickerbocker, City Attorney, and Christina J. New, Assistant City Attorney, for Defendants and Appellants.
OPINION
HERNDON, J. 

Statement of the Case
Plaintiff brought this action to recover damages for the injuries he received when he was run over by the city's beach cleaning machine while he was sleeping on the beach in violation of a city ordinance. A jury returned a verdict in his favor. The trial court granted defendants' motion for a new trial on the ground of insufficiency of the evidence, but denied their motion for judgment notwithstanding the verdict.
Plaintiff appeals from the order granting the new trial. Defendants appeal from the order denying their motion for judgment notwithstanding the verdict.
We have concluded that the evidence establishes plaintiff's contributory negligence and assumption of risk as a matter of law. It follows that the *376 order denying the motion for judgment n.o.v. must be reversed and that plaintiff's appeal should be dismissed as moot.

Statement of the Facts
The accident occurred on September 3, 1967 at approximately 2:45 a.m. on Santa Monica Beach while defendant Manriquez, an employee of the City of Santa Monica, was operating beach cleaning equipment. Said equipment consisted of a rubber-tired Case tractor, with two seal beam headlights on the front and a spotlight on the rear, to which a rake was attached. During the summer months, due to the large number of people utilizing the beach in the daytime, the beach cleaning is accomplished during the late night and early morning hours.
On the day in question Manriquez was working the morning shift from 1 a.m. to 9 a.m. September 3, 1967 was the Sunday of Labor Day weekend and a crowd of approximately 200,000 had been on the beach the day before. The trash, debris and seaweed were unusually heavy on this particular morning. When Manriquez arrived at the designated area of the beach he proceeded with his tractor-rake combination to rake the debris into windrows. In making each run he had to overlap each windrow by about four or five feet before making his drop so that the sanitizer would be able to straddle the windrow and pick it up later.
Manriquez had made about seven or eight laps around the beach before he reached the area in which plaintiff had selected his resting place. When he was approximately 15 feet from the windrow behind which plaintiff was later found, Manriquez slowed his tractor from five miles per hour to two miles per hour so that he could make his drop at the right place. As he approached the windrow in question just prior to the accident, he was looking straight ahead and all he saw was debris.
As the tractor passed over the windrow he felt a couple of bumps and thought he had run over a rock or a tire. He turned around to see what it was he had run over so it wouldn't get tangled with the rake. There was a light on the back of the tractor which shone straight down on the rake. As he turned around he saw plaintiff lying immediately behind the left rear wheel of the tractor. It was at this time that he realized he had run over a man with the left front and left rear wheels of the tractor. He stopped the tractor immediately, checked to see if the man was still alive, and then ran to call the police.
Upon arrival at the scene of the accident, Officer Saunders observed plaintiff lying in a slight depression, as if he had burrowed into the sand *377 to sleep. Officer Saunders noted a strong odor of alcohol on plaintiff's breath and person. Plaintiff told the officer, "I knew I wasn't supposed to be sleeping out on the beach like that" and that he never heard or saw the tractor before it ran over him.
Officer Saunders further observed that the tractor headlights were operative and that there were clumps of seaweed in the area of the beach where plaintiff was lying. Plaintiff was transported to the Los Angeles County General Hospital. The admitting physician noted on the hospital chart that "the patient had been drinking." Plaintiff underwent surgery on September 3, 1967, the day he was admitted to the hospital and had a relatively normal post operative course until September 8 when he went into delirium tremens, an acute psychosis due to withdrawal from alcohol.
Plaintiff's medical records indicated that plaintiff, age 54, had been admitted to the hospital on two prior occasions for chronic alcoholism and on a third occasion for a hernia with a secondary diagnosis of chronic alcoholism. He had not worked a steady job since 1954. He admitted to a long history of drinking in public commencing in 1956. Plaintiff testified that after spending Saturday, September 2, on the beach, he ate dinner and returned to the beach about midnight, sat down, lay back and dozed off.
Prior to the accident in question there had been other accidents on the Santa Monica beach in which persons had been run over by lifeguard jeeps. These accidents caused great concern on the part of city officials. As a result, Ordinance No. 745 was enacted by the City Council of the City of Santa Monica as an emergency measure to prohibit loitering or sleeping on the beach between the hours of midnight and 5 a.m. in an effort to prevent just this type of accident. This ordinance was in effect at the time of the accident in question; it was published as required by law in a newspaper of general circulation on July 19, 1967.

Proceedings in the Trial Court
Following the accident, plaintiff filed a complaint for damages against the City of Santa Monica and Phillip Manriquez. At the conclusion of the evidence, defendants made a motion for a directed verdict on the grounds that the evidence failed to show any negligence on the part of either defendant and that plaintiff was guilty of contributory negligence as a matter of law in that his inexcusable violation of the ordinance necessarily was the proximate cause of the accident. The motion for directed verdict was denied.
The jury returned a verdict in favor of plaintiff and against defendants *378 in the sum of $50,000. Judgment was entered and notice thereof served by the clerk on October 16, 1969. Defendants filed a timely notice of motion for judgment notwithstanding the verdict and notice of intention to move for a new trial on October 31, 1969.
The court denied the motion for judgment notwithstanding the verdict and granted the motion for new trial upon the ground that there was insufficient evidence to support a finding of negligence on the part of defendants. Plaintiff filed a notice of appeal from the order granting the new trial. Defendants filed a notice of cross-appeal from the judgment, from the order denying their motion to bifurcate the trial, from the order denying their motion for a directed verdict and from the order denying their motion for judgment notwithstanding the verdict.[1]

The Applicable Law
As stated in Bolar v. Maxwell Hardware Co., 205 Cal. 396, 402 [271 P. 97, 60 A.L.R. 429]: "In this cause the provisions of section 629 of the Code of Civil Procedure are applicable, authorizing the appellate court, if it appears from the whole evidence that a verdict should have been directed at the trial, to order that judgment be so entered."
In Bolar, the Supreme Court reversed a judgment for plaintiff entered after a verdict in his favor, and ordered judgment for defendants notwithstanding the verdict. At pages 398-399 the court stated: "We can discern no ground whatever upon which minds could differ for an instant as to plaintiff's own patent negligence in causing the explosion which produced his injuries."
In Morton v. California Sports Car Club, 163 Cal. App.2d 685 [329 P.2d 967], we reversed a judgment for the plaintiff and directed that judgment be entered for defendant pursuant to the provisions of Code of Civil Procedure section 629. The basis for that disposition was that the defendant had established an affirmative defense as a matter of law. We held at page 689: "Even if we assume that the question would ordinarily be one of fact, the evidence in the instant case so clearly establishes the defense of assumption of risk that reasonable minds could not differ and the question should not, therefore, have been submitted to the jury. The court should have granted defendant's motion for directed verdict or, having *379 failed to do this, should have granted the motion for judgment notwithstanding the verdict."
(1) In the instant case it was uncontradicted that plaintiff violated the city ordinance which prohibited sleeping on the beach between the hours of 12 midnight and 5 a.m. In violating this ordinance plaintiff was guilty of negligence as a matter of law. Unquestionably his violation of this ordinance was the proximate cause of his injury. The manifest purpose of the ordinance was to protect people from the very danger that caused the injury. The application of the doctrine of assumption of risk is equally clear.
In Reeves v. Lapinta, 25 Cal. App.2d 680, 682 [78 P.2d 465], a judgment notwithstanding the verdict was affirmed on the ground that the plaintiff's violation of an ordinance constituted contributory negligence as a matter of law. "As plaintiff violated a provision of the foregoing ordinance in riding upon the step of the automobile bus, she was guilty of negligence per se, and since the accident would not have occurred had plaintiff remained in any other portion of the bus, her negligence was one of the proximate causes of the accident, and therefore she cannot recover for her injury."
In Lorry v. Englander Drayage etc. Co., 108 Cal. App. 116, 118-119 [291 P. 467], the Court of Appeal affirmed an order directing a verdict in favor of the defendants upon the ground that the plaintiffs' violation of an ordinance constituted contributory negligence as a matter of law.
Leek v. Western Union Tel. Co., 20 Cal. App.2d 374, 376 [66 P.2d 1232], reversed a judgment in favor of plaintiff and stated the law thusly: "The law is settled that (1) the violation of a statute or ordinance constitutes negligence per se, and (2) it constitutes contributory negligence if the failure to comply with the statute or ordinance contributes directly to the injury."
Even in the absence of the ordinance in question, this drunken plaintiff's reckless conduct in lying on the beach at night hidden behind a windrow of debris when he should have seen or heard the beach cleaning equipment in operation before it struck him probably would have constituted assumption of risk and contributory negligence as a matter of law.
The judgment and the order denying the motion for judgment notwithstanding the verdict are reversed with directions to enter judgment for defendants. Plaintiff's appeal from the order granting the new trial is dismissed *380 as moot. The improvident appeals from the orders denying motions to bifurcate the trial and for a directed verdict are dismissed.
Respondents and cross-appellants will recover their costs on appeal.
Roth, P.J., and Compton, J., concurred.
The petition of the plaintiff and appellant for a hearing by the Supreme Court was denied September 7, 1972. Tobriner, J., and Mosk, J., were of the opinion that the petition should be granted.
NOTES
[1]  The attempted appeals from the non-appealable orders denying the motions to bifurcate the trial and for a directed verdict will be dismissed.
