]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Added Entity_GetTeamIndex.
authorLyberta <lyberta@lyberta.net>
Fri, 9 Mar 2018 15:16:53 +0000 (18:16 +0300)
committerLyberta <lyberta@lyberta.net>
Fri, 9 Mar 2018 15:16:53 +0000 (18:16 +0300)
qcsrc/server/teamplay.qc
qcsrc/server/teamplay.qh

index 8cb78d72d96fb5b3f973df7b803c3e94269554b3..ff3abf755a64d0fede8d8134505ceda85e701184 100644 (file)
@@ -226,6 +226,11 @@ void setcolor(entity this, int clr)
 #endif
 }
 
+int Entity_GetTeamIndex(entity this)
+{
+       return Team_TeamToIndex(this.team);
+}
+
 void SetPlayerColors(entity player, float _color)
 {
        float pants = _color & 0x0F;
index e589a176f139890b69610505eaa87641b97d03e9..6ac1df288b3e490eb9659f8ae475f467d1f83ad9 100644 (file)
@@ -40,6 +40,11 @@ string getwelcomemessage(entity this);
 
 void setcolor(entity this, int clr);
 
+/// \brief Returns the team index of the entity.
+/// \param[in] this Entity to check.
+/// \return Team index of the entity.
+int Entity_GetTeamIndex(entity this);
+
 void SetPlayerColors(entity player, float _color);
 
 /// \brief Kills player as a result of team change.