r134 - trunk/progsqc
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Tue Jan 20 22:08:34 EST 2009
Author: vermeulen
Date: 2009-01-20 22:08:32 -0500 (Tue, 20 Jan 2009)
New Revision: 134
Modified:
trunk/progsqc/actor.qc
trunk/progsqc/gamedefs.qc
trunk/progsqc/inventory.qc
trunk/progsqc/player.qc
Log:
Modified: trunk/progsqc/actor.qc
===================================================================
--- trunk/progsqc/actor.qc 2009-01-20 14:59:42 UTC (rev 133)
+++ trunk/progsqc/actor.qc 2009-01-21 03:08:32 UTC (rev 134)
@@ -328,7 +328,7 @@
//bprint("lowering\n");
weapon_state(WS_LOWER);
}
- else if ((self.weapinfo_ammo <= self.weapinfo_ammo1minimumtofire) && (cvar("g_autoreload")) && (self.weapinfo_ammoinventory >= 1))
+ else if ((self.weapinfo_ammo < self.weapinfo_ammo1minimumtofire) && (cvar("g_autoreload")) && (self.weapinfo_ammoinventory >= 1))
weapon_state(WS_RELOAD);
else if (self.button4 && ((self.weapinfo_ammo < self.weapinfo_ammomax && self.weapinfo_ammoinventory >= 1)))
weapon_state(WS_RELOAD);
Modified: trunk/progsqc/gamedefs.qc
===================================================================
--- trunk/progsqc/gamedefs.qc 2009-01-20 14:59:42 UTC (rev 133)
+++ trunk/progsqc/gamedefs.qc 2009-01-21 03:08:32 UTC (rev 134)
@@ -61,6 +61,7 @@
.float sight;
.float fire1distance;
.float fire2distance;
+.float itemdrop;
.float combodie;
Modified: trunk/progsqc/inventory.qc
===================================================================
--- trunk/progsqc/inventory.qc 2009-01-20 14:59:42 UTC (rev 133)
+++ trunk/progsqc/inventory.qc 2009-01-21 03:08:32 UTC (rev 134)
@@ -613,7 +613,9 @@
{
item = Inventory_GetItem(from, weaptype);
if (item != '0 0 0')
+ {
Inventory_ModifyItem(to, weaptype, item_x, item_y);
+ }
weaptype = weaptype + 1;
}
};
@@ -764,53 +766,53 @@
void() weapon_thenex =
{
- Item_Spawn(weaptype_WEAP10,1,50,self.origin,'0 0 0',10,1.5,world);
+ Item_Spawn(weaptype_WEAP10,1,50,self.origin,'0 0 0',0,1.5,world);
}
void() weapon_weap1 =
{
- Item_Spawn(weaptype_WEAP1,1,100,self.origin,'0 0 0',0,1.5,world);
+ Item_Spawn(weaptype_WEAP1,1,25,self.origin,'0 0 0',0,1.5,world);
}
void() weapon_weap2 =
{
- Item_Spawn(weaptype_WEAP2,1,100,self.origin,'0 0 0',0,1.5,world);
+ Item_Spawn(weaptype_WEAP2,1,25,self.origin,'0 0 0',0,1.5,world);
}
void() weapon_weap3 =
{
- Item_Spawn(weaptype_WEAP3,1,100,self.origin,'0 0 0',0,1.5,world);
+ Item_Spawn(weaptype_WEAP3,1,25,self.origin,'0 0 0',0,1.5,world);
}
void() weapon_weap4 =
{
- Item_Spawn(weaptype_WEAP4,1,100,self.origin,'0 0 0',0,1.5,world);
+ Item_Spawn(weaptype_WEAP4,1,25,self.origin,'0 0 0',0,1.5,world);
}
void() weapon_weap5 =
{
- Item_Spawn(weaptype_WEAP5,1,100,self.origin,'0 0 0',0,1.5,world);
+ Item_Spawn(weaptype_WEAP5,1,25,self.origin,'0 0 0',0,1.5,world);
}
void() weapon_weap6 =
{
- Item_Spawn(weaptype_WEAP6,1,100,self.origin,'0 0 0',0,1.5,world);
+ Item_Spawn(weaptype_WEAP6,1,25,self.origin,'0 0 0',0,1.5,world);
}
void() weapon_weap7 =
{
- Item_Spawn(weaptype_WEAP7,1,100,self.origin,'0 0 0',0,1.5,world);
+ Item_Spawn(weaptype_WEAP7,1,25,self.origin,'0 0 0',0,1.5,world);
}
void() weapon_weap8 =
{
- Item_Spawn(weaptype_WEAP8,1,100,self.origin,'0 0 0',0,1.5,world);
+ Item_Spawn(weaptype_WEAP8,1,25,self.origin,'0 0 0',0,1.5,world);
}
void() weapon_weap9 =
{
- Item_Spawn(weaptype_WEAP9,1,100,self.origin,'0 0 0',0,1.5,world);
+ Item_Spawn(weaptype_WEAP9,1,25,self.origin,'0 0 0',0,1.5,world);
}
//void() item_ammo1 =
@@ -819,15 +821,15 @@
//}
void() item_ammo2 =
{
- Item_Spawn(weaptype_AMMO2,50,0,self.origin,'0 0 0',0,1,world);
+ Item_Spawn(weaptype_AMMO2,25,0,self.origin,'0 0 0',0,1,world);
}
void() item_ammo3 =
{
- Item_Spawn(weaptype_AMMO3,50,0,self.origin,'0 0 0',0,1,world);
+ Item_Spawn(weaptype_AMMO3,25,0,self.origin,'0 0 0',0,1,world);
}
void() item_ammo4 =
{
- Item_Spawn(weaptype_AMMO4,50,0,self.origin,'0 0 0',0,1,world);
+ Item_Spawn(weaptype_AMMO4,25,0,self.origin,'0 0 0',0,1,world);
}
void armor_small_toss (vector velo) =
@@ -860,7 +862,7 @@
armor_small_toss('0 0 0');
}
-void() armor_medium =
+void armor_medium_toss (vector velo) =
{
newmis = spawn();
newmis.armorvalue = 50;
@@ -870,7 +872,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;
@@ -885,6 +887,10 @@
newmis.effects = newmis.effects | EF_ADDITIVE | EF_FULLBRIGHT;
}
+void armor_medium () =
+{
+ armor_medium_toss('0 0 0');
+}
void health_small_toss (vector velo) =
{
@@ -916,7 +922,7 @@
health_small_toss('0 0 0');
}
-void() health_medium =
+void health_medium_toss (vector velo) =
{
newmis = spawn();
newmis.health = 50;
@@ -926,7 +932,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;
@@ -941,7 +947,12 @@
newmis.effects = newmis.effects | EF_ADDITIVE | EF_FULLBRIGHT;
}
+void health_medium ( ) =
+{
+ health_medium_toss('0 0 0');
+}
+
/*
// _x = quantity, _y = ammo type, _z = ammo quantity
.vector inventory_weap1;
Modified: trunk/progsqc/player.qc
===================================================================
--- trunk/progsqc/player.qc 2009-01-20 14:59:42 UTC (rev 133)
+++ trunk/progsqc/player.qc 2009-01-21 03:08:32 UTC (rev 134)
@@ -83,6 +83,7 @@
pc.sight = cvar(cname,"_sight");
pc.fire1distance = cvar(cname,"_fire1distance");
pc.fire2distance = cvar(cname,"_fire2distance");
+ pc.itemdrop = cvar(cname,"_itemdrop");
if (pc.animationtype == 1)
{
@@ -282,6 +283,10 @@
self.sight = pc.sight;
self.fire1distance = pc.fire1distance;
self.fire2distance = pc.fire2distance;
+ self.itemdrop = pc.itemdrop;
+
+ self.modelflags = 0;
+ self.velocity = '0 0 0';
setsize (self, pc.mins, pc.maxs);
Inventory_CloneFromInventory(self, pc);
@@ -1073,22 +1078,31 @@
void() item_toss =
{
local float c;
- c = random() * 3;
+ c = random() * 2;
if (c < 1)
{
- health_small_toss('-200 0 100');
- health_small_toss('0 -200 100');
+ if (self.itemdrop == 1)
+ {
+ health_medium_toss('-200 0 100');
+ }
+ else
+ {
+ 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');
+ {
+ if (self.itemdrop == 1)
+ {
+ armor_medium_toss('-200 0 100');
+ }
+ else
+ {
+ 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 =
More information about the zymotic-commits
mailing list