r132 - trunk/progsqc
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Mon Jan 19 08:17:12 EST 2009
Author: vermeulen
Date: 2009-01-19 08:17:12 -0500 (Mon, 19 Jan 2009)
New Revision: 132
Modified:
trunk/progsqc/inventory.qc
trunk/progsqc/player.qc
trunk/progsqc/structures.qc
Log:
Modified: trunk/progsqc/inventory.qc
===================================================================
--- trunk/progsqc/inventory.qc 2008-12-12 23:17:02 UTC (rev 131)
+++ trunk/progsqc/inventory.qc 2009-01-19 13:17:12 UTC (rev 132)
@@ -675,7 +675,7 @@
void() Item_Pickup =
{
- if (other.classname != "player")
+ if (!(other.flags & FL_CLIENT))
return;
if (self.armorvalue > 24)
@@ -830,7 +830,7 @@
Item_Spawn(weaptype_AMMO4,50,0,self.origin,'0 0 0',0,1,world);
}
-void() armor_small =
+void armor_small_toss (vector velo) =
{
newmis = spawn();
newmis.armorvalue = 5;
@@ -840,7 +840,7 @@
newmis.ispointable = TRUE;
newmis.solid = SOLID_TRIGGER;
newmis.movetype = MOVETYPE_TOSS;
- newmis.velocity = '0 0 0';
+ newmis.velocity = velo;
newmis.angles = '0 0 0';
newmis.nextthink = time + 10;
newmis.think = Item_Think;
@@ -855,6 +855,11 @@
newmis.effects = newmis.effects | EF_ADDITIVE | EF_FULLBRIGHT;
}
+void() armor_small =
+{
+ armor_small_toss('0 0 0');
+}
+
void() armor_medium =
{
newmis = spawn();
@@ -881,7 +886,7 @@
}
-void() health_small =
+void health_small_toss (vector velo) =
{
newmis = spawn();
newmis.health = 5;
@@ -891,7 +896,7 @@
newmis.ispointable = TRUE;
newmis.solid = SOLID_TRIGGER;
newmis.movetype = MOVETYPE_TOSS;
- newmis.velocity = '0 0 0';
+ newmis.velocity = velo;
newmis.angles = '0 0 0';
newmis.nextthink = time + 10;
newmis.think = Item_Think;
@@ -906,6 +911,11 @@
newmis.effects = newmis.effects | EF_ADDITIVE | EF_FULLBRIGHT;
}
+void() health_small =
+{
+ health_small_toss('0 0 0');
+}
+
void() health_medium =
{
newmis = spawn();
Modified: trunk/progsqc/player.qc
===================================================================
--- trunk/progsqc/player.qc 2008-12-12 23:17:02 UTC (rev 131)
+++ trunk/progsqc/player.qc 2009-01-19 13:17:12 UTC (rev 132)
@@ -1070,6 +1070,27 @@
}
};
+void() item_toss =
+{
+ local float c;
+ c = random() * 3;
+ if (c < 1)
+ {
+ health_small_toss('-200 0 100');
+ health_small_toss('0 -200 100');
+ }
+ else if (c < 2)
+ {
+ health_small_toss('-200 0 100');
+ armor_small_toss('0 -200 100');
+ }
+ else
+ {
+ armor_small_toss('-200 0 100');
+ armor_small_toss('0 -200 100');
+ }
+}
+
void() player_die =
{
self.deadtime = time;
@@ -1084,6 +1105,8 @@
self.movetype = MOVETYPE_TOSS;
+ item_toss();
+
c = random() * 3;
if (c < 1)
{
Modified: trunk/progsqc/structures.qc
===================================================================
--- trunk/progsqc/structures.qc 2008-12-12 23:17:02 UTC (rev 131)
+++ trunk/progsqc/structures.qc 2009-01-19 13:17:12 UTC (rev 132)
@@ -29,14 +29,15 @@
void() structure_die =
{
- if (self.structure_print != "")
- {
- bprint(self.structure_print,"\n");
- }
if (self.classname == "power")
{
sound (self, CHAN_AUTO, "misc/capture.wav", 1, ATTN_NORM);
+ bprint(self.message,"\n");
}
+ else if (self.structure_print != "")
+ {
+ bprint(self.structure_print,"\n");
+ }
pointparticles(particleeffectnum(self.structure_effect), self.origin, '0 0 0', 1);
TossGib (world, "models/gibs/m_gib1.md3", self.origin, self.velocity,0,2);
TossGib (world, "models/gibs/m_gib2.md3", self.origin, self.velocity,0,2);
@@ -96,7 +97,7 @@
setmodel(self, "models/structures/reactor/reactor.md3");
self.structure_effect = "blue_power";
- self.structure_print = "POWER STATION DESTORYED";
+ //self.structure_print = "POWER STATION DESTORYED";
self.takedamage = DAMAGE_YES;
self.health = 500;
More information about the zymotic-commits
mailing list