set g_balance_electro_primary_animtime 0.3
set g_balance_electro_primary_ammo 2
set g_balance_electro_primary_range 0
+set g_balance_electro_primary_falloff_mindist 255 // 0.3 * radius
+set g_balance_electro_primary_falloff_maxdist 850
+set g_balance_electro_primary_falloff_halflifedist 425
set g_balance_electro_secondary_damage 50
set g_balance_electro_secondary_spread 0.05
set g_balance_electro_secondary_edgedamage 0
set g_balance_electro_primary_animtime 0.3
set g_balance_electro_primary_ammo 2
set g_balance_electro_primary_range 0
+set g_balance_electro_primary_falloff_mindist 255 // 0.3 * radius
+set g_balance_electro_primary_falloff_maxdist 850
+set g_balance_electro_primary_falloff_halflifedist 425
set g_balance_electro_secondary_damage 50
set g_balance_electro_secondary_spread 0.05
set g_balance_electro_secondary_edgedamage 0
set g_balance_electro_primary_animtime 0.3
set g_balance_electro_primary_ammo 2
set g_balance_electro_primary_range 0
+set g_balance_electro_primary_falloff_mindist 255 // 0.3 * radius
+set g_balance_electro_primary_falloff_maxdist 850
+set g_balance_electro_primary_falloff_halflifedist 425
set g_balance_electro_secondary_damage 50
set g_balance_electro_secondary_spread 0.05
set g_balance_electro_secondary_edgedamage 0
set g_balance_pause_health_rot_spawn 0
set g_balance_health_regenstable 100
set g_balance_health_rotstable 100
-set g_balance_health_limit 200
+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_pause_armor_rot_spawn 0
set g_balance_armor_regenstable 100
set g_balance_armor_rotstable 100
-set g_balance_armor_limit 200
+set g_balance_armor_limit 999
set g_balance_armor_blockpercent 0.7
set g_balance_fuel_regen 0.1 "fuel regeneration (only applies if the player owns IT_FUEL_REGEN)"
set g_balance_fuel_regenlinear 0
set g_balance_shotgun_primary_bulletconstant 75 // 3.8qu
set g_balance_shotgun_secondary 1
set g_balance_shotgun_secondary_melee_delay 0.35 // match the anim
-set g_balance_shotgun_secondary_melee_range 60
+set g_balance_shotgun_secondary_melee_range 85
set g_balance_shotgun_secondary_melee_swing 50
set g_balance_shotgun_secondary_melee_time 0.1
-set g_balance_shotgun_secondary_damage 115
+set g_balance_shotgun_secondary_damage 110
set g_balance_shotgun_secondary_force 150
set g_balance_shotgun_secondary_refire 1.1
set g_balance_shotgun_secondary_animtime 1
set g_balance_uzi_first_spread 0.03
set g_balance_uzi_first_refire 0.2
set g_balance_uzi_first_ammo 2
-set g_balance_uzi_sustained_damage 7
+set g_balance_uzi_sustained_damage 9
set g_balance_uzi_sustained_force 7.5
set g_balance_uzi_sustained_spread 0.1
set g_balance_uzi_sustained_refire 0.075
set g_balance_grenadelauncher_primary_lifetime 5
set g_balance_grenadelauncher_primary_lifetime2 0.65
set g_balance_grenadelauncher_primary_refire 0.8
-set g_balance_grenadelauncher_primary_animtime 0.2
+set g_balance_grenadelauncher_primary_animtime 0.4
set g_balance_grenadelauncher_primary_ammo 2
set g_balance_grenadelauncher_primary_health 72
set g_balance_grenadelauncher_secondary_sticky 1
set g_balance_grenadelauncher_secondary_lifetime 5
set g_balance_grenadelauncher_secondary_lifetime2 1
set g_balance_grenadelauncher_secondary_refire 0.8
-set g_balance_grenadelauncher_secondary_animtime 0.2
+set g_balance_grenadelauncher_secondary_animtime 0.4
set g_balance_grenadelauncher_secondary_ammo 2
set g_balance_grenadelauncher_secondary_health 40
set g_balance_grenadelauncher_secondary_damageforcescale 0
set g_balance_electro_primary_lifetime 0
set g_balance_electro_primary_refire 0.03333333
set g_balance_electro_primary_animtime 0.03333333
-set g_balance_electro_primary_ammo 10
+set g_balance_electro_primary_ammo 7
set g_balance_electro_primary_range 800
+set g_balance_electro_primary_falloff_mindist 255 // 0.3 * radius
+set g_balance_electro_primary_falloff_maxdist 850
+set g_balance_electro_primary_falloff_halflifedist 425
set g_balance_electro_secondary_damage 25
set g_balance_electro_secondary_spread 0
set g_balance_electro_secondary_edgedamage 0
// }}}
// {{{ nex
set g_balance_nex_primary_damage 80
-set g_balance_nex_primary_force 200
+set g_balance_nex_primary_force 400
set g_balance_nex_primary_refire 1.25
set g_balance_nex_primary_animtime 0.75
set g_balance_nex_primary_ammo 5
-set g_balance_nex_primary_damagefalloff_mindist 1000
-set g_balance_nex_primary_damagefalloff_maxdist 3000
-set g_balance_nex_primary_damagefalloff_halflife 4000
-set g_balance_nex_primary_damagefalloff_forcehalflife 4000
+set g_balance_nex_primary_damagefalloff_mindist 0
+set g_balance_nex_primary_damagefalloff_maxdist 4000
+set g_balance_nex_primary_damagefalloff_halflife 2000
+set g_balance_nex_primary_damagefalloff_forcehalflife 2000
set g_balance_nex_secondary 1
set g_balance_nex_secondary_damage 80
-set g_balance_nex_secondary_force -200
+set g_balance_nex_secondary_force -500
set g_balance_nex_secondary_refire 1.25
set g_balance_nex_secondary_animtime 0.75
set g_balance_nex_secondary_ammo 5
-set g_balance_nex_secondary_damagefalloff_mindist 1000
-set g_balance_nex_secondary_damagefalloff_maxdist 3000
-set g_balance_nex_secondary_damagefalloff_halflife 4000
-set g_balance_nex_secondary_damagefalloff_forcehalflife 4000
+set g_balance_nex_secondary_damagefalloff_mindist 0
+set g_balance_nex_secondary_damagefalloff_maxdist 4000
+set g_balance_nex_secondary_damagefalloff_halflife 2000
+set g_balance_nex_secondary_damagefalloff_forcehalflife 2000
// }}}
// {{{ minstanex
set g_balance_minstanex_refire 1.25
// }}}
// {{{ hagar
set g_balance_hagar_primary_damage 12
-set g_balance_hagar_primary_edgedamage 12
+set g_balance_hagar_primary_edgedamage 6
set g_balance_hagar_primary_force 70
-set g_balance_hagar_primary_radius 70
+set g_balance_hagar_primary_radius 100
set g_balance_hagar_primary_spread 0.1
set g_balance_hagar_primary_speed 1800
set g_balance_hagar_primary_lifetime 5
set g_balance_hagar_primary_ammo 1
set g_balance_hagar_secondary 1
set g_balance_hagar_secondary_damage 12
-set g_balance_hagar_secondary_edgedamage 12
+set g_balance_hagar_secondary_edgedamage 6
set g_balance_hagar_secondary_force 70
-set g_balance_hagar_secondary_radius 50
+set g_balance_hagar_secondary_radius 100
set g_balance_hagar_secondary_spread 0.15
set g_balance_hagar_secondary_speed 1800
set g_balance_hagar_secondary_lifetime_min 5
set g_balance_rocketlauncher_speedstart 1000
set g_balance_rocketlauncher_lifetime 5
set g_balance_rocketlauncher_refire 1
-set g_balance_rocketlauncher_animtime 0.2
+set g_balance_rocketlauncher_animtime 0.4
set g_balance_rocketlauncher_ammo 3
set g_balance_rocketlauncher_health 0
set g_balance_rocketlauncher_damageforcescale 0
set g_balance_hlac_secondary_shots 6
// }}}
// {{{ campingrifle
-set g_balance_campingrifle_magazinecapacity 4 // make it pretty much useless in close combat
+set g_balance_campingrifle_magazinecapacity 8 // make it pretty much useless in close combat
set g_balance_campingrifle_reloadtime 2 // matches reload anim
set g_balance_campingrifle_auto_reload_after_changing_weapons 0
set g_balance_campingrifle_bursttime 0
set g_balance_campingrifle_tracer 1
-set g_balance_campingrifle_primary_damage 60
+set g_balance_campingrifle_primary_damage 50
set g_balance_campingrifle_primary_headshotaddeddamage 50
set g_balance_campingrifle_primary_spread 0
set g_balance_campingrifle_primary_force 2
set g_balance_campingrifle_primary_bullethail 0 // empty magazine on shot
set g_balance_campingrifle_secondary 1
set g_balance_campingrifle_secondary_damage 25
-set g_balance_campingrifle_secondary_headshotaddeddamage 20 // 45 damage only on head
+set g_balance_campingrifle_secondary_headshotaddeddamage 25 // 50 damage only on head
set g_balance_campingrifle_secondary_spread 0.008
set g_balance_campingrifle_secondary_force 1
set g_balance_campingrifle_secondary_speed 20000
--- /dev/null
+/* XPM */
+static char * xonotic_32_xpm[] = {
+"32 32 92 1",
+" c None",
+". c #000509",
+"+ c #0F0303",
+"@ c #150400",
+"# c #1B0400",
+"$ c #010C14",
+"% c #220700",
+"& c #010F1A",
+"* c #250700",
+"= c #2B0900",
+"- c #011321",
+"; c #310A03",
+"> c #001628",
+", c #330B00",
+"' c #390B03",
+") c #400A01",
+"! c #3C0E00",
+"~ c #051A31",
+"{ c #331103",
+"] c #430D00",
+"^ c #4D1002",
+"/ c #0A1F36",
+"( c #141E29",
+"_ c #451A07",
+": c #082743",
+"< c #0A273F",
+"[ c #4F1D08",
+"} c #5B1B07",
+"| c #182C3F",
+"1 c #0C2F51",
+"2 c #5D2409",
+"3 c #65240A",
+"4 c #562812",
+"5 c #4D2C1B",
+"6 c #0D3A65",
+"7 c #662A06",
+"8 c #722D0F",
+"9 c #743101",
+"0 c #2C3F53",
+"a c #77310A",
+"b c #1A4673",
+"c c #7C3908",
+"d c #683D29",
+"e c #733B1E",
+"f c #823A03",
+"g c #214C76",
+"h c #8B3E18",
+"i c #8F410D",
+"j c #963F11",
+"k c #604D4A",
+"l c #255A88",
+"m c #255A9B",
+"n c #295B8F",
+"o c #9F4610",
+"p c #984A17",
+"q c #255EA5",
+"r c #1761B1",
+"s c #9A4A21",
+"t c #A54C15",
+"u c #475E79",
+"v c #346399",
+"w c #A2511E",
+"x c #3E6792",
+"y c #5C6272",
+"z c #266BBB",
+"A c #2271BD",
+"B c #4D6C8F",
+"C c #3C6FA5",
+"D c #B15A26",
+"E c #3472BA",
+"F c #3373B4",
+"G c #3479C1",
+"H c #4178AE",
+"I c #287ED1",
+"J c #347CCA",
+"K c #387FC7",
+"L c #4380C1",
+"M c #3A84D2",
+"N c #5489C0",
+"O c #488CD4",
+"P c #648AB7",
+"Q c #628DB2",
+"R c #678DBA",
+"S c #5691CC",
+"T c #748CA8",
+"U c #5F9AD7",
+"V c #6D99CC",
+"W c #74A4DA",
+"X c #81A4C9",
+"Y c #7AACDC",
+"Z c #8DBCE9",
+"` c #98C2EA",
+" ",
+" ",
+" E E ",
+" AUG EUA ",
+" SW WS ",
+" SY YS ",
+" LZr rZL ",
+" E`E cwcppc E`E ",
+" YW pwh}h3}sp WY ",
+" GXL w8hD8^3swD LXG ",
+" VR is^]8h^ai9 RV ",
+" zxS p8]]]]]]Dpptf Sxz ",
+" JlO t}))))))))}io OlJ ",
+" MgJ fo]!!!!!!!!8o JgM ",
+" MbI ih}t!''''''8i IbM ",
+" K6M ijht3,,,,,,!i M6K ",
+" K6K otffa3;;;;;;a9 K6K ",
+" K6Fq f ftia======a rF6K ",
+" M1nz f!======a An1M ",
+" Ib1K a*******29 K1bI ",
+" rv1bJ c[%%%%%%%%a9 Jb1vr ",
+" K::Fq c7%%%%%%%%%*2a9 mF::K ",
+" Ag:1Le_############%_2eH1:gA ",
+" K//:Hd{############{dH://K ",
+" zv~~/Ck[%@@@@@@@@%[kC/~~vz ",
+" Jg>>>gCy4!@++@!4yCg>>>gJ ",
+" Jg----<lB[++[Bl<----gJ ",
+" Jx&&&&&|y==y|&&&&&xJ ",
+" AN0$$$$B55B$$$$0NA ",
+" KPu(.$TT$.(uPK ",
+" rSVQXXQVSr ",
+" "};
alias movetoteam_yellow "sv_cmd movetoteam $1 yellow"
alias movetoteam_auto "sv_cmd movetoteam $1 auto"
-// merge lightmaps up to 1024x1024 textures
-// the default of 2048x2048 is too heavy for my rig (SavageX)
-mod_q3bsp_lightmapmergepower 3
+// merge lightmaps up to 2048x2048 textures
+mod_q3bsp_lightmapmergepower 4
// player defaults
_cl_color 102
hostname "Xonotic $g_xonoticversion Server"
set sv_mapchange_delay 5
set minplayers 0 "number of players playing at the same time (if not enough real players are there the remaining slots are filled with bots)"
-sv_cullentities_trace 1
-r_cullentities_trace 1
// restart server if all players hit "ready"-button
set sv_ready_restart 0 "if set to 1 allow a map to be restarted once all players pressed the \"ready\" button'"
seta cl_particles_oldnexbeam 0 "Uses the old v2.3 Nexgun beam instead of the new beam, only works if server allows it (g_allow_oldnexbeam 1)"
set sv_qcweaponanimation 0
-set g_telefrags 1
-set g_telefrags_avoid 0
+set g_telefrags 1 "telefragging, i.e. killing someone who stands in the way of someone who is teleporting"
+set g_telefrags_teamplay 1 "never telefrag team mates"
+set g_telefrags_avoid 1 "when teleporters have a random destination, avoid teleporting to locations where a telefrag would happen"
set g_teleport_maxspeed 0 "maximum speed that a player can keep when going through a teleporter (if a misc_teleporter_dest also has a cap the smallest one of these will be used), 0 = don't limit, -1 = keep no speed"
-set g_respawn_ghosts 0 "if 1 dead bodies become ghosts and float away when the player respawns"
+set g_respawn_ghosts 1 "if 1 dead bodies become ghosts and float away when the player respawns"
set g_respawn_ghosts_speed 5 "the speed with which respawn ghosts float and rotate"
set g_respawn_ghosts_maxtime 6 "maximum amount of time a respawn ghost can last, minimum time is half this value. 0 disables and ghosts fade when the body would"
// use default physics
set sv_friction_on_land 0
-exec physicsNoQWBunny-nexbased.cfg
+exec physicsNoQWBunny-xpmbased.cfg
set sv_player_viewoffset "0 0 35" "view offset of the player model"
set sv_player_mins "-16 -16 -24" "playermodel mins"
r_mipskins 1
r_shadow_realtime_world_lightmaps 1
seta r_ambient 4
-cl_decals_fadetime 1
+cl_decals_fadetime 5
cl_decals_time 2
seta cl_gunalign 3 "Gun alignment; 1 = right, 2 = left, 3 = center or right, 4 = center or left"
seta cl_nogibs 0 "reduce number of violence effects, or remove them totally"
seta cl_particlegibs 0 "simpler gibs"
seta cl_gibs_damageforcescale 3.5 "force to push around gibs"
-seta cl_gibs_lifetime 14 "average lifetime of gibs"
+seta cl_gibs_lifetime 5 "average lifetime of gibs"
seta cl_gibs_velocity_scale 1 "gib throw velocity force scale"
seta cl_gibs_velocity_random 1 "gib throw velocity randomness scale"
-seta cl_gibs_velocity_up 0 "extra z velocity for gibs"
+seta cl_gibs_velocity_up 1 "extra z velocity for gibs"
seta cl_gibs_ticrate 0.1 "ticrate for gibs"
seta cl_gibs_sloppy 1 "sloppy gibs, may temporarily penetrate walls"
seta cl_casings 1 "enable or disable bullet casings"
// hud variables
set _hud_configure 0 "1 = configure the HUD"
-seta hud_configure_teamcolorforced 1 "1 = force display of team colors in configure mode"
+seta hud_configure_teamcolorforced 0 "1 = force display of team colors in configure mode"
seta hud_configure_checkcollisions 1 "check for collisions against other panels when in hud configure mode"
seta hud_configure_bg_minalpha 0.25 "minimum panel background alpha when in hud configure mode"
seta hud_configure_grid_alpha 0.15 "alpha for visible grid when in configure mode"
cl_netfps 60 // should match
sv_gameplayfix_delayprojectiles 0
sv_gameplayfix_q2airaccelerate 1
+sv_gameplayfix_stepmultipletimes 1
// delay for "kill" to prevent abuse
set g_balance_kill_delay 5
// DP cannot properly detect this, so rather turn off the detection
r_texture_dds_load_dxt1_noalpha 1
+
+// particles optimization
+r_drawparticles_nearclip_min 8
+r_drawparticles_nearclip_max 16
+
+// sv_cullentities_trace is 1, so the client doesn't have to
+sv_cullentities_trace 1
+r_cullentities_trace 0
+
+// less "lagging" of other players, but also less PL tolerant... let's try this
+sv_clmovement_inputtimeout 0.05
alias -tuba_c "-crouch; -tuba_$*"
alias +tuba_j "+jump; +tuba_$*"
alias -tuba_j "-jump; -tuba_$*"
-alias +tuba_1 "+attack"
-alias -tuba_1 "-attack"
-alias +tuba_2 "+attack2"
-alias -tuba_2 "-attack2"
+alias +tuba_1 "+fire"
+alias -tuba_1 "-fire"
+alias +tuba_2 "+fire2"
+alias -tuba_2 "-fire2"
alias +tuba_! "echo cannot play this note, sorry"
alias -tuba_! ""
alias +tuba_ ""
//TAG: soldier
//affirmative sound/player/carni-lycan/player/affirmative 0
-attack sound/player/soldier/coms/attack 2
+attack sound/player/soldier/coms/attack 0
//attacking sound/player/carni-lycan/player/attacking 0
attackinfive sound/player/soldier/coms/attackinfive 0
coverme sound/player/soldier/coms/coverme 0
defend sound/player/soldier/coms/defend 0
//defending sound/player/carni-lycan/player/defending 0
//droppedflag sound/player/carni-lycan/player/droppedflag 0
-flagcarriertakingdamage sound/player/soldier/player/flagcarriertakingdamage 0
+flagcarriertakingdamage sound/player/soldier/coms/flagcarriertakingdamage 0
freelance sound/player/soldier/coms/freelance 2
-getflag sound/player/soldier/player/getflag 0
+getflag sound/player/soldier/coms/getflag 0
incoming sound/player/soldier/coms/incoming 0
meet sound/player/soldier/coms/meet 0
needhelp sound/player/soldier/coms/needhelp 2
// "NoQWBunny" physics based on XPM
sv_gravity 800
sv_maxspeed 320
-
-sv_maxairspeed 320
+sv_maxairspeed 400
sv_stopspeed 100
sv_accelerate 15
sv_airaccelerate 2
sv_friction 8
edgefriction 1
-sv_stepheight 34
+sv_stepheight 26
+// Q1: 16+2
+// Nex: 32+2
+// we try: 24+2
-sv_jumpvelocity 250
-sv_wateraccelerate 4
-sv_waterfriction 1
+// actually, what we want is 266.6666 for 180bpm
+// but 260 takes same amount of frames and is nicer to mappers
+sv_jumpvelocity 260
+sv_wateraccelerate -1
+sv_waterfriction -1
sv_airaccel_sideways_friction 0
-sv_airaccel_qw -0.937
+sv_airaccel_qw -0.8
sv_airstopaccelerate 3
-sv_airstrafeaccelerate 20
-sv_maxairstrafespeed 96
-sv_airstrafeaccel_qw -0.979
+sv_airstrafeaccelerate 24
+sv_maxairstrafespeed 100
+sv_airstrafeaccel_qw -0.95
sv_aircontrol 125
-sv_aircontrol_penalty 100
-sv_aircontrol_power 2.5
-sv_airspeedlimit_nonqw 0
+sv_aircontrol_penalty 150
+sv_aircontrol_power 2
+sv_airspeedlimit_nonqw 800
sv_warsowbunny_turnaccel 0
sv_warsowbunny_accel 0.1593
sv_warsowbunny_topspeed 925
if (previous_game_starttime != startTime) {
if ((time + 5.0) < startTime) {
//if connecting to server while restart was active don't always play prepareforbattle
- sound(self, CHAN_VOICE, strcat("announcer/", cvar_string("cl_announcer"), "/prepareforbattle.wav"), VOL_BASEVOICE, ATTN_NONE);
+ sound(world, CHAN_AUTO, strcat("announcer/", cvar_string("cl_announcer"), "/prepareforbattle.wav"), VOL_BASEVOICE, ATTN_NONE);
}
if (time < startTime) {
restartAnnouncer = spawn();
killnotify_victims[0] = strzone(victim);
}
-void HUD_KillNotify(string s1, string s2, string s3, float type, float msg)
+void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s1 = attacker, s2 = victim
{
float w;
float alsoprint, gentle;
}
else if(type == KILL_FIRST_BLOOD)
print("^1",s1, "^1 drew first blood", "\n");
- // TODO: icon!
else if (type == DEATH_TELEFRAG) {
- HUD_KillNotify_Push(s2, s1, 1, DEATH_TELEFRAG);
+ HUD_KillNotify_Push(s1, s2, 1, DEATH_TELEFRAG);
if(gentle)
- print ("^1",s1, "^1 tried to occupy ", s2, "^1's teleport destination space\n");
+ print ("^1",s2, "^1 tried to occupy ", s1, "^1's teleport destination space\n");
else
- print ("^1",s1, "^1 was telefragged by ", s2, "\n");
+ print ("^1",s2, "^1 was telefragged by ", s1, "\n");
}
else if (type == DEATH_DROWN) {
- HUD_KillNotify_Push(s2, s1, 1, DEATH_DROWN);
+ HUD_KillNotify_Push(s1, s2, 1, DEATH_DROWN);
if(alsoprint)
- print ("^1",s1, "^1 was drowned by ", s2, "\n");
+ print ("^1",s2, "^1 was drowned by ", s1, "\n");
}
else if (type == DEATH_SLIME) {
- HUD_KillNotify_Push(s2, s1, 1, DEATH_SLIME);
+ HUD_KillNotify_Push(s1, s2, 1, DEATH_SLIME);
if(alsoprint)
- print ("^1",s1, "^1 was slimed by ", s2, "\n");
+ print ("^1",s2, "^1 was slimed by ", s1, "\n");
}
else if (type == DEATH_LAVA) {
- HUD_KillNotify_Push(s2, s1, 1, DEATH_LAVA);
+ HUD_KillNotify_Push(s1, s2, 1, DEATH_LAVA);
if(alsoprint)
- print ("^1",s1, "^1 was cooked by ", s2, "\n");
+ print ("^1",s2, "^1 was cooked by ", s1, "\n");
}
else if (type == DEATH_FALL) {
- HUD_KillNotify_Push(s2, s1, 1, DEATH_FALL);
+ HUD_KillNotify_Push(s1, s2, 1, DEATH_FALL);
if(alsoprint)
- print ("^1",s1, "^1 was grounded by ", s2, "\n");
+ print ("^1",s2, "^1 was grounded by ", s1, "\n");
}
else if (type == DEATH_SHOOTING_STAR) {
- HUD_KillNotify_Push(s2, s1, 1, DEATH_SHOOTING_STAR);
+ HUD_KillNotify_Push(s1, s2, 1, DEATH_SHOOTING_STAR);
if(alsoprint)
- print ("^1",s1, "^1 was shot into space by ", s2, "\n");
+ print ("^1",s2, "^1 was shot into space by ", s1, "\n");
}
else if (type == DEATH_SWAMP) {
- HUD_KillNotify_Push(s2, s1, 1, DEATH_GENERIC);
+ HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
if(alsoprint)
- print ("^1",s1, "^1 was conserved by ", s2, "\n");
+ print ("^1",s2, "^1 was conserved by ", s1, "\n");
}
else if (type == DEATH_HURTTRIGGER)
{
- HUD_KillNotify_Push(s2, s1, 1, DEATH_HURTTRIGGER);
+ HUD_KillNotify_Push(s1, s2, 1, DEATH_HURTTRIGGER);
if(alsoprint)
- print("^1",s1, "^1 was thrown into a world of hurt by ", s2, "\n");
+ print("^1",s2, "^1 was thrown into a world of hurt by ", s1, "\n");
} else if(type == DEATH_SBCRUSH) {
- HUD_KillNotify_Push(s2, s1, 1, DEATH_GENERIC);
+ HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
if(alsoprint)
- print ("^1",s1, "^1 was crushed by ^1", s2, "\n");
+ print ("^1",s2, "^1 was crushed by ^1", s1, "\n");
} else if(type == DEATH_SBMINIGUN) {
- HUD_KillNotify_Push(s2, s1, 1, DEATH_GENERIC);
+ HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
if(alsoprint)
- print ("^1",s1, "^1 got shredded by ^1", s2, "\n");
+ print ("^1",s2, "^1 got shredded by ^1", s1, "\n");
} else if(type == DEATH_SBROCKET) {
- HUD_KillNotify_Push(s2, s1, 1, DEATH_GENERIC);
+ HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
if(alsoprint)
- print ("^1",s1, "^1 was blased to bits by ^1", s2, "\n");
+ print ("^1",s2, "^1 was blased to bits by ^1", s1, "\n");
} else if(type == DEATH_SBBLOWUP) {
- HUD_KillNotify_Push(s2, s1, 1, DEATH_GENERIC);
+ HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
if(alsoprint)
- print ("^1",s1, "^1 got caught in the destruction of ^1", s2, "'s vehicle\n");
+ print ("^1",s2, "^1 got caught in the destruction of ^1", s1, "'s vehicle\n");
} else if(type == DEATH_WAKIGUN) {
- HUD_KillNotify_Push(s2, s1, 1, DEATH_GENERIC);
+ HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
if(alsoprint)
- print ("^1",s1, "^1 was bolted down by ^1", s2, "\n");
+ print ("^1",s2, "^1 was bolted down by ^1", s1, "\n");
} else if(type == DEATH_WAKIROCKET) {
- HUD_KillNotify_Push(s2, s1, 1, DEATH_GENERIC);
+ HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
if(alsoprint)
- print ("^1",s1, "^1 could find no shelter from ^1", s2, "'s rockets\n");
+ print ("^1",s2, "^1 could find no shelter from ^1", s1, "'s rockets\n");
} else if(type == DEATH_WAKIBLOWUP) {
- HUD_KillNotify_Push(s2, s1, 1, DEATH_GENERIC);
+ HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
if(alsoprint)
- print ("^1",s1, "^1 dies when ^1", s2, "'s wakizashi dies.\n");
+ print ("^1",s2, "^1 dies when ^1", s1, "'s wakizashi dies.\n");
} else if(type == DEATH_TURRET) {
- HUD_KillNotify_Push(s2, s1, 1, DEATH_GENERIC);
+ HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
if(alsoprint)
- print ("^1",s1, "^1 was pushed into the line of fire by ^1", s2, "\n");
+ print ("^1",s2, "^1 was pushed into the line of fire by ^1", s1, "\n");
} else if(type == DEATH_TOUCHEXPLODE) {
- HUD_KillNotify_Push(s2, s1, 1, DEATH_GENERIC);
+ HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
if(alsoprint)
- print ("^1",s1, "^1 was pushed into an accident by ^1", s2, "\n");
+ print ("^1",s2, "^1 was pushed into an accident by ^1", s1, "\n");
} else if(type == DEATH_CHEAT) {
- HUD_KillNotify_Push(s2, s1, 1, DEATH_GENERIC);
+ HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
if(alsoprint)
- print ("^1",s1, "^1 was unfairly eliminated by ^1", s2, "\n");
+ print ("^1",s2, "^1 was unfairly eliminated by ^1", s1, "\n");
} else if (type == DEATH_FIRE) {
- HUD_KillNotify_Push(s2, s1, 1, DEATH_GENERIC);
+ HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
if(alsoprint)
- print ("^1",s1, "^1 was burnt to death by ^1", s2, "\n");
+ print ("^1",s2, "^1 was burnt to death by ^1", s1, "\n");
} else if (type == DEATH_CUSTOM) {
- HUD_KillNotify_Push(s2, s1, 1, DEATH_CUSTOM);
+ HUD_KillNotify_Push(s1, s2, 1, DEATH_CUSTOM);
if(alsoprint)
- print ("^1",s1, "^1 ", s2, "\n");
+ print ("^1",s2, "^1 ", s1, "\n");
} else {
- HUD_KillNotify_Push(s2, s1, 1, DEATH_GENERIC);
+ HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
if(alsoprint)
- print ("^1",s1, "^1 was fragged by ", s2, "\n");
+ print ("^1",s2, "^1 was fragged by ", s1, "\n");
}
} else if(msg == MSG_SPREE) {
if(type == KILL_END_SPREE) {
pos = panel_pos;
mySize = panel_size;
- panel_fg_alpha = autocvar_hud_panel_fg_alpha;
- panel_bg_alpha_str = autocvar_hud_panel_vote_bg_alpha;
+ if(!autocvar__hud_configure)
+ {
+ panel_fg_alpha = autocvar_hud_panel_fg_alpha;
+ panel_bg_alpha_str = autocvar_hud_panel_vote_bg_alpha;
- if(panel_bg_alpha_str == "") {
- panel_bg_alpha_str = ftos(autocvar_hud_panel_bg_alpha);
- }
- panel_bg_alpha = stof(panel_bg_alpha_str);
- if(autocvar__hud_configure && disable_menu_alphacheck == 2 && highlightedPanel == active_panel) {
- panel_bg_alpha = (1 - autocvar__menu_alpha) * max(autocvar_hud_configure_bg_minalpha, panel_bg_alpha) + autocvar__menu_alpha * panel_bg_alpha;
- } else if(autocvar__hud_configure) {
- panel_bg_alpha = max(autocvar_hud_configure_bg_minalpha, panel_bg_alpha);
- } if(autocvar__hud_configure && !panel_enabled) {
- panel_bg_alpha = 0.25;
+ if(panel_bg_alpha_str == "") {
+ panel_bg_alpha_str = ftos(autocvar_hud_panel_bg_alpha);
+ }
+ panel_bg_alpha = stof(panel_bg_alpha_str);
}
string s;
if(!vote_alpha)
return;
- a = vote_alpha * bound(autocvar_hud_panel_vote_alreadyvoted_alpha, 1 - vote_highlighted, 1);
-
+ a = panel_bg_alpha * vote_alpha * bound(autocvar_hud_panel_vote_alreadyvoted_alpha, 1 - vote_highlighted, 1);
HUD_Panel_DrawBg(a);
+ a = panel_fg_alpha * vote_alpha * bound(autocvar_hud_panel_vote_alreadyvoted_alpha, 1 - vote_highlighted, 1);
if(panel_bg_padding)
{
pos += '1 1 0' * panel_bg_padding;
self.iorigin2 = self.origin;
if(self.iflags & IFLAG_AUTOANGLES)
- self.angles = vectoangles(self.iorigin2 - self.iorigin1);
+ if(self.iorigin2 != self.iorigin1)
+ self.angles = vectoangles(self.iorigin2 - self.iorigin1);
if(self.iflags & IFLAG_ANGLES)
{
// check for pending announcement, play it and remove it
if(announce_snd != "")
{
- sound(self, CHAN_VOICE, strcat("announcer/", cvar_string("cl_announcer"), "/", announce_snd, ".wav"), VOL_BASEVOICE, ATTN_NONE);
+ sound(world, CHAN_AUTO, strcat("announcer/", cvar_string("cl_announcer"), "/", announce_snd, ".wav"), VOL_BASEVOICE, ATTN_NONE);
strunzone(announce_snd);
announce_snd = "";
}
if (!spectatee_status) //do cprint only for players
centerprint("^1Begin!");
- sound(self, CHAN_VOICE, strcat("announcer/", cvar_string("cl_announcer"), "/begin.wav"), VOL_BASEVOICE, ATTN_NONE);
+ sound(world, CHAN_AUTO, strcat("announcer/", cvar_string("cl_announcer"), "/begin.wav"), VOL_BASEVOICE, ATTN_NONE);
//reset maptime announcers now as well
announcer_5min = announcer_1min = FALSE;
centerprint(strcat("^1Game starts in ", ftos(countdown_rounded), " seconds"));
if(countdown_rounded <= 3 && countdown_rounded >= 1) {
- sound(self, CHAN_VOICE, strcat("announcer/", cvar_string("cl_announcer"), "/", ftos(countdown_rounded), ".wav"), VOL_BASEVOICE, ATTN_NONE);
+ sound(world, CHAN_AUTO, strcat("announcer/", cvar_string("cl_announcer"), "/", ftos(countdown_rounded), ".wav"), VOL_BASEVOICE, ATTN_NONE);
}
self.nextthink = getstatf(STAT_GAMESTARTTIME) - (countdown - 1);
if not (warmuplimit == -1 && warmup_stage) {
announcer_5min = TRUE;
//dprint("i will play the sound, I promise!\n");
- sound(self, CHAN_VOICE, strcat("announcer/", cvar_string("cl_announcer"), "/5minutesremain.wav"), VOL_BASEVOICE, ATTN_NONE);
+ sound(world, CHAN_AUTO, strcat("announcer/", cvar_string("cl_announcer"), "/5minutesremain.wav"), VOL_BASEVOICE, ATTN_NONE);
}
}
//if we're in warmup mode, check whether there's a warmup timelimit
if not (warmuplimit == -1 && warmup_stage) {
announcer_1min = TRUE;
- sound(self, CHAN_VOICE, strcat("announcer/", cvar_string("cl_announcer"), "/1minuteremains.wav"), VOL_BASEVOICE, ATTN_NONE);
+ sound(world, CHAN_AUTO, strcat("announcer/", cvar_string("cl_announcer"), "/1minuteremains.wav"), VOL_BASEVOICE, ATTN_NONE);
}
}
}
if(self.noise != "")
{
self.origin = p;
- sound(self, CHAN_AUTO, self.noise, VOL_BASE * self.volume, self.atten);
+ sound(self, CHAN_TRIGGER, self.noise, VOL_BASE * self.volume, self.atten);
}
self.just_toggled = 0;
}
else
Movetype_Physics_MatchServer(autocvar_cl_projectiles_sloppy);
if(!(self.move_flags & FL_ONGROUND))
- self.angles = vectoangles(self.velocity);
+ if(self.velocity != '0 0 0')
+ self.angles = vectoangles(self.velocity);
}
else
{
self.maxs = '3 3 3';
break;
case PROJECTILE_GRENADE:
- self.mins = '0 0 -3';
- self.maxs = '0 0 -3';
+ self.mins = '-3 -3 -3';
+ self.maxs = '3 3 3';
break;
case PROJECTILE_GRENADE_BOUNCING:
- self.mins = '0 0 -3';
- self.maxs = '0 0 -3';
+ self.mins = '-3 -3 -3';
+ self.maxs = '3 3 3';
self.move_movetype = MOVETYPE_BOUNCE;
self.move_touch = SUB_Null;
self.move_bounce_factor = g_balance_grenadelauncher_secondary_bouncefactor;
// on world: announcers, ... INFO
// on players: item pickup ITEMS
// on entities: UNUSED
- // on csqc: UNUSED
+ // on csqc: announcers INFO
float CHAN_WEAPON = 1; // Weapon fire
// on world: UNUSED
// on players: weapon firing WEAPONS
// on world: UNUSED
// on players: item pickup ITEMS
// on entities: platforms moving etc. ITEMS
- // on csqc: UNUSED
+ // on csqc: platforms moving etc. ITEMS
float CHAN_PROJECTILE = 4; // Projectiles
// on world: UNUSED
// on players: projectiles hitting player SHOTS
#include "xonotic/dialog_hudpanel_engineinfo.c"
#include "xonotic/dialog_hudpanel_infomessages.c"
#include "xonotic/dialog_hudpanel_weapons.c"
+#include "xonotic/slider_picmip.c"
if(me.disabled)
return 0;
inRange = (almost_in_bounds(me.valueMin, me.value, me.valueMax));
- if(key == K_LEFTARROW || key == K_KP_LEFTARROW)
+ if(key == K_LEFTARROW || key == K_KP_LEFTARROW || key == K_MWHEELUP)
{
if(inRange)
me.setValue(me, median(me.valueMin, me.value - me.valueKeyStep, me.valueMax));
me.setValue(me, me.valueMax);
return 1;
}
- if(key == K_RIGHTARROW || key == K_KP_RIGHTARROW)
+ if(key == K_RIGHTARROW || key == K_KP_RIGHTARROW || key == K_MWHEELDOWN)
{
if(inRange)
me.setValue(me, median(me.valueMin, me.value + me.valueKeyStep, me.valueMax));
me.TR(me);
me.TDempty(me, 0.2);
s = makeXonoticDecibelsSlider(-20, 0, 0.5, "snd_entchannel3volume");
- makeMulti(s, "snd_playerchannel0volume snd_playerchannel3volume");
+ makeMulti(s, "snd_playerchannel0volume snd_playerchannel3volume snd_csqcchannel3volume");
me.TD(me, 1, 0.8, e = makeXonoticSliderCheckBox(-1000000, 1, s, "Items:"));
me.TD(me, 1, 2, s);
setDependentStringNotEqual(e, "volume", "0");
float have_dds, have_jpg, have_tga;
if((have_dds = (fh = fopen("dds/particles/particlefont.dds", FILE_READ) >= 0)))
fclose(fh);
- if((have_jpg = (fh = fopen("jpg/particles/particlefont.jpg", FILE_READ) >= 0)))
+ if((have_jpg = (fh = fopen("particles/particlefont.jpg", FILE_READ) >= 0)))
fclose(fh);
- if((have_tga = (fh = fopen("tga/particles/particlefont.tga", FILE_READ) >= 0)))
+ if((have_tga = (fh = fopen("particles/particlefont.tga", FILE_READ) >= 0)))
fclose(fh);
if(have_dds && (have_jpg || have_tga))
{
me.TR(me);
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Texture resolution:"));
- me.TD(me, 1, 2, e = makeXonoticTextSlider("gl_picmip"));
+ me.TD(me, 1, 2, e = makeXonoticPicmipSlider());
if(cvar("developer"))
e.addValue(e, "Leet", "1337");
e.addValue(e, "Lowest", "2");
--- /dev/null
+#ifdef INTERFACE
+CLASS(XonoticPicmipSlider) EXTENDS(XonoticTextSlider)
+ METHOD(XonoticPicmipSlider, configureXonoticPicmipSlider, void(entity))
+ METHOD(XonoticPicmipSlider, draw, void(entity))
+ METHOD(XonoticPicmipSlider, autofix, void(entity))
+ENDCLASS(XonoticPicmipSlider)
+entity makeXonoticPicmipSlider(); // note: you still need to call addValue and configureXonoticTextSliderValues!
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticPicmipSlider()
+{
+ entity me;
+ me = spawnXonoticPicmipSlider();
+ me.configureXonoticPicmipSlider(me);
+ return me;
+}
+void XonoticPicmipSlider_configureXonoticPicmipSlider(entity me)
+{
+ me.configureXonoticTextSlider(me, "gl_picmip");
+ me.autofix(me);
+}
+float texmemsize()
+{
+ return
+ (
+ 2500 * pow(0.5, max(0, cvar("gl_picmip") + cvar("gl_picmip_other")))
+ + 1500 * pow(0.5, max(0, cvar("gl_picmip") + cvar("gl_picmip_world")))
+ ) * ((cvar("r_texture_dds_load") || cvar("gl_texturecompression")) ? 0.4 : 1.0); // TC: normalmaps 50%, other 25%, few incompressible, guessing 40% as conservative average
+}
+void XonoticPicmipSlider_autofix(entity me)
+{
+ float max_hard, max_soft;
+ max_hard = cvar("sys_memsize_virtual");
+ max_soft = cvar("sys_memsize_physical");
+ if(max_hard > 0)
+ {
+ while(me.value > 0 && texmemsize() > max_hard)
+ me.setValue(me, me.value - 1);
+ }
+ // TODO also check the soft limit!
+ // TODO better handling than clamping the slider!
+}
+void XonoticPicmipSlider_draw(entity me)
+{
+ me.autofix(me);
+ SUPER(XonoticPicmipSlider).draw(me);
+}
+#endif
ATTRIB(XonoticTextSlider, fontSize, float, SKINFONTSIZE_NORMAL)
ATTRIB(XonoticTextSlider, valueSpace, float, SKINWIDTH_SLIDERTEXT)
ATTRIB(XonoticTextSlider, image, string, SKINGFX_SLIDER)
- ATTRIB(XonoticSlider, tolerance, vector, SKINTOLERANCE_SLIDER)
+ ATTRIB(XonoticTextSlider, tolerance, vector, SKINTOLERANCE_SLIDER)
ATTRIB(XonoticTextSlider, align, float, 0.5)
- ATTRIB(XonoticSlider, color, vector, SKINCOLOR_SLIDER_N)
- ATTRIB(XonoticSlider, colorC, vector, SKINCOLOR_SLIDER_C)
- ATTRIB(XonoticSlider, colorF, vector, SKINCOLOR_SLIDER_F)
- ATTRIB(XonoticSlider, colorD, vector, SKINCOLOR_SLIDER_D)
- ATTRIB(XonoticSlider, color2, vector, SKINCOLOR_SLIDER_S)
+ ATTRIB(XonoticTextSlider, color, vector, SKINCOLOR_SLIDER_N)
+ ATTRIB(XonoticTextSlider, colorC, vector, SKINCOLOR_SLIDER_C)
+ ATTRIB(XonoticTextSlider, colorF, vector, SKINCOLOR_SLIDER_F)
+ ATTRIB(XonoticTextSlider, colorD, vector, SKINCOLOR_SLIDER_D)
+ ATTRIB(XonoticTextSlider, color2, vector, SKINCOLOR_SLIDER_S)
ATTRIB(XonoticTextSlider, cvarName, string, string_null)
METHOD(XonoticTextSlider, loadCvars, void(entity))
for(i = 1; i < n; ++i)
s = strcat(s, " ", cvar_string(argv(i)));
me.setValueFromIdentifier(me, s);
+ if(me.value < 0 && n > 1)
+ {
+ // if it failed: check if all cvars have the same value
+ // if yes, try its value as 1-word identifier
+ for(i = 1; i < n; ++i)
+ if(cvar_string(argv(i)) != cvar_string(argv(i-1)))
+ break;
+ if(i >= n)
+ me.setValueFromIdentifier(me, cvar_string(argv(0)));
+ }
}
void XonoticTextSlider_saveCvars(entity me)
{
END_CHEAT_FUNCTION();
}
+void crosshair_trace_plusvisibletriggers(entity pl);
void Drag_Begin(entity dragger, entity draggee, vector touchpoint);
void Drag_Finish(entity dragger);
float Drag_IsDraggable(entity draggee);
if(Drag_CanDrag(self))
if(self.BUTTON_DRAG)
{
- crosshair_trace(self);
+ crosshair_trace_plusvisibletriggers(self);
if(trace_ent)
if(Drag_IsDraggable(trace_ent))
switch(0)
// ENTITY DRAGGING
+void crosshair_trace_plusvisibletriggers(entity pl)
+{
+ entity first;
+ entity e;
+ first = findchainfloat(solid, SOLID_TRIGGER);
+
+ for (e = first; e; e = e.chain)
+ if (e.model != "")
+ e.solid = SOLID_BSP;
+
+ crosshair_trace(pl);
+
+ for (e = first; e; e = e.chain)
+ e.solid = SOLID_TRIGGER;
+}
+
// on dragger:
.float draggravity;
.float dragspeed; // speed of mouse wheel action
return FALSE;
if(draggee.classname == "func_button")
return FALSE;
- if(draggee.model == "")
- return FALSE;
+// if(draggee.model == "")
+// return FALSE;
if(draggee.classname == "spectator")
return FALSE;
if(draggee.classname == "observer")
return FALSE;
if(draggee.classname == "exteriorweaponentity")
return FALSE;
+ if(draggee.classname == "weaponentity")
+ return FALSE;
return TRUE;
}
switch(c)
{
case 0:
- case 32:
- case 160:
+ case 32: // space
break;
+ case 192: // charmap space
+ if (!cvar("utf8_enable"))
+ break;
+ return FALSE;
+ case 160: // space in unicode fonts
+ case 0xE000 + 192: // utf8 charmap space
+ if (cvar("utf8_enable"))
+ break;
default:
return FALSE;
}
// call the corpse damage function just in case it wants to gib
self.event_damage(inflictor, attacker, 0, deathtype, hitloc, force);
// set up to fade out later
- SUB_SetFade (self, time + 12 + random () * 4, 1);
+ SUB_SetFade (self, time + 6 + random (), 1);
// remove laserdot
if(self.weaponentity)
return;
if(!W_IsWeaponThrowable(w))
return;
- if(self.weaponentity.state != WS_READY)
+ if(self.deadflag == DEAD_NO && self.weaponentity.state != WS_READY)
return;
wb = W_WeaponBit(w);
if(!self.cnt)
self.cnt = particleeffectnum(self.mdl);
- Net_LinkEntity(self, FALSE, 0, pointparticles_SendEntity);
+ Net_LinkEntity(self, (self.spawnflags & 4), 0, pointparticles_SendEntity);
IFTARGETED
{
void Item_ScheduleRespawn(entity e)
{
- Item_Show(e, 0);
- Item_ScheduleRespawnIn(e, ITEM_RESPAWNTIME(e));
+ if(e.respawntime > 0)
+ {
+ Item_Show(e, 0);
+ Item_ScheduleRespawnIn(e, ITEM_RESPAWNTIME(e));
+ }
+ else // if respawntime is -1, this item does not respawn
+ Item_Show(e, -1);
}
void Item_ScheduleInitialRespawn(entity e)
// NOTE: for best experience, you need to swap MGs with SGs in the map or it won't have a MG
// SG -> SG
-void spawnfunc_ammo_shells() { spawnfunc_item_shells(); }
-
-// MG -> MG
-void spawnfunc_weapon_machinegun() { spawnfunc_weapon_uzi(); }
-void spawnfunc_ammo_bullets() { spawnfunc_item_bullets(); }
-
-// GL -> Mortar
-void spawnfunc_ammo_grenades() { spawnfunc_item_rockets(); }
-
-// LG -> Electro
-void spawnfunc_weapon_lightning() { spawnfunc_weapon_electro(); }
-void spawnfunc_ammo_lightning() { spawnfunc_item_cells(); }
-
-// Plasma -> Hagar
-void spawnfunc_weapon_plasmagun() { spawnfunc_weapon_hagar(); }
-void spawnfunc_ammo_cells() { spawnfunc_item_rockets(); }
-
-// Rail -> Nex
-void spawnfunc_weapon_railgun() { spawnfunc_weapon_nex(); }
-void spawnfunc_ammo_slugs() { spawnfunc_item_cells(); }
-
-// BFG -> Crylink
-void spawnfunc_weapon_bfg() { spawnfunc_weapon_crylink(); }
-void spawnfunc_ammo_bfg() { spawnfunc_item_cells(); }
+void spawnfunc_ammo_shells() { spawnfunc_item_shells(); }
+
+// MG -> MG
+void spawnfunc_weapon_machinegun() { spawnfunc_weapon_uzi(); }
+void spawnfunc_ammo_bullets() { spawnfunc_item_bullets(); }
+
+// GL -> Mortar
+void spawnfunc_ammo_grenades() { spawnfunc_item_rockets(); }
+
+// LG -> Electro
+void spawnfunc_weapon_lightning() { spawnfunc_weapon_electro(); }
+void spawnfunc_ammo_lightning() { spawnfunc_item_cells(); }
+
+// Plasma -> Hagar
+void spawnfunc_weapon_plasmagun() { spawnfunc_weapon_hagar(); }
+void spawnfunc_ammo_cells() { spawnfunc_item_rockets(); }
+
+// Rail -> Rifle
+void spawnfunc_weapon_railgun() { spawnfunc_weapon_campingrifle(); }
+void spawnfunc_ammo_slugs() { spawnfunc_item_bullets(); }
+
+// BFG -> Crylink
+void spawnfunc_weapon_bfg() { spawnfunc_weapon_crylink(); }
+void spawnfunc_ammo_bfg() { spawnfunc_item_cells(); }
// RL -> RL
-void spawnfunc_ammo_rockets() { spawnfunc_item_rockets(); }
-
-// Armor
-void spawnfunc_item_armor_body() { spawnfunc_item_armor_large(); }
-void spawnfunc_item_armor_combat() { spawnfunc_item_armor_big(); }
-void spawnfunc_item_armor_shard() { spawnfunc_item_armor_small(); }
-void spawnfunc_item_enviro() { spawnfunc_item_invincible(); }
+void spawnfunc_ammo_rockets() { spawnfunc_item_rockets(); }
+
+// Armor
+void spawnfunc_item_armor_body() { spawnfunc_item_armor_large(); }
+void spawnfunc_item_armor_combat() { spawnfunc_item_armor_big(); }
+void spawnfunc_item_armor_shard() { spawnfunc_item_armor_small(); }
+void spawnfunc_item_enviro() { spawnfunc_item_invincible(); }
// weapon remove ent from defrag
-void spawnfunc_target_init()
+void spawnfunc_target_init()
{
self.spawnflags = 0; // remove all weapons except the ones listed below
self.netname = "laser uzi"; // keep these weapons through the remove trigger
float check_tdeath(entity player, vector org, vector telefragmin, vector telefragmax)
{
- TDEATHLOOP(org)
+ if (player.classname == "player" && player.health >= 1)
{
- if ((player.classname == "player") && (player.health >= 1))
+ TDEATHLOOP(org)
{
- if(head.classname == "player")
- if(head.health >= 1)
- return 1;
+ if not(teamplay && cvar("g_telefrags_teamplay") && head.team == player.team)
+ if(head.classname == "player")
+ if(head.health >= 1)
+ return 1;
}
}
return 0;
{
TDEATHLOOP(player.origin)
{
- if ((player.classname == "player") && (player.health >= 1))
+ if (player.classname == "player" && player.health >= 1)
{
- if(head.classname == "player")
- if(head.health >= 1)
- ++tdeath_hit;
- Damage (head, teleporter, telefragger, 10000, DEATH_TELEFRAG, head.origin, '0 0 0');
+ if not(teamplay && cvar("g_telefrags_teamplay") && head.team == player.team)
+ {
+ if(head.classname == "player")
+ if(head.health >= 1)
+ ++tdeath_hit;
+ Damage (head, teleporter, telefragger, 10000, DEATH_TELEFRAG, head.origin, '0 0 0');
+ }
}
- else if (telefragger.health < 1) // corpses gib
- Damage (head, teleporter, telefragger, 10000, DEATH_TELEFRAG, head.origin, '0 0 0');
else // dead bodies and monsters gib themselves instead of telefragging
Damage (telefragger, teleporter, telefragger, 10000, DEATH_TELEFRAG, telefragger.origin, '0 0 0');
}
#define TELEPORT_FLAG_SOUND 1
#define TELEPORT_FLAG_PARTICLES 2
#define TELEPORT_FLAG_TDEATH 4
+#define TELEPORT_FLAG_FORCE_TDEATH 8
#define TELEPORT_FLAGS_WARPZONE 0
-#define TELEPORT_FLAGS_PORTAL (TELEPORT_FLAG_SOUND | TELEPORT_FLAG_PARTICLES)
+#define TELEPORT_FLAGS_PORTAL (TELEPORT_FLAG_SOUND | TELEPORT_FLAG_PARTICLES | TELEPORT_FLAG_TDEATH | TELEPORT_FLAG_FORCE_TDEATH)
#define TELEPORT_FLAGS_TELEPORTER (TELEPORT_FLAG_SOUND | TELEPORT_FLAG_PARTICLES | TELEPORT_FLAG_TDEATH)
void TeleportPlayer(entity teleporter, entity player, vector to, vector to_angles, vector to_velocity, vector telefragmin, vector telefragmax, float tflags)
{
if(player.classname == "player")
{
if(tflags & TELEPORT_FLAG_TDEATH)
- if(player.takedamage && player.deadflag == DEAD_NO && !g_race && !g_cts && cvar("g_telefrags"))
+ if(player.takedamage && player.deadflag == DEAD_NO && !g_race && !g_cts && (cvar("g_telefrags") || (tflags & TELEPORT_FLAG_FORCE_TDEATH)))
tdeath(player, teleporter, telefragger, telefragmin, telefragmax);
// player no longer is on ground
makevectors(self.owner.v_angle);
- float dt;
+ float dt, f;
dt = frametime;
if not(self.owner.items & IT_UNLIMITED_WEAPON_AMMO)
{
{
vector force;
force = w_shotdir * cvar("g_balance_electro_primary_force") + '0 0 1' * cvar("g_balance_electro_primary_force_up");
- Damage (trace_ent, self.owner, self.owner, cvar("g_balance_electro_primary_damage") * dt, WEP_ELECTRO, trace_endpos, force * dt);
- Damage_RecordDamage(self.owner, WEP_ELECTRO, cvar("g_balance_electro_primary_damage") * dt);
+
+ f = ExponentialFalloff(cvar("g_balance_electro_primary_falloff_mindist"), cvar("g_balance_electro_primary_falloff_maxdist"), cvar("g_balance_electro_primary_falloff_halflifedist"), vlen(WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos) - w_shotorg));
+
+ Damage (trace_ent, self.owner, self.owner, cvar("g_balance_electro_primary_damage") * dt * f, WEP_ELECTRO, trace_endpos, force * dt);
+ Damage_RecordDamage(self.owner, WEP_ELECTRO, cvar("g_balance_electro_primary_damage") * dt * f);
}
W_Plasma_TriggerCombo(trace_endpos, cvar("g_balance_electro_primary_comboradius"), self.owner);
}
else if(req == WR_PRECACHE)
{
- precache_sound("weapons/fireball_impact.wav");
precache_sound("weapons/fireball_impact2.wav");
}
else if (req == WR_SUICIDEMESSAGE)
self.event_damage = SUB_Null;
self.takedamage = DAMAGE_NO;
+
+ if(self.movetype == MOVETYPE_NONE)
+ self.velocity = self.oldvelocity;
+
RadiusDamage (self, self.owner, cvar("g_balance_grenadelauncher_secondary_damage"), cvar("g_balance_grenadelauncher_secondary_edgedamage"), cvar("g_balance_grenadelauncher_secondary_radius"), world, cvar("g_balance_grenadelauncher_secondary_force"), self.projectiledeathtype, other);
remove (self);
void W_Grenade_Touch1 (void)
{
PROJECTILE_TOUCH;
- if(cvar("g_balance_grenadelauncher_primary_sticky") && other.takedamage != DAMAGE_AIM)
+ if(cvar("g_balance_grenadelauncher_primary_sticky") && (!other || (other.takedamage != DAMAGE_AIM && other.movetype == MOVETYPE_NONE)))
{
spamsound (self, CHAN_PROJECTILE, "weapons/grenade_stick.wav", VOL_BASE, ATTN_NORM);
void W_Grenade_Touch2 (void)
{
PROJECTILE_TOUCH;
- if(cvar("g_balance_grenadelauncher_secondary_sticky") && other.takedamage != DAMAGE_AIM)
+ if(cvar("g_balance_grenadelauncher_secondary_sticky") && (!other || (other.takedamage != DAMAGE_AIM && other.movetype == MOVETYPE_NONE)))
{
spamsound (self, CHAN_PROJECTILE, "weapons/grenade_stick.wav", VOL_BASE, ATTN_NORM);
}
else
{
- if (other.takedamage == DAMAGE_AIM)
+ if (cvar("g_balance_grenadelauncher_secondary_sticky") || other.takedamage == DAMAGE_AIM)
{
self.use ();
}
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
self.ammo_rockets = self.ammo_rockets - cvar("g_balance_grenadelauncher_primary_ammo");
- W_SetupShot_ProjectileSize (self, '0 0 -3', '0 0 -3', FALSE, 4, "weapons/grenade_fire.wav", cvar("g_balance_grenadelauncher_primary_damage"));
+ W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', FALSE, 4, "weapons/grenade_fire.wav", cvar("g_balance_grenadelauncher_primary_damage"));
w_shotdir = v_forward; // no TrueAim for grenades please
pointparticles(particleeffectnum("grenadelauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
PROJECTILE_MAKETRIGGER(gren);
gren.projectiledeathtype = WEP_GRENADE_LAUNCHER;
setorigin(gren, w_shotorg);
- setsize(gren, '0 0 -3', '0 0 -3');
+ setsize(gren, '-3 -3 -3', '3 3 3');
gren.nextthink = time + cvar("g_balance_grenadelauncher_primary_lifetime");
gren.think = adaptor_think2use_hittype_splash;
if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
self.ammo_rockets = self.ammo_rockets - cvar("g_balance_grenadelauncher_secondary_ammo");
- W_SetupShot_ProjectileSize (self, '0 0 -3', '0 0 -3', FALSE, 4, "weapons/grenade_fire.wav", cvar("g_balance_grenadelauncher_secondary_damage"));
+ W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', FALSE, 4, "weapons/grenade_fire.wav", cvar("g_balance_grenadelauncher_secondary_damage"));
w_shotdir = v_forward; // no TrueAim for grenades please
pointparticles(particleeffectnum("grenadelauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
PROJECTILE_MAKETRIGGER(gren);
gren.projectiledeathtype = WEP_GRENADE_LAUNCHER | HITTYPE_SECONDARY;
setorigin(gren, w_shotorg);
- setsize(gren, '0 0 -3', '0 0 -3');
+ setsize(gren, '-3 -3 -3', '3 3 3');
gren.nextthink = time + cvar("g_balance_grenadelauncher_secondary_lifetime");
gren.think = adaptor_think2use_hittype_splash;
WarpZone_traceline_antilag(self.owner, self.owner.origin + self.owner.view_ofs, targpos, FALSE, self.owner, ANTILAG_LATENCY(self.owner));
// apply the damage, also remove self
- if(trace_fraction < 1 && trace_ent.takedamage == DAMAGE_AIM && trace_ent.classname == "player")
+ if(trace_fraction < 1 && trace_ent.takedamage == DAMAGE_AIM && (trace_ent.classname == "player" || trace_ent.classname == "body"))
{
vector force;
force = angle * cvar("g_balance_shotgun_secondary_force");
- Damage (trace_ent, self.owner, self.owner, cvar("g_balance_shotgun_secondary_damage") * ((f + 1) / 2), WEP_SHOTGUN | HITTYPE_SECONDARY , self.owner.origin + self.owner.view_ofs, force);
- Damage_RecordDamage(self.owner, WEP_SHOTGUN | HITTYPE_SECONDARY, cvar("g_balance_shotgun_secondary_damage") * ((f + 1) / 2));
+ Damage (trace_ent, self.owner, self.owner, cvar("g_balance_shotgun_secondary_damage") * min(1, f + 1), WEP_SHOTGUN | HITTYPE_SECONDARY , self.owner.origin + self.owner.view_ofs, force);
+ Damage_RecordDamage(self.owner, WEP_SHOTGUN | HITTYPE_SECONDARY, cvar("g_balance_shotgun_secondary_damage") * min(1, f + 1));
remove(self);
}
else if(time >= self.cnt + cvar("g_balance_shotgun_secondary_melee_time")) // missed, remove ent
void spawnfunc_weapon_shotgun(); // defined in t_items.qc
+.float shotgun_primarytime;
+
float w_shotgun(float req)
{
if (req == WR_AIM)
else if (req == WR_THINK)
{
if (self.BUTTON_ATCK)
- if (weapon_prepareattack(0, cvar("g_balance_shotgun_primary_refire")))
{
- W_Shotgun_Attack();
- weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_shotgun_primary_animtime"), w_ready);
+ if (time >= self.shotgun_primarytime) // handle refire separately so the secondary can be fired straight after a primary
+ {
+ if(weapon_prepareattack(0, cvar("g_balance_shotgun_primary_animtime")))
+ {
+ W_Shotgun_Attack();
+ self.shotgun_primarytime = time + cvar("g_balance_shotgun_primary_refire");
+ weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_shotgun_primary_animtime"), w_ready);
+ }
+ }
}
if (self.BUTTON_ATCK2 && cvar("g_balance_shotgun_secondary"))
if (weapon_prepareattack(1, cvar("g_balance_shotgun_secondary_refire")))
--- /dev/null
+models/lasertrail
+{
+ cull disable
+ {
+ map models/ltrail.tga
+ blendfunc add
+ rgbGen identity
+ }
+}
+
+models/lasercore
+{
+ deformVertexes autosprite
+ {
+ map models/lcore.tga
+ blendfunc add
+ rgbGen identity
+ }
+}
+
+models/plastrail
+{
+ cull disable
+ {
+ map models/ptrail.tga
+ blendfunc add
+ rgbGen identity
+ }
+}
+
+models/plascore
+{
+ deformVertexes autosprite
+ {
+ map models/pcore.tga
+ blendfunc add
+ rgbGen identity
+ }
+}
+
+models/bultrail
+{
+ cull disable
+ {
+ map models/bultrail.tga
+ blendfunc add
+ rgbGen identity
+ }
+}
+
+models/bulcore
+{
+ deformVertexes autosprite
+ {
+ map models/bulcore.tga
+ blendfunc add
+ rgbGen identity
+ }
+}
+
+models/eleccore
+{
+ {
+ animmap 45 models/eleccore.tga models/eleccore2.tga models/eleccore3.tga models/eleccore4.tga models/eleccore5.tga models/eleccore6.tga models/eleccore7.tga models/eleccore8.tga
+ blendfunc blend
+ rgbGen identity
+ }
+}
+
+models/elecglass
+{
+ {
+ map models/elecglass.tga
+ blendfunc add
+ rgbGen lightingDiffuse
+ }
+}
+
+models/elecbeam
+{
+ cull disable
+ {
+ map models/elecbeam.tga
+ blendfunc add
+ rgbGen identity
+ tcMod scroll -2 0
+ }
+}
+
--- /dev/null
+nutsandboltssteel
+{
+ {
+ map textures/nutsandbolts3
+ tcgen environment
+ }
+ {
+ map $lightmap
+ }
+}
--- /dev/null
+rocketThrust
+{
+ surfaceparm trans
+ cull disable
+ {
+ clampmap textures/thrustc1.tga
+ blendfunc add
+ tcMod rotate 720
+ }
+}
-//affirmative sound/player/torus/affirmative 0
-attack sound/player/torus/attack 0
-//attacking sound/player/torus/attacking 0
-attackinfive sound/player/torus/letsgo 0
-coverme sound/player/torus/coverme 0
-//defend sound/player/voice/defend 1
-//defending sound/player/torus/defending 0
-//droppedflag sound/player/voice/droppedflag 0
-//flagcarriertakingdamage sound/player/voice/flagcarriertakingdamage 0
-//freelance sound/player/voice/freelance 1
-//getflag sound/player/voice/getflag 0
-incoming sound/player/torus/incoming 0
-meet sound/player/torus/waypoint 0
-needhelp sound/player/torus/needhelp 0
-//negative sound/player/torus/negative 0
-//onmyway sound/player/torus/onmyway 0
-//roaming sound/player/torus/roaming 0
-//seenenemy sound/player/torus/seenenemy 0
-seenflag sound/player/torus/flagseen 0
-taunt sound/player/torus/taunt 0
-teamshoot sound/player/torus/teamshoot 0
-death sound/player/torus/death 0
-drown sound/player/torus/drown 0
-//fall sound/debug/v_falling 0
+//affirmative sound/player/torus/coms/affirmative 0
+attack sound/player/torus/coms/attack 0
+//attacking sound/player/torus/coms/attacking 0
+attackinfive sound/player/torus/coms/letsgo 0
+coverme sound/player/torus/coms/coverme 0
+//defend sound/player/torus/coms/defend 1
+//defending sound/player/torus/coms/defending 0
+//droppedflag sound/player/torus/coms/droppedflag 0
+//flagcarriertakingdamage sound/player/torus/coms/flagcarriertakingdamage 0
+//freelance sound/player/torus/coms/freelance 1
+//getflag sound/player/torus/coms/getflag 0
+incoming sound/player/torus/coms/incoming 0
+meet sound/player/torus/coms/waypoint 0
+needhelp sound/player/torus/coms/needhelp 0
+//negative sound/player/torus/coms/negative 0
+//onmyway sound/player/torus/coms/onmyway 0
+//roaming sound/player/torus/coms/roaming 0
+//seenenemy sound/player/torus/coms/seenenemy 0
+seenflag sound/player/torus/coms/seenflag 0
+taunt sound/player/torus/coms/taunt 2
+teamshoot sound/player/torus/coms/teamshoot 0
+death sound/player/torus/player/death 0
+drown sound/player/torus/player/drown 0
+//fall sound/player/torus/player/fall 0
//falling sound/debug/v_falling 0
-gasp sound/player/torus/gasp 0
-jump sound/player/torus/jump 0
-pain25 sound/player/torus/pain25 0
-pain50 sound/player/torus/pain50 0
-pain75 sound/player/torus/pain75 0
-pain100 sound/player/torus/pain100 0
+gasp sound/player/torus/player/gasp 0
+jump sound/player/torus/player/fall 0
+pain25 sound/player/torus/player/pain25 0
+pain50 sound/player/torus/player/pain50 0
+pain75 sound/player/torus/player/pain75 0
+pain100 sound/player/torus/player/pain100 0
**Active Contributors
Ben "MooKow" Banker
+Calinou
Kristian "morfar" Johansson
+kojn
Maik "SavageX" Merten
MrBougo
Stephan "esteel" Stahl