[nexuiz-commits] r6605 - in branches/nexuiz-2.0: . data data/qcsrc/server misc/netradiant-NexuizPack/nexuiz.game misc/tools server/rcon2irc
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Tue Apr 28 10:00:54 EDT 2009
Author: div0
Date: 2009-04-28 10:00:32 -0400 (Tue, 28 Apr 2009)
New Revision: 6605
Modified:
branches/nexuiz-2.0/.patchsets
branches/nexuiz-2.0/data/defaultNexuiz.cfg
branches/nexuiz-2.0/data/effectinfo.txt
branches/nexuiz-2.0/data/qcsrc/server/cl_physics.qc
branches/nexuiz-2.0/data/qcsrc/server/clientcommands.qc
branches/nexuiz-2.0/data/qcsrc/server/defs.qh
branches/nexuiz-2.0/data/qcsrc/server/g_triggers.qc
branches/nexuiz-2.0/data/qcsrc/server/target_spawn.qc
branches/nexuiz-2.0/misc/netradiant-NexuizPack/nexuiz.game/default_build_menu.xml
branches/nexuiz-2.0/misc/tools/nexuiz-map-compiler
branches/nexuiz-2.0/server/rcon2irc/rcon2irc.pl
Log:
r6585 | div0 | 2009-04-24 19:42:13 +0200 (Fri, 24 Apr 2009) | 2 lines
give access to "other"
r6586 | div0 | 2009-04-24 20:08:18 +0200 (Fri, 24 Apr 2009) | 2 lines
more "other" fixes
r6587 | div0 | 2009-04-24 21:49:56 +0200 (Fri, 24 Apr 2009) | 2 lines
"cherryblossom" effect for func_pointparticles :P
r6592 | div0 | 2009-04-26 13:11:22 +0200 (Sun, 26 Apr 2009) | 2 lines
add minimap making to radiant build menu
r6593 | div0 | 2009-04-26 13:23:57 +0200 (Sun, 26 Apr 2009) | 2 lines
minimap support to nexuiz-map-compiler
r6598 | div0 | 2009-04-27 20:03:00 +0200 (Mon, 27 Apr 2009) | 2 lines
better detect teamplay
r6603 | div0 | 2009-04-28 15:50:52 +0200 (Tue, 28 Apr 2009) | 7 lines
Nick flood protection. Death to nick changing scripts!
Punishment level 1: invert movement for 0.5 seconds (after 3 changes in rapid succession)
Punishment level 2: randomize view angles (after 10 changes in rapid succession)
I wish it didn't have to come to this.
r6604 | div0 | 2009-04-28 15:51:43 +0200 (Tue, 28 Apr 2009) | 2 lines
add a comment
Modified: branches/nexuiz-2.0/.patchsets
===================================================================
--- branches/nexuiz-2.0/.patchsets 2009-04-28 13:51:43 UTC (rev 6604)
+++ branches/nexuiz-2.0/.patchsets 2009-04-28 14:00:32 UTC (rev 6605)
@@ -1,2 +1,2 @@
master = svn://svn.icculus.org/nexuiz/trunk
-revisions_applied = 1-6536,6541-6549,6552-6567,6572-6572,6577-6577,6580-6582
+revisions_applied = 1-6536,6541-6549,6552-6567,6572-6572,6577-6577,6580-6582,6585-6587,6592-6593,6598-6598,6603-6604
Modified: branches/nexuiz-2.0/data/defaultNexuiz.cfg
===================================================================
--- branches/nexuiz-2.0/data/defaultNexuiz.cfg 2009-04-28 13:51:43 UTC (rev 6604)
+++ branches/nexuiz-2.0/data/defaultNexuiz.cfg 2009-04-28 14:00:32 UTC (rev 6605)
@@ -1027,6 +1027,10 @@
set g_chat_teamcolors 0 "colorize nicknames in team color for chat"
set g_voice_flood_spv 4 "normal voices: seconds between voices to not count as flooding"
set g_voice_flood_spv_team 2 "team voices: seconds between voices to not count as flooding"
+set g_nick_flood_timeout 120 "time after which nick flood protection resets (set to 0 to disable nick flood checking)"
+set g_nick_flood_penalty 0.5 "duration of the nick flood penalty"
+set g_nick_flood_penalty_yellow 3 "number of changes to allow before warning and movement blocking"
+set g_nick_flood_penalty_red 10 "number of changes to allow before totally disorienting the player"
set g_waypointsprite_normdistance 512
set g_waypointsprite_minscale 1
Modified: branches/nexuiz-2.0/data/effectinfo.txt
===================================================================
--- branches/nexuiz-2.0/data/effectinfo.txt 2009-04-28 13:51:43 UTC (rev 6604)
+++ branches/nexuiz-2.0/data/effectinfo.txt 2009-04-28 14:00:32 UTC (rev 6605)
@@ -3236,3 +3236,19 @@
alpha 256 256 2600
velocityjitter 2 2 2
velocitymultiplier 0.01
+
+effect cherryblossom
+count 3
+type static
+color 0xb123ff 0xb183ff
+size 1.5 2
+alpha 128 256 32
+gravity 0.05
+bounce 1.5
+airfriction 1
+liquidfriction 1
+originjitter 16 16 16
+velocityjitter 32 32 0
+tex 40 40
+//lightradius 200
+//lighttime 0
Modified: branches/nexuiz-2.0/data/qcsrc/server/cl_physics.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/cl_physics.qc 2009-04-28 13:51:43 UTC (rev 6604)
+++ branches/nexuiz-2.0/data/qcsrc/server/cl_physics.qc 2009-04-28 14:00:32 UTC (rev 6605)
@@ -370,6 +370,22 @@
self.movement_old = self.movement;
self.v_angle_old = self.v_angle;
+ if(time < self.nickspamtime)
+ if(self.nickspamcount >= cvar("g_nick_flood_penalty_yellow"))
+ {
+ // slight annoyance for nick change scripts
+ self.movement = -1 * self.movement;
+ self.BUTTON_ATCK = self.BUTTON_JUMP = self.BUTTON_ATCK2 = self.BUTTON_ZOOM = self.BUTTON_CROUCH = self.BUTTON_HOOK = self.BUTTON_USE = 0;
+
+ if(self.nickspamcount >= cvar("g_nick_flood_penalty_red")) // if you are persistent and the slight annoyance above does not stop you, I'll show you!
+ {
+ self.angles_x = random() * 360;
+ self.angles_y = random() * 360;
+ // at least I'm not forcing retardedview by also assigning to angles_z
+ self.fixangle = 1;
+ }
+ }
+
if(time > self.shtest_next)
{
if(self.shtest_next > 0)
Modified: branches/nexuiz-2.0/data/qcsrc/server/clientcommands.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/clientcommands.qc 2009-04-28 13:51:43 UTC (rev 6604)
+++ branches/nexuiz-2.0/data/qcsrc/server/clientcommands.qc 2009-04-28 14:00:32 UTC (rev 6605)
@@ -368,6 +368,18 @@
print("WARNING: Invalid clientcommand by ", self.netname, ": ", s, "\n");
return;
}
+
+ if(self.jointime > 0 && time > self.jointime + 10 && time > self.nickspamtime) // allow any changes in the first 10 seconds since joining
+ if(cmd == "name" || cmd == "playermodel") // TODO also playerskin and color?
+ {
+ if(self.nickspamtime == 0 || time > self.nickspamtime + cvar("g_nick_flood_timeout"))
+ // good, no serious flood
+ self.nickspamcount = 1;
+ else
+ self.nickspamcount += 1;
+ self.nickspamtime = time + cvar("g_nick_flood_penalty");
+ }
+
clientcommand(self,s);
}
}
Modified: branches/nexuiz-2.0/data/qcsrc/server/defs.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/defs.qh 2009-04-28 13:51:43 UTC (rev 6604)
+++ branches/nexuiz-2.0/data/qcsrc/server/defs.qh 2009-04-28 14:00:32 UTC (rev 6605)
@@ -562,3 +562,6 @@
.float ammo_fuel;
.vector prevorigin;
+
+.float nickspamtime; // time of last nick change
+.float nickspamcount;
Modified: branches/nexuiz-2.0/data/qcsrc/server/g_triggers.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/g_triggers.qc 2009-04-28 13:51:43 UTC (rev 6604)
+++ branches/nexuiz-2.0/data/qcsrc/server/g_triggers.qc 2009-04-28 14:00:32 UTC (rev 6605)
@@ -157,7 +157,7 @@
self.takedamage = DAMAGE_NO;
activator = self.enemy;
-
+ other = self.goalentity;
SUB_UseTargets();
if (self.wait > 0)
@@ -174,6 +174,7 @@
void multi_use()
{
+ self.goalentity = other;
self.enemy = activator;
multi_trigger();
};
@@ -201,10 +202,11 @@
EXACTTRIGGER_TOUCH;
self.enemy = other;
+ self.goalentity = other;
multi_trigger ();
};
-void multi_eventdamage (vector hitloc, float damage, entity inflictor, entity attacker, float deathtype)
+void multi_eventdamage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
{
if (!self.takedamage)
return;
@@ -212,6 +214,7 @@
if (self.health <= 0)
{
self.enemy = attacker;
+ self.goalentity = inflictor;
multi_trigger();
}
}
Modified: branches/nexuiz-2.0/data/qcsrc/server/target_spawn.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/target_spawn.qc 2009-04-28 13:51:43 UTC (rev 6604)
+++ branches/nexuiz-2.0/data/qcsrc/server/target_spawn.qc 2009-04-28 14:00:32 UTC (rev 6605)
@@ -104,6 +104,11 @@
valueent = activator;
value = "";
}
+ else if(value == "other")
+ {
+ valueent = other;
+ value = "";
+ }
else if(value == "pusher")
{
if(time < activator.pushltime)
Modified: branches/nexuiz-2.0/misc/netradiant-NexuizPack/nexuiz.game/default_build_menu.xml
===================================================================
--- branches/nexuiz-2.0/misc/netradiant-NexuizPack/nexuiz.game/default_build_menu.xml 2009-04-28 13:51:43 UTC (rev 6604)
+++ branches/nexuiz-2.0/misc/netradiant-NexuizPack/nexuiz.game/default_build_menu.xml 2009-04-28 14:00:32 UTC (rev 6605)
@@ -21,6 +21,9 @@
<build name="Q3Map2: (single) -light, high quality">
<command>[q3map2] -light -deluxe -fast -samples 3 "[MapFile]"</command>
</build>
+<build name="Q3Map2: (single) -minimap">
+<command>[q3map2] -minimap "[MapFile]"</command>
+</build>
<build name="Q3Map2: (rebuild only entitys) ">
<command>[q3map2] -onlyents "[MapFile]"</command>
</build>
@@ -38,31 +41,37 @@
<command>[q3map2] -meta -v -mv 1000000 -mi 6000000 "[MapFile]"</command>
<command>[q3map2] -vis -saveprt -fast "[MapFile]"</command>
<command>[q3map2] -light -deluxe -fast -samples 2 "[MapFile]"</command>
+<command>[q3map2] -minimap "[MapFile]"</command>
</build>
<build name="Q3Map2: (final) simple lighting">
<command>[q3map2] -meta -v -samplesize 8 -minsamplesize 4 -mv 1000000 -mi 6000000 "[MapFile]"</command>
<command>[q3map2] -vis -saveprt "[MapFile]"</command>
<command>[q3map2] -light -deluxe -fast -patchshadows -samples 2 "[MapFile]"</command>
+<command>[q3map2] -minimap "[MapFile]"</command>
</build>
<build name="Q3Map2: (final) long distance lighting">
<command>[q3map2] -meta -v -samplesize 8 -minsamplesize 4 -mv 1000000 -mi 6000000 "[MapFile]"</command>
<command>[q3map2] -vis -saveprt "[MapFile]"</command>
<command>[q3map2] -light -deluxe -patchshadows -samples 3 "[MapFile]"</command>
+<command>[q3map2] -minimap "[MapFile]"</command>
</build>
<build name="Q3Map2: (final) + radiosity (Nexuiz 2.4.2 default)">
<command>[q3map2] -meta -v -samplesize 8 -minsamplesize 4 -mv 1000000 -mi 6000000 "[MapFile]"</command>
<command>[q3map2] -vis -saveprt "[MapFile]"</command>
<command>[q3map2] -light -deluxe -patchshadows -samples 3 -bounce 8 -fastbounce -bouncegrid "[MapFile]"</command>
+<command>[q3map2] -minimap "[MapFile]"</command>
</build>
<build name="Q3Map2: (final) + highres external lightmaps (Nexuiz 2.5 default, 2.5 required)">
<command>[q3map2] -meta -v -samplesize 8 -minsamplesize 4 -mv 1000000 -mi 6000000 "[MapFile]"</command>
<command>[q3map2] -vis -saveprt "[MapFile]"</command>
<command>[q3map2] -light -deluxe -patchshadows -samples 3 -lightmapsize 512 -bounce 8 -fastbounce -bouncegrid "[MapFile]"</command>
+<command>[q3map2] -minimap "[MapFile]"</command>
</build>
<build name="Q3Map2: (final) + ambient occlusion (Nexuiz 2.5 required)">
<command>[q3map2] -meta -v -samplesize 8 -minsamplesize 4 -mv 1000000 -mi 6000000 "[MapFile]"</command>
<command>[q3map2] -vis -saveprt "[MapFile]"</command>
<command>[q3map2] -light -deluxe -patchshadows -samples 3 -lightmapsize 512 -bounce 8 -fastbounce -bouncegrid -dirty -dirtscale 2 "[MapFile]"</command>
+<command>[q3map2] -minimap "[MapFile]"</command>
</build>
</project>
Modified: branches/nexuiz-2.0/misc/tools/nexuiz-map-compiler
===================================================================
--- branches/nexuiz-2.0/misc/tools/nexuiz-map-compiler 2009-04-28 13:51:43 UTC (rev 6604)
+++ branches/nexuiz-2.0/misc/tools/nexuiz-map-compiler 2009-04-28 14:00:32 UTC (rev 6605)
@@ -27,6 +27,9 @@
# Default flags for the -light stage
our $LIGHTFLAGS = '-deluxe -patchshadows -samples 3 -lightmapsize 512 -bounce 8 -fastbounce -bouncegrid';
+ # Default flags for the -minimap stage
+ our $MINIMAPFLAGS = '';
+
# end of user changable part
do "$ENV{HOME}/.nexuiz-map-compiler";
@@ -45,6 +48,7 @@
bsp => [split /\s+/, $BSPFLAGS],
vis => [split /\s+/, $VISFLAGS],
light => [split /\s+/, $LIGHTFLAGS],
+ minimap => [split /\s+/, $MINIMAPFLAGS],
maps => [],
scale => 1
};
@@ -67,6 +71,10 @@
{
$enterflags = 'light';
}
+ elsif($_ eq '-minimap')
+ {
+ $enterflags = 'minimap';
+ }
elsif($_ eq '-map')
{
$curmode = 'maps';
@@ -83,6 +91,10 @@
{
$options->{light} = undef;
}
+ elsif($_ eq '-nominimap')
+ {
+ $options->{minimap} = undef;
+ }
elsif($_ =~ /^-(-.*)/)
{
if($curmode eq 'maps')
@@ -249,6 +261,11 @@
rename "${m}_s.bsp", "$m.bsp"
or die "rename ${m}_s.bsp $m.bsp: $!";
}
+ if(defined $options->{minimap})
+ {
+ q3map2 '-minimap', @{$options->{minimap}}, "$m.map"
+ or die "-minimap: $?";
+ }
unlink "$m.srf";
Modified: branches/nexuiz-2.0/server/rcon2irc/rcon2irc.pl
===================================================================
--- branches/nexuiz-2.0/server/rcon2irc/rcon2irc.pl 2009-04-28 13:51:43 UTC (rev 6604)
+++ branches/nexuiz-2.0/server/rcon2irc/rcon2irc.pl 2009-04-28 14:00:32 UTC (rev 6605)
@@ -685,12 +685,6 @@
# Nexuiz specific parsing of some server messages
-sub nex_is_teamplay($)
-{
- my ($map) = @_;
- return $map =~ /^(?:kh|ctf|tdm|dom)_/;
-}
-
sub nex_slotsstring()
{
my $slotsstr = "";
@@ -1469,7 +1463,7 @@
return if not exists $store{scores};
my $s = $store{scores};
delete $store{scores};
- my $teams_matter = nex_is_teamplay($s->{map});
+ my $teams_matter = defined $s->{teams};
my @t = ();
my @p = ();
More information about the nexuiz-commits
mailing list