[nexuiz-commits] r7933 - in trunk/data: . qcsrc/client qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sat Sep 26 16:15:21 EDT 2009
Author: div0
Date: 2009-09-26 16:15:16 -0400 (Sat, 26 Sep 2009)
New Revision: 7933
Added:
trunk/data/merge-settings-into-cfg.pl
Modified:
trunk/data/balance.cfg
trunk/data/balance25.cfg
trunk/data/balanceHavoc.cfg
trunk/data/balanceSamual.cfg
trunk/data/defaultNexuiz.cfg
trunk/data/qcsrc/client/Main.qc
trunk/data/qcsrc/client/casings.qc
trunk/data/qcsrc/client/damage.qc
trunk/data/qcsrc/client/gibs.qc
trunk/data/qcsrc/client/modeleffects.qc
trunk/data/qcsrc/server/constants.qh
Log:
settings merger script; fix problems with casings reappearing at low slowmo
Modified: trunk/data/balance.cfg
===================================================================
--- trunk/data/balance.cfg 2009-09-26 16:01:48 UTC (rev 7932)
+++ trunk/data/balance.cfg 2009-09-26 20:15:16 UTC (rev 7933)
@@ -3,7 +3,7 @@
//
// And... don't forget to edit the other balance*.cfg too.
-set cvar_check_balance 5492fb074d4ce56842b519e92899359d
+set cvar_check_balance 59ee376a58dfcc2e2ee440c6a9508e11
// {{{ weapon replacement
// NOTE: this only replaces weapons on the map
Modified: trunk/data/balance25.cfg
===================================================================
--- trunk/data/balance25.cfg 2009-09-26 16:01:48 UTC (rev 7932)
+++ trunk/data/balance25.cfg 2009-09-26 20:15:16 UTC (rev 7933)
@@ -3,7 +3,7 @@
//
// And... don't forget to edit the other balance*.cfg too.
-set cvar_check_balance 5492fb074d4ce56842b519e92899359d
+set cvar_check_balance 59ee376a58dfcc2e2ee440c6a9508e11
// {{{ weapon replacement
// NOTE: this only replaces weapons on the map
Modified: trunk/data/balanceHavoc.cfg
===================================================================
--- trunk/data/balanceHavoc.cfg 2009-09-26 16:01:48 UTC (rev 7932)
+++ trunk/data/balanceHavoc.cfg 2009-09-26 20:15:16 UTC (rev 7933)
@@ -3,7 +3,7 @@
//
// And... don't forget to edit the other balance*.cfg too.
-set cvar_check_balance 5492fb074d4ce56842b519e92899359d
+set cvar_check_balance 59ee376a58dfcc2e2ee440c6a9508e11
// {{{ weapon replacement
// NOTE: this only replaces weapons on the map
Modified: trunk/data/balanceSamual.cfg
===================================================================
--- trunk/data/balanceSamual.cfg 2009-09-26 16:01:48 UTC (rev 7932)
+++ trunk/data/balanceSamual.cfg 2009-09-26 20:15:16 UTC (rev 7933)
@@ -3,7 +3,7 @@
//
// And... don't forget to edit the other balance*.cfg too.
-set cvar_check_balance 5492fb074d4ce56842b519e92899359d
+set cvar_check_balance 59ee376a58dfcc2e2ee440c6a9508e11
// {{{ weapon replacement
// NOTE: this only replaces weapons on the map
Modified: trunk/data/defaultNexuiz.cfg
===================================================================
--- trunk/data/defaultNexuiz.cfg 2009-09-26 16:01:48 UTC (rev 7932)
+++ trunk/data/defaultNexuiz.cfg 2009-09-26 20:15:16 UTC (rev 7933)
@@ -26,7 +26,7 @@
seta g_configversion 0 "Configuration file version (used to upgrade settings) 0: first run, or previous start was <2.4.1 Later, it's overridden by config.cfg, version ranges are defined in config_update.cfg"
// default.cfg versioning (update using update-cvarcount.sh, run that every time after adding a new cvar)
-set cvar_check_default 6c74fb328d2563906f4f881ec9355396
+set cvar_check_default 4bb48bd2d43bd891aa49d542abb24bf8
// Nexuiz version (formatted for machines)
// used to determine if a client version is compatible
Added: trunk/data/merge-settings-into-cfg.pl
===================================================================
--- trunk/data/merge-settings-into-cfg.pl (rev 0)
+++ trunk/data/merge-settings-into-cfg.pl 2009-09-26 20:15:16 UTC (rev 7933)
@@ -0,0 +1,35 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+my ($in, $out) = @ARGV;
+
+my %changes = ();
+while(<STDIN>)
+{
+ chomp;
+ /^(?:seta?\s)?\s*(\S+)\s+(.*)/
+ or next;
+ $changes{$1} = $2;
+}
+
+my %changes_unapplied = %changes;
+my $result = "";
+open my $fh, "<", $in
+ or die "<$in: $!";
+while(<$fh>)
+{
+ chomp;
+ /^(seta?\s?\s*)(\S+)(\s+)(.*)/
+ or do { $result .= "$_\n"; next; };
+ my $v = exists($changes{$2}) ? $changes{$2} : $4;
+ $result .= "$1$2$3$v\n";
+ delete $changes_unapplied{$2};
+}
+close $fh;
+open $fh, ">", $out
+ or die ">$out: $!";
+print $fh $result;
+print $fh "set $_ $changes_unapplied{$_}\n" for keys %changes_unapplied;
+close $fh;
Modified: trunk/data/qcsrc/client/Main.qc
===================================================================
--- trunk/data/qcsrc/client/Main.qc 2009-09-26 16:01:48 UTC (rev 7932)
+++ trunk/data/qcsrc/client/Main.qc 2009-09-26 20:15:16 UTC (rev 7933)
@@ -796,6 +796,7 @@
{
print("A CSQC entity changed its type!\n");
Ent_Remove();
+ bIsNewEntity = 1;
}
#endif
self.enttype = t;
@@ -811,16 +812,16 @@
case ENT_CLIENT_WAYPOINT: Ent_WaypointSprite(); break;
case ENT_CLIENT_RADARLINK: Ent_RadarLink(); break;
case ENT_CLIENT_PROJECTILE: Ent_Projectile(); break;
- case ENT_CLIENT_GIBSPLASH: Ent_GibSplash(); break;
- case ENT_CLIENT_DAMAGEINFO: Ent_DamageInfo(); break;
- case ENT_CLIENT_CASING: Ent_Casing(); break;
+ case ENT_CLIENT_GIBSPLASH: Ent_GibSplash(bIsNewEntity); break;
+ case ENT_CLIENT_DAMAGEINFO: Ent_DamageInfo(bIsNewEntity); break;
+ case ENT_CLIENT_CASING: Ent_Casing(bIsNewEntity); break;
case ENT_CLIENT_INIT: Ent_Init(); break;
case ENT_CLIENT_SCORES_INFO: Ent_ScoresInfo(); break;
case ENT_CLIENT_MAPVOTE: Ent_MapVote(); break;
case ENT_CLIENT_CLIENTDATA: Ent_ClientData(); break;
case ENT_CLIENT_RANDOMSEED: Ent_RandomSeed(); break;
case ENT_CLIENT_WALL: Ent_Wall(); break;
- case ENT_CLIENT_MODELEFFECT: Ent_ModelEffect(); break;
+ case ENT_CLIENT_MODELEFFECT: Ent_ModelEffect(bIsNewEntity); break;
default:
error(strcat("unknown entity type in CSQC_Ent_Update: ", ftos(self.enttype), "\n"));
break;
Modified: trunk/data/qcsrc/client/casings.qc
===================================================================
--- trunk/data/qcsrc/client/casings.qc 2009-09-26 16:01:48 UTC (rev 7932)
+++ trunk/data/qcsrc/client/casings.qc 2009-09-26 20:15:16 UTC (rev 7933)
@@ -70,7 +70,7 @@
self.move_flags &~= FL_ONGROUND;
}
-void Ent_Casing()
+void Ent_Casing(float isNew)
{
entity casing;
@@ -86,7 +86,7 @@
casing.angles_y = ReadByte() * 360 / 256;
casing.angles_z = ReadByte() * 360 / 256;
- if(cvar("cl_casings")) {
+ if(cvar("cl_casings") && isNew) {
casing.draw = Casing_Draw;
casing.move_origin = casing.origin;
casing.move_velocity = casing.velocity + 2 * prandomvec();
Modified: trunk/data/qcsrc/client/damage.qc
===================================================================
--- trunk/data/qcsrc/client/damage.qc 2009-09-26 16:01:48 UTC (rev 7932)
+++ trunk/data/qcsrc/client/damage.qc 2009-09-26 20:15:16 UTC (rev 7933)
@@ -1,6 +1,6 @@
.float silent;
-void Ent_DamageInfo()
+void Ent_DamageInfo(float isNew)
{
float hittype, dmg, rad, edge, thisdmg, forcemul;
float issilent;
@@ -23,6 +23,9 @@
edge = ReadByte();
force = decompressShortVector(ReadShort());
+ if not(isNew)
+ return;
+
if(rad < 0)
{
rad = -rad;
@@ -30,7 +33,7 @@
}
else
forcemul = 1;
-
+
for(self = findradius(org, rad); self; self = self.chain)
{
if(rad)
Modified: trunk/data/qcsrc/client/gibs.qc
===================================================================
--- trunk/data/qcsrc/client/gibs.qc 2009-09-26 16:01:48 UTC (rev 7932)
+++ trunk/data/qcsrc/client/gibs.qc 2009-09-26 20:15:16 UTC (rev 7933)
@@ -134,7 +134,7 @@
RubbleLimit("gib", cvar_or("cl_gibs_maxcount",100), Gib_Delete);
}
-void Ent_GibSplash()
+void Ent_GibSplash(float isNew)
{
float amount, type, specnum;
vector org, vel;
@@ -173,7 +173,7 @@
if(cvar("ekg"))
amount *= 5;
- if(amount <= 0)
+ if(amount <= 0 || !isNew)
return;
self.origin = org; // for the sounds
Modified: trunk/data/qcsrc/client/modeleffects.qc
===================================================================
--- trunk/data/qcsrc/client/modeleffects.qc 2009-09-26 16:01:48 UTC (rev 7932)
+++ trunk/data/qcsrc/client/modeleffects.qc 2009-09-26 20:15:16 UTC (rev 7933)
@@ -19,7 +19,7 @@
R_AddEntity(self);
}
-void Ent_ModelEffect()
+void Ent_ModelEffect(float isNew)
{
float f;
entity e;
@@ -64,4 +64,7 @@
e.cnt = ReadByte() / 255.0; // actually alpha
e.draw = ModelEffect_Draw;
+
+ if(!isNew)
+ remove(e); // yes, this IS stupid, but I don't need to duplicate all the read* stuff then
}
Modified: trunk/data/qcsrc/server/constants.qh
===================================================================
--- trunk/data/qcsrc/server/constants.qh 2009-09-26 16:01:48 UTC (rev 7932)
+++ trunk/data/qcsrc/server/constants.qh 2009-09-26 20:15:16 UTC (rev 7933)
@@ -1,5 +1,5 @@
-string CVAR_CHECK_DEFAULT = "6c74fb328d2563906f4f881ec9355396";
-string CVAR_CHECK_BALANCE = "5492fb074d4ce56842b519e92899359d";
+string CVAR_CHECK_DEFAULT = "4bb48bd2d43bd891aa49d542abb24bf8";
+string CVAR_CHECK_BALANCE = "59ee376a58dfcc2e2ee440c6a9508e11";
float FALSE = 0;
float TRUE = 1;
More information about the nexuiz-commits
mailing list