Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
sv_lms.qc File Reference
Include dependency graph for sv_lms.qc:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void ClearWinners ()
bool lms_AddPlayer (entity player)
void lms_Initialize ()
int LMS_NewPlayerLives ()
void lms_RemovePlayer (entity player)
void lms_replace_with_extralife (entity this)
void lms_UpdateLeaders ()
bool lms_waypointsprite_visible_for_player (entity this, entity player, entity view)
 MUTATOR_HOOKFUNCTION (lms, AddPlayerScore)
 MUTATOR_HOOKFUNCTION (lms, Bot_FixCount, CBC_ORDER_EXCLUSIVE)
 MUTATOR_HOOKFUNCTION (lms, CalculateRespawnTime)
 MUTATOR_HOOKFUNCTION (lms, CheckRules_World)
 MUTATOR_HOOKFUNCTION (lms, ClientCommand_Spectate)
 MUTATOR_HOOKFUNCTION (lms, ClientConnect)
 MUTATOR_HOOKFUNCTION (lms, ClientDisconnect)
 MUTATOR_HOOKFUNCTION (lms, Damage_Calculate)
 MUTATOR_HOOKFUNCTION (lms, FilterItem)
 MUTATOR_HOOKFUNCTION (lms, FilterItemDefinition)
 MUTATOR_HOOKFUNCTION (lms, ForbidPlayerScore_Clear)
 MUTATOR_HOOKFUNCTION (lms, ForbidSpawn)
 MUTATOR_HOOKFUNCTION (lms, ForbidThrowCurrentWeapon)
 MUTATOR_HOOKFUNCTION (lms, GiveFragsForKill)
 MUTATOR_HOOKFUNCTION (lms, ItemTouch)
 MUTATOR_HOOKFUNCTION (lms, MakePlayerObserver)
 MUTATOR_HOOKFUNCTION (lms, PlayerDied)
 MUTATOR_HOOKFUNCTION (lms, PlayerPowerups)
 MUTATOR_HOOKFUNCTION (lms, PlayerPreThink)
 MUTATOR_HOOKFUNCTION (lms, PlayerRegen)
 MUTATOR_HOOKFUNCTION (lms, PlayerSpawn)
 MUTATOR_HOOKFUNCTION (lms, PutClientInServer)
 MUTATOR_HOOKFUNCTION (lms, ReadLevelCvars)
 MUTATOR_HOOKFUNCTION (lms, reset_map_global)
 MUTATOR_HOOKFUNCTION (lms, reset_map_players)
 MUTATOR_HOOKFUNCTION (lms, SetStartItems)
 MUTATOR_HOOKFUNCTION (lms, SetWeaponArena)
 MUTATOR_HOOKFUNCTION (lms, SV_StartFrame)
int WinningCondition_LMS ()

Variables

float autocvar_g_lms_dynamic_respawn_delay = 1
float autocvar_g_lms_dynamic_respawn_delay_base = 2
float autocvar_g_lms_dynamic_respawn_delay_increase = 3
float autocvar_g_lms_dynamic_respawn_delay_max = 20
bool autocvar_g_lms_dynamic_vampire = 1
float autocvar_g_lms_dynamic_vampire_factor_base = 0.1
float autocvar_g_lms_dynamic_vampire_factor_increase = 0.1
float autocvar_g_lms_dynamic_vampire_factor_max = 0.5
int autocvar_g_lms_dynamic_vampire_min_lives_diff = 2
int autocvar_g_lms_extra_lives
float autocvar_g_lms_forfeit_min_match_time
bool autocvar_g_lms_items
bool autocvar_g_lms_join_anytime
int autocvar_g_lms_last_join
int autocvar_g_lms_leader_lives_diff = 2
float autocvar_g_lms_leader_minpercent = 0.5
float autocvar_g_lms_leader_wp_interval = 25
float autocvar_g_lms_leader_wp_interval_jitter = 10
float autocvar_g_lms_leader_wp_time = 5
bool autocvar_g_lms_regenerate
bool autocvar_g_lms_rot
float last_forfeiter_armorvalue
float last_forfeiter_health
int last_forfeiter_lives
float lms_leader
int lms_leaders
int lms_leaders_lives_diff
bool lms_visible_leaders = true
bool lms_visible_leaders_prev
float lms_visible_leaders_time

Function Documentation

◆ ClearWinners()

void ClearWinners ( )

Definition at line 1534 of file world.qc.

1535{
1536 FOREACH_CLIENT(IS_PLAYER(it) || INGAME(it), { it.winning = 0; });
1537}
#define IS_PLAYER(s)
Definition player.qh:243
#define INGAME(it)
Definition sv_rules.qh:24
#define FOREACH_CLIENT(cond, body)
Definition utils.qh:50

Referenced by CheckRules_World(), WinningCondition_LMS(), WinningCondition_RanOutOfSpawns(), and WinningCondition_Scores().

◆ lms_AddPlayer()

bool lms_AddPlayer ( entity player)

Definition at line 254 of file sv_lms.qc.

255{
256 if (!INGAME(player))
257 {
258 int lives = GameRules_scoring_add(player, LMS_LIVES, LMS_NewPlayerLives());
259 if(lives <= 0)
260 return false;
261 if (time < game_starttime)
263 else
264 INGAME_STATUS_SET(player, INGAME_STATUS_JOINING); // this is just to delay setting health and armor that can't be done here
265 }
267 {
268 player.lms_spectate = false;
269 GameRules_scoring_add(player, LMS_RANK, -GameRules_scoring_add(player, LMS_RANK, 0));
270 int lives = GameRules_scoring_add(player, LMS_LIVES, 0);
271 if(lives <= 0)
272 GameRules_scoring_add(player, LMS_LIVES, LMS_NewPlayerLives());
273 }
274 else
275 {
276 if(GameRules_scoring_add(player, LMS_LIVES, 0) <= 0)
277 {
278 Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_LMS_NOLIVES);
279 return false;
280 }
281 }
282 return true;
283}
bool warmup_stage
Definition main.qh:120
float game_starttime
Definition stats.qh:82
float time
void Send_Notification(NOTIF broadcast, entity client, MSG net_type, Notification net_name,...count)
Definition all.qc:1573
int LMS_NewPlayerLives()
Definition sv_lms.qc:38
#define INGAME_STATUS_JOINED
Definition sv_rules.qh:17
#define INGAME_STATUS_JOINING
Definition sv_rules.qh:16
#define GameRules_scoring_add(client, fld, value)
Definition sv_rules.qh:85
#define INGAME_STATUS_SET(it, s)
Definition sv_rules.qh:21

References entity(), game_starttime, GameRules_scoring_add, INGAME, INGAME_STATUS_JOINED, INGAME_STATUS_JOINING, INGAME_STATUS_SET, LMS_NewPlayerLives(), Send_Notification(), time, and warmup_stage.

