r125 - trunk/progsqc
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sat Sep 6 20:37:00 EDT 2008
Author: vermeulen
Date: 2008-09-06 20:36:59 -0400 (Sat, 06 Sep 2008)
New Revision: 125
Modified:
trunk/progsqc/actor.qc
trunk/progsqc/bots.qc
trunk/progsqc/inventory.qc
trunk/progsqc/player.qc
Log:
fixed the jetpack recharging issue
Modified: trunk/progsqc/actor.qc
===================================================================
--- trunk/progsqc/actor.qc 2008-09-07 00:24:13 UTC (rev 124)
+++ trunk/progsqc/actor.qc 2008-09-07 00:36:59 UTC (rev 125)
@@ -270,35 +270,6 @@
local float f2;
oldself = self;
self = self.owner;
-
- if (self.button7)
- {
- Inventory_GetItemInfo(self, self.itemselected);
- if ((!iteminfo_ammo1noprojectile) && iteminfo_weapon_canfire1 && iteminfo_weapon_canfire2 && (!self.weapon_oldbutton7 || !(iteminfo_ammo1fireflags & FIREFLAG_SEMIAUTOMATIC)))
- {
- weapon_state(WS_FIRE3);
- }
- else if (iteminfo_ammo1fireflags & FIREFLAG_JETPACK)
- {
- Inventory_ModifyItem(self, self.itemselected, 0 - iteminfo_ammo1minimumtofire, 0);
- self.jetpack_fuel = iteminfo_quantity;
- if (!self.jetpackactive && self.jetpack_fuel > 10)
- {
- sound(self, CHAN_BODY, "jetpack/low.wav", 0.2, ATTN_NORM);
- self.jetpackactive = TRUE;
- }
- }
- else if (iteminfo_ammo1fireflags & FIREFLAG_SHIELD)
- {
- Inventory_ModifyItem(self, self.itemselected, 0 - iteminfo_ammo1minimumtofire, 0);
- self.shieldactive = TRUE;
- }
- else if (iteminfo_ammo1fireflags & FIREFLAG_INVIS)
- {
- Inventory_ModifyItem(self, self.itemselected, 0 - iteminfo_ammo1minimumtofire, 0);
- self.invisactive = TRUE;
- }
- }
Inventory_GetItemInfo(self, self.weaponitem);
if (animdone)
Modified: trunk/progsqc/bots.qc
===================================================================
--- trunk/progsqc/bots.qc 2008-09-07 00:24:13 UTC (rev 124)
+++ trunk/progsqc/bots.qc 2008-09-07 00:36:59 UTC (rev 125)
@@ -155,13 +155,13 @@
return;
}
- Inventory_GetItemInfo(self, self.itemselected);
- if (iteminfo_ammo1fireflags & FIREFLAG_JETPACK)
- {
- self.button7 = 1;
- }
- else
- self.button7 = 0;
+ //Inventory_GetItemInfo(self, self.itemselected);
+ //if (iteminfo_ammo1fireflags & FIREFLAG_JETPACK)
+ //{
+ // self.button7 = 1;
+ //}
+ //else
+ // self.button7 = 0;
// if it has jetpack proj flag, use
//ai_strafe();
Modified: trunk/progsqc/inventory.qc
===================================================================
--- trunk/progsqc/inventory.qc 2008-09-07 00:24:13 UTC (rev 124)
+++ trunk/progsqc/inventory.qc 2008-09-07 00:36:59 UTC (rev 125)
@@ -45,7 +45,7 @@
float WS_IDLE = 0;
float WS_FIRE1 = 1;
float WS_FIRE2 = 2;
-float WS_FIRE3 = 4;
+float WS_FIRE3 = 3;
float WS_RELOAD = 5;
float WS_LOWER = 6;
float WS_RAISE = 7;
Modified: trunk/progsqc/player.qc
===================================================================
--- trunk/progsqc/player.qc 2008-09-07 00:24:13 UTC (rev 124)
+++ trunk/progsqc/player.qc 2008-09-07 00:36:59 UTC (rev 125)
@@ -510,6 +510,7 @@
.float deadtime;
void() PlayerPreThink =
{
+ local float im;
if (!self.spawned)
{
return;
@@ -525,13 +526,44 @@
self.viewmodelchange = self.viewmodelchange + self.viewmodeldiff * 0.1;
actor_setviewmodeloffset(self.viewmodelchange);
}
+
+ if (self.flags & FL_CLIENT)
+ {
+ Inventory_GetItemInfo(self, self.itemselected);
+ Inventory_ModifyItem(self, self.itemselected, 0 + iteminfo_rechargerate, 0);
+ Inventory_GetItemInfo(self, self.weaponitem);
+ Inventory_ModifyItem(self, self.weaponitem, 0, 0 + iteminfo_rechargerate);
+ }
+
+ if (self.button7)
+ {
+ Inventory_GetItemInfo(self, self.itemselected);
+ if ((!iteminfo_ammo1noprojectile) && iteminfo_weapon_canfire1 && iteminfo_weapon_canfire2 && (!self.weapon_oldbutton7 || !(iteminfo_ammo1fireflags & FIREFLAG_SEMIAUTOMATIC)))
+ {
+ weapon_state(WS_FIRE3);
+ }
+ else if (iteminfo_ammo1fireflags & FIREFLAG_JETPACK)
+ {
+ Inventory_ModifyItem(self, self.itemselected, 0 - iteminfo_ammo1minimumtofire, 0);
+ self.jetpack_fuel = iteminfo_quantity;
+ if (!self.jetpackactive && self.jetpack_fuel > 10)
+ {
+ sound(self, CHAN_BODY, "jetpack/low.wav", 0.2, ATTN_NORM);
+ self.jetpackactive = TRUE;
+ }
+ }
+ else if (iteminfo_ammo1fireflags & FIREFLAG_SHIELD)
+ {
+ Inventory_ModifyItem(self, self.itemselected, 0 - iteminfo_ammo1minimumtofire, 0);
+ self.shieldactive = TRUE;
+ }
+ else if (iteminfo_ammo1fireflags & FIREFLAG_INVIS)
+ {
+ Inventory_ModifyItem(self, self.itemselected, 0 - iteminfo_ammo1minimumtofire, 0);
+ self.invisactive = TRUE;
+ }
+ }
- Inventory_GetItemInfo(self, self.itemselected);
- Inventory_ModifyItem(self, self.itemselected, 0 + iteminfo_rechargerate, 0);
- Inventory_GetItemInfo(self, self.weaponitem);
- Inventory_ModifyItem(self, self.weaponitem, 0, 0 + iteminfo_rechargerate);
-
- local float im;
if (self.flags & FL_CLIENT) // only real players can respawn, not NPCs
if (self.deadflag)
{
More information about the zymotic-commits
mailing list