Code:
public CheckRoundState()
{
switch(GameRules_GetRoundState())
{
case RoundState_Pregame, RoundState_Preround:
{
return 0;
}
case RoundState_RoundRunning, RoundState_StartGame, RoundState_Stalemate:
{
return 1;
}
case RoundState_BetweenRounds, RoundState_GameOver, RoundState_TeamWin, RoundState_Restart, RoundState_Bonus:
{
return 2;
}
default:
{
return -1;
}
}
return -1; // for the silly return value warning
}
After messing around with CheckRoundState, the issues with hales not being able to use abilites and 1v1 crits have been fixed (though since I'm not the most familiar with the code these cases might be a little off, not tested to the extreme) . Two outstanding issues remain, the first hale check doesn't quite work as it still ends up with a hale that can't attack, and this end of round text being bugged:
Edit: It should also be noted I get this on startup:
Code:
L 11/03/2013 - 15:21:38: [SM] Native "SetEntProp" reported: Entity -1 (-1) is invalid
L 11/03/2013 - 15:21:38: [SM] Displaying call stack trace for plugin "freak_fortress_2.smx":
L 11/03/2013 - 15:21:38: [SM] [0] Line 6823, L:\...\addons\sourcemod\scripting\freak_fortress_2.sp::UpdateHealthBar()
L 11/03/2013 - 15:21:38: [SM] [1] Line 6926, L:\...\addons\sourcemod\scripting\freak_fortress_2.sp::HealthbarEnableChanged()