Referenced by MUTATOR_HOOKFUNCTION(), and MUTATOR_HOOKFUNCTION().

◆ lms_Initialize()

void lms_Initialize ( )

Definition at line 738 of file sv_lms.qc.

739{
740 lms_lowest_lives = 999;
741}
int lms_lowest_lives
Definition sv_lms.qh:35

References lms_lowest_lives.

Referenced by REGISTER_MUTATOR().

◆ LMS_NewPlayerLives()

int LMS_NewPlayerLives ( )

Definition at line 38 of file sv_lms.qc.

39{
40 int fl = floor(autocvar_fraglimit);
41 if(fl == 0 || fl > 999)
42 fl = 999;
43
44 // first player has left the game for dying too much? Nobody else can get in.
45 if(lms_lowest_lives < 1)
46 return 0;
47
50 return 0;
51
52 return bound(1, lms_lowest_lives, fl);
53}
#define autocvar_fraglimit
Definition stats.qh:90
float bound(float min, float value, float max)
float floor(float f)
float max(float f,...)
int autocvar_g_lms_last_join
Definition sv_lms.qc:12
bool autocvar_g_lms_join_anytime
Definition sv_lms.qc:11

References autocvar_fraglimit, autocvar_g_lms_join_anytime, autocvar_g_lms_last_join, bound(), floor(), lms_lowest_lives, and max().

Referenced by lms_AddPlayer(), and WinningCondition_LMS().

◆ lms_RemovePlayer()

void lms_RemovePlayer ( entity player)

Definition at line 341 of file sv_lms.qc.

342{
344 return;
345
346 float player_rank = GameRules_scoring_add(player, LMS_RANK, 0);
347 if (!player_rank)
348 {
349 if (!player.lms_spectate)
350 {
351 player.frags = FRAGS_PLAYER_OUT_OF_GAME;
352 int pl_cnt = 0;
353 FOREACH_CLIENT(IS_PLAYER(it) && it.frags == FRAGS_PLAYER, {
354 pl_cnt++;
355 });
356 GameRules_scoring_add(player, LMS_RANK, pl_cnt + 1);
357 }
358 else if (INGAME(player))
359 {
360 FOREACH_CLIENT(it != player, {
361 // update rank of other players
362 if (it.frags == FRAGS_PLAYER_OUT_OF_GAME)
363 GameRules_scoring_add(it, LMS_RANK, -1);
364 });
365 int rank = GameRules_scoring_add(player, LMS_RANK, 0);
366 GameRules_scoring_add(player, LMS_RANK, -rank);
367 if(!warmup_stage)
368 {
369 int pl_lives = GameRules_scoring_add(player, LMS_LIVES, 0);
370 float pl_health = IS_DEAD(player) ? start_health : GetResource(player, RES_HEALTH);
371 float pl_armor = IS_DEAD(player) ? start_armorvalue : GetResource(player, RES_ARMOR);
373 {
374 last_forfeiter_lives = pl_lives;
375 last_forfeiter_health = pl_health;
376 last_forfeiter_armorvalue = pl_armor;
377 }
378 else if (pl_lives == last_forfeiter_lives)
379 {
380 // these values actually can belong to a different forfeiter
383 }
384 GameRules_scoring_add(player, LMS_LIVES, -pl_lives);
385 }
386 player.frags = FRAGS_SPECTATOR;
387 TRANSMUTE(Observer, player);
388 INGAME_STATUS_CLEAR(player);
389 player.lms_spectate = false;
390 CS(player).killcount = FRAGS_SPECTATOR;
391 }
394 }
395
396 if (CS(player).killcount != FRAGS_SPECTATOR)
397 {
398 if (GameRules_scoring_add(player, LMS_RANK, 0) > 0)
399 Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_LMS_NOLIVES, player.netname);
400 }
401}
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
#define IS_DEAD(s)
Definition player.qh:245
const int FRAGS_PLAYER_OUT_OF_GAME
Definition constants.qh:5
const int FRAGS_PLAYER
Definition constants.qh:3
const int FRAGS_SPECTATOR
Definition constants.qh:4
RES_ARMOR
Definition ent_cs.qc:130
float min(float f,...)
#define TRANSMUTE(cname, this,...)
Definition oo.qh:136
#define NULL
Definition post.qh:14
int killcount
Definition client.qh:315
ClientState CS(Client this)
Definition state.qh:47
int autocvar_g_lms_leader_lives_diff
Definition sv_lms.qc:15
void lms_UpdateLeaders()
Definition sv_lms.qc:171
float last_forfeiter_health
Definition sv_lms.qc:296
int last_forfeiter_lives
Definition sv_lms.qc:295
float last_forfeiter_armorvalue
Definition sv_lms.qc:297
#define INGAME_STATUS_CLEAR(it)
Definition sv_rules.qh:22
float start_armorvalue
Definition world.qh:97
float start_health
Definition world.qh:96

References autocvar_g_lms_leader_lives_diff, CS(), entity(), FOREACH_CLIENT, FRAGS_PLAYER, FRAGS_PLAYER_OUT_OF_GAME, FRAGS_SPECTATOR, game_starttime, GameRules_scoring_add, GetResource(), INGAME, INGAME_STATUS_CLEAR, IS_DEAD, IS_PLAYER, killcount, last_forfeiter_armorvalue, last_forfeiter_health, last_forfeiter_lives, lms_UpdateLeaders(), min(), NULL, RES_ARMOR, Send_Notification(), start_armorvalue, start_health, time, TRANSMUTE, and warmup_stage.

Referenced by MUTATOR_HOOKFUNCTION(), and MUTATOR_HOOKFUNCTION().

◆ lms_replace_with_extralife()

void lms_replace_with_extralife ( entity this)

Definition at line 659 of file sv_lms.qc.

660{
661 entity e = new(item_extralife);
662 Item_CopyFields(this, e);
663
664 StartItem(e, ITEM_ExtraLife);
665}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
void Item_CopyFields(entity this, entity to)
Definition items.qc:850
void StartItem(entity this, entity def)
Definition items.qc:1004

References entity(), Item_CopyFields(), and StartItem().

Referenced by MUTATOR_HOOKFUNCTION().

◆ lms_UpdateLeaders()

void lms_UpdateLeaders ( )

Definition at line 171 of file sv_lms.qc.

