.string netname; // game type name as in cvar (with g_ prefix)
.string mdl; // game type short name
.string message; // human readable name
-.float team; // does this gametype support teamplay?
+.int team; // does this gametype support teamplay?
.string model2; // game type defaults
.string gametype_description; // game type description
#ifdef SVQC
void Notification_GetCvars(void)
{
- float i;
- for(i = 0; i <= NOTIF_CHOICE_COUNT; ++i)
+ for(int i = 0; i <= NOTIF_CHOICE_COUNT; ++i)
{
GetCvars_handleFloat(
get_cvars_s,
));
#endif
- float i;
- for(i = 0; i < 4; ++i) { if(self.nent_strings[i]) { strunzone(self.nent_strings[i]); } }
+ for(int i = 0; i < 4; ++i) { if(self.nent_strings[i]) { strunzone(self.nent_strings[i]); } }
remove(self);
}
{
if(Notification_ShouldSend(self.nent_broadcast, client, self.nent_client))
{
- float i;
WriteByte(MSG_ENTITY, ENT_CLIENT_NOTIFICATION);
WriteByte(MSG_ENTITY, self.nent_net_type);
WriteShort(MSG_ENTITY, self.nent_net_name);
- for(i = 0; i < self.nent_stringcount; ++i) { WriteString(MSG_ENTITY, self.nent_strings[i]); }
- for(i = 0; i < self.nent_floatcount; ++i) { WriteLong(MSG_ENTITY, self.nent_floats[i]); }
+ for(int i = 0; i < self.nent_stringcount; ++i) { WriteString(MSG_ENTITY, self.nent_strings[i]); }
+ for(int i = 0; i < self.nent_floatcount; ++i) { WriteLong(MSG_ENTITY, self.nent_floats[i]); }
return true;
}
else { return false; }
net_notif.nent_stringcount = notif.nent_stringcount;
net_notif.nent_floatcount = notif.nent_floatcount;
- float i;
- for(i = 0; i < net_notif.nent_stringcount; ++i)
+ for(int i = 0; i < net_notif.nent_stringcount; ++i)
{ net_notif.nent_strings[i] = strzone(...(i, string)); }
- for(i = 0; i < net_notif.nent_floatcount; ++i)
+ for(int i = 0; i < net_notif.nent_floatcount; ++i)
{ net_notif.nent_floats[i] = ...((net_notif.nent_stringcount + i), float); }
net_notif.think = Net_Notification_Remove;
vector antilag_takebackorigin(entity e, float t)
{
- float i0, i1;
-
- i0 = antilag_find(e, t);
- if(i0 < 0)
+ int i0 = antilag_find(e, t);
+ if (i0 < 0)
{
// IN THE PRESENT
if(e.antilag_takenback)
else
return e.origin;
}
- i1 = i0 + 1;
- if(i1 >= ANTILAG_MAX_ORIGINS)
+ int i1 = i0 + 1;
+ if (i1 >= ANTILAG_MAX_ORIGINS)
i1 = 0;
return lerpv(e.(antilag_times[i0]), e.(antilag_origins[i0]), e.(antilag_times[i1]), e.(antilag_origins[i1]), t);
void antilag_clear(entity e)
{
- float i;
-
antilag_restore(e);
- for(i = 0; i < ANTILAG_MAX_ORIGINS; ++i)
+ for (int i = 0; i < ANTILAG_MAX_ORIGINS; ++i)
{
e.(antilag_times[i]) = -2342;
e.(antilag_origins[i]) = e.origin;
// if the bot is not attacking, consider reloading weapons
if (!(self.aistatus & AI_STATUS_ATTACKING))
{
- float i;
- entity e;
-
// we are currently holding a weapon that's not fully loaded, reload it
if(skill >= 2) // bots can only reload the held weapon on purpose past this skill
if(self.clip_load < self.clip_size)
if(skill >= 5) // bots can only look for unloaded weapons past this skill
if(self.clip_load >= 0) // only if we're not reloading a weapon already
{
- for(i = WEP_FIRST; i <= WEP_LAST; ++i)
+ for (int i = WEP_FIRST; i <= WEP_LAST; ++i)
{
- e = get_weaponinfo(i);
+ entity e = get_weaponinfo(i);
if ((self.weapons & WepSet_FromWeapon(i)) && (e.spawnflags & WEP_FLAG_RELOADABLE) && (self.weapon_load[i] < e.reloading_ammo))
self.switchweapon = i;
}
void bot_resetqueues()
{
entity cl;
- float i;
FOR_EACH_CLIENT(cl) if(cl.isbot)
{
bot_clearqueue(cl);
// also, cancel all barriers
cl.bot_barrier = 0;
- for(i = 0; i < cl.bot_places_count; ++i)
+ for(int i = 0; i < cl.bot_places_count; ++i)
{
strunzone(cl.(bot_placenames[i]));
cl.(bot_placenames[i]) = string_null;
if(IS_PLAYER(self))
{
entity spot, oldself;
- float j;
accuracy_resend(self);
target_voicescript_clear(self);
// reset fields the weapons may use
- for (j = WEP_FIRST; j <= WEP_LAST; ++j)
+ for (int j = WEP_FIRST; j <= WEP_LAST; ++j)
{
WEP_ACTION(j, WR_RESETPLAYER);
// all weapons must be fully loaded when we spawn
entity e = get_weaponinfo(j);
- if(e.spawnflags & WEP_FLAG_RELOADABLE) // prevent accessing undefined cvars
+ if (e.spawnflags & WEP_FLAG_RELOADABLE) // prevent accessing undefined cvars
self.(weapon_load[j]) = e.reloading_ammo;
}
{
sharpen_buffer[x + 2 * RADAR_WIDTH_MAX] = v;
}
-float sharpen_getpixel(float x, float y)
+float sharpen_getpixel(int x, int y)
{
if(x < 0)
return 0;
{
entity tmp_player;
int i;
- float x, z, t_teams, t_players, team_color;
+ float x, t_teams, t_players, team_color;
// count the total amount of players and total amount of teams
t_players = 0;
}
// finally, from the list made earlier, re-join the players in different order.
- for(i = 1; i <= t_teams; ++i)
+ for (int i = 1; i <= t_teams; ++i)
{
// find out how many players to assign to this team
x = (t_players / t_teams);
team_color = Team_NumberToTeam(i);
// sort through the random list of players made earlier
- for(z = 1; z <= maxclients; ++z)
+ for (int z = 1; z <= maxclients; ++z)
{
if (!(shuffleteams_teams[i] >= x))
{
.float version_nagtime;
const int NUM_JUMPPADSUSED = 3;
-.float jumppadcount;
+.int jumppadcount;
.entity jumppadsused[NUM_JUMPPADSUSED];
string gamemode_name;
ent.ammo_charge[wep] -= max(0, cvar(sprintf("g_overkill_ammo_decharge_%s", wepent.netname)));
}
-void ok_IncreaseCharge(entity ent, float wep)
+void ok_IncreaseCharge(entity ent, int wep)
{
entity wepent = get_weaponinfo(wep);
ent.ammo_charge[wep] = min(autocvar_g_overkill_ammo_charge_limit, ent.ammo_charge[wep] + cvar(sprintf("g_overkill_ammo_charge_rate_%s", wepent.netname)) * frametime / W_TICSPERFRAME);
}
-float ok_CheckWeaponCharge(entity ent, float wep)
+float ok_CheckWeaponCharge(entity ent, int wep)
{
if(!ent.ok_use_ammocharge) return true;
{
if(autocvar_g_overkill_ammo_charge)
{
- float i;
-
- for(i = WEP_FIRST; i <= WEP_LAST; ++i)
+ for(int i = WEP_FIRST; i <= WEP_LAST; ++i)
self.ammo_charge[i] = autocvar_g_overkill_ammo_charge_limit;
self.ok_use_ammocharge = 1;
float pathlib_expandnode_starf(entity node, vector start, vector goal)
{
vector where,f,r,t;
- float fc,fc2,c;
+ float fc,c;
entity nap;
where = node.origin;
plib_points2[0] = plib_points[0];
vector bp;
bp = plib_points[0];
- fc2 = 0;
+ int fc2 = 0;
for(int i = 0; i < 8; ++i)
{
c = 0;
float weapon_pickupevalfunc(entity player, entity item)
{
- float c, j, position;
+ float c;
// See if I have it already
if(item.weapons & ~player.weapons)
if( bot_custom_weapon && c )
{
// Find the highest position on any range
- position = -1;
- for(j = 0; j < WEP_LAST ; ++j){
+ int position = -1;
+ for (int j = 0; j < WEP_LAST ; ++j){
if(
bot_weapons_far[j] == item.weapon ||
bot_weapons_mid[j] == item.weapon ||
entity oldself, wep;
float thisammo, i;
string s;
- var .float ammotype = (get_weaponinfo(wpn)).ammo_field;
+ var .int ammotype = (get_weaponinfo(wpn)).ammo_field;
wep = spawn();