#include "bleeding_config"

void main()
{
    object oPC = GetLastPlayerDying();
    object oModule = GetModule();

    // Let the module know somebody is not alive
    SetLocalInt(oModule, "EverybodyAlive", FALSE);

    // How bad is it?
    if (GetCurrentHitPoints(oPC) == 0)
    {
        // Just disabled
        // See if they want to wait for help
        SetLocalInt(oPC, "PlayerHealth", PC_HEALTH_DISABLED);
        PopUpDeathGUIPanel(oPC, bAllowRespawnWhenDisabled, bAllowWaitForHelpWhenDisabled, 0, sDisabledGUIMessage);
    }
    else
    {
        // Flag them as dying.  We make them bleed in the module's OnHeartbeat script
        SetLocalInt(oPC, "PlayerHealth", PC_HEALTH_DYING);
        // time to start bleeding 1 hp per round
        //effect eDamage = EffectHitPointChangeWhenDying(-1.0);
        //ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oPC);
    }
}