172{
173 int max_lives = 0;
174 int pl_cnt = 0;
176 int lives = GameRules_scoring_add(it, LMS_LIVES, 0);
177 if (lives > max_lives)
178 max_lives = lives;
179 pl_cnt++;
180 });
181
182 int second_max_lives = 0;
183 int pl_cnt_with_max_lives = 0;
185 int lives = GameRules_scoring_add(it, LMS_LIVES, 0);
186 if (lives == max_lives)
187 pl_cnt_with_max_lives++;
188 else if (lives > second_max_lives)
189 second_max_lives = lives;
190 });
191
192 lms_leaders_lives_diff = max_lives - second_max_lives;
193
194 int lives_diff = autocvar_g_lms_leader_lives_diff;
195 if (lms_leaders_lives_diff >= lives_diff && pl_cnt_with_max_lives <= pl_cnt * autocvar_g_lms_leader_minpercent)
197 int lives = GameRules_scoring_add(it, LMS_LIVES, 0);
198 if (lives == max_lives)
199 {
200 if (!it.lms_leader)
201 it.lms_leader = true;
202 }
203 else
204 {
205 it.lms_leader = false;
206 }
207 });
208 else
210 if (it.waypointsprite_attachedforcarrier)
211 WaypointSprite_Kill(it.waypointsprite_attachedforcarrier);
212 it.lms_leader = false;
213 });
214}
float autocvar_g_lms_leader_minpercent
Definition sv_lms.qc:16
int lms_leaders_lives_diff
Definition sv_lms.qc:170

References autocvar_g_lms_leader_lives_diff, autocvar_g_lms_leader_minpercent, FOREACH_CLIENT, FRAGS_PLAYER_OUT_OF_GAME, IS_PLAYER, and lms_leaders_lives_diff.

Referenced by lms_RemovePlayer(), and MUTATOR_HOOKFUNCTION().

◆ lms_waypointsprite_visible_for_player()

bool lms_waypointsprite_visible_for_player ( entity this,
entity player,
entity view )

Definition at line 158 of file sv_lms.qc.

159{
160 if(view.lms_leader)
161 if(IS_SPEC(player))
162 return false; // we don't want spectators of leaders to see the attached waypoint on the top of their screen
163
165 return false;
166
167 return true;
168}
bool lms_visible_leaders
Definition sv_lms.qc:33
#define IS_SPEC(v)
Definition utils.qh:10

References entity(), IS_SPEC, and lms_visible_leaders.

Referenced by MUTATOR_HOOKFUNCTION().

◆ MUTATOR_HOOKFUNCTION() [1/28]

MUTATOR_HOOKFUNCTION ( lms ,
AddPlayerScore  )

Definition at line 731 of file sv_lms.qc.

732{
733 if(game_stopped)
734 if(M_ARGV(0, entity) == SP_LMS_RANK) // score field
735 return true; // allow writing to this field in intermission as it is needed for newly joining players
736}
#define M_ARGV(x, type)
Definition events.qh:17
float game_stopped
Definition stats.qh:81

References entity(), game_stopped, and M_ARGV.

◆ MUTATOR_HOOKFUNCTION() [2/28]

MUTATOR_HOOKFUNCTION ( lms ,
Bot_FixCount ,
CBC_ORDER_EXCLUSIVE  )

Definition at line 699 of file sv_lms.qc.

700{
702 if (INGAME(it))
703 ++M_ARGV(0, int); // activerealplayers
704 ++M_ARGV(1, int); // realplayers
705 });
706
707 return true;
708}
#define IS_REAL_CLIENT(v)
Definition utils.qh:17

References CBC_ORDER_EXCLUSIVE, FOREACH_CLIENT, INGAME, IS_REAL_CLIENT, and M_ARGV.

◆ MUTATOR_HOOKFUNCTION() [3/28]

MUTATOR_HOOKFUNCTION ( lms ,
CalculateRespawnTime  )

Definition at line 565 of file sv_lms.qc.

566{
567 entity player = M_ARGV(0, entity);
568 player.respawn_flags |= RESPAWN_FORCE;
569
570 int pl_lives = GameRules_scoring_add(player, LMS_LIVES, 0);
571 if (pl_lives <= 0)
572 {
573 player.respawn_flags = RESPAWN_SILENT;
574 // prevent unwanted sudden rejoin as spectator and movement of spectator camera
575 player.respawn_time = time + 2;
576 return true;
577 }
578
580 return false;
581
582 int max_lives = 0;
583 int pl_cnt = 0;
584 FOREACH_CLIENT(it != player && IS_PLAYER(it) && it.frags != FRAGS_PLAYER_OUT_OF_GAME, {
585 int lives = GameRules_scoring_add(it, LMS_LIVES, 0);
586 if (lives > max_lives)
587 max_lives = lives;
588 pl_cnt++;
589 });
590
591 // min delay with only 2 players
592 if (pl_cnt == 1) // player wasn't counted
593 max_lives = 0;
594
596 autocvar_g_lms_dynamic_respawn_delay_increase * max(0, max_lives - pl_lives);
597 player.respawn_time = time + min(autocvar_g_lms_dynamic_respawn_delay_max, dlay);
598 return true;
599}
const int RESPAWN_SILENT
Definition client.qh:327
const int RESPAWN_FORCE
Definition client.qh:326
float autocvar_g_lms_dynamic_respawn_delay_increase
Definition sv_lms.qc:22
float autocvar_g_lms_dynamic_respawn_delay_base
Definition sv_lms.qc:21
float autocvar_g_lms_dynamic_respawn_delay_max
Definition sv_lms.qc:23
float autocvar_g_lms_dynamic_respawn_delay
Definition sv_lms.qc:20

References autocvar_g_lms_dynamic_respawn_delay, autocvar_g_lms_dynamic_respawn_delay_base, autocvar_g_lms_dynamic_respawn_delay_increase, autocvar_g_lms_dynamic_respawn_delay_max, entity(), FOREACH_CLIENT, FRAGS_PLAYER_OUT_OF_GAME, GameRules_scoring_add, IS_PLAYER, M_ARGV, max(), min(), RESPAWN_FORCE, RESPAWN_SILENT, and time.

◆ MUTATOR_HOOKFUNCTION() [4/28]

MUTATOR_HOOKFUNCTION ( lms ,
CheckRules_World  )

Definition at line 719 of file sv_lms.qc.

720{
721 M_ARGV(0, float) = WinningCondition_LMS();
722 return true;
723}
int WinningCondition_LMS()
Definition sv_lms.qc:60

References CheckRules_World(), M_ARGV, and WinningCondition_LMS().

◆ MUTATOR_HOOKFUNCTION() [5/28]

MUTATOR_HOOKFUNCTION ( lms ,
ClientCommand_Spectate  )

Definition at line 710 of file sv_lms.qc.

711{
712 entity player = M_ARGV(0, entity);
713 if(player.frags != FRAGS_SPECTATOR && player.frags != FRAGS_PLAYER_OUT_OF_GAME)
715 // ranked players (out of game) can no longer become real spectators
716 return MUT_SPECCMD_RETURN;
717}
@ MUT_SPECCMD_RETURN
Definition events.qh:1005
@ MUT_SPECCMD_CONTINUE
Definition events.qh:1004

