return ((a * 22 + b) * 22 + c) * 22 + d;
}
-float lowestbit(int f)
+int lowestbit(int f)
{
f &= ~(f * 2);
f &= ~(f * 4);
// Otherwise, channels 8 to 15 would be blocked for a weird QW feature.
#define sound(e,c,s,v,a) sound7(e,c,s,v,a,0,0)
-float lowestbit(float f);
+int lowestbit(float f);
#ifdef CSQC
entity ReadCSQCEntity();
if(self.deadflag == DEAD_NO)
{
// custom order weapon cycling
- i = imp % 10;
+ int i = imp % 10;
m = (imp - (210 + i)); // <0 for prev, =0 for best, >0 for next
W_CycleWeapon(self.(cvar_cl_weaponpriorities[i]), m);
}
if(death_weapon)
{
w_deathtype = deathtype;
- float death_message = WEP_ACTION(death_weapon, ((murder) ? WR_KILLMESSAGE : WR_SUICIDEMESSAGE));
+ int death_message = WEP_ACTION(death_weapon, ((murder) ? WR_KILLMESSAGE : WR_SUICIDEMESSAGE));
w_deathtype = false;
- if(death_message)
+ if (death_message)
{
Send_Notification_WOCOVA(
NOTIF_ONE,
void GrapplingHookThink()
{
- float spd, dist, minlength, pullspeed, ropestretch, ropeairfriction, rubberforce, newlength, rubberforce_overstretch, s;
+ float spd, dist, minlength, pullspeed, ropestretch, ropeairfriction, rubberforce, newlength, rubberforce_overstretch;
vector dir, org, end, v0, dv, v, myorg, vs;
if(self.realowner.hook != self) // how did that happen?
{
self.nextthink = time;
- s = self.realowner.cvar_cl_gunalign;
+ int s = self.realowner.cvar_cl_gunalign;
if(s != 1 && s != 2 && s != 4)
s = 3; // default value
--s;
{
entity missile;
vector org;
- float s;
vector vs;
if(forbidWeaponUse()) return;
makevectors(self.v_angle);
- s = self.cvar_cl_gunalign;
+ int s = self.cvar_cl_gunalign;
if(s != 1 && s != 2 && s != 4)
s = 3; // default value
--s;
void WeaponStats_Shutdown();
void spawnfunc_worldspawn (void)
{
- float fd, l, i, j, n;
+ float fd, l, j, n;
string s;
cvar = cvar_normal;
maplist_reply = strzone(getmaplist());
lsmaps_reply = strzone(getlsmaps());
monsterlist_reply = strzone(getmonsterlist());
- for(i = 0; i < 10; ++i)
+ for(int i = 0; i < 10; ++i)
{
s = getrecords(i);
if (s)
{
s = "";
n = tokenize_console(cvar_string("sv_curl_serverpackages"));
- for(i = 0; i < n; ++i)
+ for(int i = 0; i < n; ++i)
if(substring(argv(i), -18, -1) != "-serverpackage.txt")
if(substring(argv(i), -14, -1) != ".serverpackage") // OLD legacy
s = strcat(s, " ", argv(i));
if(fd >= 0)
{
j = search_getsize(fd);
- for(i = 0; i < j; ++i)
+ for(int i = 0; i < j; ++i)
s = strcat(s, " ", search_getfilename(fd, i));
search_end(fd);
}
if(fd >= 0)
{
j = search_getsize(fd);
- for(i = 0; i < j; ++i)
+ for(int i = 0; i < j; ++i)
s = strcat(s, " ", search_getfilename(fd, i));
search_end(fd);
}
}
string item_keys_keylist(float keylist) {
- float base, l;
- string n;
-
// no keys
if (!keylist)
return "";
if ((keylist & (keylist-1)) != 0)
return strcat("the ", item_keys_names[lowestbit(keylist)]);
- n = "";
- base = 0;
+ string n = "";
+ int base = 0;
while (keylist) {
- l = lowestbit(keylist);
+ int l = lowestbit(keylist);
if (n)
n = strcat(n, ", the ", item_keys_names[base + l]);
else