#include "scores.qh"
-#include "_all.qh"
#include "command/common.qh"
-#include "mutators/mutators_include.qh"
+#include "mutators/all.qh"
#include "../common/playerstats.qh"
#include "../common/teams.qh"
* teamscore entities
*/
-float TeamScore_SendEntity(entity to, float sendflags)
+bool TeamScore_SendEntity(entity this, entity to, float sendflags)
{
float i, p, longflags;
}
}
-float ScoreInfo_SendEntity(entity to, int sf)
+bool ScoreInfo_SendEntity(entity this, entity to, int sf)
{
float i;
WriteByte(MSG_ENTITY, ENT_CLIENT_SCORES_INFO);
* per-player score entities
*/
-float PlayerScore_SendEntity(entity to, float sendflags)
+bool PlayerScore_SendEntity(entity this, entity to, float sendflags)
{
float i, p, longflags;
float PlayerScore_Add(entity player, float scorefield, float score)
{
- entity s;
+ bool mutator_returnvalue = MUTATOR_CALLHOOK(AddPlayerScore, scorefield, score);
+ score = ret_float;
if(gameover)
- if(!(g_lms && scorefield == SP_LMS_RANK)) // allow writing to this field in intermission as it is needed for newly joining players
+ if(!mutator_returnvalue)
score = 0;
if(!scores_initialized) return 0; // FIXME remove this when everything uses this system
- s = player.scorekeeper;
+ entity s = player.scorekeeper;
if(!s)
{
if(gameover)
s = strcat(s, ":human");
else
s = strcat(s, ":bot");
- if(!IS_PLAYER(p) && p.caplayer != 1 && !g_lms)
+ if(!IS_PLAYER(p) && !MUTATOR_CALLHOOK(GetPlayerStatus, p, s))
s = strcat(s, ":spectator");
+ s = strcat(s, ret_string);
}
else
{
- if(IS_PLAYER(p) || p.caplayer == 1 || g_lms)
+ if(IS_PLAYER(p) || MUTATOR_CALLHOOK(GetPlayerStatus, p, s))
s = GetPlayerScoreString(p, 2);
else
s = "-666";
+ s = strcat(s, ret_string);
}
if(p.clientstatus)