References entity(), FRAGS_PLAYER_OUT_OF_GAME, FRAGS_SPECTATOR, M_ARGV, MUT_SPECCMD_CONTINUE, and MUT_SPECCMD_RETURN.

◆ MUTATOR_HOOKFUNCTION() [6/28]

MUTATOR_HOOKFUNCTION ( lms ,
ClientConnect  )

Definition at line 438 of file sv_lms.qc.

439{
440 entity player = M_ARGV(0, entity);
441 player.frags = FRAGS_SPECTATOR;
442}

References ClientConnect, entity(), FRAGS_SPECTATOR, and M_ARGV.

◆ MUTATOR_HOOKFUNCTION() [7/28]

MUTATOR_HOOKFUNCTION ( lms ,
ClientDisconnect  )

Definition at line 403 of file sv_lms.qc.

404{
405 entity player = M_ARGV(0, entity);
406
407 player.lms_spectate = true;
408
409 lms_RemovePlayer(player);
410 INGAME_STATUS_CLEAR(player);
411}
void lms_RemovePlayer(entity player)
Definition sv_lms.qc:341

References ClientDisconnect, entity(), INGAME_STATUS_CLEAR, lms_RemovePlayer(), and M_ARGV.

◆ MUTATOR_HOOKFUNCTION() [8/28]

MUTATOR_HOOKFUNCTION ( lms ,
Damage_Calculate  )

Definition at line 530 of file sv_lms.qc.

531{
533 return;
534
535 entity frag_attacker = M_ARGV(1, entity);
537 float frag_damage = M_ARGV(4, float);
538
539 if (IS_PLAYER(frag_attacker) && !IS_DEAD(frag_attacker)
540 && IS_PLAYER(frag_target) && !IS_DEAD(frag_target) && frag_attacker != frag_target)
541 {
542 float vampire_factor = 0;
543
544 int frag_attacker_lives = GameRules_scoring_add(frag_attacker, LMS_LIVES, 0);
545 int frag_target_lives = GameRules_scoring_add(frag_target, LMS_LIVES, 0);
546 int diff = frag_target_lives - frag_attacker_lives - autocvar_g_lms_dynamic_vampire_min_lives_diff;
547
548 if (diff >= 0)
550 if (vampire_factor > 0)
551 {
552 vampire_factor = min(vampire_factor, autocvar_g_lms_dynamic_vampire_factor_max);
553 SetResourceExplicit(frag_attacker, RES_HEALTH,
554 min(GetResource(frag_attacker, RES_HEALTH) + frag_damage * vampire_factor, start_health));
555 }
556 }
557}
bool SetResourceExplicit(entity e, Resource res_type, float amount)
Sets the resource amount of an entity without calling any hooks.
float frag_damage
Definition sv_ctf.qc:2322
entity frag_target
Definition sv_ctf.qc:2321
float autocvar_g_lms_dynamic_vampire_factor_base
Definition sv_lms.qc:25
float autocvar_g_lms_dynamic_vampire_factor_increase
Definition sv_lms.qc:26
bool autocvar_g_lms_dynamic_vampire
Definition sv_lms.qc:24
float autocvar_g_lms_dynamic_vampire_factor_max
Definition sv_lms.qc:27
int autocvar_g_lms_dynamic_vampire_min_lives_diff
Definition sv_lms.qc:28

References autocvar_g_lms_dynamic_vampire, autocvar_g_lms_dynamic_vampire_factor_base, autocvar_g_lms_dynamic_vampire_factor_increase, autocvar_g_lms_dynamic_vampire_factor_max, autocvar_g_lms_dynamic_vampire_min_lives_diff, entity(), frag_damage, frag_target, GameRules_scoring_add, GetResource(), IS_DEAD, IS_PLAYER, M_ARGV, min(), SetResourceExplicit(), and start_health.

◆ MUTATOR_HOOKFUNCTION() [9/28]

MUTATOR_HOOKFUNCTION ( lms ,
FilterItem  )

Definition at line 667 of file sv_lms.qc.

668{
669 entity item = M_ARGV(0, entity);
670 entity def = item.itemdef;
671 if(def == ITEM_HealthMega && !(autocvar_g_lms_items || autocvar_g_pickup_items > 0))
672 {
675 return true;
676 }
677
678 return false;
679}
int autocvar_g_pickup_items
Definition items.qh:10
void lms_replace_with_extralife(entity this)
Definition sv_lms.qc:659
bool autocvar_g_lms_items
Definition sv_lms.qc:13
int autocvar_g_lms_extra_lives
Definition sv_lms.qc:9
int autocvar_g_powerups
Definition sv_powerups.qh:7

References autocvar_g_lms_extra_lives, autocvar_g_lms_items, autocvar_g_pickup_items, autocvar_g_powerups, entity(), lms_replace_with_extralife(), and M_ARGV.

◆ MUTATOR_HOOKFUNCTION() [10/28]

MUTATOR_HOOKFUNCTION ( lms ,
FilterItemDefinition  )

Definition at line 647 of file sv_lms.qc.

648{
650 return false;
651
652 entity def = M_ARGV(0, entity);
653 if (autocvar_g_powerups && autocvar_g_lms_extra_lives && (def == ITEM_ExtraLife || def == ITEM_HealthMega))
654 return false;
655
656 return true;
657}

References autocvar_g_lms_extra_lives, autocvar_g_lms_items, autocvar_g_pickup_items, autocvar_g_powerups, entity(), and M_ARGV.

◆ MUTATOR_HOOKFUNCTION() [11/28]

MUTATOR_HOOKFUNCTION ( lms ,
ForbidPlayerScore_Clear  )

Definition at line 641 of file sv_lms.qc.

642{
643 // don't clear player score
644 return true;
645}

◆ MUTATOR_HOOKFUNCTION() [12/28]

MUTATOR_HOOKFUNCTION ( lms ,
ForbidSpawn  )

Definition at line 331 of file sv_lms.qc.

332{
333 entity player = M_ARGV(0, entity);
334
335 if (warmup_stage || lms_AddPlayer(player))
336 return false;
337
338 return true;
339}
bool lms_AddPlayer(entity player)
Definition sv_lms.qc:254

References entity(), lms_AddPlayer(), M_ARGV, and warmup_stage.

◆ MUTATOR_HOOKFUNCTION() [13/28]

MUTATOR_HOOKFUNCTION ( lms ,
ForbidThrowCurrentWeapon  )

Definition at line 524 of file sv_lms.qc.

525{
526 // forbode!
527 return true;
528}

◆ MUTATOR_HOOKFUNCTION() [14/28]

MUTATOR_HOOKFUNCTION ( lms ,
GiveFragsForKill  )

Definition at line 601 of file sv_lms.qc.

