set g_start_weapon_tuba -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
set g_start_weapon_fireball -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
set g_start_weapon_seeker -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_balance_health_start 100
+set g_balance_health_start 150
set g_balance_armor_start 0
-set g_start_ammo_shells 45
+set g_start_ammo_shells 40
set g_start_ammo_nails 0
set g_start_ammo_rockets 0
set g_start_ammo_cells 0
set g_start_ammo_fuel 0
-set g_warmup_start_health 200 "starting values when being in warmup-stage"
+set g_warmup_start_health 250 "starting values when being in warmup-stage"
set g_warmup_start_armor 100 "starting values when being in warmup-stage"
set g_warmup_start_ammo_shells 50 "starting values when being in warmup-stage"
set g_warmup_start_ammo_nails 150 "starting values when being in warmup-stage"
set g_warmup_start_ammo_rockets 50 "starting values when being in warmup-stage"
set g_warmup_start_ammo_cells 50 "starting values when being in warmup-stage"
set g_warmup_start_ammo_fuel 0 "starting values when being in warmup-stage"
-set g_lms_start_health 200
+set g_lms_start_health 250
set g_lms_start_armor 100
set g_lms_start_ammo_shells 50
set g_lms_start_ammo_nails 150
// {{{ pickup items
set g_pickup_ammo_anyway 0
set g_pickup_weapons_anyway 0
-set g_pickup_shells 30
-set g_pickup_shells_max 120
+set g_pickup_shells 15
+set g_pickup_shells_max 999
set g_pickup_nails 80
-set g_pickup_nails_max 400
-set g_pickup_rockets 30
-set g_pickup_rockets_max 120
-set g_pickup_cells 50
-set g_pickup_cells_max 200
+set g_pickup_nails_max 999
+set g_pickup_rockets 15
+set g_pickup_rockets_max 999
+set g_pickup_cells 25
+set g_pickup_cells_max 999
set g_pickup_fuel 25
set g_pickup_fuel_jetpack 50
set g_pickup_fuel_max 999
-set g_pickup_armorsmall 10
-set g_pickup_armorsmall_max 100
+set g_pickup_armorsmall 5
+set g_pickup_armorsmall_max 999
set g_pickup_armorsmall_anyway 0
set g_pickup_armormedium 25
-set g_pickup_armormedium_max 100
+set g_pickup_armormedium_max 999
set g_pickup_armormedium_anyway 0
set g_pickup_armorbig 50
-set g_pickup_armorbig_max 100
+set g_pickup_armorbig_max 999
set g_pickup_armorbig_anyway 0
set g_pickup_armorlarge 100
-set g_pickup_armorlarge_max 100
+set g_pickup_armorlarge_max 999
set g_pickup_armorlarge_anyway 0
-set g_pickup_healthsmall 10
-set g_pickup_healthsmall_max 200
+set g_pickup_healthsmall 5
+set g_pickup_healthsmall_max 999
set g_pickup_healthsmall_anyway 0
set g_pickup_healthmedium 25
-set g_pickup_healthmedium_max 200
+set g_pickup_healthmedium_max 999
set g_pickup_healthmedium_anyway 0
set g_pickup_healthlarge 50
-set g_pickup_healthlarge_max 200
+set g_pickup_healthlarge_max 999
set g_pickup_healthlarge_anyway 0
set g_pickup_healthmega 100
-set g_pickup_healthmega_max 200
+set g_pickup_healthmega_max 999
set g_pickup_healthmega_anyway 0
set g_pickup_respawntime_short 15
set g_pickup_respawntime_medium 20
// }}}
// {{{ regen/rot
-set g_balance_health_regen 0
-set g_balance_health_regenlinear 5
+set g_balance_health_regen 0.1
+set g_balance_health_regenlinear 0
set g_balance_pause_health_regen 5
set g_balance_pause_health_regen_spawn 0
-set g_balance_health_rot 0
-set g_balance_health_rotlinear 5
-set g_balance_pause_health_rot 3
-set g_balance_pause_health_rot_spawn 1
+set g_balance_health_rot 0.1
+set g_balance_health_rotlinear 0
+set g_balance_pause_health_rot 5
+set g_balance_pause_health_rot_spawn 10
set g_balance_health_regenstable 100
set g_balance_health_rotstable 100
set g_balance_health_limit 999
set g_balance_armor_regen 0
set g_balance_armor_regenlinear 0
-set g_balance_armor_rot 0
+set g_balance_armor_rot 0.1
set g_balance_armor_rotlinear 0
-set g_balance_pause_armor_rot 1
-set g_balance_pause_armor_rot_spawn 1
+set g_balance_pause_armor_rot 5
+set g_balance_pause_armor_rot_spawn 10
set g_balance_armor_regenstable 100
set g_balance_armor_rotstable 100
set g_balance_armor_limit 999
// 2: relative velocity projectiles, but aim is precorrected so projectiles hit the crosshair (note: strafe rockets then are SLOWER than ones shot while standing, happens in 1 too when aiming correctly which is hard)
// 3: absolute velocity + player velocity component in shot direction (note: does NOT yield the right relative velocity, but may be good enough, but it is somewhat prone to sniper rockets)
// 4: just add the player velocity length to the absolute velocity (tZork's sniper rockets)
-set g_projectiles_newton_style_2_minfactor 0.8
-set g_projectiles_newton_style_2_maxfactor 1.5
+set g_projectiles_newton_style_2_minfactor 0.7
+set g_projectiles_newton_style_2_maxfactor 5
set g_projectiles_spread_style 0
// possible values:
// 0: forward + solid sphere (like Quake) - varies velocity
set g_jetpack_antigravity 0.8 "factor of gravity compensation of the jetpack"
set g_jetpack_acceleration_side 1200 "acceleration of the jetpack in xy direction"
set g_jetpack_acceleration_up 600 "acceleration of the jetpack in z direction (note: you have to factor in gravity here, if antigravity is not 1)"
-set g_jetpack_maxspeed_side 1200 "max speed of the jetpack in xy direction"
+set g_jetpack_maxspeed_side 1500 "max speed of the jetpack in xy direction"
set g_jetpack_maxspeed_up 600 "max speed of the jetpack in z direction"
set g_jetpack_fuel 8 "fuel per second for jetpack"
set g_jetpack_attenuation 2 "jetpack sound attenuation"
// {{{ weapon properties
// {{{ laser
-set g_balance_laser_primary_damage 25
+set g_balance_laser_primary_damage 35
set g_balance_laser_primary_edgedamage 10
set g_balance_laser_primary_force 400
set g_balance_laser_primary_radius 70
-set g_balance_laser_primary_speed 12000
+set g_balance_laser_primary_speed 9000
set g_balance_laser_primary_spread 0
set g_balance_laser_primary_refire 0.7
set g_balance_laser_primary_animtime 0.3
set g_balance_laser_primary_delay 0.03
set g_balance_laser_gauntlet 0
set g_balance_laser_secondary 0 // when 1, a secondary laser mode exists
-set g_balance_laser_secondary_damage 25
+set g_balance_laser_secondary_damage 35
set g_balance_laser_secondary_edgedamage 10
set g_balance_laser_secondary_force 400
set g_balance_laser_secondary_radius 70
-set g_balance_laser_secondary_speed 12000
+set g_balance_laser_secondary_speed 9000
set g_balance_laser_secondary_spread 0
set g_balance_laser_secondary_refire 0.7
set g_balance_laser_secondary_animtime 0.3
set g_balance_laser_secondary_lifetime 30
-set g_balance_laser_secondary_shotangle -90
+set g_balance_laser_secondary_shotangle 0
set g_balance_laser_secondary_delay 0
// }}}
// {{{ shotgun
set g_balance_shotgun_primary_bullets 6
-set g_balance_shotgun_primary_damage 8
-set g_balance_shotgun_primary_force 0
-set g_balance_shotgun_primary_spread 0.11
+set g_balance_shotgun_primary_damage 9
+set g_balance_shotgun_primary_force 60
+set g_balance_shotgun_primary_spread 0.07
set g_balance_shotgun_primary_refire 0.5
set g_balance_shotgun_primary_animtime 0.2
set g_balance_shotgun_primary_ammo 1
-set g_balance_shotgun_primary_speed 8000
+set g_balance_shotgun_primary_speed 12000
set g_balance_shotgun_primary_bulletconstant 75 // 3.8qu
set g_balance_shotgun_secondary 1
set g_balance_shotgun_secondary_bullets 6
-set g_balance_shotgun_secondary_damage 8
-set g_balance_shotgun_secondary_force 0
-set g_balance_shotgun_secondary_spread 0.17
+set g_balance_shotgun_secondary_damage 9
+set g_balance_shotgun_secondary_force 60
+set g_balance_shotgun_secondary_spread 0.1
set g_balance_shotgun_secondary_refire 1.35
set g_balance_shotgun_secondary_animtime 0.2
set g_balance_shotgun_secondary_ammo 1
-set g_balance_shotgun_secondary_speed 8000
+set g_balance_shotgun_secondary_speed 12000
set g_balance_shotgun_secondary_bulletconstant 75 // 3.8qu
// }}}
// {{{ uzi
set g_balance_uzi_first 1
-set g_balance_uzi_first_damage 12
-set g_balance_uzi_first_force 0
+set g_balance_uzi_first_damage 30
+set g_balance_uzi_first_force 50
set g_balance_uzi_first_spread 0.015
-set g_balance_uzi_first_refire 0.15
+set g_balance_uzi_first_refire 0.2
set g_balance_uzi_first_ammo 1
-set g_balance_uzi_sustained_damage 7
-set g_balance_uzi_sustained_force 0
+set g_balance_uzi_sustained_damage 15
+set g_balance_uzi_sustained_force 27
set g_balance_uzi_sustained_spread 0.05
-set g_balance_uzi_sustained_refire 0.075
+set g_balance_uzi_sustained_refire 0.1
set g_balance_uzi_sustained_ammo 1
set g_balance_uzi_speed 18000
set g_balance_uzi_bulletconstant 115 // 13.1qu
// }}}
// {{{ mortar
set g_balance_grenadelauncher_primary2secondary 0
-set g_balance_grenadelauncher_primary_damage 50
+set g_balance_grenadelauncher_primary_damage 70
set g_balance_grenadelauncher_primary_edgedamage 38
set g_balance_grenadelauncher_primary_force 400
set g_balance_grenadelauncher_primary_radius 140
-set g_balance_grenadelauncher_primary_speed 2200
-set g_balance_grenadelauncher_primary_speed_up 220
+set g_balance_grenadelauncher_primary_speed 2000
+set g_balance_grenadelauncher_primary_speed_up 200
set g_balance_grenadelauncher_primary_speed_z 0
set g_balance_grenadelauncher_primary_spread 0
set g_balance_grenadelauncher_primary_lifetime 30
set g_balance_grenadelauncher_primary_refire 0.8
set g_balance_grenadelauncher_primary_animtime 0.3
set g_balance_grenadelauncher_primary_ammo 2
-set g_balance_grenadelauncher_secondary_damage 60
+set g_balance_grenadelauncher_secondary_damage 70
set g_balance_grenadelauncher_secondary_edgedamage 38
set g_balance_grenadelauncher_secondary_force 400
set g_balance_grenadelauncher_secondary_radius 140
set g_balance_grenadelauncher_secondary_speed 1400
-set g_balance_grenadelauncher_secondary_speed_up 150
+set g_balance_grenadelauncher_secondary_speed_up 200
set g_balance_grenadelauncher_secondary_speed_z 0
set g_balance_grenadelauncher_secondary_spread 0
-set g_balance_grenadelauncher_secondary_lifetime 1
+set g_balance_grenadelauncher_secondary_lifetime 2.5
set g_balance_grenadelauncher_secondary_refire 0.7
set g_balance_grenadelauncher_secondary_animtime 0.3
set g_balance_grenadelauncher_secondary_ammo 2
-set g_balance_grenadelauncher_secondary_health 70
+set g_balance_grenadelauncher_secondary_health 10
set g_balance_grenadelauncher_secondary_damageforcescale 4
set g_balance_grenadelauncher_secondary_bouncefactor 0.5
set g_balance_grenadelauncher_secondary_bouncestop 0.075
set g_balance_electro_secondary_speed_up 200
set g_balance_electro_secondary_speed_z 0
set g_balance_electro_secondary_spread 0
-set g_balance_electro_secondary_lifetime 2.5
-set g_balance_electro_secondary_refire 0.2
-set g_balance_electro_secondary_refire2 1
-set g_balance_electro_secondary_animtime 0.2
+set g_balance_electro_secondary_lifetime 5
+set g_balance_electro_secondary_refire 0.3
+set g_balance_electro_secondary_refire2 0
+set g_balance_electro_secondary_animtime 0.3
set g_balance_electro_secondary_ammo 2
set g_balance_electro_secondary_health 5
set g_balance_electro_secondary_damageforcescale 4
-set g_balance_electro_secondary_count 3
-set g_balance_electro_combo_damage 50
+set g_balance_electro_secondary_count 1
+set g_balance_electro_combo_damage 80
set g_balance_electro_combo_edgedamage 0
set g_balance_electro_combo_force 200
set g_balance_electro_combo_radius 250
set g_balance_electro_combo_speed 2000
// }}}
// {{{ crylink
-set g_balance_crylink_primary_damage 14
+set g_balance_crylink_primary_damage 18
set g_balance_crylink_primary_edgedamage 0
set g_balance_crylink_primary_force -55
set g_balance_crylink_primary_radius 80
set g_balance_crylink_primary_speed 7000
-set g_balance_crylink_primary_spread 0.01
+set g_balance_crylink_primary_spread 0.03
set g_balance_crylink_primary_shots 4
set g_balance_crylink_primary_bounces 1
set g_balance_crylink_primary_refire 0.4
set g_balance_crylink_primary_other_fadetime 0.25
set g_balance_crylink_secondary 1
-set g_balance_crylink_secondary_damage 10
+set g_balance_crylink_secondary_damage 18
set g_balance_crylink_secondary_edgedamage 0
-set g_balance_crylink_secondary_force -40
-set g_balance_crylink_secondary_radius 10
-set g_balance_crylink_secondary_speed 4000
-set g_balance_crylink_secondary_spread 0.01
-set g_balance_crylink_secondary_shots 3
+set g_balance_crylink_secondary_force -55
+set g_balance_crylink_secondary_radius 3
+set g_balance_crylink_secondary_speed 7000
+set g_balance_crylink_secondary_spread 0.08
+set g_balance_crylink_secondary_shots 7
set g_balance_crylink_secondary_bounces 0
-set g_balance_crylink_secondary_refire 0.1
-set g_balance_crylink_secondary_animtime 0.1
-set g_balance_crylink_secondary_ammo 1
+set g_balance_crylink_secondary_refire 0.5
+set g_balance_crylink_secondary_animtime 0.3
+set g_balance_crylink_secondary_ammo 2
set g_balance_crylink_secondary_bouncedamagefactor 0.5
set g_balance_crylink_secondary_middle_lifetime 5 // range: 35000 full, fades to 70000
set g_balance_minstanex_ammo 10
// }}}
// {{{ hagar
-set g_balance_hagar_primary_damage 30
-set g_balance_hagar_primary_edgedamage 0
-set g_balance_hagar_primary_force 50
-set g_balance_hagar_primary_radius 70
-set g_balance_hagar_primary_spread 0.05
-set g_balance_hagar_primary_speed 2400
+set g_balance_hagar_primary_damage 37
+set g_balance_hagar_primary_edgedamage 15
+set g_balance_hagar_primary_force 100
+set g_balance_hagar_primary_radius 65
+set g_balance_hagar_primary_spread 0.010
+set g_balance_hagar_primary_speed 3000
set g_balance_hagar_primary_lifetime 30
set g_balance_hagar_primary_refire 0.15
set g_balance_hagar_primary_ammo 1
set g_balance_hagar_secondary 1
-set g_balance_hagar_secondary_damage 20
-set g_balance_hagar_secondary_edgedamage 10
-set g_balance_hagar_secondary_force 50
-set g_balance_hagar_secondary_radius 90
-set g_balance_hagar_secondary_spread 0.05
-set g_balance_hagar_secondary_speed 2000
-set g_balance_hagar_secondary_lifetime_min 0.1
-set g_balance_hagar_secondary_lifetime_rand 0.05
-set g_balance_hagar_secondary_refire 0.1
-set g_balance_hagar_secondary_ammo 0.5
+set g_balance_hagar_secondary_damage 37
+set g_balance_hagar_secondary_edgedamage 15
+set g_balance_hagar_secondary_force 100
+set g_balance_hagar_secondary_radius 65
+set g_balance_hagar_secondary_spread 0.015
+set g_balance_hagar_secondary_speed 1400
+set g_balance_hagar_secondary_lifetime_min 30
+set g_balance_hagar_secondary_lifetime_rand 0
+set g_balance_hagar_secondary_refire 0.15
+set g_balance_hagar_secondary_ammo 1
// }}}
// {{{ rocketlauncher
-set g_balance_rocketlauncher_damage 80
+set g_balance_rocketlauncher_damage 105
set g_balance_rocketlauncher_edgedamage 40
set g_balance_rocketlauncher_force 600
-set g_balance_rocketlauncher_radius 100
-set g_balance_rocketlauncher_speed 1600
-set g_balance_rocketlauncher_speedaccel 1600
-set g_balance_rocketlauncher_speedstart 1000
+set g_balance_rocketlauncher_radius 150
+set g_balance_rocketlauncher_speed 850
+set g_balance_rocketlauncher_speedaccel 0
+set g_balance_rocketlauncher_speedstart 850
set g_balance_rocketlauncher_lifetime 30
-set g_balance_rocketlauncher_refire 1.2
+set g_balance_rocketlauncher_refire 1
set g_balance_rocketlauncher_animtime 0.3
set g_balance_rocketlauncher_ammo 3
set g_balance_rocketlauncher_health 40
set g_balance_rocketlauncher_damageforcescale 4
-set g_balance_rocketlauncher_detonatedelay -1 // positive: timer till detonation is allowed, negative: "security device" that prevents ANY remote detonation if it could hurt its owner, zero: detonatable at any time
-set g_balance_rocketlauncher_guiderate 140 // max degrees per second
+set g_balance_rocketlauncher_detonatedelay 0.2 // positive: timer till detonation is allowed, negative: "security device" that prevents ANY remote detonation if it could hurt its owner, zero: detonatable at any time
+set g_balance_rocketlauncher_guiderate 90 // max degrees per second
set g_balance_rocketlauncher_guideratedelay 0.01 // immediate
set g_balance_rocketlauncher_guidegoal 512 // goal distance for (non-laser) guiding (higher = less control, lower = erratic)
set g_balance_rocketlauncher_guidedelay 0.15 // delay before guiding kicks in
set g_balance_portal_lifetime 15 // these get recharged whenever the portal is used
// }}}
// {{{ hook
-set g_balance_hook_primary_fuel 2 // hook monkeys set 0
+set g_balance_hook_primary_fuel 5 // hook monkeys set 0
set g_balance_hook_primary_refire 0 // hook monkeys set 0
set g_balance_hook_primary_animtime 0.3 // good shoot anim
set g_balance_hook_primary_hooked_time_max 0 // infinite
set g_balance_hook_primary_hooked_time_free 2 // 2s being hooked are free
-set g_balance_hook_primary_hooked_fuel 3 // fuel per second hooked
+set g_balance_hook_primary_hooked_fuel 5 // fuel per second hooked
set g_balance_hook_secondary_damage 25 // not much
set g_balance_hook_secondary_edgedamage 5 // not much
set g_balance_hook_secondary_radius 500 // LOTS
set g_balance_fireball_secondary_damagetime 5
set g_balance_fireball_secondary_force 100
set g_balance_fireball_secondary_laserburntime 0.5
-set g_balance_fireball_secondary_laserdamage 30
+set g_balance_fireball_secondary_laserdamage 50
set g_balance_fireball_secondary_laseredgedamage 20
set g_balance_fireball_secondary_laserradius 110
set g_balance_fireball_secondary_lifetime 7
set sv_vote_commands "restart fraglimit chmap gotomap nextmap endmatch reducematchtime extendmatchtime allready kick cointoss movetoteam_auto" "these commands can be voted"
set sv_vote_only_commands ""
set sv_vote_master_commands "movetoteam_red movetoteam_blue movetoteam_yellow movetoteam_pink" "maybe add kickban here (but then sv_vote_master 0)"
-set rcon_restricted_commands "restart fraglimit chmap gotomap endmatch reducematchtime extendmatchtime allready kick kickban \"sv_cmd bans\" \"sv_cmd unban\" status \"sv_cmd teamstatus\" movetoteam_auto movetoteam_red movetoteam_blue movetoteam_yellow movetoteam_pink"
+set rcon_restricted_commands "restart fraglimit chmap gotomap endmatch reducematchtime extendmatchtime allready kick kickban \"sv_cmd bans\" \"sv_cmd unban *\" status \"sv_cmd teamstatus\" movetoteam_auto movetoteam_red movetoteam_blue movetoteam_yellow movetoteam_pink"
set sv_vote_call 1 "users can call a vote for the above commands"
set sv_vote_master 1 "users can call a vote to become master"
set sv_vote_master_password "" "when set, users can use \"vlogin PASSWORD\" to log in as master"
set cl_lerpanim_maxdelta_framegroups 0.05 // must be faster than fastest weapon refire
set cl_lerpanim_maxdelta_server 0.1 // must be slower than slowest server controlled anim (e.g. animinfo stuff)
-// FIXME temporary
-set menu_font_size_snapping_fix 1
-
// player ID
seta _cl_userid "" "player ID (e.g. for tournaments)"
+++ /dev/null
-// When freetype support is in SVN, remove the space between vera-sans and the comma :)
-// like: loadfont user0 gfx/vera-sans,gfx/fallback 8 12 16 24 32
-// loadfont console gfx/vera-mono,gfx/fallback $con_textsize 9 10 11
-// loadfont sbar gfx/vera-mono
-loadfont notify gfx/vera-sans,gfx/fallback 8 12 16 24 32
-loadfont chat gfx/vera-sans,gfx/fallback 8 13 16 24 32
-// loadfont centerprint gfx/vera-mono
-// loadfont infobar gfx/vera-mono
-loadfont user0 gfx/vera-sans,gfx/fallback 8 12 16 24 32
-
-// now create the real sbar_font alias
-alias sbar_font "loadfont user1 ${1},gfx/fallback ${2-}; loadfont user2 ${1}-big,gfx/fallback ${2-}; sbar_columns_set"
-// if _requested_sbar_font is empty, the string becaomse "nonempty: "
-// for the case "nonempty: " a default value is used
-// in any other case, the _requested_sbar_font is sued
-set _used_sbar_font "nonempty: $_requested_sbar_font"
-toggle _used_sbar_font "$_requested_sbar_font" "nonempty: " "gfx/vera-sans 8 12 16 24 32"
-toggle _requested_sbar_font "" "gfx/vera-sans 8 12 16 24 32" "gfx/vera-sans 8 12 16 24 32" "$_requested_sbar_font"
-sbar_font ${_requested_sbar_font asis}
-
-set menu_font_size_snapping_fix 1
}
entity weaponorder[WEP_MAXCOUNT];
-
void weaponorder_swap(float i, float j, entity pass)
{
entity h;
weaponorder[j] = h;
}
+string weaponorder_cmp_str_save;
string weaponorder_cmp_str;
float weaponorder_cmp(float i, float j, entity pass)
{
mySize = HUD_Panel_GetSize(id);
stat_weapons = getstati(STAT_WEAPONS);
+ weapon_cnt = 0;
for(i = WEP_FIRST; i <= WEP_LAST; ++i)
{
self = get_weaponinfo(i);
if(self.impulse >= 0)
- {
- weaponorder[weapon_cnt] = self;
++weapon_cnt;
- }
}
// TODO make this configurable
weaponorder_cmp_str = strcat(" ", weaponorder_byimpulse, " ");
- heapsort(weapon_cnt, weaponorder_swap, weaponorder_cmp, world);
+
+ if(weaponorder_cmp_str != weaponorder_cmp_str_save)
+ {
+ if(weaponorder_cmp_str_save)
+ strunzone(weaponorder_cmp_str_save);
+ weaponorder_cmp_str_save = strzone(weaponorder_cmp_str);
+ weapon_cnt = 0;
+ for(i = WEP_FIRST; i <= WEP_LAST; ++i)
+ {
+ self = get_weaponinfo(i);
+ if(self.impulse >= 0)
+ {
+ weaponorder[weapon_cnt] = self;
+ ++weapon_cnt;
+ }
+ }
+ heapsort(weapon_cnt, weaponorder_swap, weaponorder_cmp, world);
+ }
HUD_Panel_DrawBg(id, pos, mySize, 0);
float padding;
float sz;
sz = expandingbox_sizefactor_from_fadelerp(fadelerp);
- if(cvar("menu_font_size_snapping_fix"))
- drawfontscale = sz * '1 1 0';
- else
- drawfontscale = '1 1 0';
+ drawfontscale = sz * '1 1 0';
dummyfunction(0, 0, 0, 0, 0, 0, 0, 0);
drawstring(position + expandingbox_resize_centered_box_offset(sz, scale, stringwidth(text, FALSE, scale * (sz / drawfontscale_x)) / (scale_x * sz)), text, scale * (sz / drawfontscale_x), rgb, alpha * (1 - fadelerp), flag);
// width parameter:
// (scale_x * sz / drawfontscale_x) * drawfontscale_x * SIZE1 / (scale_x * sz)
// SIZE1
-
- if(cvar("menu_font_size_snapping_fix"))
- drawfontscale = '1 1 0';
+ drawfontscale = '1 1 0';
}
void drawcolorcodedstring_expanding(vector position, string text, vector scale, float alpha, float flag, float fadelerp)
float sz;
sz = expandingbox_sizefactor_from_fadelerp(fadelerp);
- if(cvar("menu_font_size_snapping_fix"))
- drawfontscale = sz * '1 1 0';
- else
- drawfontscale = '1 1 0';
+ drawfontscale = sz * '1 1 0';
dummyfunction(0, 0, 0, 0, 0, 0, 0, 0);
drawcolorcodedstring(position + expandingbox_resize_centered_box_offset(sz, scale, stringwidth(text, TRUE, scale * (sz / drawfontscale_x)) / (scale_x * sz)), text, scale * (sz / drawfontscale_x), alpha * (1 - fadelerp), flag);
-
- if(cvar("menu_font_size_snapping_fix"))
- drawfontscale = '1 1 0';
+ drawfontscale = '1 1 0';
}
// this draws the triangles of a model DIRECTLY. Don't expect high performance, really...
}
void draw_Text(vector theOrigin, string theText, vector theSize, vector theColor, float theAlpha, float ICanHasKallerz)
{
- vector fs;
if(theSize_x <= 0 || theSize_y <= 0)
error("Drawing zero size text?\n");
- if not(cvar("menu_font_size_snapping_fix")) // FIXME remove this, this is to detect old engines
- {
- fs = draw_fontscale;
- draw_fontscale = '1 1 0';
- }
+
+ //float wi;
+ //wi = draw_TextWidth(theText, ICanHasKallerz, theSize);
+ //draw_Fill(theOrigin, '1 0 0' * wi + '0 1 0' * theSize_y, '1 0 0', 0.3);
+
if(ICanHasKallerz)
drawcolorcodedstring(boxToGlobal(theOrigin, draw_shift, draw_scale), theText, globalToBoxSize(boxToGlobalSize(theSize, draw_scale), draw_fontscale), theAlpha * draw_alpha, 0);
else
drawstring(boxToGlobal(theOrigin, draw_shift, draw_scale), theText, globalToBoxSize(boxToGlobalSize(theSize, draw_scale), draw_fontscale), theColor, theAlpha * draw_alpha, 0);
- if not(cvar("menu_font_size_snapping_fix")) // FIXME remove this, this is to detect old engines
- {
- draw_fontscale = fs;
- }
}
void draw_CenterText(vector theOrigin, string theText, vector theSize, vector theColor, float theAlpha, float ICanHasKallerz)
{
{
//return strlen(theText);
//print("draw_TextWidth \"", theText, "\"\n");
- vector fs;
vector v;
v = '0 0 0';
//float r;
- if not(cvar("menu_font_size_snapping_fix")) // FIXME remove this, this is to detect old engines
- {
- fs = draw_fontscale;
- draw_fontscale = '1 1 0';
- }
- v_x = stringwidth(theText, ICanHasKallerz, boxToGlobalSize(SizeThxBye, draw_scale)) / draw_fontscale_x;
- if not(cvar("menu_font_size_snapping_fix")) // FIXME remove this, this is to detect old engines
- {
- draw_fontscale = fs;
- }
+ v_x = stringwidth(theText, ICanHasKallerz, globalToBoxSize(boxToGlobalSize(SizeThxBye, draw_scale), draw_fontscale));
v = globalToBoxSize(v, draw_scale);
return v_x;
}
METHOD(Container, mouseRelease, float(entity, vector))
METHOD(Container, focusLeave, void(entity))
METHOD(Container, resizeNotify, void(entity, vector, vector, vector, vector))
- METHOD(Container, resizeNotifyLie, void(entity, vector, vector, vector, vector, .vector, .vector))
+ METHOD(Container, resizeNotifyLie, void(entity, vector, vector, vector, vector, .vector, .vector, .vector))
METHOD(Container, addItem, void(entity, entity, vector, vector, float))
METHOD(Container, addItemCentered, void(entity, entity, vector, float))
METHOD(Container, moveItemAfter, void(entity, entity, entity))
ATTRIB(Container, lastChild, entity, NULL)
ATTRIB(Container, focusedChild, entity, NULL)
ATTRIB(Container, shown, float, 0)
+
+ METHOD(Container, enterSubitem, void(entity, entity))
+ METHOD(Container, enterLieSubitem, void(entity, vector, vector, vector, float))
+ METHOD(Container, leaveSubitem, void(entity))
ENDCLASS(Container)
.entity nextSibling;
.entity prevSibling;
.vector Container_size;
.vector Container_fontscale;
.float Container_alpha;
+.vector Container_save_shift;
+.vector Container_save_scale;
+.vector Container_save_fontscale;
+.float Container_save_alpha;
#endif
#ifdef IMPLEMENTATION
+void Container_enterSubitem(entity me, entity sub)
+{
+ me.enterLieSubitem(me, sub.Container_origin, sub.Container_size, sub.Container_fontscale, sub.Container_alpha);
+}
+
+void Container_enterLieSubitem(entity me, vector o, vector s, vector f, float a)
+{
+ me.Container_save_shift = draw_shift;
+ me.Container_save_scale = draw_scale;
+ me.Container_save_alpha = draw_alpha;
+ me.Container_save_fontscale = draw_fontscale;
+
+ draw_shift = boxToGlobal(o, draw_shift, draw_scale);
+ draw_scale = boxToGlobalSize(s, draw_scale);
+ if(f != '0 0 0')
+ draw_fontscale = boxToGlobalSize(f, draw_fontscale);
+ draw_alpha *= a;
+}
+
+void Container_leaveSubitem(entity me)
+{
+ draw_shift = me.Container_save_shift;
+ draw_scale = me.Container_save_scale;
+ draw_alpha = me.Container_save_alpha;
+ draw_fontscale = me.Container_save_fontscale;
+}
+
void Container_showNotify(entity me)
{
entity e;
other.Container_alpha = theAlpha;
}
-void Container_resizeNotifyLie(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize, .vector originField, .vector sizeField)
+void Container_resizeNotifyLie(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize, .vector originField, .vector sizeField, .vector fontScaleField)
{
entity e;
vector o, s;
{
o = e.originField;
s = e.sizeField;
+ me.enterLieSubitem(me, o, s, e.fontScaleField, e.Container_alpha);
e.resizeNotify(e, o, s, boxToGlobal(o, absOrigin, absSize), boxToGlobalSize(s, absSize));
+ me.leaveSubitem(me);
}
do
{
d = 1;
o = e.originField;
s = e.sizeField;
+ me.enterLieSubitem(me, o, s, e.fontScaleField, e.Container_alpha);
e.resizeNotify(e, o, s, boxToGlobal(o, absOrigin, absSize), boxToGlobalSize(s, absSize));
+ me.leaveSubitem(me);
}
}
while(d);
void Container_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
{
- me.resizeNotifyLie(me, relOrigin, relSize, absOrigin, absSize, Container_origin, Container_size);
+ me.resizeNotifyLie(me, relOrigin, relSize, absOrigin, absSize, Container_origin, Container_size, Container_fontscale);
}
entity Container_itemFromPoint(entity me, vector pos)
void Container_draw(entity me)
{
- vector oldshift;
- vector oldscale;
- float oldalpha;
- vector oldfontscale;
entity e;
- oldshift = draw_shift;
- oldscale = draw_scale;
- oldalpha = draw_alpha;
- oldfontscale = draw_fontscale;
me.focusable = 0;
for(e = me.firstChild; e; e = e.nextSibling)
{
me.focusable += 1;
if(e.Container_alpha < 0.003) // can't change color values anyway
continue;
- draw_shift = boxToGlobal(e.Container_origin, oldshift, oldscale);
- draw_scale = boxToGlobalSize(e.Container_size, oldscale);
- if(e.Container_fontscale != '0 0 0')
- draw_fontscale = boxToGlobalSize(e.Container_fontscale, oldfontscale);
- draw_alpha *= e.Container_alpha;
+ me.enterSubitem(me, e);
e.draw(e);
- draw_shift = oldshift;
- draw_scale = oldscale;
- draw_fontscale = oldfontscale;
- draw_alpha = oldalpha;
+ me.leaveSubitem(me);
}
};
float Container_keyUp(entity me, float scan, float ascii, float shift)
{
entity f;
+ float r;
f = me.focusedChild;
if(f)
- return f.keyUp(f, scan, ascii, shift);
+ {
+ me.enterSubitem(me, f);
+ r = f.keyUp(f, scan, ascii, shift);
+ me.leaveSubitem(me);
+ return r;
+ }
return 0;
}
float Container_keyDown(entity me, float scan, float ascii, float shift)
{
entity f;
+ float r;
f = me.focusedChild;
if(f)
- return f.keyDown(f, scan, ascii, shift);
+ {
+ me.enterSubitem(me, f);
+ r = f.keyDown(f, scan, ascii, shift);
+ me.leaveSubitem(me);
+ return r;
+ }
return 0;
}
float Container_mouseMove(entity me, vector pos)
{
entity f;
+ float r;
f = me.focusedChild;
if(f)
- return f.mouseMove(f, globalToBox(pos, f.Container_origin, f.Container_size));
+ {
+ me.enterSubitem(me, f);
+ r = f.mouseMove(f, globalToBox(pos, f.Container_origin, f.Container_size));
+ me.leaveSubitem(me);
+ return r;
+ }
return 0;
}
float Container_mousePress(entity me, vector pos)
{
entity f;
+ float r;
f = me.focusedChild;
if(f)
- return f.mousePress(f, globalToBox(pos, f.Container_origin, f.Container_size));
+ {
+ me.enterSubitem(me, f);
+ r = f.mousePress(f, globalToBox(pos, f.Container_origin, f.Container_size));
+ me.leaveSubitem(me);
+ return r;
+ }
return 0;
}
float Container_mouseDrag(entity me, vector pos)
{
entity f;
+ float r;
f = me.focusedChild;
if(f)
- return f.mouseDrag(f, globalToBox(pos, f.Container_origin, f.Container_size));
+ {
+ me.enterSubitem(me, f);
+ r = f.mouseDrag(f, globalToBox(pos, f.Container_origin, f.Container_size));
+ me.leaveSubitem(me);
+ return r;
+ }
return 0;
}
float Container_mouseRelease(entity me, vector pos)
{
entity f;
+ float r;
f = me.focusedChild;
if(f)
- return f.mouseRelease(f, globalToBox(pos, f.Container_origin, f.Container_size));
+ {
+ me.enterSubitem(me, f);
+ r = f.mouseRelease(f, globalToBox(pos, f.Container_origin, f.Container_size));
+ me.leaveSubitem(me);
+ return r;
+ }
return 0;
}
ATTRIB(Label, disabledAlpha, float, 0.3)
ATTRIB(Label, textEntity, entity, NULL)
ATTRIB(Label, allowWrap, float, 0)
+ ATTRIB(Label, recalcPos, float, 0)
ENDCLASS(Label)
#endif
void Label_setText(entity me, string txt)
{
me.text = txt;
- me.realOrigin_x = me.align * (1 - me.keepspaceLeft - me.keepspaceRight - min(draw_TextWidth(me.text, me.allowColors, me.realFontSize), (1 - me.keepspaceLeft - me.keepspaceRight))) + me.keepspaceLeft;
+ me.recalcPos = 1;
}
void Label_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
{
me.keepspaceLeft = me.marginLeft * me.realFontSize_x;
if(me.marginRight)
me.keepspaceRight = me.marginRight * me.realFontSize_x;
- me.realOrigin_x = me.align * (1 - me.keepspaceLeft - me.keepspaceRight - min(draw_TextWidth(me.text, me.allowColors, me.realFontSize), (1 - me.keepspaceLeft - me.keepspaceRight))) + me.keepspaceLeft;
me.realOrigin_y = 0.5 * (1 - me.realFontSize_y);
+ me.realOrigin_x = me.align * (1 - me.keepspaceLeft - me.keepspaceRight - min(draw_TextWidth(me.text, me.allowColors, me.realFontSize), (1 - me.keepspaceLeft - me.keepspaceRight))) + me.keepspaceLeft;
+ me.recalcPos = 0;
}
void Label_configureLabel(entity me, string txt, float sz, float algn)
{
if(me.textEntity)
{
t = me.textEntity.toString(me.textEntity);
- me.realOrigin_x = me.align * (1 - me.keepspaceLeft - me.keepspaceRight - min(draw_TextWidth(t, 0, me.realFontSize), (1 - me.keepspaceLeft - me.keepspaceRight))) + me.keepspaceLeft;
+ me.recalcPos = 1;
}
else
t = me.text;
+
+ if(me.recalcPos)
+ me.realOrigin_x = me.align * (1 - me.keepspaceLeft - me.keepspaceRight - min(draw_TextWidth(t, me.allowColors, me.realFontSize), (1 - me.keepspaceLeft - me.keepspaceRight))) + me.keepspaceLeft;
+ me.recalcPos = 0;
+
+ //if(me.text == "Bookmark")
+ // draw_Fill(me.realOrigin, '0 1 0' + '1 0 0' * draw_TextWidth(t, me.allowColors, me.realFontSize), '1 0 1', 1);
if(me.fontSize)
if(t)
.vector ModalController_initialSize;
.vector ModalController_initialOrigin;
+.vector ModalController_initialFontScale;
.float ModalController_initialAlpha;
.vector ModalController_buttonSize;
.vector ModalController_buttonOrigin;
void ModalController_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
{
- me.resizeNotifyLie(me, relOrigin, relSize, absOrigin, absSize, ModalController_initialOrigin, ModalController_initialSize);
+ me.resizeNotifyLie(me, relOrigin, relSize, absOrigin, absSize, ModalController_initialOrigin, ModalController_initialSize, ModalController_initialFontScale);
}
void ModalController_switchState(entity me, entity other, float state, float skipAnimation)
float df; // animation step size
float prevFactor, targetFactor;
vector targetOrigin, targetSize; float targetAlpha;
+ vector fs;
animating = 0;
for(e = me.firstChild; e; e = e.nextSibling)
// --> (maxima)
// o' = (to * (f - f_prev) + o * (1 - f)) / (1 - f_prev)
- e.Container_fontscale = globalToBoxSize(e.Container_size, e.ModalController_initialSize);
+ fs = globalToBoxSize(e.Container_size, e.ModalController_initialSize);
+ e.Container_fontscale_x = fs_x * e.ModalController_initialFontScale_x;
+ e.Container_fontscale_y = fs_y * e.ModalController_initialFontScale_y;
}
if(animating || !me.focused)
me.setFocus(me, NULL);
void ModalController_addItem(entity me, entity other, vector theOrigin, vector theSize, float theAlpha)
{
SUPER(ModalController).addItem(me, other, theOrigin, theSize, (other == me.firstChild) ? theAlpha : 0);
+ other.ModalController_initialFontScale = other.Container_fontscale;
other.ModalController_initialSize = other.Container_size;
other.ModalController_initialOrigin = other.Container_origin;
other.ModalController_initialAlpha = theAlpha; // hope Container never modifies this
+ if(other.ModalController_initialFontScale == '0 0 0')
+ other.ModalController_initialFontScale = '1 1 0';
}
void ModalController_showChild(entity me, entity other, vector theOrigin, vector theSize, float skipAnimation)
#ifdef IMPLEMENTATION
.vector Nexposee_initialSize;
+.vector Nexposee_initialFontScale;
.vector Nexposee_initialOrigin;
.float Nexposee_initialAlpha;
void Nexposee_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)
{
me.calc(me);
- me.resizeNotifyLie(me, relOrigin, relSize, absOrigin, absSize, Nexposee_initialOrigin, Nexposee_initialSize);
+ me.resizeNotifyLie(me, relOrigin, relSize, absOrigin, absSize, Nexposee_initialOrigin, Nexposee_initialSize, Nexposee_initialFontScale);
}
void Nexposee_Calc_Scale(entity me, float scale)
float a0;
entity e;
float f;
+ vector fs;
if(me.animationState == -1)
{
}
me.setAlphaOf(me, e, e.Container_alpha * (1 - f) + a * f);
- e.Container_fontscale = globalToBoxSize(e.Container_size, e.Nexposee_initialSize);
+ fs = globalToBoxSize(e.Container_size, e.Nexposee_initialSize);
+ e.Container_fontscale_x = fs_x * e.Nexposee_initialFontScale_x;
+ e.Container_fontscale_y = fs_y * e.Nexposee_initialFontScale_y;
}
SUPER(Nexposee).draw(me);
void Nexposee_addItem(entity me, entity other, vector theOrigin, vector theSize, float theAlpha)
{
SUPER(Nexposee).addItem(me, other, theOrigin, theSize, theAlpha);
+ other.Nexposee_initialFontScale = other.Container_fontscale;
other.Nexposee_initialSize = other.Container_size;
other.Nexposee_initialOrigin = other.Container_origin;
other.Nexposee_initialAlpha = other.Container_alpha;
+ if(other.Nexposee_initialFontScale == '0 0 0')
+ other.Nexposee_initialFontScale = '1 1 0';
}
void Nexposee_focusEnter(entity me)
me.TR(me);
me.TD(me, 1, 3, e = makeXonoticTextLabel(0, "Key bindings:"));
me.TR(me);
- me.TD(me, me.rows - 2, 3, kb = makeXonoticKeyBinder());
+ me.TD(me, me.rows - 2, 3.3, kb = makeXonoticKeyBinder());
me.gotoRC(me, me.rows - 1, 0);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticButton("Change key...", '0 0 0'));
+ me.TD(me, 1, 1.1, e = makeXonoticButton("Change key...", '0 0 0'));
e.onClick = KeyBinder_Bind_Change;
e.onClickEntity = kb;
kb.keyGrabButton = e;
- me.TD(me, 1, 1, e = makeXonoticButton("Edit...", '0 0 0'));
+ me.TD(me, 1, 1.1, e = makeXonoticButton("Edit...", '0 0 0'));
e.onClick = KeyBinder_Bind_Edit;
e.onClickEntity = kb;
kb.userbindEditButton = e;
kb.userbindEditDialog = main.userbindEditDialog;
main.userbindEditDialog.keybindBox = kb;
- me.TD(me, 1, 1, e = makeXonoticButton("Clear", '0 0 0'));
+ me.TD(me, 1, 1.1, e = makeXonoticButton("Clear", '0 0 0'));
e.onClick = KeyBinder_Bind_Clear;
e.onClickEntity = kb;
theAlpha *= SKINALPHA_DISABLED;
}
- draw_Text(me.realUpperMargin * eY + extraMargin * eX, descr, me.realFontSize, theColor, theAlpha, 0);
+ s = draw_TextShortenToWidth(descr, me.columnFunctionSize, 0, me.realFontSize);
+ draw_Text(me.realUpperMargin * eY + extraMargin * eX, s, me.realFontSize, theColor, theAlpha, 0);
if(func != "")
{
n = tokenize(findkeysforcommand(func)); // uses '...' strings
--- /dev/null
+float autocvar_sv_cheats;
+float autocvar_g_bastet;
+var float autocvar_g_movement_highspeed = 1;
prio = 1;
FOR_EACH_CLIENT(p)
{
- if(strcat(prefix, s, suffix) == p.netname)
+ if(clienttype(p) == CLIENTTYPE_BOT)
+ if(s == p.cleanname)
{
prio = 0;
break;
else
name = bot_name;
- self.cleanname = strzone(name);
-
// number bots with identical names
float i;
i = 0;
++i;
}
if (i)
- name = strcat(name, "(", ftos(i), ")");
+ self.netname = self.netname_freeme = strzone(strcat(prefix, name, "(", ftos(i), ")", suffix));
+ else
+ self.netname = self.netname_freeme = strzone(strcat(prefix, name, suffix));
+
+ self.cleanname = strzone(name);
// pick the model and skin
if(substring(bot_model, -4, 1) != ".")
self.playermodel = self.playermodel_freeme = strzone(strcat("models/player/", bot_model));
self.playerskin = self.playerskin_freeme = strzone(bot_skin);
- self.netname = self.netname_freeme = strzone(strcat(prefix, name, suffix));
-
self.cvar_cl_accuracy_data_share = 1; // share the bots weapon accuracy data with the world
self.cvar_cl_accuracy_data_receive = 0; // don't receive any weapon accuracy data
};
.float maycheat;
float sv_cheats;
-float autocvar_sv_cheats;
#define CHIMPULSE_SPEEDRUN_INIT 30
#define CHIMPULSE_GIVE_ALL 99
string GetMapname(void);
float speedaward_lastupdate;
float speedaward_lastsent;
-var float autocvar_g_movement_highspeed = 1;
void SV_PlayerPhysics()
{
local vector wishvel, wishdir, v;
#ifdef TETRIS
-float autocvar_g_bastet;
.vector tet_org;
float tet_vs_current_id;
builtins.qh
extensions.qh
post-builtins.qh
+autocvars.qh
../warpzonelib/anglestransform.qh
../warpzonelib/mathlib.qh
self.W_BallisticBullet_LeaveSolid_origin = trace_endpos;
- dst = vlen(trace_endpos - self.origin);
+ dst = max(cvar("g_ballistics_mindistance"), vlen(trace_endpos - self.origin));
// E(s) = E0 - constant * s, constant = area of bullet circle * material constant / mass
Es_m = E0_m - constant * dst;
if(Es_m <= 0)
WarpZone_SetUp(self, self.enemy.oldorigin, self.enemy.avelocity, self.oldorigin, self.avelocity);
// engine currently wants this
- self.avelocity = AnglesTransform_TurnDirectionFR(self.avelocity);
self.drawmask = MASK_NORMAL;
// link me
setsize(self, self.mins, self.maxs);
}
-vector WarpZone_Camera_camera_transform(vector org, vector ang)
-{
- // a fixed camera view
- trace_endpos = self.oldorigin;
- makevectors(self.avelocity);
- return self.oldorigin;
-}
-
void WarpZone_Camera_Read(float isnew)
{
self.classname = "func_warpzone_camera";
self.avelocity_y = ReadCoord();
self.avelocity_z = ReadCoord();
+ // common stuff
+ WarpZone_Camera_SetUp(self, self.oldorigin, self.avelocity);
+
// engine currently wants this
self.drawmask = MASK_NORMAL;
- self.camera_transform = WarpZone_Camera_camera_transform;
// link me
//setmodel(self, self.model);
e.camera_transform = WarpZone_camera_transform;
}
+vector WarpZone_Camera_camera_transform(vector org, vector ang)
+{
+ // a fixed camera view
+ trace_endpos = self.warpzone_origin;
+ makevectors(self.warpzone_angles);
+ return self.warpzone_origin;
+}
+
+void WarpZone_Camera_SetUp(entity e, vector my_org, vector my_ang) // we assume that e.oldorigin and e.avelocity point to view origin and direction
+{
+ e.warpzone_origin = my_org;
+ e.warpzone_angles = my_ang;
+ e.camera_transform = WarpZone_Camera_camera_transform;
+}
+
.entity enemy;
vector WarpZoneLib_BoxTouchesBrush_mins;
if(--i < 1)
{
dprint("Too many warpzones in sequence, aborting trace.\n");
+ trace_ent = world;
break;
}
tracebox(org, mi, ma, end, nomonsters, forent);
if(trace_ent == wz)
{
dprint("I transformed into the same zone again, wtf, aborting the trace\n");
+ trace_ent = world;
break;
}
wz = trace_ent;
if(--i < 1)
{
dprint("Too many warpzones in sequence, aborting trace.\n");
+ trace_ent = world;
break;
}
tracetoss(e, forent);
if(trace_ent == wz)
{
dprint("I transformed into the same zone again, wtf, aborting the trace\n");
+ trace_ent = world;
break;
}
wz = trace_ent;
error("Camera with nonexisting target");
return;
}
+ WarpZone_Camera_SetUp(self, self.enemy.origin, self.enemy.angles);
}
void WarpZone_InitStep_UpdateTransform()
self.enemy = world;
}
+entity warpzone_first; .entity warpzone_next;
void WarpZone_InitStep_FindTarget()
{
float i;
entity e, e2;
+ if(self.enemy)
+ return;
+
// this way only one of the two ents needs to target
if(self.target != "")
{
+ self.enemy = self; // so the if(!e.enemy) check also skips self, saves one IF
+
e2 = world;
- for(e = world; (e = find(e, targetname, self.target)); )
+ for(e = world, i = 0; (e = find(e, targetname, self.target)); )
if(!e.enemy)
- if(random() * ++i < 1)
- e2 = e;
+ if(e.classname == self.classname) // possibly non-warpzones may use the same targetname!
+ if(random() * ++i < 1)
+ e2 = e;
if(!e2)
{
+ self.enemy = world;
error("Warpzone with non-existing target");
return;
}
WarpZone_StoreProjectileData(e);
}
-void target_warpzone_reconnect_use()
+void trigger_warpzone_reconnect_use()
{
entity e;
e = self;
self = e;
}
-void trigger_warpzone_reconnect()
+void spawnfunc_trigger_warpzone_reconnect()
+{
+ self.use = trigger_warpzone_reconnect_use;
+}
+
+void spawnfunc_target_warpzone_reconnect()
{
- self.use = target_warpzone_reconnect_use;
+ spawnfunc_trigger_warpzone_reconnect(); // both names make sense here :(
}
exec config_update.cfg
exec autoexec.cfg
stuffcmds
-exec loadfonts.cfg
//startdemos demos/demo1 demos/demo2 demos/demo3
//startdemos
//play announcer/male/welcome.ogg
-//exec font-dejavu.cfg
+exec font-nimbussansl.cfg
--- /dev/null
+electro
+fireball
+flags
+hlac
+model-common
+onslaught
+portals
+pyria
+shotgun
+spiderbot
+teamfx
+tree
+tuba
+turrets
+weapons
#!/bin/sh
-balance_cfgs="balance25.cfg balanceSamual.cfg balanceXPM.cfg"
-
-countw=`awk '/^seta? g_/ { print $2; }' balance.cfg | sort -u | tr -d '\r' | md5sum | cut -c 1-32`
-for b in $balance_cfgs; do
- countb=`awk '/^seta? g_/ { print $2; }' "$b" | sort -u | tr -d '\r' | md5sum | cut -c 1-32`
+countw=`awk '/^seta? g_/ { print $2; }' balance.cfg | sort -u | tr -d '\r' | git hash-object --stdin | cut -c 1-32`
+for b in balance*.cfg; do
+ countb=`awk '/^seta? g_/ { print $2; }' "$b" | sort -u | tr -d '\r' | git hash-object --stdin | cut -c 1-32`
if [ "$countw" != "$countb" ]; then
echo "Mismatch between balance.cfg and $b. Aborting."
exit 1