Skip to content

Commit

Permalink
Fixed some faulty incap module logic.
Browse files Browse the repository at this point in the history
Testing indicates this should fix #60.
  • Loading branch information
caligari87 committed Oct 11, 2018
1 parent 92309e0 commit bb0f733
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions modules/incap/incap.zsc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class UaS_Incap_Handler : Inventory {
if(owner.health <= 0) {
bleedout = UaS_Incap_Bleedout;
incap = false;
return;
}

let owner = HDPlayerPawn(owner);
Expand All @@ -39,7 +40,7 @@ class UaS_Incap_Handler : Inventory {

// Normal
case false:
bleedout = min(bleedout + 0.5, UaS_Incap_Bleedout);
bleedout = min(bleedout + 1, UaS_Incap_Bleedout);

// Activate incap shield
if(bleedout == UaS_Incap_Bleedout && owner.bBUDDHA == false) {
Expand All @@ -48,7 +49,7 @@ class UaS_Incap_Handler : Inventory {
}

// Enter incap state
if(owner.health == 1) {
if(owner.health == 1 && owner.bBUDDHA == true) {
incap = true;
incap_woundcount = owner.woundcount;
incap_burncount = owner.burncount;
Expand All @@ -69,8 +70,8 @@ class UaS_Incap_Handler : Inventory {
owner.player.CrouchFactor = clamp(owner.player.CrouchFactor, 0.5, 0.5);
owner.woundcount = clamp(owner.woundcount, 0, incap_woundcount);
owner.burncount = clamp(owner.burncount, 0, incap_burncount);
owner.unstablewoundcount = clamp(owner.unstablewoundcount, 0, incap_unstablewoundcount);
owner.oldwoundcount = clamp(owner.oldwoundcount, 0, incap_oldwoundcount);
//owner.unstablewoundcount = clamp(owner.unstablewoundcount, 0, incap_unstablewoundcount);
//owner.oldwoundcount = clamp(owner.oldwoundcount, 0, incap_oldwoundcount);
owner.aggravateddamage = clamp(owner.aggravateddamage, 0, incap_aggravateddamage);
owner.A_SelectWeapon("Ring");

Expand All @@ -88,7 +89,7 @@ class UaS_Incap_Handler : Inventory {
owner.bBUDDHA = false;
if(UaS_Debug & incap) { owner.A_Log("Revived"); }
}
else { incap_oldstimcount = owner.stimcount + 1; }
//else { incap_oldstimcount = owner.stimcount + 1; }
break;
}
}
Expand Down

0 comments on commit bb0f733

Please sign in to comment.