602{
604
606 {
607 // remove a life
608 int tl = GameRules_scoring_add(frag_target, LMS_LIVES, -1);
609 if(tl < lms_lowest_lives)
610 lms_lowest_lives = tl;
611 if(tl <= 0)
612 {
613 int pl_cnt = 0;
614 FOREACH_CLIENT(IS_PLAYER(it) && it.frags == FRAGS_PLAYER, {
615 pl_cnt++;
616 });
618 GameRules_scoring_add(frag_target, LMS_RANK, pl_cnt);
619 }
620 }
621 M_ARGV(2, float) = 0; // frag score
622
623 return true;
624}

References entity(), FOREACH_CLIENT, frag_target, FRAGS_PLAYER, FRAGS_PLAYER_OUT_OF_GAME, game_starttime, GameRules_scoring_add, IS_PLAYER, lms_lowest_lives, M_ARGV, time, and warmup_stage.

◆ MUTATOR_HOOKFUNCTION() [15/28]

MUTATOR_HOOKFUNCTION ( lms ,
ItemTouch  )

Definition at line 681 of file sv_lms.qc.

682{
683 if(MUTATOR_RETURNVALUE) return false;
684
685 entity item = M_ARGV(0, entity);
687
688 if(item.itemdef == ITEM_ExtraLife)
689 {
690 Send_Notification(NOTIF_ONE, toucher, MSG_CENTER, CENTER_EXTRALIVES, autocvar_g_lms_extra_lives);
692 Inventory_pickupitem(item.itemdef, toucher);
694 }
695
697}
#define MUTATOR_RETURNVALUE
Definition base.qh:328
void Inventory_pickupitem(Pickup this, entity player)
Definition inventory.qh:161
entity entity toucher
Definition self.qh:72
@ MUT_ITEMTOUCH_PICKUP
Definition events.qh:736
@ MUT_ITEMTOUCH_CONTINUE
Definition events.qh:734

References autocvar_g_lms_extra_lives, entity(), GameRules_scoring_add, Inventory_pickupitem(), M_ARGV, MUT_ITEMTOUCH_CONTINUE, MUT_ITEMTOUCH_PICKUP, MUTATOR_RETURNVALUE, Send_Notification(), and toucher.

◆ MUTATOR_HOOKFUNCTION() [16/28]

MUTATOR_HOOKFUNCTION ( lms ,
MakePlayerObserver  )

Definition at line 413 of file sv_lms.qc.

414{
415 entity player = M_ARGV(0, entity);
416 bool is_forced = M_ARGV(1, bool);
417
418 if (!IS_PLAYER(player))
419 return true;
420
422 {
423 GameRules_scoring_add(player, LMS_LIVES, -GameRules_scoring_add(player, LMS_LIVES, 0));
424 player.frags = FRAGS_SPECTATOR;
425 TRANSMUTE(Observer, player);
426 INGAME_STATUS_CLEAR(player);
427 }
428 else
429 {
430 if (is_forced || player.killindicator_teamchange == -2) // player is forced or wants to spectate
431 player.lms_spectate = true;
432 if (!GameRules_scoring_add(player, LMS_RANK, 0))
433 lms_RemovePlayer(player);
434 }
435 return true; // prevent team reset
436}

References entity(), FRAGS_SPECTATOR, game_starttime, GameRules_scoring_add, INGAME_STATUS_CLEAR, IS_PLAYER, lms_RemovePlayer(), M_ARGV, time, TRANSMUTE, and warmup_stage.

◆ MUTATOR_HOOKFUNCTION() [17/28]

MUTATOR_HOOKFUNCTION ( lms ,
PlayerDied  )

◆ MUTATOR_HOOKFUNCTION() [18/28]

MUTATOR_HOOKFUNCTION ( lms ,
PlayerPowerups  )

Definition at line 515 of file sv_lms.qc.

516{
517 entity player = M_ARGV(0, entity);
518 if (player.waypointsprite_attachedforcarrier)
519 player.effects |= (EF_ADDITIVE | EF_FULLBRIGHT);
520 else
521 player.effects &= ~(EF_ADDITIVE | EF_FULLBRIGHT);
522}
const float EF_ADDITIVE
const float EF_FULLBRIGHT

References EF_ADDITIVE, EF_FULLBRIGHT, entity(), and M_ARGV.

◆ MUTATOR_HOOKFUNCTION() [19/28]

MUTATOR_HOOKFUNCTION ( lms ,
PlayerPreThink  )

Definition at line 444 of file sv_lms.qc.

445{
446 entity player = M_ARGV(0, entity);
447
448 // recycled REDALIVE and BLUEALIVE to avoid adding a dedicated stat
449 STAT(REDALIVE, player) = lms_leaders;
450 STAT(BLUEALIVE, player) = lms_leaders_lives_diff;
451
452 if(player.deadflag == DEAD_DYING)
453 player.deadflag = DEAD_RESPAWNING;
454}
#define STAT(...)
Definition stats.qh:82
float DEAD_DYING
Definition progsdefs.qc:275
float DEAD_RESPAWNING
Definition progsdefs.qc:278
int lms_leaders
Definition sv_lms.qc:31

References DEAD_DYING, DEAD_RESPAWNING, entity(), lms_leaders, lms_leaders_lives_diff, M_ARGV, PlayerPreThink, and STAT.

◆ MUTATOR_HOOKFUNCTION() [20/28]

MUTATOR_HOOKFUNCTION ( lms ,
PlayerRegen  )

Definition at line 506 of file sv_lms.qc.

507{
509 M_ARGV(2, float) = 0;
511 M_ARGV(3, float) = 0;
513}
bool autocvar_g_lms_rot
Definition sv_lms.qc:35
bool autocvar_g_lms_regenerate
Definition sv_lms.qc:14

References autocvar_g_lms_regenerate, autocvar_g_lms_rot, and M_ARGV.

◆ MUTATOR_HOOKFUNCTION() [21/28]

MUTATOR_HOOKFUNCTION ( lms ,
PlayerSpawn  )

Definition at line 298 of file sv_lms.qc.

299{
300 entity player = M_ARGV(0, entity);
301
303 return true;
304
305 if (INGAME_JOINING(player))
306 {
307 // spawn player with the same amount of health / armor
308 // as the least healthy player with the least number of lives
309 int pl_lives = GameRules_scoring_add(player, LMS_LIVES, 0);
310 float min_health = start_health;
311 float min_armorvalue = start_armorvalue;
312 if (last_forfeiter_lives == pl_lives)
313 {
314 min_health = last_forfeiter_health;
315 min_armorvalue = last_forfeiter_armorvalue;
316 }
317 FOREACH_CLIENT(it != player && IS_PLAYER(it) && !IS_DEAD(it) && GameRules_scoring_add(it, LMS_LIVES, 0) == pl_lives, {
318 if (GetResource(it, RES_HEALTH) < min_health)
319 min_health = GetResource(it, RES_HEALTH);
320 if (GetResource(it, RES_ARMOR) < min_armorvalue)
321 min_armorvalue = GetResource(it, RES_ARMOR);
322 });
323 if (min_health != start_health)
324 SetResource(player, RES_HEALTH, max(1, min_health));
325 if (min_armorvalue != start_armorvalue)
326 SetResource(player, RES_ARMOR, min_armorvalue);
328 }
329}
void SetResource(entity e, Resource res_type, float amount)
Sets the current amount of resource the given entity will have.
#define INGAME_JOINING(it)
Definition sv_rules.qh:26

