ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/disease.C
(Generate patch)

Comparing deliantra/server/server/disease.C (file contents):
Revision 1.30 by root, Tue Aug 7 22:13:52 2007 UTC vs.
Revision 1.31 by root, Tue Aug 7 22:57:57 2007 UTC

503 503
504 float scale = 1.f + symptom->value / 100.f; 504 float scale = 1.f + symptom->value / 100.f;
505 505
506 /* now rescale all the debilities */ 506 /* now rescale all the debilities */
507 for (int i = 0; i < NUM_STATS; ++i) 507 for (int i = 0; i < NUM_STATS; ++i)
508 symptom->stats.stat (i) = clamp (scale * disease->stats.stat (i), -MAX_STAT, MAX_STAT); 508 symptom->stats.stat (i) = clamp (int (scale * disease->stats.stat (i)), -128, 127);
509 509
510 symptom->stats.dam = clamp (scale * disease->stats.dam , -1024, 1024); 510 symptom->stats.dam = clamp (scale * disease->stats.dam , -1024, 1024);
511 symptom->stats.food = clamp (scale * disease->last_eat , -1024, 1024); 511 symptom->stats.food = clamp (scale * disease->last_eat , -1024, 1024);
512 symptom->stats.maxsp = clamp (scale * disease->stats.maxsp, -1024, 1024); 512 symptom->stats.maxsp = clamp (scale * disease->stats.maxsp, -1024, 1024);
513 symptom->last_sp = clamp (scale * disease->last_sp , -1024, 1024); 513 symptom->last_sp = clamp (scale * disease->last_sp , -1024, 1024);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines