
162 Cal.App.3d 547 (1984)
208 Cal. Rptr. 668
MILLER E. LAFAYETTE, Plaintiff and Appellant,
v.
COUNTY OF LOS ANGELES, Defendant and Respondent.
Docket No. 69214.
Court of Appeals of California, Second District, Division Five.
December 11, 1984.
*549 COUNSEL
A. Tod Hindin for Plaintiff and Appellant.
Horvitz & Levy and Barry R. Levy for Defendant and Respondent.
OPINION
OSBORNE, J.[*]
Plaintiff appeals from a medical malpractice judgment for plaintiff in an amount less than a statutory offer. We conclude that the trial *550 court (1) did not abuse its discretion in admitting evidence that plaintiff received disability benefits during part of the time after his injury, (2) properly reduced the verdict by the amount of a legal malpractice settlement, and (3) properly denied plaintiff recovery of certain costs incurred after refusal of a settlement offer.
Miller Lafayette, plaintiff and appellant, was injured in an automobile accident in June 1974. In the course of treatment, a Hansen-Street rod was implanted in his left femur. In October 1975 the rod was removed during surgery performed at a hospital operated by the County of Los Angeles (County), defendant and respondent. In the course of the surgery, plaintiff's sciatic nerve somehow was partially severed, causing a condition known as foot drop, in which the muscles below the left knee are nonfunctioning and there is numbness and instability in the left foot and ankle. Plaintiff sued for medical malpractice. The County admitted liability for injury to plaintiff's sciatic nerve and any damages resulting therefrom. The issues at the trial were therefore the nature and extent of the injury, and the damages flowing therefrom.
Plaintiff's mental ability and employability were limited before the October 1975 surgery. There was a dispute as to (1) the effects of the injury on plaintiff's ability to work, and therefore the extent of loss of past and future earnings, (2) whether any psychological problems resulted from plaintiff's injury, and (3) the extent of pain resulting from the injury to plaintiff's sciatic nerve. This was reflected in the litigant's evaluation of the case.
Before trial, plaintiff offered to settle for $400,000 plus costs from the County. At trial, plaintiff sought damages totaling $2.34 million.
Before trial, the County offered to pay a total of $125,000 to settle. At trial, the County argued for total damages of about $71,000.
The jury returned a verdict awarding plaintiff damages of $84,000.
After verdict, upon motion by the County, the trial court reduced the verdict by $15,000 which plaintiff received as a pretrial settlement of a legal malpractice suit against his former attorney. The trial court also taxed costs incurred after plaintiff did not accept the County's offer to settle.
Plaintiff appealed. Plaintiff alleges that the judgment should be reversed because: (1) the trial court committed prejudicial error in admitting evidence in two instances; (2) the trial court erroneously reduced the verdict by the amount of his legal malpractice settlement; and (3) the trial court abused its *551 discretion in denying plaintiff recovery of certain costs incurred after refusal to accept a settlement offer.
There is no contention that there is not sufficient evidence to sustain the judgment. It is therefore not necessary to review all the evidence in the long trial. Those facts necessary to resolution of the issues will be set forth in the discussion.