References entity(), FOREACH_CLIENT, game_starttime, GameRules_scoring_add, GetResource(), INGAME_JOINING, INGAME_STATUS_JOINED, INGAME_STATUS_SET, IS_DEAD, IS_PLAYER, last_forfeiter_armorvalue, last_forfeiter_health, last_forfeiter_lives, M_ARGV, max(), RES_ARMOR, SetResource(), start_armorvalue, start_health, time, and warmup_stage.

◆ MUTATOR_HOOKFUNCTION() [22/28]

MUTATOR_HOOKFUNCTION ( lms ,
PutClientInServer  )

Definition at line 285 of file sv_lms.qc.

286{
287 entity player = M_ARGV(0, entity);
288 if (!warmup_stage && (IS_BOT_CLIENT(player) || CS(player).jointime != time))
289 {
290 if (GameRules_scoring_add(player, LMS_RANK, 0) || !lms_AddPlayer(player))
291 TRANSMUTE(Observer, player);
292 }
293}
float jointime
Definition client.qh:66
#define IS_BOT_CLIENT(v)
want: (IS_CLIENT(v) && !IS_REAL_CLIENT(v))
Definition utils.qh:15

References CS(), entity(), GameRules_scoring_add, IS_BOT_CLIENT, jointime, lms_AddPlayer(), M_ARGV, PutClientInServer, time, TRANSMUTE, and warmup_stage.

◆ MUTATOR_HOOKFUNCTION() [23/28]

MUTATOR_HOOKFUNCTION ( lms ,
ReadLevelCvars  )

Definition at line 247 of file sv_lms.qc.

248{
249 // incompatible
251}
bool sv_ready_restart_after_countdown
Definition world.qh:116

References sv_ready_restart_after_countdown.

◆ MUTATOR_HOOKFUNCTION() [24/28]

MUTATOR_HOOKFUNCTION ( lms ,
reset_map_global  )

Definition at line 217 of file sv_lms.qc.

218{
219 lms_lowest_lives = 999;
220}

References lms_lowest_lives.

◆ MUTATOR_HOOKFUNCTION() [25/28]

MUTATOR_HOOKFUNCTION ( lms ,
reset_map_players  )

Definition at line 222 of file sv_lms.qc.

223{
224 FOREACH_CLIENT(true, {
225 if (it.frags == FRAGS_PLAYER_OUT_OF_GAME)
226 it.frags = FRAGS_PLAYER;
227
228 CS(it).killcount = 0;
230 it.lms_spectate = false;
231 GameRules_scoring_add(it, LMS_RANK, -GameRules_scoring_add(it, LMS_RANK, 0));
232 GameRules_scoring_add(it, LMS_LIVES, -GameRules_scoring_add(it, LMS_LIVES, 0));
233
234 if (it.frags != FRAGS_PLAYER)
235 continue;
236
237 TRANSMUTE(Player, it);
239 it.lms_leader = false;
240 if (it.waypointsprite_attachedforcarrier)
241 WaypointSprite_Kill(it.waypointsprite_attachedforcarrier);
242 });
243}
#define PutClientInServer
Definition _all.inc:246
void WaypointSprite_Kill(entity wp)

References CS(), FOREACH_CLIENT, FRAGS_PLAYER, FRAGS_PLAYER_OUT_OF_GAME, GameRules_scoring_add, INGAME_STATUS_CLEAR, PutClientInServer, TRANSMUTE, and WaypointSprite_Kill().

◆ MUTATOR_HOOKFUNCTION() [26/28]

MUTATOR_HOOKFUNCTION ( lms ,
SetStartItems  )

Definition at line 626 of file sv_lms.qc.

627{
629 if(!cvar("g_use_ammunition"))
631
632 start_health = warmup_start_health = cvar("g_lms_start_health");
633 start_armorvalue = warmup_start_armorvalue = cvar("g_lms_start_armor");
634 start_ammo_shells = warmup_start_ammo_shells = cvar("g_lms_start_ammo_shells");
635 start_ammo_nails = warmup_start_ammo_nails = cvar("g_lms_start_ammo_nails");
636 start_ammo_rockets = warmup_start_ammo_rockets = cvar("g_lms_start_ammo_rockets");
637 start_ammo_cells = warmup_start_ammo_cells = cvar("g_lms_start_ammo_cells");
638 start_ammo_fuel = warmup_start_ammo_fuel = cvar("g_lms_start_ammo_fuel");
639}
const int IT_UNLIMITED_AMMO
Definition item.qh:23
const int IT_UNLIMITED_SUPERWEAPONS
Definition item.qh:24
float cvar(string name)
float warmup_start_ammo_cells
Definition world.qh:105
float start_ammo_shells
Definition world.qh:84
float warmup_start_ammo_rockets
Definition world.qh:104
float warmup_start_ammo_shells
Definition world.qh:102
float start_ammo_fuel
Definition world.qh:88
int start_items
Definition world.qh:83
float warmup_start_ammo_nails
Definition world.qh:103
float start_ammo_cells
Definition world.qh:87
float warmup_start_health
Definition world.qh:107
float start_ammo_rockets
Definition world.qh:86
float warmup_start_ammo_fuel
Definition world.qh:106
float warmup_start_armorvalue
Definition world.qh:108
float start_ammo_nails
Definition world.qh:85

References cvar(), IT_UNLIMITED_AMMO, IT_UNLIMITED_SUPERWEAPONS, start_ammo_cells, start_ammo_fuel, start_ammo_nails, start_ammo_rockets, start_ammo_shells, start_armorvalue, start_health, start_items, warmup_start_ammo_cells, warmup_start_ammo_fuel, warmup_start_ammo_nails, warmup_start_ammo_rockets, warmup_start_ammo_shells, warmup_start_armorvalue, and warmup_start_health.

◆ MUTATOR_HOOKFUNCTION() [27/28]

MUTATOR_HOOKFUNCTION ( lms ,
SetWeaponArena  )

Definition at line 725 of file sv_lms.qc.

726{
727 if(M_ARGV(0, string) == "0" || M_ARGV(0, string) == "")
729}
string autocvar_g_lms_weaponarena
Definition sv_lms.qh:11

References autocvar_g_lms_weaponarena, and M_ARGV.

◆ MUTATOR_HOOKFUNCTION() [28/28]

