]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/handicap.qc
Add an option (off by default) to allow the vortex to charge even while not in hand
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / handicap.qc
index 26c90c83711640c6b1bc976a72e056c10b261589..ccb585f013db803975bb0bc12052c375db1c0d3c 100644 (file)
@@ -12,7 +12,7 @@
 
 void Handicap_Initialize(entity player)
 {
-       player.m_handicap = 1;
+       CS(player).m_handicap = 1;
 }
 
 float Handicap_GetVoluntaryHandicap(entity player)
@@ -22,7 +22,7 @@ float Handicap_GetVoluntaryHandicap(entity player)
 
 float Handicap_GetForcedHandicap(entity player)
 {
-       return player.m_handicap;
+       return (CS(player)) ? CS(player).m_handicap : 1;
 }
 
 void Handicap_SetForcedHandicap(entity player, float value)
@@ -31,7 +31,7 @@ void Handicap_SetForcedHandicap(entity player, float value)
        {
                error("Handicap_SetForcedHandicap: Invalid handicap value.");
        }
-       player.m_handicap = value;
+       CS(player).m_handicap = value;
 }
 
 float Handicap_GetTotalHandicap(entity player)