Fix radiation bugs
This commit is contained in:
parent
cac96bfc13
commit
330edde003
|
@ -568,6 +568,13 @@ void _process_rads(Object* obj, int radiationLevel, bool isHealing)
|
|||
if (obj == gDude) {
|
||||
// Radiation level message, higher is worse.
|
||||
messageListItem.num = 1000 + radiationLevelIndex;
|
||||
|
||||
// SFALL: Fix radiation message when removing radiation effects.
|
||||
if (isHealing) {
|
||||
// You feel better.
|
||||
messageListItem.num = 3003;
|
||||
}
|
||||
|
||||
if (messageListGetItem(&gMiscMessageList, &messageListItem)) {
|
||||
displayMonitorAddMessage(messageListItem.text);
|
||||
}
|
||||
|
@ -579,6 +586,8 @@ void _process_rads(Object* obj, int radiationLevel, bool isHealing)
|
|||
critterSetBonusStat(obj, gRadiationEffectStats[effect], value);
|
||||
}
|
||||
|
||||
// SFALL: Prevent death when removing radiation effects.
|
||||
if (!isHealing) {
|
||||
if ((obj->data.critter.combat.results & DAM_DEAD) == 0) {
|
||||
// Loop thru effects affecting primary stats. If any of the primary stat
|
||||
// dropped below minimal value, kill it.
|
||||
|
@ -591,6 +600,7 @@ void _process_rads(Object* obj, int radiationLevel, bool isHealing)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((obj->data.critter.combat.results & DAM_DEAD) != 0) {
|
||||
if (obj == gDude) {
|
||||
|
|
Loading…
Reference in New Issue