MUTATOR_HOOKFUNCTION ( lms ,
SV_StartFrame  )

Definition at line 456 of file sv_lms.qc.

457{
459 return;
460
461 lms_leaders = 0;
462 FOREACH_CLIENT(true, {
463 if (IS_PLAYER(it) && it.frags != FRAGS_PLAYER_OUT_OF_GAME && it.lms_leader)
464 lms_leaders++;
465 });
466
467 float leader_time = autocvar_g_lms_leader_wp_time;
468 float leader_interval = leader_time + autocvar_g_lms_leader_wp_interval;
473
474 FOREACH_CLIENT(true, {
475 STAT(OBJECTIVE_STATUS, it) = lms_visible_leaders;
476 if (IS_PLAYER(it) && it.frags != FRAGS_PLAYER_OUT_OF_GAME)
477 {
478 if (it.lms_leader)
479 {
480 if (!it.waypointsprite_attachedforcarrier)
481 {
482 WaypointSprite_AttachCarrier(WP_LmsLeader, it, RADARICON_FLAGCARRIER);
483 it.waypointsprite_attachedforcarrier.waypointsprite_visible_for_player = lms_waypointsprite_visible_for_player;
484 WaypointSprite_UpdateRule(it.waypointsprite_attachedforcarrier, 0, SPRITERULE_DEFAULT);
485 vector pl_color = colormapPaletteColor(it.clientcolors & 0x0F, false);
486 WaypointSprite_UpdateTeamRadar(it.waypointsprite_attachedforcarrier, RADARICON_FLAGCARRIER, pl_color);
487 WaypointSprite_Ping(it.waypointsprite_attachedforcarrier);
488 }
490 Send_Notification(NOTIF_ONE, it, MSG_CENTER, CENTER_LMS_VISIBLE_LEADER);
491 }
492 else // if (!it.lms_leader)
493 {
494 if (IS_PLAYER(it) && it.frags != FRAGS_PLAYER_OUT_OF_GAME)
495 {
497 Send_Notification(NOTIF_ONE, it, MSG_CENTER, CENTER_LMS_VISIBLE_OTHER);
498 }
499 if (it.waypointsprite_attachedforcarrier)
500 WaypointSprite_Kill(it.waypointsprite_attachedforcarrier);
501 }
502 }
503 });
504}
#define colormapPaletteColor(c, isPants)
Definition color.qh:5
bool intermission_running
float random(void)
vector
Definition self.qh:92
bool lms_visible_leaders_prev
Definition sv_lms.qc:34
float lms_visible_leaders_time
Definition sv_lms.qc:32
float autocvar_g_lms_leader_wp_interval_jitter
Definition sv_lms.qc:18
float autocvar_g_lms_leader_wp_time
Definition sv_lms.qc:19
float autocvar_g_lms_leader_wp_interval
Definition sv_lms.qc:17
bool lms_waypointsprite_visible_for_player(entity this, entity player, entity view)
Definition sv_lms.qc:158
void WaypointSprite_UpdateTeamRadar(entity e, entity icon, vector col)
void WaypointSprite_Ping(entity e)
entity WaypointSprite_AttachCarrier(entity spr, entity carrier, entity icon)
void WaypointSprite_UpdateRule(entity e, float t, float r)
const int SPRITERULE_DEFAULT

References autocvar_g_lms_leader_wp_interval, autocvar_g_lms_leader_wp_interval_jitter, autocvar_g_lms_leader_wp_time, colormapPaletteColor, FOREACH_CLIENT, FRAGS_PLAYER_OUT_OF_GAME, intermission_running, IS_PLAYER, IS_REAL_CLIENT, lms_leaders, lms_visible_leaders, lms_visible_leaders_prev, lms_visible_leaders_time, lms_waypointsprite_visible_for_player(), random(), Send_Notification(), SPRITERULE_DEFAULT, STAT, time, vector, WaypointSprite_AttachCarrier(), WaypointSprite_Kill(), WaypointSprite_Ping(), WaypointSprite_UpdateRule(), and WaypointSprite_UpdateTeamRadar().

◆ WinningCondition_LMS()

int WinningCondition_LMS ( )

Definition at line 60 of file sv_lms.qc.

61{
63 return WINNING_NO;
64
65 entity first_player = NULL;
66 int totalplayers = 0;
67 int totalplayed = 0;
68 FOREACH_CLIENT(true, {
69 if (IS_PLAYER(it) && it.frags == FRAGS_PLAYER)
70 {
71 if (!totalplayers)
72 first_player = it;
73 ++totalplayers;
74 }
75 else if (GameRules_scoring_add(it, LMS_RANK, 0))
76 ++totalplayed;
77 });
78
79 if (totalplayers)
80 {
81 if (totalplayers > 1)
82 {
83 // two or more active players - continue with the game
84
86 {
88 float pl_lives = GameRules_scoring_add(it, LMS_LIVES, 0);
89 if (!pl_lives)
90 return WINNING_YES; // human player lost, game over
91 break;
92 });
93 }
94 }
95 else
96 {
97 // exactly one player?
98
100
101 if (LMS_NewPlayerLives())
102 {
103 if (totalplayed && game_starttime > 0 && time > game_starttime + autocvar_g_lms_forfeit_min_match_time) // give players time to join
104 {
105 GameRules_scoring_add(first_player, LMS_RANK, 1);
106 first_player.winning = 1;
107 return WINNING_YES;
108 }
109 // game still running (that is, nobody got removed from the game by a frag yet)? then continue
110 return WINNING_NO;
111 }
112 else
113 {
114 // a winner!
115 // and assign them their first place
116 GameRules_scoring_add(first_player, LMS_RANK, 1);
117 first_player.winning = 1;
118 return WINNING_YES;
119 }
120 }
121 }
122 else
123 {
124 // nobody is playing at all...
125 if (LMS_NewPlayerLives())
126 {
127 if (totalplayed && game_starttime > 0 && time > game_starttime + autocvar_g_lms_forfeit_min_match_time) // give players time to join
128 {
129 ClearWinners();
130 return WINNING_YES;
131 }
132 // wait for players...
133 }
134 else
135 {
136 // SNAFU (maybe a draw game?)
137 ClearWinners();
138 LOG_TRACE("No players, ending game.");
139 return WINNING_YES;
140 }
141 }
142
143 // When we get here, we have at least two players who are actually LIVING,
144 // now check if the top two players have equal score.
146
147 ClearWinners();
149 WinningConditionHelper_winner.winning = true;
151 return WINNING_NEVER;
152
153 // Top two have different scores? Way to go for our beloved TIMELIMIT!
154 return WINNING_NO;
155}
#define LOG_TRACE(...)
Definition log.qh:76
bool autocvar_g_campaign
Definition menu.qc:747
void WinningConditionHelper(entity this)
Sets the following results for the current scores entities.
Definition scores.qc:443
bool campaign_bots_may_start
campaign mode: bots shall spawn but wait for the player to spawn before they do anything in other gam...
Definition campaign.qh:26
float WinningConditionHelper_secondscore
second highest score
Definition scores.qh:108
entity WinningConditionHelper_winner
the winning player, or NULL if none
Definition scores.qh:112
float WinningConditionHelper_topscore
highest score
Definition scores.qh:107
void ClearWinners()
Definition world.qc:1534
float autocvar_g_lms_forfeit_min_match_time
Definition sv_lms.qc:10
const int WINNING_NEVER
Definition world.qh:134
const int WINNING_NO
Definition world.qh:132
const int WINNING_YES
Definition world.qh:133

