Heya,
Theres a bug in the Combat Refils section of SSGM (This also seems to effect Reborns CombatRefil plugin too) whereby when you refil, it takes a few seconds for your health to go back to its previous position. If you get damaged during this "1 second window" then the refil stays. So if your against someone with a tib auto rifle or something and you still have the tiberium poisoning on you, you have sucessfully refil.
Ive also included a freshly compiled SSGM with this change for those interested in this fix
Change:
//This script is attached to all players if combat refills are disabled.
void MDB_SSGM_Block_Refill::Created(GameObject *obj) {
currhealth = Commands->Get_Health(obj);
currshield = Commands->Get_Shield_Strength(obj);
Commands->Start_Timer(obj,this,0.5f,1);
LastDamage = The_Game()->GameDuration_Seconds;
}
void MDB_SSGM_Block_Refill::Damaged(GameObject *obj, GameObject *damager, float damage) {
currhealth = Commands->Get_Health(obj);
currshield = Commands->Get_Shield_Strength(obj);
if (damage > 0.0) LastDamage = The_Game()->GameDuration_Seconds;
}
void MDB_SSGM_Block_Refill::Timer_Expired(GameObject *obj, int number) {
if (Commands->Get_Health(obj) > currhealth || Commands->Get_Shield_Strength(obj) > currshield) {
if (Get_Int_Parameter("All") == 1) {
Commands->Set_Health(obj,currhealth);
Commands->Set_Shield_Strength(obj,currshield);
}
else if (Get_Int_Parameter("All") == 0 && (The_Game()->GameDuration_Seconds - LastDamage) <= Settings->RefillTime) {
Commands->Set_Health(obj,currhealth);
Commands->Set_Shield_Strength(obj,currshield);
}
}
Commands->Start_Timer(obj,this,0.5f,1);
}
To:
//This script is attached to all players if combat refills are disabled.
void MDB_SSGM_Block_Refill::Created(GameObject *obj) {
currhealth = Commands->Get_Health(obj);
currshield = Commands->Get_Shield_Strength(obj);
Commands->Start_Timer(obj,this,0.01f,1);
LastDamage = The_Game()->GameDuration_Seconds;
}
void MDB_SSGM_Block_Refill::Damaged(GameObject *obj, GameObject *damager, float damage) {
currhealth = Commands->Get_Health(obj);
currshield = Commands->Get_Shield_Strength(obj);
if (damage > 0.0) LastDamage = The_Game()->GameDuration_Seconds;
}
void MDB_SSGM_Block_Refill::Timer_Expired(GameObject *obj, int number) {
if (Commands->Get_Health(obj) > currhealth || Commands->Get_Shield_Strength(obj) > currshield) {
if (Get_Int_Parameter("All") == 1) {
Commands->Set_Health(obj,currhealth);
Commands->Set_Shield_Strength(obj,currshield);
}
else if (Get_Int_Parameter("All") == 0 && (The_Game()->GameDuration_Seconds - LastDamage) <= Settings->RefillTime) {
Commands->Set_Health(obj,currhealth);
Commands->Set_Shield_Strength(obj,currshield);
}
}
Commands->Start_Timer(obj,this,0.01f,1);
}
I know this is a very very small change but hopefully it should help some people out
[Updated on: Sun, 02 August 2009 16:53]
Report message to a moderator