r4264 - in branches/nexuiz-2.0: . data data/qcsrc/client data/qcsrc/common data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sat Aug 30 12:49:03 EDT 2008
Author: div0
Date: 2008-08-30 12:49:03 -0400 (Sat, 30 Aug 2008)
New Revision: 4264
Added:
branches/nexuiz-2.0/changes-since-last-release
Modified:
branches/nexuiz-2.0/.patchsets
branches/nexuiz-2.0/data/effectinfo.txt
branches/nexuiz-2.0/data/qcsrc/client/View.qc
branches/nexuiz-2.0/data/qcsrc/client/laser.qc
branches/nexuiz-2.0/data/qcsrc/common/util.qc
branches/nexuiz-2.0/data/qcsrc/server/campaign.qc
branches/nexuiz-2.0/data/qcsrc/server/cl_client.qc
branches/nexuiz-2.0/data/qcsrc/server/clientcommands.qc
branches/nexuiz-2.0/data/qcsrc/server/ctf.qc
branches/nexuiz-2.0/data/qcsrc/server/domination.qc
branches/nexuiz-2.0/data/qcsrc/server/g_damage.qc
branches/nexuiz-2.0/data/qcsrc/server/g_triggers.qc
branches/nexuiz-2.0/data/qcsrc/server/g_world.qc
branches/nexuiz-2.0/data/qcsrc/server/ipban.qc
branches/nexuiz-2.0/data/qcsrc/server/keyhunt.qc
branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc
branches/nexuiz-2.0/data/qcsrc/server/teamplay.qc
branches/nexuiz-2.0/data/qcsrc/server/vote.qc
Log:
get rid of ServerConsoleEcho workaround; fix a remote DP-console command execution hole in the process :P
laser: add a dlight to the end; improve effect; effect is now laser_deadly or none, depending on laser's .dmg
detect NOIMPACT flag for laser (TODO: possibly extend the laser to infinity if it hits sky? need a test map for this first)
fix compile errors; make sky-hitting lasers extend to infinity
workaround for decreasing time
clear overtime status on ready-restart
allow "mdl" "none" for misc_laser to turn off the particle effect, EVEN if it can hurt
Modified: branches/nexuiz-2.0/.patchsets
===================================================================
--- branches/nexuiz-2.0/.patchsets 2008-08-30 16:47:04 UTC (rev 4263)
+++ branches/nexuiz-2.0/.patchsets 2008-08-30 16:49:03 UTC (rev 4264)
@@ -1,2 +1,2 @@
master = svn://svn.icculus.org/nexuiz/trunk
-revisions_applied = 1-4249
+revisions_applied = 1-4263
Copied: branches/nexuiz-2.0/changes-since-last-release (from rev 4263, trunk/changes-since-last-release)
===================================================================
--- branches/nexuiz-2.0/changes-since-last-release (rev 0)
+++ branches/nexuiz-2.0/changes-since-last-release 2008-08-30 16:49:03 UTC (rev 4264)
@@ -0,0 +1,79 @@
+CHANGES since 2.4.2 to r4251:
+compat-q3a: switch crylink/hagar, as crylink is closer to BFG and hagar is closer to Plasmagun
+game: assault bugfixed
+game: cmd maplist improved
+game: colors improved (TODO credit sev in nexuiz-credits.txt!)
+game: command allready
+game: command lockteams, unlockteams
+game: command movetoteam_red, ...
+game: command nospectators
+game: command vlogin must be used instead of vdo login now
+game: crylink bounce does half damage
+game: crylink primary does 2 cells
+game: crylink weakened
+game: ctf flag touching when dead bug fixed
+game: cvar g_jump_grunt
+game: cvar g_maxplayers
+game: cvar g_spawn_furthest
+game: cvar g_spawnpoints_auto_move_out_of_solid
+game: cvar g_tourney*
+game: cvar sv_gentle
+game: cvar sv_maxidle
+game: cvar sv_ready_restart_after_countdown
+game: cvar sv_ready_restart_nag
+game: cvar sv_ready_restart_repeatable
+game: cvar teamplay_lockonrestart
+game: fix some memory leaks
+game: hook attaches to moving objects
+game: hook can pull players
+game: hook jitter-less
+game: hook no longer goes through walls
+game: hook sky-attach bug fixed
+game: item respawn: 20s for 50health and 25armor
+game: lemmings countdown ;)
+game: log can get :time: events
+game: map voting: nodetail 1 as default
+game: map voting: with previews
+game: new music track by meoblast001 (TODO nexuiz-credits.txt)
+game: performance improved (fteqcc -O3)
+game: race game type
+game: scoreboard improved
+game: scores per-team
+game: sounds: model specific player sounds
+game: sv_foginterval
+game: texturecompression for lightmaps off (workaround for OS X bug)
+game: timeout feature
+game: turrets
+game: vote call is now possible for server admins too
+game: zoom unlagged, detect zoom scripts (for spectating/demos)
+map: aggressor supports keyhunt
+mapping: allow mins/maxs specification for brush entities instead of models (as alternative)
+mapping: automatic shader generator script
+mapping: entities.def updated
+mapping: entity func_door: make DOOR_NOT_LINK work
+mapping: entity func_pointparticles
+mapping: entity func_sparks
+mapping: entity func_train now supports -1 wait on path_corner, making it NOT wait
+mapping: entity info_null now removes itself (as it should); this DOES break some maps that need fixing now
+mapping: entity misc_follow
+mapping: entity misc_laser changed and improved
+mapping: entity trigger_flipflop, trigger_monoflip, trigger_multivibrator
+mapping: field nottargeted overrides targetname checks in e.g. func_door (so it can be used for misc_follow without needing an extra trigger)
+mapping: mapname.cfg is deprecated. Use clientsettemp_for_type and cdtrack in mapname.mapinfo
+mapping: triggers now MUST be common/trigger; their exact shape now works (no longer their bbox)
+mapping: zeroradiant support, bugfix patchset updated
+map: reslimed: less distracting fog
+map: some more TDM map settings
+map: starship and silvercity: no CTF
+menu: channel mixer
+menu: game type in server browser
+menu: input box margin now in chars, not percent
+menu: mouse fixed in -game pro
+menu: new playermodel previews (sev)
+menu: play button in map info
+menuskins: big buttons as extra graphics
+menuskins: COLOR_SCROLLBAR_C
+menuskins: HEIGHT_DIALOGBORDER
+menu: wicked skins
+misc: +exec benchmark.cfg
+rcon2irc: disconnect fix
Modified: branches/nexuiz-2.0/data/effectinfo.txt
===================================================================
--- branches/nexuiz-2.0/data/effectinfo.txt 2008-08-30 16:47:04 UTC (rev 4263)
+++ branches/nexuiz-2.0/data/effectinfo.txt 2008-08-30 16:49:03 UTC (rev 4264)
@@ -175,7 +175,7 @@
alpha 256 256 0
originjitter 6 6 6
// dust/smoke drifting away from the impact
-effect TE_SPIKE
+effect TE_SUPERSPIKE
count 8
type smoke
tex 0 8
@@ -1984,7 +1984,7 @@
-effect misc_laser_beam
+effect nex242_misc_laser_beam
countabsolute 1
type beam
tex 60 60
@@ -1993,7 +1993,7 @@
color 0xff0000 0xff0000
sizeincrease 1
-effect misc_laser_beam_end
+effect nex242_misc_laser_beam_end
count 1
type spark
color 0x8f4333 0xfff31b
@@ -2006,7 +2006,7 @@
-effect misc_laser_beam_fast
+effect nex242_misc_laser_beam_fast
countabsolute 1
type beam
tex 60 60
@@ -2015,7 +2015,7 @@
color 0xff0000 0xff0000
sizeincrease 0.1
-effect misc_laser_beam_fast_end
+effect nex242_misc_laser_beam_fast_end
count 1
type spark
color 0x8f4333 0xfff31b
@@ -2027,7 +2027,7 @@
velocitymultiplier 100
// additional laser colors (mike)
-effect misc_laser_green_beam
+effect nex242_misc_laser_green_beam
countabsolute 1
type beam
tex 60 60
@@ -2036,7 +2036,7 @@
color 0x00ff00 0x00ff00
sizeincrease 1
-effect misc_laser_green_beam_end
+effect nex242_misc_laser_green_beam_end
count 1
type spark
color 0x8f4333 0xfff31b
@@ -2047,7 +2047,7 @@
velocityjitter 64 64 64
velocitymultiplier 100
-effect misc_laser_blue_beam
+effect nex242_misc_laser_blue_beam
countabsolute 1
type beam
tex 60 60
@@ -2056,7 +2056,7 @@
color 0x0000ff 0x0000ff
sizeincrease 1
-effect misc_laser_blue_beam_end
+effect nex242_misc_laser_blue_beam_end
count 1
type spark
color 0x8f4333 0xfff31b
@@ -2067,7 +2067,7 @@
velocityjitter 64 64 64
velocitymultiplier 100
-effect misc_laser_yellow_beam
+effect nex242_misc_laser_yellow_beam
countabsolute 1
type beam
tex 60 60
@@ -2076,7 +2076,7 @@
color 0xffff00 0xffff00
sizeincrease 1
-effect misc_laser_yellow_beam_end
+effect nex242_misc_laser_yellow_beam_end
count 1
type spark
color 0x8f4333 0xfff31b
@@ -2087,7 +2087,7 @@
velocityjitter 64 64 64
velocitymultiplier 100
-effect misc_laser_cyan_beam
+effect nex242_misc_laser_cyan_beam
countabsolute 1
type beam
tex 60 60
@@ -2096,7 +2096,7 @@
color 0x00ffff 0x00ffff
sizeincrease 1
-effect misc_laser_cyan_beam_end
+effect nex242_misc_laser_cyan_beam_end
count 1
type spark
color 0x8f4333 0xfff31b
@@ -2107,7 +2107,7 @@
velocityjitter 64 64 64
velocitymultiplier 100
-effect misc_laser_magenta_beam
+effect nex242_misc_laser_magenta_beam
countabsolute 1
type beam
tex 60 60
@@ -2116,7 +2116,7 @@
color 0xff00ff 0xff00ff
sizeincrease 1
-effect misc_laser_magenta_beam_end
+effect nex242_misc_laser_magenta_beam_end
count 1
type spark
color 0x8f4333 0xfff31b
@@ -2127,7 +2127,7 @@
velocityjitter 64 64 64
velocitymultiplier 100
-effect misc_laser_white_beam
+effect nex242_misc_laser_white_beam
countabsolute 1
type beam
tex 60 60
@@ -2136,7 +2136,7 @@
color 0xffffff 0xffffff
sizeincrease 1
-effect misc_laser_white_beam_end
+effect nex242_misc_laser_white_beam_end
count 1
type spark
color 0x8f4333 0xfff31b
@@ -2147,7 +2147,7 @@
velocityjitter 64 64 64
velocitymultiplier 100
-effect misc_laser_black_beam
+effect nex242_misc_laser_black_beam
countabsolute 1
type beam
tex 60 60
@@ -2156,7 +2156,7 @@
color 0x000000 0x000000
sizeincrease 1
-effect misc_laser_black_beam_end
+effect nex242_misc_laser_black_beam_end
count 1
type spark
color 0x8f4333 0xfff31b
@@ -2167,7 +2167,7 @@
velocityjitter 64 64 64
velocitymultiplier 100
-effect misc_laser_orange_beam
+effect nex242_misc_laser_orange_beam
countabsolute 1
type beam
tex 60 60
@@ -2176,7 +2176,7 @@
color 0xff6600 0xff6600
sizeincrease 1
-effect misc_laser_orange_beam_end
+effect nex242_misc_laser_orange_beam_end
count 1
type spark
color 0x8f4333 0xfff31b
@@ -2288,4 +2288,40 @@
//velocityoffset 0 0 120
velocityjitter 512 512 512
-
+// decal
+effect laser_deadly
+countabsolute 1
+type decal
+tex 56 59
+size 5 5
+alpha 256 256 0
+originjitter 6 6 6
+// dust/smoke drifting away from the impact
+effect laser_deadly
+count 0.05 // 50 per second
+type smoke
+tex 48 55
+color 0xFFFFFF 0xFFFFFF
+size 3 3
+alpha 0 64 64
+originjitter 1 1 1
+airfriction 7
+liquidfriction 16
+velocityjitter 15 15 15
+sizeincrease 2
+velocitymultiplier 20
+// sparks
+effect laser_deadly
+notunderwater
+count 0.05 // 50 per second
+type spark
+tex 40 40
+color 0xFDFFD9 0xFDFFD9
+size 0.6 0.6
+alpha 256 256 768
+gravity 1
+bounce 1
+airfriction 5
+originjitter 1 1 1
+velocityjitter 100 100 100
+velocitymultiplier 100
Modified: branches/nexuiz-2.0/data/qcsrc/client/View.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/client/View.qc 2008-08-30 16:47:04 UTC (rev 4263)
+++ branches/nexuiz-2.0/data/qcsrc/client/View.qc 2008-08-30 16:49:03 UTC (rev 4264)
@@ -90,7 +90,7 @@
entity e;
float fov;
- drawframetime = time - drawtime;
+ drawframetime = max(0.000001, time - drawtime);
drawtime = time;
// watch for gametype changes here...
Modified: branches/nexuiz-2.0/data/qcsrc/client/laser.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/client/laser.qc 2008-08-30 16:47:04 UTC (rev 4263)
+++ branches/nexuiz-2.0/data/qcsrc/client/laser.qc 2008-08-30 16:49:03 UTC (rev 4264)
@@ -80,6 +80,11 @@
.vector velocity;
.float alpha;
+// TODO move these into a heade file
+float trace_dphitq3surfaceflags;
+float Q3SURFACEFLAG_SKY = 4; // sky surface (also has NOIMPACT and NOMARKS set)
+float Q3SURFACEFLAG_NOIMPACT = 16; // projectiles should remove themselves on impact (this is set on sky)
+
void Draw_Laser()
{
if(!self.state)
@@ -93,6 +98,8 @@
{
makevectors(self.angles);
traceline(self.origin, self.origin + v_forward * 32768, 0, self);
+ if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_SKY)
+ trace_endpos = self.origin + v_forward * 1048576;
}
if(self.alpha)
{
@@ -102,7 +109,13 @@
{
Draw_CylindricLine(self.origin, trace_endpos, 2, "particles/laserbeam", 0, time * 3, self.colormod, 0.5, DRAWFLAG_ADDITIVE); // TODO make a texture to make the laser look smoother
}
- pointparticles(self.cnt, trace_endpos, trace_plane_normal, 256 * drawframetime);
+ if not(trace_dphitq3surfaceflags & (Q3SURFACEFLAG_SKY | Q3SURFACEFLAG_NOIMPACT))
+ {
+ if(self.cnt >= 0)
+ pointparticles(self.cnt, trace_endpos, trace_plane_normal, drawframetime * 1000);
+ if(self.colormod != '0 0 0')
+ R_AddDynamicLight(trace_endpos + trace_plane_normal * 1, 50, self.colormod * 5);
+ }
}
void Ent_Laser()
@@ -127,7 +140,7 @@
self.alpha = ReadByte() / 255.0;
else
self.alpha = 0;
- self.cnt = ReadShort(); // effect number
+ self.cnt = ReadShort() - 1; // effect number
}
if(f & 2)
{
Modified: branches/nexuiz-2.0/data/qcsrc/common/util.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/common/util.qc 2008-08-30 16:47:04 UTC (rev 4263)
+++ branches/nexuiz-2.0/data/qcsrc/common/util.qc 2008-08-30 16:49:03 UTC (rev 4264)
@@ -279,7 +279,7 @@
fh = fopen(pFilename, FILE_WRITE);
if(fh < 0)
{
- dprint(strcat("Can't write DB to ", pFilename));
+ print(strcat("^1Can't write DB to ", pFilename));
return;
}
n = buf_getsize(db);
Modified: branches/nexuiz-2.0/data/qcsrc/server/campaign.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/campaign.qc 2008-08-30 16:47:04 UTC (rev 4263)
+++ branches/nexuiz-2.0/data/qcsrc/server/campaign.qc 2008-08-30 16:49:03 UTC (rev 4264)
@@ -12,7 +12,7 @@
void CampaignBailout(string s)
{
cvar_set("g_campaign", "0");
- ServerConsoleEcho(strcat("campaign initialization failed: ", s), TRUE);
+ print("campaign initialization failed: ", s, "\n");
return;
}
Modified: branches/nexuiz-2.0/data/qcsrc/server/cl_client.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/cl_client.qc 2008-08-30 16:47:04 UTC (rev 4263)
+++ branches/nexuiz-2.0/data/qcsrc/server/cl_client.qc 2008-08-30 16:49:03 UTC (rev 4264)
@@ -1083,10 +1083,10 @@
s = "player";
else
s = "bot";
- GameLogEcho(strcat(":join:", ftos(self.playerid), ":", s, ":", self.netname), TRUE);
+ GameLogEcho(strcat(":join:", ftos(self.playerid), ":", s, ":", self.netname));
s = strcat(":team:", ftos(self.playerid), ":");
s = strcat(s, ftos(self.team));
- GameLogEcho(s, FALSE);
+ GameLogEcho(s);
}
self.netname_previous = strzone(self.netname);
@@ -1233,7 +1233,7 @@
detach_entcs();
if(cvar("sv_eventlog"))
- GameLogEcho(strcat(":part:", ftos(self.playerid)), FALSE);
+ GameLogEcho(strcat(":part:", ftos(self.playerid)));
bprint ("^4",self.netname);
bprint ("^4 disconnected\n");
@@ -1949,7 +1949,7 @@
if(self.netname_previous != self.netname)
{
if(cvar("sv_eventlog"))
- GameLogEcho(strcat(":name:", ftos(self.playerid), ":", self.netname), TRUE);
+ GameLogEcho(strcat(":name:", ftos(self.playerid), ":", self.netname));
if(self.netname_previous)
strunzone(self.netname_previous);
self.netname_previous = strzone(self.netname);
Modified: branches/nexuiz-2.0/data/qcsrc/server/clientcommands.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/clientcommands.qc 2008-08-30 16:47:04 UTC (rev 4263)
+++ branches/nexuiz-2.0/data/qcsrc/server/clientcommands.qc 2008-08-30 16:49:03 UTC (rev 4264)
@@ -96,7 +96,7 @@
}
else
sprint(self, msgstr);
- ServerConsoleEcho(strcat("NOTE: ", playername(self), "^7 is flooding."), TRUE);
+ print("NOTE: ", playername(self), "^7 is flooding.\n");
}
else if(teamsay)
{
@@ -131,7 +131,6 @@
}
else
bprint(msgstr);
- //ServerConsoleEcho(substring(msgstr, 1, strlen(msgstr) - 2), TRUE);
}
strunzone(msgstr);
@@ -370,7 +369,7 @@
if(cmd != "playerskin")
if(cmd != "god") if(cmd != "notarget") if(cmd != "fly") if(cmd != "give") if(cmd != "noclip")
{
- ServerConsoleEcho(strcat("WARNING: Invalid clientcommand by ", self.netname, ": ", s), TRUE);
+ print("WARNING: Invalid clientcommand by ", self.netname, ": ", s, "\n");
return;
}
*/
@@ -390,6 +389,10 @@
if(g_arena | g_assault | gameover | intermission_running | race_completing)
localcmd("restart\n");
+ // clear overtime
+ if(checkrules_overtimeend)
+ checkrules_overtimeend = 0;
+
if(readyNagActive) { //if every player is ready, remove the ready-nagger again
readyNagActive = 0;
remove(readyNagger);
@@ -452,7 +455,7 @@
reset_map();
if(cvar("sv_eventlog"))
- GameLogEcho(":restart", FALSE);
+ GameLogEcho(":restart");
}
/**
Modified: branches/nexuiz-2.0/data/qcsrc/server/ctf.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/ctf.qc 2008-08-30 16:47:04 UTC (rev 4263)
+++ branches/nexuiz-2.0/data/qcsrc/server/ctf.qc 2008-08-30 16:49:03 UTC (rev 4264)
@@ -74,7 +74,7 @@
s = strcat(s, ":", ftos(flagteam));
if(actor != world)
s = strcat(s, ":", ftos(actor.playerid));
- GameLogEcho(s, FALSE);
+ GameLogEcho(s);
}
void RegenFlag(entity e)
Modified: branches/nexuiz-2.0/data/qcsrc/server/domination.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/domination.qc 2008-08-30 16:47:04 UTC (rev 4263)
+++ branches/nexuiz-2.0/data/qcsrc/server/domination.qc 2008-08-30 16:49:03 UTC (rev 4264)
@@ -29,7 +29,7 @@
s = strcat(":dom:", mode);
s = strcat(s, ":", ftos(team_before));
s = strcat(s, ":", ftos(actor.playerid));
- GameLogEcho(s, FALSE);
+ GameLogEcho(s);
}
void() dom_spawnteams;
Modified: branches/nexuiz-2.0/data/qcsrc/server/g_damage.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/g_damage.qc 2008-08-30 16:47:04 UTC (rev 4263)
+++ branches/nexuiz-2.0/data/qcsrc/server/g_damage.qc 2008-08-30 16:49:03 UTC (rev 4264)
@@ -137,7 +137,7 @@
s = strcat(s, ":victimitems=");
s = AppendItemcodes(s, killed);
}
- GameLogEcho(s, FALSE);
+ GameLogEcho(s);
}
void Obituary (entity attacker, entity targ, float deathtype)
Modified: branches/nexuiz-2.0/data/qcsrc/server/g_triggers.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/g_triggers.qc 2008-08-30 16:47:04 UTC (rev 4263)
+++ branches/nexuiz-2.0/data/qcsrc/server/g_triggers.qc 2008-08-30 16:49:03 UTC (rev 4264)
@@ -839,7 +839,7 @@
WriteByte(MSG_ENTITY, self.colormod_z * 255.0);
if(fl & 0x40)
WriteByte(MSG_ENTITY, self.alpha * 255.0);
- WriteShort(MSG_ENTITY, self.cnt);
+ WriteShort(MSG_ENTITY, self.cnt + 1);
}
if(fl & 2)
{
@@ -883,14 +883,19 @@
{
if(self.mdl)
{
- self.cnt = particleeffectnum(strcat(self.mdl, "_end"));
- if(self.cnt < 0)
+ if(self.mdl == "none")
+ self.cnt = -1;
+ else
self.cnt = particleeffectnum(self.mdl);
}
- else
+ else if(!self.cnt)
{
- self.cnt = particleeffectnum("misc_laser_beam_end");
+ if(self.dmg)
+ self.cnt = particleeffectnum("laser_deadly");
+ else
+ self.cnt = -1;
}
+
if(self.colormod == '0 0 0')
if(!self.alpha)
self.colormod = '1 0 0';
Modified: branches/nexuiz-2.0/data/qcsrc/server/g_world.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/g_world.qc 2008-08-30 16:47:04 UTC (rev 4263)
+++ branches/nexuiz-2.0/data/qcsrc/server/g_world.qc 2008-08-30 16:49:03 UTC (rev 4264)
@@ -265,7 +265,7 @@
{
s = strcat(cvar_string("sv_eventlog_files_counter"), ".");
s = strcat(s, ftos(random()));
- GameLogEcho(strcat(":gamestart:", GetGametype(), "_", GetMapname(), ":", s), FALSE);
+ GameLogEcho(strcat(":gamestart:", GetGametype(), "_", GetMapname(), ":", s));
s = ":gameinfo:mutators:LIST";
if(cvar("g_grappling_hook"))
s = strcat(s, ":grappling_hook");
@@ -289,8 +289,8 @@
s = strcat(s, ":midair");
if(cvar("g_minstagib"))
s = strcat(s, ":minstagib");
- GameLogEcho(s, FALSE);
- GameLogEcho(":gameinfo:end", FALSE);
+ GameLogEcho(s);
+ GameLogEcho(":gameinfo:end");
}
cvar_set("nextmap", "");
@@ -886,9 +886,9 @@
s = strcat(s, GetGametype(), "_", GetMapname(), ":", ftos(rint(time)));
if(to_console)
- ServerConsoleEcho(s, FALSE);
+ print(s, "\n");
if(to_eventlog)
- GameLogEcho(s, FALSE);
+ GameLogEcho(s);
if(to_file)
{
file = fopen(cvar_string("sv_logscores_filename"), FILE_APPEND);
@@ -899,10 +899,9 @@
}
s = strcat(":labels:player:", GetPlayerScoreString(world, 0));
- if(to_console)
- ServerConsoleEcho(s, TRUE);
+ print(s, "\n");
if(to_eventlog)
- GameLogEcho(s, TRUE);
+ GameLogEcho(s);
if(to_file)
fputs(file, strcat(s, "\n"));
@@ -918,9 +917,9 @@
s = strcat(s, "spectator:");
if(to_console)
- ServerConsoleEcho(strcat(s, other.netname), TRUE);
+ print(s, other.netname, "\n");
if(to_eventlog)
- GameLogEcho(strcat(s, ftos(other.playerid), ":", other.netname), TRUE);
+ GameLogEcho(strcat(s, ftos(other.playerid), ":", other.netname));
if(to_file)
fputs(file, strcat(s, other.netname, "\n"));
}
@@ -930,9 +929,9 @@
{
s = strcat(":labels:teamscores:", GetTeamScoreString(0, 0));
if(to_console)
- ServerConsoleEcho(s, TRUE);
+ print(s, "\n");
if(to_eventlog)
- GameLogEcho(s, TRUE);
+ GameLogEcho(s);
if(to_file)
fputs(file, strcat(s, "\n"));
@@ -941,18 +940,18 @@
s = strcat(":teamscores:see-labels:", GetTeamScoreString(i, 0));
s = strcat(s, ":", ftos(i));
if(to_console)
- ServerConsoleEcho(s, TRUE);
+ print(s, "\n");
if(to_eventlog)
- GameLogEcho(s, TRUE);
+ GameLogEcho(s);
if(to_file)
fputs(file, strcat(s, "\n"));
}
}
if(to_console)
- ServerConsoleEcho(":end", FALSE);
+ print(":end\n");
if(to_eventlog)
- GameLogEcho(":end", FALSE);
+ GameLogEcho(":end");
if(to_file)
{
fputs(file, ":end\n");
@@ -1028,7 +1027,7 @@
DumpStats(TRUE);
if(cvar("sv_eventlog"))
- GameLogEcho(":gameover", FALSE);
+ GameLogEcho(":gameover");
GameLogClose();
@@ -1342,7 +1341,7 @@
if(e)
sprint(e, strcat(s, "\n"));
else
- ServerConsoleEcho(s, TRUE);
+ print(s, "\n");
}
void ShuffleMaplist()
@@ -1712,7 +1711,7 @@
strunzone(mapvote_suggestions[i]);
mapvote_suggestions[i] = strzone(m);
if(cvar("sv_eventlog"))
- GameLogEcho(strcat(":vote:suggested:", m, ":", ftos(self.playerid)), TRUE);
+ GameLogEcho(strcat(":vote:suggested:", m, ":", ftos(self.playerid)));
return strcat("Suggestion of ", m, " accepted.");
}
@@ -1907,9 +1906,9 @@
}
result = strcat(result, ":didn't vote:", ftos(didntvote));
- GameLogEcho(result, FALSE);
+ GameLogEcho(result);
if(mapvote_maps_suggested[mappos])
- GameLogEcho(strcat(":vote:suggestion_accepted:", mapvote_maps[mappos]), FALSE);
+ GameLogEcho(strcat(":vote:suggestion_accepted:", mapvote_maps[mappos]));
}
FOR_EACH_REALCLIENT(other)
@@ -2008,7 +2007,7 @@
}
result = strcat(result, ":didn't vote:", ftos(didntvote));
if(cvar("sv_eventlog"))
- GameLogEcho(result, FALSE);
+ GameLogEcho(result);
}
return FALSE;
@@ -2236,7 +2235,7 @@
clients_found = 0;
FOR_EACH_REALCLIENT(self)
{
- ServerConsoleEcho(strcat("Redirecting: sending connect command to ", self.netname), FALSE);
+ print("Redirecting: sending connect command to ", self.netname, "\n");
if(redirection_target == "self")
stuffcmd(self, "\ndisconnect; reconnect\n");
else
@@ -2244,7 +2243,7 @@
++clients_found;
}
- ServerConsoleEcho(strcat("Redirecting: ", ftos(clients_found), " clients left."), FALSE);
+ print("Redirecting: ", ftos(clients_found), " clients left.\n");
if(time > redirection_timeout || clients_found == 0)
localcmd("\nwait; wait; wait; quit\n");
Modified: branches/nexuiz-2.0/data/qcsrc/server/ipban.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/ipban.qc 2008-08-30 16:47:04 UTC (rev 4263)
+++ branches/nexuiz-2.0/data/qcsrc/server/ipban.qc 2008-08-30 16:49:03 UTC (rev 4264)
@@ -78,7 +78,7 @@
msg = strcat("#", ftos(i), ": ");
msg = strcat(msg, ban_ip[i], " is still banned for ");
msg = strcat(msg, ftos(ban_expire[i] - time), " seconds");
- ServerConsoleEcho(msg, FALSE);
+ print(msg, "\n");
}
}
@@ -149,7 +149,7 @@
return FALSE;
// okay, insert our new victim as i
Ban_Delete(i);
- ServerConsoleEcho(strcat(ip, " has been banned for ", ftos(bantime), " seconds"), FALSE);
+ print(ip, " has been banned for ", ftos(bantime), " seconds\n");
ban_expire[i] = time + bantime;
ban_ip[i] = strzone(ip);
ban_count = max(ban_count, i + 1);
Modified: branches/nexuiz-2.0/data/qcsrc/server/keyhunt.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/keyhunt.qc 2008-08-30 16:47:04 UTC (rev 4263)
+++ branches/nexuiz-2.0/data/qcsrc/server/keyhunt.qc 2008-08-30 16:49:03 UTC (rev 4264)
@@ -143,7 +143,7 @@
s = strcat(s, ":", ftos(frags_owner), ":");
if(key)
s = strcat(s, key.netname);
- GameLogEcho(s, FALSE);
+ GameLogEcho(s);
}
vector kh_AttachedOrigin(entity e) // runs when a team captures the flag, it can run 2 or 3 times.
Modified: branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc 2008-08-30 16:47:04 UTC (rev 4263)
+++ branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc 2008-08-30 16:49:03 UTC (rev 4264)
@@ -141,34 +141,8 @@
centerprint(head, s);
}
-void ServerConsoleEcho(string s, float check_dangerous)
+void GameLogEcho(string s)
{
- local string ch;
- if (checkextension("DP_SV_PRINT"))
- print(s, "\n");
- else
- {
- localcmd("echo \"");
- if(check_dangerous)
- {
- while(strlen(s))
- {
- ch = substring(s, 0, 1);
- if(ch != "\"" && ch != "\r" && ch != "\n")
- localcmd(ch);
- s = substring(s, 1, strlen(s) - 1);
- }
- }
- else
- {
- localcmd(s);
- }
- localcmd("\"\n");
- }
-}
-
-void GameLogEcho(string s, float check_dangerous)
-{
string fn;
float matches;
@@ -196,7 +170,7 @@
}
if(cvar("sv_eventlog_console"))
{
- ServerConsoleEcho(s, check_dangerous);
+ print(s, "\n");
}
}
Modified: branches/nexuiz-2.0/data/qcsrc/server/teamplay.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/teamplay.qc 2008-08-30 16:47:04 UTC (rev 4263)
+++ branches/nexuiz-2.0/data/qcsrc/server/teamplay.qc 2008-08-30 16:49:03 UTC (rev 4264)
@@ -82,7 +82,7 @@
return;
str = strcat(":team:", ftos(pl.playerid), ":");
str = strcat(str, ftos(pl.team));
- GameLogEcho(str, FALSE);
+ GameLogEcho(str);
}
void WriteGameCvars()
@@ -1201,7 +1201,7 @@
steam = COLOR_TEAM3;
else if(source_team == 4)
steam = COLOR_TEAM4;
- ServerConsoleEcho(strcat("Team ", ftos(source_team), " too large, complaining."), TRUE);
+ print("Team ", ftos(source_team), " too large, complaining.\n");
FOR_EACH_REALPLAYER(head)
{
if(head.team == steam)
Modified: branches/nexuiz-2.0/data/qcsrc/server/vote.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/vote.qc 2008-08-30 16:47:04 UTC (rev 4263)
+++ branches/nexuiz-2.0/data/qcsrc/server/vote.qc 2008-08-30 16:49:03 UTC (rev 4264)
@@ -137,7 +137,7 @@
}
bprint("\{1}^2* ^3", VoteNetname(votecaller), "^2 calls a vote for ", votecalledvote_display, "\n");
if(cvar("sv_eventlog"))
- GameLogEcho(strcat(":vote:vcall:", ftos(votecaller.playerid), ":", votecalledvote_display), TRUE);
+ GameLogEcho(strcat(":vote:vcall:", ftos(votecaller.playerid), ":", votecalledvote_display));
VoteCount(); // needed if you are the only one
} else {
print_to(e, "^1This vote is not ok. See help for more info.");
@@ -175,7 +175,7 @@
}
bprint("\{1}^2* ^3", VoteNetname(votecaller), "^2 calls a vote to become ^3master^2.\n");
if(cvar("sv_eventlog"))
- GameLogEcho(strcat(":vote:vcall:", ftos(votecaller.playerid), ":", votecalledvote_display), FALSE);
+ GameLogEcho(strcat(":vote:vcall:", ftos(votecaller.playerid), ":", votecalledvote_display));
VoteCount(); // needed if you are the only one
}
} else {
@@ -216,7 +216,7 @@
}
bprint("\{1}^2* ^3", VoteNetname(e), "^2 used his ^3master^2 status to do \"^2", dovote_display, "^2\".\n");
if(cvar("sv_eventlog"))
- GameLogEcho(strcat(":vote:vdo:", ftos(e.playerid), ":", dovote_display), FALSE);
+ GameLogEcho(strcat(":vote:vdo:", ftos(e.playerid), ":", dovote_display));
localcmd(strcat(dovote, "\n"));
} else {
print_to(e, "^1This command is not ok. See help for more info.");
@@ -233,13 +233,13 @@
if (e)
e.vote_master = granted;
if(granted) {
- ServerConsoleEcho(strcat("Accepted master login from ", VoteNetname(e)), TRUE);
+ print("Accepted master login from ", VoteNetname(e), "\n");
bprint("\{1}^2* ^3", VoteNetname(e), "^2 logged in as ^3master^2\n");
if(cvar("sv_eventlog"))
- GameLogEcho(strcat(":vote:vlogin:", ftos(e.playerid)), FALSE);
+ GameLogEcho(strcat(":vote:vlogin:", ftos(e.playerid)));
}
else
- ServerConsoleEcho(strcat("REJECTED master login from ", VoteNetname(e)), TRUE);
+ print("REJECTED master login from ", VoteNetname(e), "\n");
}
else
print_to(e, "^1Login to become master is NOT allowed.");
@@ -465,7 +465,7 @@
void VoteStop(entity stopper) {
bprint("\{1}^2* ^3", VoteNetname(stopper), "^2 stopped ^3", VoteNetname(votecaller), "^2's vote\n");
if(cvar("sv_eventlog"))
- GameLogEcho(strcat(":vote:vstop:", ftos(stopper.playerid)), FALSE);
+ GameLogEcho(strcat(":vote:vstop:", ftos(stopper.playerid)));
if(stopper == votecaller) {
// no wait for next vote so you can correct your vote
if(votecaller) {
@@ -507,7 +507,7 @@
s = strcat(s, ":", ftos(abstaincount));
s = strcat(s, ":", ftos(notvoters));
s = strcat(s, ":", ftos(mincount));
- GameLogEcho(s, FALSE);
+ GameLogEcho(s);
}
}
More information about the nexuiz-commits
mailing list