EVIDENCE OF SOCIAL SECURITY BENEFITS
Before trial, plaintiff moved to exclude evidence that he had received supplemental Social Security disability benefits during part of the time after his injury. Civil Code section 3333.1 permits a medical malpractice defendant to introduce such evidence. However, the trial judge correctly recognized that section 3333.1 was not applicable to this case, because the injury occurred about two months before the effective date of the statute. The judge stated it would require a hearing to evaluate the factors necessary to exercise her discretion under the controlling cases, deferred the hearing until later in the trial, and ordered defendant not to mention the payments until after a hearing.
Late in the trial, the court held a hearing out of the presence of the jury, to consider admissibility in light of the evidence that had been presented. Defendant testified. The issues had been extensively briefed, and court and counsel discussed at length the evidence and the factors to be considered in the exercise of discretion as dictated by the controlling case, Hrnjak v. Graymar, Inc. (1971) 4 Cal.3d 725 [94 Cal. Rptr. 623, 484 P.2d 599, 47 A.L.R.3d 224].
The trial court listed and considered, among others, the following factors:
1. Plaintiff received more money net during the time he was receiving Social Security benefits than he had ever made working full time.
2. There was no danger of erroneously implying that plaintiff was malingering in the sense of claiming an injury that did not occur, or that he was falsely claiming the injury was permanent, or was building up medical special damages. Medical expenses were modest and it was agreed that there was an injury and that the injury was permanent.
3. Plaintiff failed to followup in applying for a job.
4. The benefits were not from insurance plaintiff had paid for, so there was no penalty for his own frugality and foresight.
*552 5. For some time after injury, plaintiff did not know he might be eligible for Social Security benefits.
6. Plaintiff worked for AAA Plastics in the fall of 1977, and for Alpha Manufacturing in January and February 1978. He learned about possible eligibility for Social Security benefits, applied, and has never worked since.
7. Plaintiff understood that if he made over about $1,000 per year, his benefits would be reduced or eliminated.
8. Defendant was not seeking to deduct or offset amounts received from any verdict.
9. The extent of lost past earnings as a result of the injury was a contested issue.
The court considered all the relevant factors, including the probative value and potential prejudice of the evidence, and ruled that defendant could ask plaintiff if, for a period of time, he received Social Security for his disability, and if he understood that he would not receive those benefits if he were employed.
The court instructed the jury that the evidence was to be considered only for the limited purpose of determining plaintiff's motivation to seek employment and his credibility as a witness; and that the benefits were not to be deducted from plaintiff's damages.
(1) Plaintiff contends that the court's ruling was erroneous. In Hrnjak v. Graymar, Inc., supra, 4 Cal.3d 725, 732, the California Supreme Court stated: "The potentially prejudicial impact of evidence that a personal injury plaintiff received collateral insurance payments varies little from case to case." However, the Supreme Court expressly did not hold that such evidence must therefore always be excluded. It held that because of the potential prejudice, Evidence Code section 352 requires a careful weighing of the prejudicial impact against the relevance and potential probative value of the evidence, and gave examples of relevant facts that should be examined. (Id., at pp. 732-733.) In the Hrnjak trial, no such weighing process had occurred. (Id., at p. 732.)
In the present case, the trial court did carefully go through and articulate the weighing process. She noted facts that lessened the potential prejudice in this case, and facts that supported a strong inference of motivation not to work as a result of plaintiff's receiving more money from Social Security benefits than he had from working.
*553 We cannot find, as plaintiff urges, that the trial court erred, or abused its discretion, in admitting the evidence, with the limiting instruction given to the jury.

EVIDENCE OF CHILD OUT OF WEDLOCK
At the trial, plaintiff presented expert testimony that he suffered depression as a result of the October 1975 surgical injury. The existence and cause of any depression were contested. Other possible sources of any depression were explored, including the following circumstances: a trade school plaintiff was attending closed; plaintiff was about 100 pounds overweight; he had a testicle removed as an adolescent; he failed many classes in school; his illegitimate daughter was born about two months before his October 1975 surgery; and he sustained an injury to his right hip while playing football at age 16, resulting in surgery.
(2) Plaintiff claims prejudicial error in permitting the County to cross-examine the doctor about whether fathering an illegitimate child had any effect on plaintiff's psychological condition.
The court held a hearing before permitting the cross-examination. The trial judge observed that the jury already knew plaintiff had a child and lived with his mother and his grandmother, but that nothing had been said about a wife or being married. The judge considered the likelihood that the jury had already concluded he was an unwed father, considered that any possible prejudice is much less now than in the past and that the prejudice has always been substantially greater against the mother of an illegitimate child than the father. She weighed those factors against the importance of whether that fact had contributed to his depression and the importance of examining whether the doctor considered that fact in arriving at his opinions. We cannot say the trial judge abused her discretion in ruling that the evidence was admissible.
The testimony to the jury was very brief, in a long trial, and was not argued. Even if erroneous, we cannot find any reasonable possibility of prejudice to plaintiff.

