Last active
December 23, 2015 01:09
-
-
Save chrisinajar/6558718 to your computer and use it in GitHub Desktop.
Radiant and Dire bitmaps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getBitmaps() { | |
var direBitmap = 0, | |
radiBitmap = 0, | |
i, cl, hero; | |
for (i = 0; i < server.clients.length; ++i) { | |
cl = server.clients[i]; | |
if (!cl) { continue; } | |
if (cl.netprops.m_iTeamNum === dota.TEAM_DIRE) { | |
direBitmap += (1 << cl.netprops.m_iPlayerID); | |
} else if (cl.netprops.m_iTeamNum === dota.TEAM_RADIANT) { | |
radiBitmap += (1 << cl.netprops.m_iPlayerID); | |
} | |
} | |
return { | |
radiant: radiBitmap, | |
dire: direBitmap | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment