r4442 - in branches/nexuiz-2.0: . data data/qcsrc/client data/qcsrc/menu/nexuiz data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Wed Sep 10 06:00:50 EDT 2008
Author: div0
Date: 2008-09-10 06:00:48 -0400 (Wed, 10 Sep 2008)
New Revision: 4442
Modified:
branches/nexuiz-2.0/.patchsets
branches/nexuiz-2.0/data/defaultNexuiz.cfg
branches/nexuiz-2.0/data/qcsrc/client/mapvoting.qc
branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup.c
branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup_weapons.c
branches/nexuiz-2.0/data/qcsrc/server/arena.qc
branches/nexuiz-2.0/data/qcsrc/server/cl_physics.qc
branches/nexuiz-2.0/data/qcsrc/server/cl_player.qc
branches/nexuiz-2.0/data/qcsrc/server/cl_weaponsystem.qc
branches/nexuiz-2.0/data/qcsrc/server/portals.qc
branches/nexuiz-2.0/data/qcsrc/server/portals.qh
branches/nexuiz-2.0/data/qcsrc/server/w_porto.qc
Log:
r4433 | div0 | 2008-09-09 12:53:06 +0200 (Tue, 09 Sep 2008) | 2 lines
force returning the dummy weapon info if the weapon number is out of range
r4434 | div0 | 2008-09-09 14:07:15 +0200 (Tue, 09 Sep 2008) | 3 lines
border
r4435 | div0 | 2008-09-09 15:33:55 +0200 (Tue, 09 Sep 2008) | 2 lines
prevent an exploit to create portals on noimpact
r4436 | div0 | 2008-09-09 15:36:42 +0200 (Tue, 09 Sep 2008) | 2 lines
improve the last fix
r4437 | div0 | 2008-09-09 20:12:19 +0200 (Tue, 09 Sep 2008) | 2 lines
again: remove portals when owner dies, but this time without crash
r4438 | div0 | 2008-09-09 20:58:27 +0200 (Tue, 09 Sep 2008) | 2 lines
sv_clmovement_waitforinput 2 was perhaps a bad idea, back to 4
r4439 | div0 | 2008-09-09 21:28:16 +0200 (Tue, 09 Sep 2008) | 2 lines
make reset_map no longer overwrite "self" so even Green's code works with it :P
r4440 | div0 | 2008-09-10 08:05:22 +0200 (Wed, 10 Sep 2008) | 2 lines
fix a tiny accuracy bug in speedhack detection
r4441 | div0 | 2008-09-10 11:59:37 +0200 (Wed, 10 Sep 2008) | 2 lines
rename weapon priority to weapon order
Modified: branches/nexuiz-2.0/.patchsets
===================================================================
--- branches/nexuiz-2.0/.patchsets 2008-09-10 09:59:37 UTC (rev 4441)
+++ branches/nexuiz-2.0/.patchsets 2008-09-10 10:00:48 UTC (rev 4442)
@@ -1,2 +1,2 @@
master = svn://svn.icculus.org/nexuiz/trunk
-revisions_applied = 1-4431
+revisions_applied = 1-4441
Modified: branches/nexuiz-2.0/data/defaultNexuiz.cfg
===================================================================
--- branches/nexuiz-2.0/data/defaultNexuiz.cfg 2008-09-10 09:59:37 UTC (rev 4441)
+++ branches/nexuiz-2.0/data/defaultNexuiz.cfg 2008-09-10 10:00:48 UTC (rev 4442)
@@ -584,7 +584,6 @@
cl_sound_r_exp3 ""
sv_sound_land ""
sv_sound_watersplash ""
-sv_clmovement_waitforinput 2
// startmap_dm is used when running with the -listen or -dedicated commandline options
alias startmap_dm "set _sv_init 1; map aggressor"
Modified: branches/nexuiz-2.0/data/qcsrc/client/mapvoting.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/client/mapvoting.qc 2008-09-10 09:59:37 UTC (rev 4441)
+++ branches/nexuiz-2.0/data/qcsrc/client/mapvoting.qc 2008-09-10 10:00:48 UTC (rev 4442)
@@ -64,15 +64,19 @@
a_x = img_size_x; // for the lines
b_y = img_size_y;
drawfill(pos, img_size, '.5 .5 .5', .7, DRAWFLAG_NORMAL);
- drawline(2, pos, pos + a, '1 1 1', 1, DRAWFLAG_NORMAL);
- drawline(2, pos, pos + b, '1 1 1', 1, DRAWFLAG_NORMAL);
- drawline(2, pos + img_size, pos + a, '1 1 1', 1, DRAWFLAG_NORMAL);
- drawline(2, pos + img_size, pos + b, '1 1 1', 1, DRAWFLAG_NORMAL);
}
else
{
drawpic(pos, pic, img_size, '1 1 1', 1, DRAWFLAG_NORMAL);
}
+
+ if(id == mv_ownvote || pic == "")
+ {
+ drawfill(pos, '1 0 0' * img_size_x + '0 2 0', rgb, 1, DRAWFLAG_NORMAL);
+ drawfill(pos + '0 2 0', '0 1 0' * img_size_y + '2 -4 0', rgb, 1, DRAWFLAG_NORMAL);
+ drawfill(pos + '1 0 0' * img_size_x + '-2 2 0', '0 1 0' * img_size_y + '2 -4 0', rgb, 1, DRAWFLAG_NORMAL);
+ drawfill(pos + '0 1 0' * img_size_y + '0 -2 0', '1 0 0' * img_size_x + '0 2 0', rgb, 1, DRAWFLAG_NORMAL);
+ }
}
void MapVote_DrawAbstain(vector pos, float isize, float tsize, float count, float id)
Modified: branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup.c
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup.c 2008-09-10 09:59:37 UTC (rev 4441)
+++ branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup.c 2008-09-10 10:00:48 UTC (rev 4442)
@@ -78,7 +78,7 @@
me.TR(me);
me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "cl_autoswitch", "Auto switch weapons on pickup"));
me.TR(me);
- me.TD(me, 1, 1, e = makeNexuizButton("Weapon priority...", '0 0 0'));
+ me.TD(me, 1, 1, e = makeNexuizButton("Weapon order...", '0 0 0'));
e.onClick = DialogOpenButton_Click;
e.onClickEntity = main.weaponsDialog;
me.TD(me, 1, 2, e0 = makeNexuizTextLabel(0, string_null));
Modified: branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup_weapons.c
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup_weapons.c 2008-09-10 09:59:37 UTC (rev 4441)
+++ branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup_weapons.c 2008-09-10 10:00:48 UTC (rev 4442)
@@ -3,7 +3,7 @@
METHOD(NexuizWeaponsDialog, toString, string(entity))
METHOD(NexuizWeaponsDialog, fill, void(entity))
METHOD(NexuizWeaponsDialog, showNotify, void(entity))
- ATTRIB(NexuizWeaponsDialog, title, string, "Weapon priority")
+ ATTRIB(NexuizWeaponsDialog, title, string, "Weapon order")
ATTRIB(NexuizWeaponsDialog, color, vector, SKINCOLOR_DIALOG_WEAPONS)
ATTRIB(NexuizWeaponsDialog, intendedWidth, float, 0.3)
ATTRIB(NexuizWeaponsDialog, rows, float, 9.5)
Modified: branches/nexuiz-2.0/data/qcsrc/server/arena.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/arena.qc 2008-09-10 09:59:37 UTC (rev 4441)
+++ branches/nexuiz-2.0/data/qcsrc/server/arena.qc 2008-09-10 10:00:48 UTC (rev 4442)
@@ -25,6 +25,9 @@
*/
void reset_map()
{
+ entity oldself;
+ oldself = self;
+
if(g_arena)
if(cvar("g_arena_warmup"))
warmup = time + cvar("g_arena_warmup");
@@ -149,6 +152,8 @@
if(g_arena)
if(champion)
UpdateFrags(champion, +1);
+
+ self = oldself;
}
void Spawnqueue_Insert(entity e)
Modified: branches/nexuiz-2.0/data/qcsrc/server/cl_physics.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/cl_physics.qc 2008-09-10 09:59:37 UTC (rev 4441)
+++ branches/nexuiz-2.0/data/qcsrc/server/cl_physics.qc 2008-09-10 10:00:48 UTC (rev 4442)
@@ -16,7 +16,8 @@
.float wasFlying;
.float spectatorspeed;
-#define SHTEST_DELTA 15
+#define SHTEST_DELTA 10
+#define SHTEST_THRESHOLD 1.1
.float shtest_next;
.float shtest_accumulator;
@@ -144,9 +145,9 @@
// self.shtest_accumulator:
// started at time - SHTEST_DELTA
// should be at SHTEST_DELTA
- shtest_score = self.shtest_accumulator / SHTEST_DELTA;
- if(shtest_score > 1.2)
- dprint("TIME PARADOX: shtest for ", self.netname, " said ", ftos(shtest_score), "\n");
+ shtest_score = self.shtest_accumulator / (SHTEST_DELTA + time - self.shtest_next);
+ if(shtest_score > SHTEST_THRESHOLD)
+ print("TIME PARADOX: shtest for ", self.netname, " said ", ftos(shtest_score), "\n");
else if(cvar("developer_shtest"))
dprint("okay: shtest for ", self.netname, " said ", ftos(shtest_score), "\n");
}
Modified: branches/nexuiz-2.0/data/qcsrc/server/cl_player.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/cl_player.qc 2008-09-10 09:59:37 UTC (rev 4441)
+++ branches/nexuiz-2.0/data/qcsrc/server/cl_player.qc 2008-09-10 10:00:48 UTC (rev 4442)
@@ -506,6 +506,7 @@
kh_Key_DropAll(self, TRUE);
if(self.flagcarried)
DropFlag(self.flagcarried);
+ Portal_ClearAllLater(self);
// clear waypoints
WaypointSprite_PlayerDead();
// make the corpse upright (not tilted)
Modified: branches/nexuiz-2.0/data/qcsrc/server/cl_weaponsystem.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/cl_weaponsystem.qc 2008-09-10 09:59:37 UTC (rev 4441)
+++ branches/nexuiz-2.0/data/qcsrc/server/cl_weaponsystem.qc 2008-09-10 10:00:48 UTC (rev 4442)
@@ -649,6 +649,8 @@
entity get_weaponinfo(float id)
{
entity w;
+ if(id < WEP_FIRST || id > WEP_LAST)
+ return dummy_weapon_info;
w = weapon_info[id - 1];
if(w)
return w;
Modified: branches/nexuiz-2.0/data/qcsrc/server/portals.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/portals.qc 2008-09-10 09:59:37 UTC (rev 4441)
+++ branches/nexuiz-2.0/data/qcsrc/server/portals.qc 2008-09-10 10:00:48 UTC (rev 4442)
@@ -543,6 +543,24 @@
if(own.portal_out)
Portal_Remove(own.portal_out, 0);
}
+void Portal_RemoveLater_Think()
+{
+ Portal_Remove(self, self.cnt);
+}
+void Portal_RemoveLater(entity portal, float kill)
+{
+ Portal_MakeBrokenPortal(portal);
+ portal.cnt = kill;
+ portal.think = Portal_RemoveLater_Think;
+ portal.nextthink = time;
+}
+void Portal_ClearAllLater(entity own)
+{
+ if(own.portal_in)
+ Portal_RemoveLater(own.portal_in, 0);
+ if(own.portal_out)
+ Portal_RemoveLater(own.portal_out, 0);
+}
void Portal_ClearWithID(entity own, float id)
{
if(own.portal_in)
@@ -602,13 +620,6 @@
vector ang;
vector org;
- if(trace_ent.movetype == MOVETYPE_WALK)
- {
- trace_endpos = trace_ent.origin + '0 0 1' * PL_MIN_z;
- trace_plane_normal = '0 0 1';
- dir = -1 * dir; // create telefrag portals the other way round
- }
-
org = trace_endpos;
ang = fixedvectoangles2(trace_plane_normal, dir);
fixedmakevectors(ang);
@@ -633,13 +644,6 @@
vector ang;
vector org;
- if(trace_ent.movetype == MOVETYPE_WALK)
- {
- trace_endpos = trace_ent.origin + '0 0 1' * PL_MIN_z;
- trace_plane_normal = '0 0 1';
- dir = -1 * dir; // create telefrag portals the other way round
- }
-
org = trace_endpos;
ang = fixedvectoangles2(trace_plane_normal, dir);
fixedmakevectors(ang);
Modified: branches/nexuiz-2.0/data/qcsrc/server/portals.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/portals.qh 2008-09-10 09:59:37 UTC (rev 4441)
+++ branches/nexuiz-2.0/data/qcsrc/server/portals.qh 2008-09-10 10:00:48 UTC (rev 4442)
@@ -1,4 +1,5 @@
void Portal_ClearAll(entity own);
+void Portal_ClearAllLater(entity own);
float Portal_SpawnOutPortalAtTrace(entity own, vector dir, float id);
float Portal_SpawnInPortalAtTrace(entity own, vector dir, float id);
void Portal_ClearWithID(entity own, float id);
Modified: branches/nexuiz-2.0/data/qcsrc/server/w_porto.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/w_porto.qc 2008-09-10 09:59:37 UTC (rev 4441)
+++ branches/nexuiz-2.0/data/qcsrc/server/w_porto.qc 2008-09-10 10:00:48 UTC (rev 4442)
@@ -65,6 +65,17 @@
return; // handled by the portal
norm = trace_plane_normal;
+ if(trace_ent.movetype == MOVETYPE_WALK)
+ {
+ traceline(trace_ent.origin, trace_ent.origin + '0 0 2' * PL_MIN_z, MOVE_NORMAL, self);
+ if(trace_fraction >= 1)
+ return;
+ if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_SLICK)
+ return;
+ if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
+ return;
+ }
+
if(self.owner.playerid != self.playerid)
{
remove(self);
@@ -84,11 +95,11 @@
self.effects += EF_BLUE - EF_RED;
if(Portal_SpawnInPortalAtTrace(self.owner, self.right_vector, self.portal_id))
{
+ trace_plane_normal = norm;
sound(self, CHAN_PROJECTILE, "misc/invshot.wav", VOL_BASE, ATTN_NORM);
centerprint(self.owner, "^1In^7-portal created.\n");
- trace_plane_normal = norm;
- self.right_vector = self.right_vector - 2 * trace_plane_normal * (self.right_vector * trace_plane_normal);
- self.angles = vectoangles(self.velocity - 2 * trace_plane_normal * (self.velocity * trace_plane_normal));
+ self.right_vector = self.right_vector - 2 * trace_plane_normal * (self.right_vector * norm);
+ self.angles = vectoangles(self.velocity - 2 * trace_plane_normal * (self.velocity * norm));
}
else
{
@@ -100,13 +111,13 @@
{
if(Portal_SpawnOutPortalAtTrace(self.owner, self.right_vector, self.portal_id))
{
+ trace_plane_normal = norm;
sound(self, CHAN_PROJECTILE, "misc/invshot.wav", VOL_BASE, ATTN_NORM);
centerprint(self.owner, "^4Out^7-portal created.\n");
W_Porto_Success();
}
else
{
- trace_plane_normal = norm;
W_Porto_Fail(0);
}
}
More information about the nexuiz-commits
mailing list