Skip to content

Commit

Permalink
Rescale body points if players have different armour levels, when tra…
Browse files Browse the repository at this point in the history
…nsferring units.

Fixes ticket:4554.
  • Loading branch information
Cyp committed Apr 5, 2017
1 parent 92b50b7 commit d0934ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/droid.cpp
Expand Up @@ -3087,7 +3087,7 @@ DROID *giftSingleDroid(DROID *psD, UDWORD to)
psNewDroid = reallyBuildDroid(&sTemplate, Position(psD->pos.x, psD->pos.y, 0), to, false, psD->rot);
ASSERT_OR_RETURN(NULL, psNewDroid, "Unable to build unit");
addDroid(psNewDroid, apsDroidLists);
psNewDroid->body = psD->body;
psNewDroid->body = clip((psD->body*psNewDroid->originalBody + psD->originalBody/2)/std::max(psD->originalBody, 1u), 1u, psNewDroid->originalBody);
psNewDroid->experience = psD->experience;
if (!(psNewDroid->droidType == DROID_PERSON || cyborgDroid(psNewDroid) || isTransporter(psNewDroid)))
{
Expand Down

0 comments on commit d0934ff

Please sign in to comment.