SETOFF OF THE SETTLEMENT
Plaintiff sued Joseph Rose for legal malpractice in handling plaintiff's medical malpractice claim, and later amended to also sue the County for medical malpractice and to sue Zimmer USA and K.S. Bartow Company on a product liability cause of action. The causes of action against the County, Zimmer, and Bartow were dismissed after demurrers were sustained. *554 Rose was granted a summary judgment. On appeal, plaintiff procured a reversal as to the County and Rose, and was thus able to prosecute his medical malpractice claim against the County. Before trial, plaintiff settled with Rose for $15,000. After trial, and after a verdict against the County, the County moved to reduce the verdict by the amount of the settlement, under the provisions of Code of Civil Procedure section 877.
The court held a hearing, took the motion under submission, and later granted the motion. Plaintiff claims error.
(3) Code of Civil Procedure section 877 provides as follows: "Where a release, dismissal with or without prejudice, or a covenant not to sue or not to enforce judgment is given in good faith before verdict or judgment to one or more of a number of tortfeasors claimed to be liable for the same tort 
"(a) It shall not discharge any other such tortfeasor from liability unless its terms so provide, but it shall reduce the claims against the others in the amount stipulated by the release, the dismissal or the covenant, or in the amount of the consideration paid for it whichever is the greater; and
"(b) It shall discharge the tortfeasor to whom it is given from all liability for any contribution to any other tortfeasors."
Plaintiff contends that section 877 is not applicable because the section "requires that there be `joint tortfeasors.'" Plaintiff cites Carr v. Cove (1973) 33 Cal. App.3d 851 [109 Cal. Rptr. 449]. Carr states that the purpose of this section is to prevent double recovery for the same wrong, and states that no case has been found in which the section has been applied to tortfeasors involved in separate torts. Carr states that the section prevents double recoveries in case of a single injury caused by joint tortfeasors (id., at p. 854) but it does not hold that the section only applies where there are joint tortfeasors. Carr states that the general theory of compensatory damages bars double recovery for the same wrong, and discusses several examples of cases involving overlapping liability for the same injury, though not by joint tortfeasors.
Section 877 applies where there is a settlement by "one or more of a number of tortfeasors claimed to be liable for the same tort...." Two tortfeasors can both be liable for the same tort without being joint tortfeasors in the sense of concert of action and unity of purpose urged by plaintiff. Defendant summarizes an excellent example as follows: "In Helling v. Lew (1972) 28 Cal. App.3d 434, 104 Cal. Rptr. 789, tortfeasor 1 caused injury to plaintiff who was required to seek medical care from tortfeasor 2 who *555 malpracticed the plaintiff. The plaintiff, of course would be entitled under recognized principles of proximate causation to recover against tortfeasor 1 for the damages caused by tortfeasor 2. Therefore, an offset was allowed to tortfeasor 1 for a settlement made with tortfeasor 2." Specifically, tortfeasor 1 and tortfeasor 2 were both liable for damages from the second tort  medical malpractice. To avoid double recovery, tortfeasor 1 was entitled to an offset for the settlement with tortfeasor 2.
In an ordinary legal malpractice case, the negligent attorney is liable for the damages his client was not able to recover from a prior tortfeasor. If there were no damages from the prior tort, than the client would not have been damaged and would have no right to recover from the attorney. If the client were able to recover from the prior tortfeasor, then section 877 may apply to avoid a double recovery for the same tort.
In this case, the County admitted liability for all injuries suffered by plaintiff from his surgery on October 21, 1975, and a verdict was rendered against the County for the damages resulting from that tort.
While product liability claims against two other defendants were held to be barred by the statute of limitations, plaintiff suffered no damages as a result. There was no contention or evidence presented that any injury or damage was involved in those causes of action that were not included in the cause of action and verdict against the County. Thus, those lost causes of action cannot explain any separate injury or tort which could take the settlement with Rose out of the operation of section 877.
In appellant's reply brief, plaintiff points out that plaintiff opposed the motion to reduce the verdict, before the trial court, with a declaration of plaintiff's counsel to the effect that the settlement with Rose did not include damages for the injury caused by the County, but included solely damages occasioned by the failure to timely present a late claim and the resulting distress and expenses of prosecuting the appeal. However, before the settlement, another judge had granted a summary adjudication establishing that Rose's failure to file a late claim against the County did not constitute legal malpractice. And since another judge's order dismissing the cause of action against the County was reversed on appeal, it would appear that the need for the appeal was caused by the erroneous dismissal by the trial court, and not by any legal malpractice by Rose.
For section 877 to apply, it was not necessary that Rose be liable for the same tort for which a verdict was returned against the County. The section applied if Rose was claimed to be liable for the same tort. Plaintiff clearly claimed Rose was liable for the damages resulting from the County's tort, *556 in the original complaint, through an appeal, and in continuing to prosecute the suit against Rose for damages resulting from the County's tort.
In the complaint, plaintiff prays for judgment against Rose for damages of $3 million as the worth of the medical malpractice claim which may now be barred and for damages resulting from emotional pain and suffering. In the settlement with Rose, plaintiff agreed and acknowledged that the release "extends ... to all claims asserted ... in [this] lawsuit...."
The issue was submitted to the trial judge who was well aware that the purpose of section 877 is to avoid double recovery for the same injury, and who was well aware of all the evidence in the case. She granted the County's motion to reduce the verdict against the County. That ruling implies a finding that the settlement was for the same injury to plaintiff, and that finding is amply supported by the record.

