Difference between revisions of "Talk:Megaarmor"
From DoomWiki.org
Line 1: | Line 1: | ||
I've never quite looked into it, but doesn't combat armor only absorb half the damage while it is above 100%? | I've never quite looked into it, but doesn't combat armor only absorb half the damage while it is above 100%? | ||
+ | |||
+ | :It looks to me from the source code like armortype == 2 is preserved until it goes to zero. If you have seen differently during gameplay, please let us know! | ||
+ | |||
+ | if (player->armortype) | ||
+ | { | ||
+ | if (player->armortype == 1) | ||
+ | saved = damage/3; | ||
+ | else | ||
+ | saved = damage/2; | ||
+ | |||
+ | if (player->armorpoints <= saved) | ||
+ | { | ||
+ | // armor is used up | ||
+ | saved = player->armorpoints; | ||
+ | player->armortype = 0; | ||
+ | } | ||
+ | player->armorpoints -= saved; | ||
+ | damage -= saved; | ||
+ | } | ||
+ | player->health -= damage; // mirror mobj health here for Dave | ||
+ | |||
+ | :[[User:Radius|radius]] 06:11, 20 Jul 2005 (UTC) |
Revision as of 01:11, 20 July 2005
I've never quite looked into it, but doesn't combat armor only absorb half the damage while it is above 100%?
- It looks to me from the source code like armortype == 2 is preserved until it goes to zero. If you have seen differently during gameplay, please let us know!
if (player->armortype) { if (player->armortype == 1) saved = damage/3; else saved = damage/2; if (player->armorpoints <= saved) { // armor is used up saved = player->armorpoints; player->armortype = 0; } player->armorpoints -= saved; damage -= saved; } player->health -= damage; // mirror mobj health here for Dave
- radius 06:11, 20 Jul 2005 (UTC)