r3702 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Thu Jun 12 03:30:58 EDT 2008
Author: div0
Date: 2008-06-12 03:30:56 -0400 (Thu, 12 Jun 2008)
New Revision: 3702
Modified:
trunk/data/qcsrc/server/cl_client.qc
trunk/data/qcsrc/server/cl_impulse.qc
trunk/data/qcsrc/server/cl_player.qc
Log:
(suicide countdown) also show the countdown for clones and kill them on suicide. Get video of this on http://mensa.ath.cx/~polzer/temp/nexlings.avi when it's done uploading.
Modified: trunk/data/qcsrc/server/cl_client.qc
===================================================================
--- trunk/data/qcsrc/server/cl_client.qc 2008-06-12 05:58:21 UTC (rev 3701)
+++ trunk/data/qcsrc/server/cl_client.qc 2008-06-12 07:30:56 UTC (rev 3702)
@@ -736,19 +736,21 @@
else
{
if(self.cnt <= 10)
- {
setmodel(self, strcat("models/sprites/", ftos(self.cnt), ".spr32"));
- play2(self.owner, strcat("announcer/robotic/", ftos(self.cnt), ".ogg"));
- }
- if(self.owner.killindicator_teamchange)
+ if(clienttype(self.owner) == CLIENTTYPE_REAL)
{
- if(self.owner.killindicator_teamchange == -1)
- centerprint(self.owner, strcat("Changing team in ", ftos(self.cnt), " seconds"));
+ if(self.cnt <= 10)
+ play2(self.owner, strcat("announcer/robotic/", ftos(self.cnt), ".ogg"));
+ if(self.owner.killindicator_teamchange)
+ {
+ if(self.owner.killindicator_teamchange == -1)
+ centerprint(self.owner, strcat("Changing team in ", ftos(self.cnt), " seconds"));
+ else
+ centerprint(self.owner, strcat("Changing to ", ColoredTeamName(self.owner.killindicator_teamchange), " in ", ftos(self.cnt), " seconds"));
+ }
else
- centerprint(self.owner, strcat("Changing to ", ColoredTeamName(self.owner.killindicator_teamchange), " in ", ftos(self.cnt), " seconds"));
+ centerprint(self.owner, strcat("^1Suicide in ", ftos(self.cnt), " seconds"));
}
- else
- centerprint(self.owner, strcat("^1Suicide in ", ftos(self.cnt), " seconds"));
self.nextthink = time + 1;
self.cnt -= 1;
}
@@ -757,6 +759,7 @@
void ClientKill_TeamChange (float targetteam) // 0 = don't change, -1 = auto
{
float killtime;
+ entity e;
killtime = cvar("g_balance_kill_delay");
self.killindicator_teamchange = targetteam;
@@ -775,9 +778,25 @@
setattachment(self.killindicator, self, "");
setorigin(self.killindicator, '0 0 52');
self.killindicator.think = KillIndicator_Think;
- self.killindicator.nextthink = time;
+ self.killindicator.nextthink = time + (self.lip) * 0.05;
self.killindicator.cnt = ceil(killtime);
+ self.killindicator.count = bound(0, ceil(killtime), 10);
sprint(self, strcat("^1You'll be dead in ", ftos(self.killindicator.cnt), " seconds\n"));
+
+ for(e = world; (e = find(e, classname, "body")) != world; )
+ {
+ if(e.enemy != self)
+ return;
+ e.killindicator = spawn();
+ e.killindicator.owner = e;
+ e.killindicator.scale = 0.5;
+ setattachment(e.killindicator, e, "");
+ setorigin(e.killindicator, '0 0 52');
+ e.killindicator.think = KillIndicator_Think;
+ e.killindicator.nextthink = time + (e.lip) * 0.05;
+ e.killindicator.cnt = ceil(killtime);
+ }
+ self.lip = 0;
}
}
if(self.killindicator)
Modified: trunk/data/qcsrc/server/cl_impulse.qc
===================================================================
--- trunk/data/qcsrc/server/cl_impulse.qc 2008-06-12 05:58:21 UTC (rev 3701)
+++ trunk/data/qcsrc/server/cl_impulse.qc 2008-06-12 07:30:56 UTC (rev 3702)
@@ -252,10 +252,14 @@
makevectors (self.v_angle);
self.velocity = self.velocity + v_forward * 300;
CopyBody(1);
+ self.lip += 1;
self.velocity = self.velocity - v_forward * 300;
}
else if (imp == 14)
+ {
CopyBody(0);
+ self.lip += 1;
+ }
}
}
}
Modified: trunk/data/qcsrc/server/cl_player.qc
===================================================================
--- trunk/data/qcsrc/server/cl_player.qc 2008-06-12 05:58:21 UTC (rev 3701)
+++ trunk/data/qcsrc/server/cl_player.qc 2008-06-12 07:30:56 UTC (rev 3702)
@@ -20,6 +20,8 @@
return;
oldself = self;
self = spawn();
+ self.enemy = oldself;
+ self.lip = oldself.lip;
self.colormap = oldself.colormap;
self.iscreature = oldself.iscreature;
self.angles = oldself.angles;
@@ -440,6 +442,13 @@
self.killindicator = world;
if(self.killindicator_teamchange)
defer_ClientKill_Now_TeamChange = TRUE;
+
+ if(self.classname == "body")
+ if(deathtype == DEATH_KILL)
+ {
+ // for the lemmings fans, a small harmless explosion
+ pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
+ }
}
// become fully visible
More information about the nexuiz-commits
mailing list