COSTS
At the request of plaintiff, before trial, the court authorized a daily transcript at plaintiff's expense, but reserved any ruling on whether the cost would be recoverable. The cost was over $20,000 for reporter and transcript fees. Plaintiff filed a total cost bill of $39,073.04 including those fees. But for the refusal of a statutory offer, plaintiff would have been entitled to recover those costs in addition to the verdict. The County moved to tax all costs incurred after plaintiff failed to accept the County's offer to settle, since the verdict was less than the offer. The County also sought reimbursement of $30,868.04 of its costs.
(4) Code of Civil Procedure section 998 provides procedures governing offers by a party to compromise claims. Subdivision (c) of that section provides: "If an offer made by a defendant is not accepted and the plaintiff fails to obtain a more favorable judgment, the plaintiff shall not recover his costs and shall pay the defendant's costs from the time of the offer. In addition, in any action or proceeding other than an eminent domain action, the court, in its discretion, may require the plaintiff to pay the defendant's costs from the date of filing of the complaint and a reasonable sum to cover costs of the services of expert witnesses, who are not regular employees of any party, actually incurred and reasonably necessary in either, or both, the preparation or trial of the case by the defendant." As related to this case, the section applies to three different categories of costs.
One category includes a defendant's costs for expert witnesses and defendant's regular court costs from the time of filing of the complaint to the time of the offer. The court, in its discretion, may require that plaintiff to *557 pay those costs. The court denied the County's motion regarding discretionary items, in consideration of the costs incurred by plaintiff that would not have been necessary if the County had admitted liability earlier. The County understandably has not appealed from that ruling.
The second category includes a defendant's regular court costs incurred after the time of the offer. The section originally provided that recovery of those costs was also discretionary, as discussed in Pomeroy v. Zion (1971) 19 Cal. App.3d 473 [96 Cal. Rptr. 822], cited by plaintiff. However, the statute has been amended to provide that the plaintiff "shall pay the defendant's costs from the time of the offer." The court did allow the County costs as mandated, of $6,294.44. Plaintiff does not contest that ruling.
The third category includes plaintiff's costs incurred after the offer. The trial court granted the County's motion to disallow recovery of those costs. The order reduced plaintiff's recoverable costs from $39,073.04 to $2,517.69. Plaintiff appeals, contending the trial court abused its discretion under Pomeroy v. Zion, supra, 19 Cal. App.3d 473. However, the statute is mandatory, not discretionary, regarding plaintiff's postoffer costs. Pomeroy discussed the discretion the section then gave the court regarding defendant's costs, but recognized that denial of plaintiff's costs was mandatory.
Finally, plaintiff cites Government Code section 69953 as authority for recovery of the costs of the daily transcript. However, section 69953 provides that the transcript costs "paid by the party to whom costs are awarded shall be taxed as costs in the case." As to the costs after the date of the offer, "the party to whom the costs are awarded" is the County, under Code of Civil Procedure section 998.
The court did not err in its rulings on costs.

CONCLUSION
We find no prejudicial error in the trial court's rulings on the admissibility of evidence. The court properly reduced the verdict by the amount received in settlement of a legal malpractice cause of action claiming an attorney was liable for the damages from the County's medical malpractice. Since the verdict against the County was less than the pretrial statutory offer by the County, the court was required to deny plaintiff costs after the offer and to require plaintiff to pay defendant's ordinary court costs after the offer.
*558 Accordingly, the judgment is affirmed.
Feinerman, P.J., and Ashby, J., concurred.
NOTES
[*]   Assigned by the Chairperson of the Judicial Council.
