| Name | Author | Game Mode | Rating | |||||
|---|---|---|---|---|---|---|---|---|
| Characters | Cranky | Mutator | N/A | |||||
namespace mixSharedVisibility
{
const int REASON_MIX_HIDE = 1;
const int REASON_CHAR_SCALE = 2;
const int REASON_CHAR_DEVAN = 4;
array<int> reasons(32, 0);
bool characterSystemHandlesHide = false;
int characterSystemHandlesHideTick = -1;
void SetReason(int playerID, int reason, bool active)
{
if(playerID < 0 || playerID >= int(reasons.length)) return;
if(active)
reasons[playerID] |= reason;
else
reasons[playerID] &= ~reason;
}
bool IsHidden(int playerID)
{
if(playerID < 0 || playerID >= int(reasons.length)) return false;
return reasons[playerID] != 0;
}
bool HasReason(int playerID, int reason)
{
if(playerID < 0 || playerID >= int(reasons.length)) return false;
return (reasons[playerID] & reason) != 0;
}
void SetCharacterSystemHandlesHide(bool active)
{
characterSystemHandlesHide = active;
characterSystemHandlesHideTick = jjGameTicks;
}
bool CharacterSystemHandlesHide()
{
return characterSystemHandlesHide && jjGameTicks <= characterSystemHandlesHideTick + 1;
}
void Apply(jjPLAYER@ play)
{
play.invisibility = IsHidden(play.playerID);
}
}
Jazz2Online © 1999-INFINITY (Site Credits). We have a Privacy Policy. Jazz Jackrabbit, Jazz Jackrabbit 2, Jazz Jackrabbit Advance and all related trademarks and media are ™ and © Epic Games. Lori Jackrabbit is © Dean Dodrill. J2O development powered by Loops of Fury and Chemical Beats.
Eat your lima beans, Johnny.