References autocvar_g_campaign, autocvar_g_lms_forfeit_min_match_time, campaign_bots_may_start, ClearWinners(), entity(), FOREACH_CLIENT, FRAGS_PLAYER, game_starttime, GameRules_scoring_add, IS_PLAYER, IS_REAL_CLIENT, LMS_NewPlayerLives(), LOG_TRACE, NULL, time, warmup_stage, WINNING_NEVER, WINNING_NO, WINNING_YES, WinningConditionHelper(), WinningConditionHelper_secondscore, WinningConditionHelper_topscore, and WinningConditionHelper_winner.

Referenced by MUTATOR_HOOKFUNCTION().

Variable Documentation

◆ autocvar_g_lms_dynamic_respawn_delay

float autocvar_g_lms_dynamic_respawn_delay = 1

Definition at line 20 of file sv_lms.qc.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_lms_dynamic_respawn_delay_base

float autocvar_g_lms_dynamic_respawn_delay_base = 2

Definition at line 21 of file sv_lms.qc.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_lms_dynamic_respawn_delay_increase

float autocvar_g_lms_dynamic_respawn_delay_increase = 3

Definition at line 22 of file sv_lms.qc.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_lms_dynamic_respawn_delay_max

float autocvar_g_lms_dynamic_respawn_delay_max = 20

Definition at line 23 of file sv_lms.qc.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_lms_dynamic_vampire

bool autocvar_g_lms_dynamic_vampire = 1

Definition at line 24 of file sv_lms.qc.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_lms_dynamic_vampire_factor_base

float autocvar_g_lms_dynamic_vampire_factor_base = 0.1

Definition at line 25 of file sv_lms.qc.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_lms_dynamic_vampire_factor_increase

float autocvar_g_lms_dynamic_vampire_factor_increase = 0.1

Definition at line 26 of file sv_lms.qc.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_lms_dynamic_vampire_factor_max

float autocvar_g_lms_dynamic_vampire_factor_max = 0.5

Definition at line 27 of file sv_lms.qc.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_lms_dynamic_vampire_min_lives_diff

int autocvar_g_lms_dynamic_vampire_min_lives_diff = 2

Definition at line 28 of file sv_lms.qc.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_lms_extra_lives

int autocvar_g_lms_extra_lives

Definition at line 9 of file sv_lms.qc.

Referenced by MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), and MUTATOR_HOOKFUNCTION().

◆ autocvar_g_lms_forfeit_min_match_time

float autocvar_g_lms_forfeit_min_match_time

Definition at line 10 of file sv_lms.qc.

Referenced by WinningCondition_LMS().

◆ autocvar_g_lms_items

bool autocvar_g_lms_items

Definition at line 13 of file sv_lms.qc.

Referenced by MUTATOR_HOOKFUNCTION(), and MUTATOR_HOOKFUNCTION().

◆ autocvar_g_lms_join_anytime

bool autocvar_g_lms_join_anytime

Definition at line 11 of file sv_lms.qc.

Referenced by LMS_NewPlayerLives().

◆ autocvar_g_lms_last_join

int autocvar_g_lms_last_join

Definition at line 12 of file sv_lms.qc.

Referenced by LMS_NewPlayerLives().

◆ autocvar_g_lms_leader_lives_diff

int autocvar_g_lms_leader_lives_diff = 2

Definition at line 15 of file sv_lms.qc.

Referenced by lms_RemovePlayer(), lms_UpdateLeaders(), and MUTATOR_HOOKFUNCTION().

◆ autocvar_g_lms_leader_minpercent

float autocvar_g_lms_leader_minpercent = 0.5

Definition at line 16 of file sv_lms.qc.

Referenced by lms_UpdateLeaders().

◆ autocvar_g_lms_leader_wp_interval

float autocvar_g_lms_leader_wp_interval = 25

Definition at line 17 of file sv_lms.qc.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_lms_leader_wp_interval_jitter

float autocvar_g_lms_leader_wp_interval_jitter = 10

Definition at line 18 of file sv_lms.qc.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_lms_leader_wp_time

float autocvar_g_lms_leader_wp_time = 5

Definition at line 19 of file sv_lms.qc.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_lms_regenerate

bool autocvar_g_lms_regenerate

Definition at line 14 of file sv_lms.qc.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_lms_rot

bool autocvar_g_lms_rot

Definition at line 35 of file sv_lms.qc.

Referenced by MUTATOR_HOOKFUNCTION().

◆ last_forfeiter_armorvalue

float last_forfeiter_armorvalue

Definition at line 297 of file sv_lms.qc.

Referenced by lms_RemovePlayer(), and MUTATOR_HOOKFUNCTION().

◆ last_forfeiter_health

float last_forfeiter_health

Definition at line 296 of file sv_lms.qc.

Referenced by lms_RemovePlayer(), and MUTATOR_HOOKFUNCTION().

◆ last_forfeiter_lives

int last_forfeiter_lives

Definition at line 295 of file sv_lms.qc.

Referenced by lms_RemovePlayer(), and MUTATOR_HOOKFUNCTION().

◆ lms_leader

float lms_leader

Definition at line 30 of file sv_lms.qc.

◆ lms_leaders

int lms_leaders

Definition at line 31 of file sv_lms.qc.

Referenced by MUTATOR_HOOKFUNCTION(), and MUTATOR_HOOKFUNCTION().

◆ lms_leaders_lives_diff

int lms_leaders_lives_diff

Definition at line 170 of file sv_lms.qc.

Referenced by lms_UpdateLeaders(), and MUTATOR_HOOKFUNCTION().

◆ lms_visible_leaders

bool lms_visible_leaders = true

Definition at line 33 of file sv_lms.qc.

Referenced by lms_waypointsprite_visible_for_player(), and MUTATOR_HOOKFUNCTION().

◆ lms_visible_leaders_prev

bool lms_visible_leaders_prev

Definition at line 34 of file sv_lms.qc.

Referenced by MUTATOR_HOOKFUNCTION().

◆ lms_visible_leaders_time

float lms_visible_leaders_time

Definition at line 32 of file sv_lms.qc.

Referenced by MUTATOR_HOOKFUNCTION().