set g_br_revive_health 0.25 "start health multiplier when revived"
set g_br_dropship_color "0.5 0 0.5" "dropship color"
set g_br_dropship_scale 3 "dropship scale"
-set g_br_dropship_speed 200 "dropship speed"
+set g_br_dropship_speed -1 "dropship speed, -1 to decide based on map size"
set g_br_drop_damage 0.5 "multiplier of damage taken while dropping"
set g_br_drop_speed_max 2 "max air speed multiplier while dropping"
set g_br_drop_speed_min 1.25 "min air speed multiplier while dropping"
if(STAT(DROP, player) == DROP_TRANSPORT){
if(!(STAT(PRESSED_KEYS, player) & KEY_JUMP) && (dropship_path_length > player.br_squad.br_force_drop_distance)){
- player.velocity = dropship_path_direction * max(autocvar_g_br_dropship_speed, 0);
+ player.velocity = dropship_path_direction * dropship_speed;
}
else{
if(!(IN_SQUAD(player) && player.br_squad.br_squad_drop_leader))
float autocvar_g_br_dropship_scale = 3;
vector autocvar_g_br_dropship_color = '0.5 0 0.5';
+float autocvar_g_br_dropship_speed = -1;
entity dropship_spawn(Vehicle info, float entity_scale, vector color);
void dropship_think(entity this);
this.angles = vectoangles(dropship_path_direction);
this.velocity = '0 0 0';
+ dropship_speed = autocvar_g_br_dropship_speed;
+ // if dropship_speed is negative adjust speed dependant on map size
+ if(dropship_speed < 0)
+ dropship_speed = vlen(vec2(world.maxs - world.mins)) / 60; // dropship needs one minute to diagonally fly over the whole map
+
return this;
}
if(dropship_path_length > 0){
this.alpha = bound(0.01, dropship_path_length / autocvar_g_br_drop_distance_force, 1);
- this.velocity = dropship_path_direction * autocvar_g_br_dropship_speed;
- dropship_path_length -= autocvar_g_br_dropship_speed * frametime;
+ this.velocity = dropship_path_direction * dropship_speed;
+ dropship_path_length -= dropship_speed * frametime;
}
else{
delete(this);
float dropship_path_length = 0;
vector dropship_path_direction = '0 0 0';
+float dropship_speed = 0;
float autocvar_g_br_drop_distance_force = 500;
-float autocvar_g_br_dropship_speed = 200;
entity dropship_initialize();