r4274 - in branches/nexuiz-2.0: . data data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Mon Sep 1 09:36:58 EDT 2008
Author: div0
Date: 2008-09-01 09:36:58 -0400 (Mon, 01 Sep 2008)
New Revision: 4274
Modified:
branches/nexuiz-2.0/.patchsets
branches/nexuiz-2.0/changes-since-last-release
branches/nexuiz-2.0/data/defaultNexuiz.cfg
branches/nexuiz-2.0/data/qcsrc/server/cl_weapons.qc
branches/nexuiz-2.0/data/qcsrc/server/cl_weaponsystem.qc
branches/nexuiz-2.0/data/qcsrc/server/defs.qh
branches/nexuiz-2.0/data/qcsrc/server/g_hook.qc
branches/nexuiz-2.0/data/qcsrc/server/t_teleporters.qc
Log:
r4265 | div0 | 2008-08-30 19:02:48 +0200 (Sat, 30 Aug 2008) | 3 lines
hook: always enter the pulling state right
hook: detach when teleporting
r4269 | esteel | 2008-08-31 02:56:32 +0200 (Sun, 31 Aug 2008) | 2 lines
add some more useful userbinds (team: positive, flag-seen and toggle vid_fullscreen, cl_capturevideo) correct binds to match
r4270 | div0 | 2008-08-31 15:17:05 +0200 (Sun, 31 Aug 2008) | 2 lines
unbreak NixNex
r4273 | div0 | 2008-09-01 15:33:10 +0200 (Mon, 01 Sep 2008) | 2 lines
waitforinput 2 (was: 4), reduces player warping even more. Now trying 1 on my server.
Modified: branches/nexuiz-2.0/.patchsets
===================================================================
--- branches/nexuiz-2.0/.patchsets 2008-09-01 13:33:10 UTC (rev 4273)
+++ branches/nexuiz-2.0/.patchsets 2008-09-01 13:36:58 UTC (rev 4274)
@@ -1,2 +1,2 @@
master = svn://svn.icculus.org/nexuiz/trunk
-revisions_applied = 1-4263
+revisions_applied = 1-4273
Modified: branches/nexuiz-2.0/changes-since-last-release
===================================================================
--- branches/nexuiz-2.0/changes-since-last-release 2008-09-01 13:33:10 UTC (rev 4273)
+++ branches/nexuiz-2.0/changes-since-last-release 2008-09-01 13:36:58 UTC (rev 4274)
@@ -25,7 +25,8 @@
game: cvar teamplay_lockonrestart
game: fix some memory leaks
game: hook attaches to moving objects
-game: hook can pull players
+game: hook can pull players (but detaches when that player shoots you)
+game: hook detaches when teleporting
game: hook jitter-less
game: hook no longer goes through walls
game: hook sky-attach bug fixed
Modified: branches/nexuiz-2.0/data/defaultNexuiz.cfg
===================================================================
--- branches/nexuiz-2.0/data/defaultNexuiz.cfg 2008-09-01 13:33:10 UTC (rev 4273)
+++ branches/nexuiz-2.0/data/defaultNexuiz.cfg 2008-09-01 13:36:58 UTC (rev 4274)
@@ -573,7 +573,7 @@
cl_sound_r_exp3 ""
sv_sound_land ""
sv_sound_watersplash ""
-sv_clmovement_waitforinput 4
+sv_clmovement_waitforinput 2
// startmap_dm is used when running with the -listen or -dedicated commandline options
alias startmap_sp "set _sv_init 1; map aggressor"
@@ -678,16 +678,16 @@
bind kp_downarrow "+userbind 2"
bind kp_pgdn "+userbind 3"
bind kp_leftarrow "+userbind 4"
-bind kp_5 "+userbind 5"
-bind kp_rightarrow "+userbind 6"
-bind kp_home "+userbind 7"
-bind kp_uparrow "+userbind 8"
-bind kp_pgup "+userbind 9"
-bind kp_multiply "+userbind 10"
-bind kp_slash "+userbind 11"
-bind kp_enter "+userbind 13"
-bind kp_plus "+userbind 14"
-bind kp_minus "+userbind 15"
+bind kp_5 "+userbind 6"
+bind kp_rightarrow "+userbind 7"
+bind kp_home "+userbind 9"
+bind kp_uparrow "+userbind 10"
+bind kp_pgup "+userbind 11"
+bind kp_multiply "+userbind 12"
+bind kp_slash "+userbind 13"
+bind kp_enter "+userbind 15"
+bind kp_plus "+userbind 16"
+bind kp_minus "+userbind 17"
// these commands can be voted
set sv_vote_commands "restart timelimit fraglimit chmap gotomap g_grappling_hook sv_defaultplayer_fbskin_green sv_defaultplayer_fbskin_red sv_defaultplayer_fbskin_orange sv_defaultplayer_fbskin_off endmatch reducematchtime extendmatchtime allready"
@@ -923,22 +923,22 @@
seta "userbind2_press" "say_team free item %x^7 (l:%y^7); g_waypointsprite_team_here_p"; seta "userbind2_release" ""; seta "userbind2_description" "team: free item, icon"
seta "userbind3_press" "say_team took item (l:%l^7); g_waypointsprite_team_here"; seta "userbind3_release" ""; seta "userbind3_description" "team: took item, icon"
seta "userbind4_press" "say_team negative"; seta "userbind4_release" ""; seta "userbind4_description" "team: negative"
-seta "userbind5_press" "say_team need help (l:%l^7) (h:%h^7 a:%a^7 w:%w^7); g_waypointsprite_team_helpme"; seta "userbind5_release" ""; seta "userbind5_description" "team: need help, icon"
-seta "userbind6_press" "say_team enemy seen (l:%y^7); g_waypointsprite_team_danger_p"; seta "userbind6_release" ""; seta "userbind6_description" "team: enemy seen, icon"
-seta "userbind7_press" "say_team defending (l:%l^7) (h:%h^7 a:%a^7 w:%w^7); g_waypointsprite_team_here"; seta "userbind7_release" ""; seta "userbind7_description" "team: defending, icon"
-seta "userbind8_press" "say_team roaming (l:%l^7) (h:%h^7 a:%a^7 w:%w^7); g_waypointsprite_team_here"; seta "userbind8_release" ""; seta "userbind8_description" "team: roaming, icon"
-seta "userbind9_press" "say_team attacking (l:%l^7) (h:%h^7 a:%a^7 w:%w^7); g_waypointsprite_team_here"; seta "userbind9_release" ""; seta "userbind9_description" "team: attacking, icon"
-seta "userbind10_press" "say_team killed flagcarrier (l:%y^7); g_waypointsprite_team_p"; seta "userbind10_release" ""; seta "userbind10_description" "team: killed flag, icon"
-seta "userbind11_press" "say_team dropped flag (l:%d^7); g_waypointsprite_team_here_d"; seta "userbind11_release" ""; seta "userbind11_description" "team: dropped flag, icon"
-seta "userbind12_press" "say_team dropped gun %w (l:%l^7); g_waypointsprite_team_here; wait; dropweapon"; seta "userbind12_release" ""; seta "userbind12_description" "team: drop, icon"
-seta "userbind13_press" "say :-) / nice one"; seta "userbind13_release" ""; seta "userbind13_description" "chat: nice one"
-seta "userbind14_press" "say good game"; seta "userbind14_release" ""; seta "userbind14_description" "chat: good game"
-seta "userbind15_press" "say hi / good luck and have fun"; seta "userbind15_release" ""; seta "userbind15_description" "chat: hi / good luck"
-seta "userbind16_press" ""; seta "userbind16_release" ""; seta "userbind16_description" ""
-seta "userbind17_press" ""; seta "userbind17_release" ""; seta "userbind17_description" ""
-seta "userbind18_press" ""; seta "userbind18_release" ""; seta "userbind18_description" ""
-seta "userbind19_press" ""; seta "userbind19_release" ""; seta "userbind19_description" ""
-seta "userbind20_press" ""; seta "userbind20_release" ""; seta "userbind20_description" ""
+seta "userbind5_press" "say_team positive"; seta "userbind5_release" ""; seta "userbind5_description" "team: positive"
+seta "userbind6_press" "say_team need help (l:%l^7) (h:%h^7 a:%a^7 w:%w^7); g_waypointsprite_team_helpme"; seta "userbind6_release" ""; seta "userbind6_description" "team: need help, icon"
+seta "userbind7_press" "say_team enemy seen (l:%y^7); g_waypointsprite_team_danger_p"; seta "userbind7_release" ""; seta "userbind7_description" "team: enemy seen, icon"
+seta "userbind8_press" "say_team flag seen (l:%y^7); g_waypointsprite_team_here_p"; seta "userbind8_release" ""; seta "userbind8_description" "team: flag seen, icon"
+seta "userbind9_press" "say_team defending (l:%l^7) (h:%h^7 a:%a^7 w:%w^7); g_waypointsprite_team_here"; seta "userbind9_release" ""; seta "userbind9_description" "team: defending, icon"
+seta "userbind10_press" "say_team roaming (l:%l^7) (h:%h^7 a:%a^7 w:%w^7); g_waypointsprite_team_here"; seta "userbind10_release" ""; seta "userbind10_description" "team: roaming, icon"
+seta "userbind11_press" "say_team attacking (l:%l^7) (h:%h^7 a:%a^7 w:%w^7); g_waypointsprite_team_here"; seta "userbind11_release" ""; seta "userbind11_description" "team: attacking, icon"
+seta "userbind12_press" "say_team killed flagcarrier (l:%y^7); g_waypointsprite_team_p"; seta "userbind12_release" ""; seta "userbind12_description" "team: killed flag, icon"
+seta "userbind13_press" "say_team dropped flag (l:%d^7); g_waypointsprite_team_here_d"; seta "userbind13_release" ""; seta "userbind13_description" "team: dropped flag, icon"
+seta "userbind14_press" "say_team dropped gun %w (l:%l^7); g_waypointsprite_team_here; wait; dropweapon"; seta "userbind14_release" ""; seta "userbind14_description" "team: drop, icon"
+seta "userbind15_press" "say :-) / nice one"; seta "userbind15_release" ""; seta "userbind15_description" "chat: nice one"
+seta "userbind16_press" "say good game"; seta "userbind16_release" ""; seta "userbind16_description" "chat: good game"
+seta "userbind17_press" "say hi / good luck and have fun"; seta "userbind17_release" ""; seta "userbind17_description" "chat: hi / good luck"
+seta "userbind18_press" "+showscores; +con_chat_maximize"; seta "userbind18_release" "-showscores; -con_chat_maximize"; seta "userbind18_description" "scoreboard / chat history"
+seta "userbind19_press" "toggle cl_capturevideo"; seta "userbind19_release" ""; seta "userbind19_description" "toggle recording .avi"
+seta "userbind20_press" "toggle vid_fullscreen; vid_restart"; seta "userbind20_release" ""; seta "userbind20_description" "toggle fullscreen"
seta "userbind21_press" ""; seta "userbind21_release" ""; seta "userbind21_description" ""
seta "userbind22_press" ""; seta "userbind22_release" ""; seta "userbind22_description" ""
seta "userbind23_press" ""; seta "userbind23_release" ""; seta "userbind23_description" ""
Modified: branches/nexuiz-2.0/data/qcsrc/server/cl_weapons.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/cl_weapons.qc 2008-09-01 13:33:10 UTC (rev 4273)
+++ branches/nexuiz-2.0/data/qcsrc/server/cl_weapons.qc 2008-09-01 13:36:58 UTC (rev 4274)
@@ -35,7 +35,6 @@
if(weaponid == WEP_HAGAR) return "Hagar";
if(weaponid == WEP_ROCKET_LAUNCHER) return "Rocket Launcher";
if(weaponid == WEP_CRYLINK) return "Crylink";
- if(weaponid == WEP_ANTINEX) return "Antinex";
return "@!#%'n Tuba";
}
@@ -68,7 +67,6 @@
case WEP_NEX: return IT_CELLS;
case WEP_HAGAR: return IT_ROCKETS;
case WEP_ROCKET_LAUNCHER: return IT_ROCKETS;
- case WEP_ANTINEX: return IT_ROCKETS;
default: return 0;
}
}
@@ -252,11 +250,18 @@
}
else if (self.weaponentity.state == WS_READY)
{
+#ifdef INDEPENDENT_ATTACK_FINISHED
+ if(ATTACK_FINISHED(self) > time + frametime * 0.5)
+ {
+#endif
sound (self, CHAN_WEAPON, "weapons/weapon_switch.wav", VOL_BASE, ATTN_NORM);
self.weaponentity.state = WS_DROP;
// set up weapon switch think in the future, and start drop anim
weapon_thinkf(WFRAME_IDLE, cvar("g_balance_weaponswitchdelay"), w_clear);
weapon_boblayer1(PLAYER_WEAPONSELECTION_SPEED, PLAYER_WEAPONSELECTION_RANGE);
+#ifdef INDEPENDENT_ATTACK_FINISHED
+ }
+#endif
}
}
Modified: branches/nexuiz-2.0/data/qcsrc/server/cl_weaponsystem.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/cl_weaponsystem.qc 2008-09-01 13:33:10 UTC (rev 4273)
+++ branches/nexuiz-2.0/data/qcsrc/server/cl_weaponsystem.qc 2008-09-01 13:36:58 UTC (rev 4274)
@@ -443,6 +443,10 @@
if (timeoutStatus == 2) //don't allow the player to shoot while game is paused
return FALSE;
+ // do not even think about shooting if switching
+ if(self.switchweapon != self.weapon)
+ return FALSE;
+
// don't fire if previous attack is not finished
if (ATTACK_FINISHED(self) > time + frametime * 0.5)
return FALSE;
Modified: branches/nexuiz-2.0/data/qcsrc/server/defs.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/defs.qh 2008-09-01 13:33:10 UTC (rev 4273)
+++ branches/nexuiz-2.0/data/qcsrc/server/defs.qh 2008-09-01 13:36:58 UTC (rev 4274)
@@ -1,3 +1,5 @@
+#define INDEPENDENT_ATTACK_FINISHED
+
float require_spawnfunc_prefix; // if this float exists, only functions with spawnfunc_ name prefix qualify as spawn functions
#define BUTTON_ATCK button0
@@ -212,11 +214,10 @@
float WEP_NEX = 7; // float IT_NEX = 32;
float WEP_HAGAR = 8; // float IT_HAGAR = 64;
float WEP_ROCKET_LAUNCHER = 9; // float IT_ROCKET_LAUNCHER = 128;
-float WEP_ANTINEX = 10;
// For weapon cycling commands
float WEP_FIRST = 1;
-float WEP_LAST = 10;
-float WEP_COUNT = 11;
+float WEP_LAST = 9;
+float WEP_COUNT = 10;
void(entity client, string s) centerprint_builtin = #73;
.vector dest1, dest2;
@@ -402,7 +403,11 @@
.float attack_finished_for[WEP_COUNT];
.float attack_finished_single;
+#ifdef INDEPENDENT_ATTACK_FINISHED
#define ATTACK_FINISHED(ent) ((ent).(attack_finished_for[(ent).weapon]))
+#else
+#define ATTACK_FINISHED(ent) ((ent).attack_finished_single)
+#endif
// assault game mode: Which team is attacking in this round?
float assault_attacker_team;
Modified: branches/nexuiz-2.0/data/qcsrc/server/g_hook.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/g_hook.qc 2008-09-01 13:33:10 UTC (rev 4273)
+++ branches/nexuiz-2.0/data/qcsrc/server/g_hook.qc 2008-09-01 13:36:58 UTC (rev 4274)
@@ -95,6 +95,21 @@
//pl.disableclientprediction = FALSE;
}
+void GrapplingHookThink();
+void GrapplingHook_Stop()
+{
+ pointparticles(particleeffectnum("grapple_impact"), self.origin, '0 0 0', 1);
+ sound (self, CHAN_PROJECTILE, "weapons/hook_impact.wav", VOL_BASE, ATTN_NORM);
+
+ self.state = 1;
+ self.think = GrapplingHookThink;
+ self.nextthink = time;
+ self.touch = SUB_Null;
+ self.velocity = '0 0 0';
+ self.movetype = MOVETYPE_NONE;
+ self.rope_length = -1;
+}
+
void GrapplingHookThink()
{
float spd, dist, minlength, pullspeed, ropestretch, ropeairfriction, rubberforce, newlength, rubberforce_overstretch;
@@ -117,8 +132,14 @@
tracebox(org, self.mins, self.maxs, self.origin, MOVE_NOMONSTERS, self.owner);
// do not hit players with this, as they tend to get in the way just too often
+ // NOTE: this assumes sky brushes cannot get in the way
+ // if they can, assume the map is broken! :P
if(trace_fraction < 1 && (!self.aiment || trace_ent != self.aiment))
{
+ // 0. stop it
+ if(self.state != 1)
+ GrapplingHook_Stop();
+
// 1. detach the hook
if(self.aiment)
UnsetMovetypeFollow(self);
@@ -251,21 +272,11 @@
}
}
- pointparticles(particleeffectnum("grapple_impact"), self.origin, '0 0 0', 1);
- sound (self, CHAN_PROJECTILE, "weapons/hook_impact.wav", VOL_BASE, ATTN_NORM);
-
- self.state = 1;
- self.think = GrapplingHookThink;
- self.nextthink = time;
- self.touch = SUB_Null;
- self.velocity = '0 0 0';
- self.movetype = MOVETYPE_NONE;
- self.rope_length = -1;
-
if(other)
if(other.movetype != MOVETYPE_NONE)
SetMovetypeFollow(self, other);
+ GrapplingHook_Stop();
//self.owner.disableclientprediction = TRUE;
}
Modified: branches/nexuiz-2.0/data/qcsrc/server/t_teleporters.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/t_teleporters.qc 2008-09-01 13:33:10 UTC (rev 4273)
+++ branches/nexuiz-2.0/data/qcsrc/server/t_teleporters.qc 2008-09-01 13:36:58 UTC (rev 4274)
@@ -30,6 +30,7 @@
other.angles = self.enemy.mangle;
other.fixangle = TRUE;
other.velocity = v_forward * vlen(other.velocity);
+ RemoveGrapplingHook(other);
// Kill anyone else in the teleporter box (NO MORE TDEATH)
if(other.takedamage && !g_race)
More information about the nexuiz-commits
mailing list