set g_freezetag_revive_speed 0.4 "Speed for reviving a frozen teammate"
set g_freezetag_revive_clearspeed 1.6 "Speed at which reviving progress gets lost when out of range"
set g_freezetag_revive_extra_size 100 "Distance in qu that you can stand from a frozen teammate to keep reviving him"
-set g_freezetag_round_timelimit 180
+ set g_freezetag_revive_falldamage 0 "Enable reviving from this amount of fall damage"
+ set g_freezetag_revive_falldamage_health 40 "Amount of health player has if they revived from falling"
+set g_freezetag_round_timelimit 180 "round time limit in seconds"
set g_freezetag_frozen_force 0.6 "How much to multiply the force on a frozen player with"
set g_freezetag_frozen_maxtime 60 "frozen players will be automatically unfrozen after this time in seconds"
seta g_freezetag_teams_override 0
MUTATOR_HOOKFUNCTION(ca_SetStartItems)
{
- start_items &~= IT_UNLIMITED_AMMO;
- start_health = cvar("g_lms_start_health");
- start_armorvalue = cvar("g_lms_start_armor");
-
- start_ammo_shells = cvar("g_lms_start_ammo_shells");
- start_ammo_nails = cvar("g_lms_start_ammo_nails");
- start_ammo_rockets = cvar("g_lms_start_ammo_rockets");
- start_ammo_cells = cvar("g_lms_start_ammo_cells");
- start_ammo_fuel = cvar("g_lms_start_ammo_fuel");
-
+ start_items &= ~IT_UNLIMITED_AMMO;
+ start_health = warmup_start_health = cvar("g_lms_start_health");
+ start_armorvalue = warmup_start_armorvalue = cvar("g_lms_start_armor");
+ start_ammo_shells = warmup_start_ammo_shells = cvar("g_lms_start_ammo_shells");
+ start_ammo_nails = warmup_start_ammo_nails = cvar("g_lms_start_ammo_nails");
+ start_ammo_rockets = warmup_start_ammo_rockets = cvar("g_lms_start_ammo_rockets");
+ start_ammo_cells = warmup_start_ammo_cells = cvar("g_lms_start_ammo_cells");
+ start_ammo_fuel = warmup_start_ammo_fuel = cvar("g_lms_start_ammo_fuel");
return 0;
}
-// scoreboard setup
-void ca_ScoreRules()
-{
- ScoreRules_basics(2, SFL_SORT_PRIO_PRIMARY, 0, TRUE);
- ScoreInfo_SetLabel_TeamScore (ST_CA_ROUNDS, "rounds", SFL_SORT_PRIO_PRIMARY);
- ScoreRules_basics_end();
-}
-
-void ca_DelayedInit() // Do this check with a delay so we can wait for teams to be set up.
-{
- ca_ScoreRules();
-}
-
+ MUTATOR_HOOKFUNCTION(ca_PlayerDamage)
+ {
+ if(IS_PLAYER(frag_target))
+ if(frag_target.deadflag == DEAD_NO)
+ if(frag_target == frag_attacker || SAME_TEAM(frag_target, frag_attacker) || frag_deathtype == DEATH_FALL)
+ frag_damage = 0;
+
+ frag_mirrordamage = 0;
+
+ return FALSE;
+ }
+
+ MUTATOR_HOOKFUNCTION(ca_FilterItem)
+ {
+ if(autocvar_g_powerups <= 0)
+ if(self.flags & FL_POWERUP)
+ return TRUE;
+
+ if(autocvar_g_pickup_items <= 0)
+ return TRUE;
+
+ return FALSE;
+ }
+
+ MUTATOR_HOOKFUNCTION(ca_PlayerDamage_SplitHealthArmor)
+ {
+ float excess = max(0, frag_damage - damage_take - damage_save);
+
+ if(frag_target != frag_attacker && IS_PLAYER(frag_attacker))
+ PlayerTeamScore_Add(frag_attacker, SP_SCORE, ST_SCORE, (frag_damage - excess) * autocvar_g_ca_damage2score_multiplier);
+
+ return FALSE;
+ }
+
void ca_Initialize()
{
allowed_to_spawn = TRUE;
MUTATOR_HOOKFUNCTION(lms_SetStartItems)
{
- start_items &~= IT_UNLIMITED_AMMO;
+ start_items &= ~IT_UNLIMITED_AMMO;
- start_ammo_shells = cvar("g_lms_start_ammo_shells");
- start_ammo_nails = cvar("g_lms_start_ammo_nails");
- start_ammo_rockets = cvar("g_lms_start_ammo_rockets");
- start_ammo_cells = cvar("g_lms_start_ammo_cells");
- start_ammo_fuel = cvar("g_lms_start_ammo_fuel");
- start_health = cvar("g_lms_start_health");
- start_armorvalue = cvar("g_lms_start_armor");
+ start_health = warmup_start_health = cvar("g_lms_start_health");
+ start_armorvalue = warmup_start_armorvalue = cvar("g_lms_start_armor");
+ start_ammo_shells = warmup_start_ammo_shells = cvar("g_lms_start_ammo_shells");
+ start_ammo_nails = warmup_start_ammo_nails = cvar("g_lms_start_ammo_nails");
+ start_ammo_rockets = warmup_start_ammo_rockets = cvar("g_lms_start_ammo_rockets");
+ start_ammo_cells = warmup_start_ammo_cells = cvar("g_lms_start_ammo_cells");
+ start_ammo_fuel = warmup_start_ammo_fuel = cvar("g_lms_start_ammo_fuel");
return FALSE;
}