From: MirceaKitsune Date: Sun, 6 Nov 2011 14:21:58 +0000 (+0200) Subject: Fix compile issues with latest fteqcc X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=bf7ed15977857de30addba2229da888cb425fef4;p=voretournament%2Fvoretournament.git Fix compile issues with latest fteqcc --- diff --git a/data/qcsrc/menu/voret/serverlist.c b/data/qcsrc/menu/voret/serverlist.c index d8113a61..2becfe1b 100644 --- a/data/qcsrc/menu/voret/serverlist.c +++ b/data/qcsrc/menu/voret/serverlist.c @@ -413,17 +413,17 @@ void ServerList_ShowFull_Click(entity box, entity me) me.ipAddressBox.cursorPos = 0; me.ipAddressBoxFocused = -1; } -void setSortOrderVoretServerList(entity me, float field, float direction) +void setSortOrderVoretServerList(entity me, float vfield, float direction) { - if(me.currentSortField == field) + if(me.currentSortField == vfield) direction = -me.currentSortOrder; me.currentSortOrder = direction; - me.currentSortField = field; - me.sortButton1.forcePressed = (field == SLIST_FIELD_PING); - me.sortButton2.forcePressed = (field == SLIST_FIELD_NAME); - me.sortButton3.forcePressed = (field == SLIST_FIELD_MAP); + me.currentSortField = vfield; + me.sortButton1.forcePressed = (vfield == SLIST_FIELD_PING); + me.sortButton2.forcePressed = (vfield == SLIST_FIELD_NAME); + me.sortButton3.forcePressed = (vfield == SLIST_FIELD_MAP); me.sortButton4.forcePressed = 0; - me.sortButton5.forcePressed = (field == SLIST_FIELD_NUMHUMANS); + me.sortButton5.forcePressed = (vfield == SLIST_FIELD_NUMHUMANS); me.selectedItem = 0; if(me.selectedServer) strunzone(me.selectedServer); diff --git a/data/qcsrc/server/cl_client.qc b/data/qcsrc/server/cl_client.qc index 945b419f..29f39be3 100644 --- a/data/qcsrc/server/cl_client.qc +++ b/data/qcsrc/server/cl_client.qc @@ -1020,7 +1020,7 @@ void PutClientInServer (void) entity e; e = get_weaponinfo(j); if(e.spawnflags & WEP_FLAG_RELOADABLE) // prevent accessing undefined cvars - self.weapon_load[j] = cvar(strcat("g_balance_", e.netname, "_reload_ammo")); + self.(weapon_load[j]) = cvar(strcat("g_balance_", e.netname, "_reload_ammo")); } oldself = self; diff --git a/data/qcsrc/server/cl_weapons.qc b/data/qcsrc/server/cl_weapons.qc index f908a519..8f4f6002 100644 --- a/data/qcsrc/server/cl_weapons.qc +++ b/data/qcsrc/server/cl_weapons.qc @@ -232,7 +232,7 @@ string W_ThrowNewWeapon(entity own, float wpn, float doreduce, vector org, vecto if(self.weapon_load[self.weapon] > 0) { own.ammofield += self.weapon_load[self.weapon]; - self.weapon_load[self.weapon] = -1; // schedule the weapon for reloading + self.(weapon_load[self.weapon]) = -1; // schedule the weapon for reloading } } } diff --git a/data/qcsrc/server/cl_weaponsystem.qc b/data/qcsrc/server/cl_weaponsystem.qc index 06ee01e1..61763b71 100644 --- a/data/qcsrc/server/cl_weaponsystem.qc +++ b/data/qcsrc/server/cl_weaponsystem.qc @@ -1588,7 +1588,7 @@ void W_DecreaseAmmo(.float ammo_type, float ammo_use, float ammo_reload) if(ammo_reload) { self.clip_load -= ammo_use; - self.weapon_load[self.weapon] = self.clip_load; + self.(weapon_load[self.weapon]) = self.clip_load; } else self.(self.current_ammo) -= ammo_use; @@ -1605,7 +1605,7 @@ void W_ReloadedAndReady() // if we are inside the stomach, don't allow reloading, and schedule the weapon to reload once when we're out if(self.stat_eaten) { - self.clip_load = self.weapon_load[self.weapon] = -1; + self.clip_load = self.(weapon_load[self.weapon]) = -1; w_ready(); // don't keep executing each frame return; } @@ -1625,7 +1625,7 @@ void W_ReloadedAndReady() self.(self.current_ammo) -= 1; } } - self.weapon_load[self.weapon] = self.clip_load; + self.(weapon_load[self.weapon]) = self.clip_load; // do not set ATTACK_FINISHED in reload code any more. This causes annoying delays if eg: You start reloading a weapon, // then quickly switch to another weapon and back. Reloading is canceled, but the reload delay is still there, @@ -1717,5 +1717,5 @@ void W_Reload(float sent_ammo_min, float sent_ammo_amount, float sent_time, stri if(self.clip_load < 0) self.clip_load = 0; self.old_clip_load = self.clip_load; - self.clip_load = self.weapon_load[self.weapon] = -1; + self.clip_load = self.(weapon_load[self.weapon]) = -1; } \ No newline at end of file