103 if (item.itemdef.instanceOfPowerup){
109 if (item.itemdef.instanceOfPowerup){
119 if (item.itemdef.instanceOfAmmo || item.itemdef.instanceOfWeaponPickup){
134 float frag_deathtype =
M_ARGV(3,
float);
147 int scoringmethod = 1;
156 bool disable_selfdamage2score;
174 if (frag_weight && damage_weight)
176 else if (frag_weight)
178 else if (damage_weight)
183 switch (scoringmethod)
191 float suicide_weight = 1 + (disable_selfdamage2score / frag_weight);
199 float roundedplayerdamagescore =
rint(playerdamagescore * 10) / 10;
205 float playerkillscore = (
killcount * 100) * upscaler * frag_weight;
208 float playerscore = roundedplayerdamagescore + playerkillscore;
211 float scoretoadd = playerscore - (
PlayerScore_Get(scorer, SP_SCORE) * 100);
221 print(sprintf(
"%f", scorer.total_damage_dealt),
" scorer.total_damage_dealt \n");
222 print(sprintf(
"%f", scorer.hitsound_damage_dealt),
" scorer.hitsound_damage_dealt \n");
223 print(sprintf(
"%f", playerdamagescore/100),
" playerdamagescore \n");
224 print(sprintf(
"%f", roundedplayerdamagescore/100),
" rounded playerdamagescore \n");
225 print(sprintf(
"%f", playerkillscore/100),
" playerkillscore \n");
226 print(sprintf(
"%f",
PlayerScore_Get(scorer, SP_KILLS)),
" PlayerScore_Get(scorer, SP_KILLS) \n");
227 print(sprintf(
"%f", playerscore/100),
" playerscore \n");
228 print(sprintf(
"%f", scoretoadd/100),
" scoretoadd \n");
229 print(sprintf(
"%f",
PlayerScore_Get(scorer, SP_SCORE)),
" PlayerScore_Get(scorer, SP_SCORE) \n \n");
239 float upscaledplayerscore = playerkillscore * upscaler;
240 float scoretoadd = upscaledplayerscore -
PlayerScore_Get(scorer, SP_SCORE);
246 print(sprintf(
"%f", playerkillscore),
" playerkillscore \n");
247 print(sprintf(
"%f",
PlayerScore_Get(scorer, SP_KILLS)),
" PlayerScore_Get(scorer, SP_KILLS) \n");
248 print(sprintf(
"%f", upscaledplayerscore),
" upscaled playerscore \n");
249 print(sprintf(
"%f", scoretoadd),
" scoretoadd \n");
250 print(sprintf(
"%f",
PlayerScore_Get(scorer, SP_SCORE)),
" PlayerScore_Get(scorer, SP_SCORE) \n \n");
260 float roundedplayerdamagescore =
rint(playerdamagescore * 10) / 10;
261 float upscaledplayerscore = roundedplayerdamagescore * upscaler;
262 float scoretoadd = upscaledplayerscore - (
PlayerScore_Get(scorer, SP_SCORE) * 100);
268 print(sprintf(
"%f", scorer.total_damage_dealt),
" scorer.total_damage_dealt \n");
269 print(sprintf(
"%f", playerdamagescore),
" playerdamagescore \n");
270 print(sprintf(
"%f", roundedplayerdamagescore),
" rounded playerdamagescore \n");
271 print(sprintf(
"%f", upscaledplayerscore),
" upscaled playerscore \n");
272 print(sprintf(
"%f", scoretoadd),
" scoretoadd \n");
273 print(sprintf(
"%f",
PlayerScore_Get(scorer, SP_SCORE)),
" PlayerScore_Get(scorer, SP_SCORE) \n \n");
290 float frag_deathtype =
M_ARGV(6,
float);
297 if (total == 0)
return;
308 frag_attacker.total_damage_dealt += total;
312 frag_attacker.total_damage_dealt -= total;
314 scorer = frag_attacker;
326 frag_deathtype == DEATH_KILL.m_id ||
327 frag_deathtype == DEATH_DROWN.m_id ||
328 frag_deathtype == DEATH_HURTTRIGGER.m_id ||
329 frag_deathtype == DEATH_CAMP.m_id ||
330 frag_deathtype == DEATH_LAVA.m_id ||
331 frag_deathtype == DEATH_SLIME.m_id ||
332 frag_deathtype == DEATH_SWAMP.m_id))
341 print(sprintf(
"%f", total),
" total dmg from PlayerDamage_SplitHealthArmor \n");
342 print(sprintf(
"%f", scorer.total_damage_dealt),
"scorer.total_damage_dealt\n");
363 it.total_damage_dealt = 0;
const int CBC_ORDER_FIRST
#define MUTATOR_HOOKFUNCTION(...)
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
const int IT_UNLIMITED_AMMO
const int IT_UNLIMITED_SUPERWEAPONS
int autocvar_g_pickup_items
float autocvar_g_spawnshield_blockdamage
#define PlayerScore_Get(player, scorefield)
Returns the player's score.
bool StatusEffects_active(StatusEffect this, entity actor)
bool autocvar_g_mayhem_powerups
float autocvar_g_mayhem_start_ammo_nails
float autocvar_g_mayhem_start_ammo_rockets
float autocvar_g_mayhem_start_ammo_fuel
float autocvar_g_mayhem_point_limit
void MayhemCalculatePlayerScore(entity scorer)
bool autocvar_g_mayhem_selfdamage
string autocvar_g_mayhem_weaponarena
float autocvar_g_mayhem_start_health
bool autocvar_g_mayhem_scoring_disable_selfdamage2score
float autocvar_g_mayhem_start_armor
bool autocvar_g_mayhem_unlimited_ammo
bool autocvar_g_mayhem_pickup_items
bool autocvar_g_mayhem_rot
float autocvar_g_mayhem_start_ammo_shells
float autocvar_g_mayhem_scoring_kill_weight
float autocvar_g_mayhem_point_leadlimit
bool autocvar_g_mayhem_pickup_items_remove_weapons_and_ammo
float autocvar_g_mayhem_start_ammo_cells
float autocvar_g_mayhem_scoring_damage_weight
bool autocvar_g_mayhem_regenerate
float autocvar_g_mayhem_scoring_upscaler
void GameRules_limit_score(int limit)
void GameRules_limit_lead(int limit)
#define GameRules_scoring_add_team(client, fld, value)
float autocvar_g_tmayhem_scoring_damage_weight
float autocvar_g_tmayhem_scoring_upscaler
float autocvar_g_tmayhem_scoring_kill_weight
bool autocvar_g_tmayhem_scoring_disable_selfdamage2score
#define FOREACH_CLIENT(cond, body)
#define IS_BOT_CLIENT(v)
want: (IS_CLIENT(v) && !IS_REAL_CLIENT(v))
float warmup_start_ammo_cells
float warmup_start_ammo_rockets
float warmup_start_ammo_shells
float warmup_start_ammo_nails
float warmup_start_health
float warmup_start_ammo_fuel
float warmup_start_armorvalue