set g_freezetag_revive_auto_progress 1 "start the automatic reviving progress as soon as the player gets frozen"
set g_freezetag_revive_auto_reducible 1 "reduce auto-revival time when frozen players are hit by enemies; set to -1 to reduce it even when they are hit by teammates"
set g_freezetag_revive_auto_reducible_forcefactor 0.025 "hit force to time reduction conversion factor"
+set g_freezetag_revive_auto_reducible_maxforce 400 "max force considered at once"
set g_freezetag_revive_spawnshield 1 "apply spawnshield for this time in seconds after the player has been revived"
set g_freezetag_frozen_maxtime 60 "frozen players will be automatically unfrozen after this time in seconds"
set g_freezetag_teams_override 0
&& frag_target.freezetag_frozen_timeout > time)
{
if (fabs(autocvar_g_freezetag_revive_auto_reducible) == 1)
- t = vlen(frag_force) * autocvar_g_freezetag_revive_auto_reducible_forcefactor;
+ {
+ float maxforce = autocvar_g_freezetag_revive_auto_reducible_maxforce;
+ t = vlen(frag_force);
+ // limit hit force considered at once, e.g when you have the Strength
+ // powerup but also with weapons that fire multiple projectiles at once (crylink)
+ if (frag_target.freezetag_frozen_force + t > maxforce)
+ {
+ t = max(0, maxforce - frag_target.freezetag_frozen_force);
+ frag_target.freezetag_frozen_force = maxforce;
+ }
+ else
+ frag_target.freezetag_frozen_force += t;
+ t *= autocvar_g_freezetag_revive_auto_reducible_forcefactor;
+ }
frag_target.freezetag_frozen_timeout -= t;
if (frag_target.freezetag_frozen_timeout < time)
frag_target.freezetag_frozen_timeout = time;
//if(player.freezetag_frozen_timeout > 0 && time < player.freezetag_frozen_timeout)
//player.iceblock.alpha = ICE_MIN_ALPHA + (ICE_MAX_ALPHA - ICE_MIN_ALPHA) * (player.freezetag_frozen_timeout - time) / (player.freezetag_frozen_timeout - player.freezetag_frozen_time);
+ player.freezetag_frozen_force = 0;
+
if (!(frametime && IS_PLAYER(player)))
return true;
.float freezetag_revive_time;
.float freezetag_frozen_time;
.float freezetag_frozen_timeout;
+.float freezetag_frozen_force;
const float ICE_MAX_ALPHA = 1;
const float ICE_MIN_ALPHA = 0.1;
float freezetag_teams;
int autocvar_g_freezetag_revive_auto_progress = 1;
int autocvar_g_freezetag_revive_auto_reducible;
float autocvar_g_freezetag_revive_auto_reducible_forcefactor;
+float autocvar_g_freezetag_revive_auto_reducible_maxforce;
float autocvar_g_freezetag_revive_extra_size;
float autocvar_g_freezetag_revive_speed;
float autocvar_g_freezetag_revive_time_to_score = 1.5;