Early in the morning on a foggy winter day, a Plymouth sedan automobile driven by Charles C. Nourse, one of the petroleum engineers of the Standard Oil Company, collided with a moving freight train at the Rosedale crossing approximately five miles west of Bakersfield, thereby derailing 11 ears, and destroying their cargo as well as damaging the track of The Atchison, Topeka and Santa Fe Railway Company. Mr. Nourse was on his way home to Taft after working in a unitized oilfield near Bakersfield, known as the Greeley Field, of which the Standard Oil Company of California was, by contract, the operating agent. The latter company paid plaintiff the sum of $40,000 as its share of the alleged total damage of $62,147.75, and other defendants similarly paid $2,000 to the plaintiff, receiving in return covenants not to sue.
Other signatories of the Greeley Field contract, the respondents herein, are the Superior Oil Company, Socony-Mobil Oil Company, Inc., and Signal Oil and Gas Company. The complaint alleges that Mr. Nourse was an agent of the named defendants, that his negligence proximately caused the collision with the freight train, that he was acting within the course and scope of his employment at the time, and that damages resulted in the total sum of $62,147.75.
In their answers, the defendants denied the basic allegations of the complaint, including the statement that Mr. Nourse was their agent acting in the course of his employment at the time of the collision, and that he was guilty of negligence; and they all alleged, as a special defense, that the plaintiff was guilty of contributory negligence, and that if defendants should be found liable, they should receive credit for the payments made for the covenants not to sue. The defendants also filed a cross-complaint against Mr. Nourse, asserting that if there should be a verdict against them in any amount, they should in turn have a judgment against him in the same sum, inasmuch as judgment for the plaintiff could only be granted if Mr. Nourse were acting as agent for the defendants. The trial resulted in a verdict in favor of the answering defendants and also for Mr. Nourse, the cross-defendant. A motion for a new trial made by the railway company was denied.
*292No appeal was taken by any party from the judgment in favor of the cross-defendant. So, at the outset, it must be noted that Charles C. Nourse is not a proper party respondent and that the judgment below in his favor is final. The appeal which was filed by the plaintiff was directed to the judgment for the defendants as against the plaintiff. The prayer for relief on the cross-complaint was wholly contingent; it was expressly restricted to a situation in which there had been a verdict in favor of the plaintiff, and it is obvious that when the jury reached the conclusion that plaintiff was not entitled to a judgment, there was no longer an active request for a verdict against the cross-defendant. Nevertheless, if the defendants wished to preserve their right to a possible recoupment from their alleged agent in the event of a reversal of the present judgment against plaintiff and a new trial, it was incumbent upon them to file an appeal phrased in contingent fashion, to the effect that their appeal should be effective only in the event that the judgment in favor of defendants were reversed. This conclusion is reinforced by the stipulation in open court between the appellant and the Superior Oil Company and Signal Oil and Gas Company that cross-defendant Nourse is not a party to the appeal.
The jury was required to pass on three issues:
(A) Was Mr. Nourse guilty of negligence which proximately caused the collision?
(B) If so, was he then acting in the course and within the scope of his employment as an agent for the defendants ?
(C) Was the railway company guilty of contributory negligence ?
These issues were fully covered by instructions proposed by the several parties. It does not appear upon what view of the facts the jury based its verdict.
For the most part, the underlying facts are not in dispute.
Unquestionably, Standard Oil Company of California was the operator in the Greeley Field, as the common agent for all of the parties to the unitized agreement. By contract, it had an exclusive right as such operator to the conduct and management of the unit. No representative of any of the defendants was present at the Greeley Field except through the Standard Oil Company. Mr. Nourse received all of his orders and directives from that company; it maintained offices within the boundaries of the unit; and these offices also served the entire eastern portion of Kern County from Arvin north to the *293county boundary for the Standard Oil Company in matters wholly unconnected with the Greeley Field. It maintained a staff of six engineers of which Mr. Nourse was one, besides two lead engineers and a senior engineer for that entire territory, including all of its separate interests as well as the Greeley Field. About ten percent of Mr. Nourse’s total professional time was devoted to work at the Greeley Field, and 90 percent of his activities concerned other Standard Oil Company holdings in the eastern part of Kern County, as to which the defendants had nothing to do.
The engineers’ work schedule was so arranged that once in every six weeks each of the professional workers on the Standard Oil Company staff received a weekend duty assignment, which meant that he was on call by Standard Oil Company for any duty which might arise at any time during the weekend, from Friday night to early Monday morning. This roster is referred to by the plaintiff as a 24-hour duty schedule; in fact, the applicable time scale constituted more than 48 hours during which period the assigned engineer was on call.
Pursuant to his periodical weekend duty, Mr. Nourse, on this occasion, left the office of Standard Oil Company on the Friday before the accident at the end of the normal workday in an automobile of the Standard Oil Company, which was not especially limited to use in the Greeley Field, but was available for all of the company’s operations during the weekend, wherever they might be. He then drove to his home in Taft. He had been advised that there was a well on the Greeley unit which would require casing perforation, and subsequent tests to determine the adequacy of certain cement work which had been done at a depth of approximately 11,500 feet. On Saturday, January 10, 1959, he drove the company ear to the Greeley Field arriving there between 4 and 4:30 o’clock in the morning. He then found that shooting of the perforations in the easing would have to be delayed, and it was not until about 6 a.m. that this work was done. He spent about a half hour’s time on this job, left to eat breakfast and returned to the well and then went to the Greeley office; he was free for a period of several hours because there were 11,500 feet of tubing to be assembled and inserted in the well by a well-servicing company, which had been hired for this job, during which time his presence would not be required. Mr. Nourse occupied himself during the following free hours with other tasks, none of which was related in any way to the Greeley *294unit: he did some office work, visited other Standard Oil Company holdings completely outside of the Greeley Field on the east side of Kern County, visited for awhile with his mother and father in Bakersfield, ate lunch at a cafe, and also went to a nursery where he purchased steer manure for his own garden. It was not until about 2 o’clock on Saturday afternoon that Mr. Nourse went back to the Greeley unit well where he was advised that the contemplated swabbing operation would commence in about an hour. He remained there at the well from 3 to 8 o'clock p.m.; and then went to a nearby cafe where he spent an hour at dinner returning to the well at approximately 9 p.m.; he stayed there until the circulation was finished at around 3 a.m., and finally left the site at about 4 a.m. on Sunday, January 11, 1959. During the preceding 24 hours, Mr. Nourse had spent about 12% hours at the Greeley unit. He had “cat-napped” at times in his car at the well site. When he finally left, he knew that his presence there would not be required again for at least 8 to 10 hours as the well-servicing company was first required to pull 11,500 feet of tubing out of the hole; this was a mechanical job which would not require his presence or supervision.
Mr. Nourse intended at the time to drive to Bakersfield, which was located in an opposite direction from his home in Taft; he intended to get gasoline there rather than at the company pumps nearby, and to have breakfast; but when he got to Bakersfield and secured the gasoline he decided to return to Taft and to eat there. It was while he was driving home that he collided with appellant’s freight train; on the Bosedale highway, about five miles west of Bakersfield at a point where it was extremely foggy, he drove at from 25 to 15 miles an hour, reducing speed as the fog became thicker; when the visibility finally was reduced to about 50 feet, he approached the railway crossing, but did not see any train on the tracks or any warning signal; at his first sight of the moving freight car in front of him, he cramped his wheels to the right but could not then avoid a crash. He saw no warning indicator before the accident, but testified that he did see a blinking light on the other side of the railroad track after the crash; one of the freight cars jumped the track, part of the train was derailed, and 11 of the cars turned over. There is a total lack of any explicit evidence that Nourse, as claimed by the plaintiff in its argument to the jury, was then “rum-dumb”—“worn out with fatigue caused by overwork on this *295job” or that he had gone “through eight hours of torture.” Mr. Nourse was asked, “Were you sleepy that night?” And his answer was, “I can’t say that I was or wasn’t.”
The issues of negligence, agency, and contributory negligence were submitted to the jury by the trial court with appropriate instructions requested by the several parties.
Appellant offers these contentions for reversal:
1) That the court erred in refusing plaintiff’s request to amend the complaint to conform to proof;
2) That the court was in error in refusing to instruct the jury that if the Standard Oil Company, aside from the alleged negligence of Nourse, was also negligent in conducting the unit operation, defendants were liable for such negligence;
3) That the court should have instructed the jury that Nourse was an employee of the defendants at the time of the accident;
4) That the court was guilty of error by instructing the jury that, if it found that the defendants were liable, a judgment should also be awarded in the same amount against Nourse on the cross-complaint; and
5) That the court improperly sustained objections to questions asked the witness, Holman, with respect to the sufficiency of the safety precautions at the crossing.
The Trial Court Correctly Denied Plaintiff’s Proposed Amendment to the Complaint.
After all of the evidence was in, counsel for the plaintiff stated to the court at a session in chambers that he desired to amend the complaint “to include a cause of action directly charging these defendants with negligently participating directly in the accident that resulted in the damage prayed for.” The request was opposed and the court denied the attempt to amend the complaint. Counsel for the appellant did not propose a specific amendment in writing and for this reason alone respondents point out that there is authority to the effect that the denial was justified (Neher v. Kauffman, 197 Cal. 674, 686 [242 P. 713] ; Knox v. Atchison, T. & S. F. Ry. Co., 95 Cal.App.2d 896, 901 [214 P.2d 589]). Respondents also call attention to the fact that all of the factors relating to the working hours of Mr. Nourse had been placed in the record, through his deposition, some two years and three months prior to the trial, and that there was no excuse for the delay in making the request for an amendment. They also aver *296that if the request had been granted, they would have been compelled to ask for time to consider new pleadings and to prepare appropriate responses, which would have necessitated a continuance of the ease with the unfortunate result that the jury would have had to suffer a gap of several days, or weeks, before the trial could be resumed.
Be this as it may, it would seem that plaintiff’s request did not involve issues which were not already before the jury; the theory of plaintiff’s complaint was that Mr. Nourse was negligent, that his negligence proximately caused the collision, that he was an agent of all of the defendants at the time, as well as of the other parties to the unitized agreement for the operation of Greeley Field, and that because of this relationship, the defendants, as well as the Standard Oil Company and all other parties to the agreement, were responsible for the accident. The contention that the proposed amendment to the complaint sought to make the Standard Oil Company “directly” liable for its alleged fault in overworking Nourse is oblivious of the fact that there never could have been a recovery by plaintiff in the absence of proof of negligence on the part of Mr. Nourse, no matter what preceded that negligence. And appellant also apparently overlooked the fact that if Mr. Nourse were acting in the course of his employment at the time of the collision all of the parties who had signed the agreement would be liable for his negligent acts. The contract for the operation of the unitized field was in evidence and the defendants were responsible for anything done by Mr. Nourse if at the time of the collision he was acting in the course of his employment. To talk about “direct” negligence of the Standard Oil Company is to invoke the impossible; liability necessarily hinged upon direct negligence by Nourse. In any event, if the amendment had been allowed, it would not have changed the requirement that proof would have to be made that Nourse was negligent and that by reason of derivative responsibility, the defendants also were responsible.
While it is, of course, the policy of our law to allow great liberality in the amendment of pleadings prior to trial and even during the trial itself (Posz v. Burchell, 209 Cal. App.2d 324, 333 [25 Cal.Bptr. 896]; Richter v. Adams, 43 Cal.App.2d 184 [110 P.2d 486]), the matter of permitting an amendment, in the final analysis, is within the legal discretion of the trial court (Vogel v. Thrifty Drug Co., 43 Cal.2d 184, 188-189 [272 P.2d 1]). In our viewpoint, the court ruled *297correctly when it denied the informal suggestion of amendment.
The Rulings on Proposed Instructions Were Proper.
The plaintiff requested the following instructions: “If you find that activity on the part of Standard Oil Company or Charles Nourse for which these Defendants are responsible under instructions heretofore given you was negligent and proximately contributed in some degree to the accident, then Plaintiff is entitled to recover from the Defendants, if Plaintiff itself was not contributorily negligent. ’ ’
“If you find that some activity of the Standard Oil Company, in addition to the activity of Charles Nourse, for which these defendants are liable under the instructions heretofore given you, contributed in some degree to the accident, then these defendants are not entitled to recover from cross-defendant under their cross-complaint. ’ ’
The refusal of the above proposed instructions was sound; furthermore, the second suggested instruction did not concern the appellant as it relates to a pleading between parties other than itself.
Appellant alleged in its complaint only the negligence of Mr. Nourse in operating the automobile, and alleged liability is premised on Nourse’s negligence while acting as the agent of respondents at the time of the collision; these were the issues upon which the case was tried; there is no allegation in the complaint of direct negligence on the part of Standard Oil Company, and the denial of the attempt to amend the complaint itself made these proposed instructions unacceptable. Appellant did not hint in the pleadings, in the pretrial statement, in its opening statement or at any time during the trial that respondents’ liability should rest on any independent, or concurrent, negligence of the Standard Oil Company. It would have been error to give instructions which were outside the issues. (Nicholas v. Harger-Haldeman, 196 Cal.App.2d 77, 89 [16 Cal.Rptr. 195].) Furthermore, liability of these defendants could not be affected by weighing elements of negligence as between Nourse and a nonparty, the Standard Oil Company.
The court also refused the following instruction proposed by the plaintiff: “You are instructed that the acts of Charles C. Nourse involved in this collision were performed by him while acting as the servant of the Defendants, Superior *298Oil Company, Signal Oil and Gas Company and Socony-Mobil Oil Company, and that said Defendants are responsible for the acts of Charles C. Nourse, and your verdict should be against such Defendants and in favor of the Plaintiff, if you find that the damage to Plaintiff’s train and cars was proximately caused by the negligence of Charles C. Nourse, and if you further find that the Plaintiff Atchison, Topeka & Santa Fe Railway Company, was not negligent, of [or] if negligent, its negligence was not a proximate cause of the accident. ’ ’
Appellant concedes that the accident happened after Nourse had left the site of the oil well, but argues that defendants’ liability comes within an exception to the general rule that a servant is not acting in the course of his employment when going to or coming from work, and that here the master had a particular interest in transporting the employee, because a special automobile was assigned to him in which there was a telephone through which, if the occasion arose, Nourse could receive orders; that it was Nourse’s responsibility to keep himself available for further directions, and, consequently, that he was on duty even though going home at the time (Robinson v. George, 16 Cal.2d 238, 245 [105 P.2d 914]) ; it claimed that Nourse was on a roving commission and that it was his duty to supervise the work at Greeley Field at all times; thus, it is argued that his returning home was not a deviation from his assignment (Loper v. Morrison, 23 Cal.2d 600, 606 [145 P.2d 1]), and that because the Standard Oil Company knew that Nourse would keep the car at his residence over the weekend the returning of the car to his home was within the scope of the employment. (Tidal Pipe Line Co. v. Black, 161 Okla. 136 [17 P.2d 388].) However, this was a question of fact to be determined by the jury. (Brokaw v. Black-Foxe Military Institute, 37 Cal.2d 274, 278 [231 P.2d 816].)
The Instruction on the Cross-complaint Was Properly Given.
The court instructed the jury that if defendants were held liable to plaintiff, judgment should also be granted in favor of cross-complainants against Nourse for the exact amount of the verdict against defendants: “Ladies and gentlemen of the jury, if under the evidence and in adhering to the court’s instructions you find in favor of the Plaintiff and against the Defendants, then and in that event only, I hereby instruct you and direct you to return a verdict in the *299same amount in favor of the Cross-Complainants against the Cross-Defendant. ’ ’
Appellant contends that this contingent direction of a verdict was erroneous, because the jury could have found defendants liable on the basis of “direct” negligence of the Standard Oil Company, completely apart from Nourse’s conduct, as that company had negligently ordered him to work fatiguing hours. This argument compounds the erroneous view of appellant already discussed. Defendants ’ liability, if any, had to be based on the derivative theory of agency, and a principal who has been held liable under the doctrine of respondeat superior has the right of recoupment against a negligent agent. (Continental Cas. Go. v. Phoenix Constr. Co., 46 Cal.2d 423, 428-429 [296 P.2d 801, 57 A.L.R.2d 914]; Walsh v. Hooker & Fay, 212 Cal.App.2d 450, 462 [28 Cal. Rptr. 16] ; 1 Witkin, Summary of Cal. Law (1960) Agency and Employment, § 32(e), p. 411.) This right may be enforced by a cross-complaint in the action brought by an injured third party against the principal. (Herrero v. Atkinson, 227 Cal. App.2d 69, 77 [38 Cal.Rptr. 490].)
The Court Correctly Excluded Certain Parts op the Proposed Testimony op C. L. Holman, Regional Engineer por the Santa Fe Company’s Lines.
The plaintiff called its regional safety engineer as a witness to support its contention that it was not guilty of contributory negligence. C. L. Plolman, qualified as an expert in the matter of safety appliances at grade crossings, stated that he was in charge of the Santa Fe’s crossing installations in California, and that he had had some 20 years of experience.
Mr. Holman was asked certain questions to which objections were sustained, but Mr. Holman later testified: ‘ ‘ The crossing protection that was there in 1959 is the best crossing protection that existed other than gates, automatic gates, which normally are not installed on a single track crossing.” He was also asked if “fog” is a condition considered by an engineer in prescribing safety devices for a grade crossing, and he answered, “Not in itself.” Then, counsel asked: “Is it one factor?” And the witness answered, ‘‘No, we don't consider weather conditions in our crossing protection. ’ ’
Respondents correctly contend that Mr. Holman did testify fully that in his opinion the crossing had been made as safe as *300reasonably possible. Answers to the questions to which objections were sustained would have usurped the function of the jury, which alone had the duty to determine negligence and contributory negligence. (Martindale v. City of Mountain View, 208 Cal.App.2d 109,124 [25 Cal.Rptr. 148].)
We find nothing in the record which would justify a reversal of the judgment.
The judgment is affirmed.
Stone, J., and MeMurray, J. pro tern.,* concurred.
Appellant’s petition for a hearing by the Supreme Court was denied August 24, 1966.