me.ipAddressBox.cursorPos = 0;\r
me.ipAddressBoxFocused = -1;\r
}\r
-void setSortOrderVoretServerList(entity me, float field, float direction)\r
+void setSortOrderVoretServerList(entity me, float vfield, float direction)\r
{\r
- if(me.currentSortField == field)\r
+ if(me.currentSortField == vfield)\r
direction = -me.currentSortOrder;\r
me.currentSortOrder = direction;\r
- me.currentSortField = field;\r
- me.sortButton1.forcePressed = (field == SLIST_FIELD_PING);\r
- me.sortButton2.forcePressed = (field == SLIST_FIELD_NAME);\r
- me.sortButton3.forcePressed = (field == SLIST_FIELD_MAP);\r
+ me.currentSortField = vfield;\r
+ me.sortButton1.forcePressed = (vfield == SLIST_FIELD_PING);\r
+ me.sortButton2.forcePressed = (vfield == SLIST_FIELD_NAME);\r
+ me.sortButton3.forcePressed = (vfield == SLIST_FIELD_MAP);\r
me.sortButton4.forcePressed = 0;\r
- me.sortButton5.forcePressed = (field == SLIST_FIELD_NUMHUMANS);\r
+ me.sortButton5.forcePressed = (vfield == SLIST_FIELD_NUMHUMANS);\r
me.selectedItem = 0;\r
if(me.selectedServer)\r
strunzone(me.selectedServer);\r
entity e;\r
e = get_weaponinfo(j);\r
if(e.spawnflags & WEP_FLAG_RELOADABLE) // prevent accessing undefined cvars\r
- self.weapon_load[j] = cvar(strcat("g_balance_", e.netname, "_reload_ammo"));\r
+ self.(weapon_load[j]) = cvar(strcat("g_balance_", e.netname, "_reload_ammo"));\r
}\r
\r
oldself = self;\r
if(self.weapon_load[self.weapon] > 0)\r
{\r
own.ammofield += self.weapon_load[self.weapon];\r
- self.weapon_load[self.weapon] = -1; // schedule the weapon for reloading\r
+ self.(weapon_load[self.weapon]) = -1; // schedule the weapon for reloading\r
}\r
}\r
}\r
if(ammo_reload)\r
{\r
self.clip_load -= ammo_use;\r
- self.weapon_load[self.weapon] = self.clip_load;\r
+ self.(weapon_load[self.weapon]) = self.clip_load;\r
}\r
else\r
self.(self.current_ammo) -= ammo_use;\r
// if we are inside the stomach, don't allow reloading, and schedule the weapon to reload once when we're out\r
if(self.stat_eaten)\r
{\r
- self.clip_load = self.weapon_load[self.weapon] = -1;\r
+ self.clip_load = self.(weapon_load[self.weapon]) = -1;\r
w_ready(); // don't keep executing each frame\r
return;\r
}\r
self.(self.current_ammo) -= 1;\r
}\r
}\r
- self.weapon_load[self.weapon] = self.clip_load;\r
+ self.(weapon_load[self.weapon]) = self.clip_load;\r
\r
// do not set ATTACK_FINISHED in reload code any more. This causes annoying delays if eg: You start reloading a weapon,\r
// then quickly switch to another weapon and back. Reloading is canceled, but the reload delay is still there,\r
if(self.clip_load < 0)\r
self.clip_load = 0;\r
self.old_clip_load = self.clip_load;\r
- self.clip_load = self.weapon_load[self.weapon] = -1;\r
+ self.clip_load = self.(weapon_load[self.weapon]) = -1;\r
}
\ No newline at end of file