r4721 - in trunk/data: . qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Fri Oct 10 15:01:04 EDT 2008
Author: div0
Date: 2008-10-10 15:00:58 -0400 (Fri, 10 Oct 2008)
New Revision: 4721
Modified:
trunk/data/defaultNexuiz.cfg
trunk/data/qcsrc/server/ctf.qc
Log:
allow flag dropping, but disabled by default. Also fix flag portal sound spam.
Modified: trunk/data/defaultNexuiz.cfg
===================================================================
--- trunk/data/defaultNexuiz.cfg 2008-10-10 17:02:44 UTC (rev 4720)
+++ trunk/data/defaultNexuiz.cfg 2008-10-10 19:00:58 UTC (rev 4721)
@@ -391,6 +391,8 @@
set g_ctf_flagcarrier_selfdamage 1
set g_ctf_flagcarrier_selfforce 1
set g_ctf_fullbrightflags 1
+set g_ctf_allow_drop 0 // dropping allows circumventing carrierkill score, so enable this with care!
+set g_balance_ctf_delay_collect 1.0
set g_balance_ctf_damageforcescale 1
exec ctfscoring-nex242.cfg
Modified: trunk/data/qcsrc/server/ctf.qc
===================================================================
--- trunk/data/qcsrc/server/ctf.qc 2008-10-10 17:02:44 UTC (rev 4720)
+++ trunk/data/qcsrc/server/ctf.qc 2008-10-10 19:00:58 UTC (rev 4721)
@@ -2,6 +2,7 @@
entity ctf_worldflaglist; // CTF flags in the map
.entity ctf_worldflagnext;
.float dropperid;
+.float ctf_droptime;
.float next_take_time; // the next time a player can pick up a flag (time + blah)
/// I used this, in part, to fix the looping score bug. - avirox
@@ -143,6 +144,7 @@
UpdateFrags(p, -ctf_score_value("penalty_drop"));
PlayerScore_Add(p, SP_CTF_DROPS, +1);
e.playerid = attacker.playerid;
+ e.ctf_droptime = time;
WaypointSprite_Ping(p.waypointsprite_attachedforcarrier);
WaypointSprite_DetachCarrier(p);
@@ -239,6 +241,10 @@
DropFlag(self, world, world);
return;
}
+
+ if(cvar("g_ctf_allow_drop"))
+ if(e.BUTTON_USE)
+ DropFlag(self, e, world);
};
void FlagTouch()
@@ -387,7 +393,7 @@
sound (other, CHAN_AUTO, self.noise1, VOL_BASE, ATTN_NONE);
ReturnFlag(self);
}
- else if (!other.flagcarried)
+ else if (!other.flagcarried && (other.playerid != self.dropperid || time > self.ctf_droptime + cvar("g_balance_ctf_delay_collect")))
{
// pick up
self.solid = SOLID_NOT;
More information about the nexuiz-commits
mailing list