entity clearentity_ent;
void clearentity(entity e)
{
- if not(clearentity_ent)
+ if (!clearentity_ent)
{
clearentity_ent = spawn();
clearentity_ent.classname = "clearentity";
if(autocvar_chase_active < 0)
cvar_set("chase_active", "0");
- if not(isdemo())
+ if (!isdemo())
{
- if not(calledhooks & HOOK_START)
+ if (!(calledhooks & HOOK_START))
localcmd("\n_cl_hook_gamestart nop\n");
- if not(calledhooks & HOOK_END)
+ if (!(calledhooks & HOOK_END))
localcmd("\ncl_hook_gameend\n");
}
}
}
else
{
- if not(o.has_team)
+ if (!o.has_team)
{
o.team = Team;
tm = GetTeam(Team, true);
}
else
{
- if not(e.sort_prev)
+ if (!e.sort_prev)
{
// player connected
- if not(e)
+ if (!e)
playerslots[i] = e = spawn();
e.sv_entnum = i;
e.ping = 0;
self.sv_entnum = n;
- if not(playerslots[self.sv_entnum])
+ if (!(playerslots[self.sv_entnum]))
playerslots[self.sv_entnum] = spawn();
o = self.owner = playerslots[self.sv_entnum];
o.sv_entnum = self.sv_entnum;
o.gotscores = 1;
- //if not(o.sort_prev)
+ //if (!o.sort_prev)
// RegisterPlayer(o);
//playerchecker will do this for us later, if it has not already done so
{
f = ReadByte();
for(j = i-1, b = 1; b < 256; b *= 2, ++j)
- if not(f & b)
+ if (!(f & b))
if(playerslots[j])
playerslots[j].ready = 0;
}
void Gamemode_Init()
{
- if not(isdemo())
+ if (!isdemo())
{
if(!(calledhooks & HOOK_START))
localcmd("\n_cl_hook_gamestart ", MapInfo_Type_ToString(gametype), "\n");
pi = ReadShort();
pl = ReadByte();
ml = ReadByte();
- if not(playerslots[e])
+ if (!(playerslots[e]))
return;
playerslots[e].ping = pi;
playerslots[e].ping_packetloss = pl / 255.0;
drawstring('0 0 0', "", '1 1 0', '1 1 1', 0, 0);
if(autocvar_r_fakelight >= 2 || autocvar_r_fullbright)
- if not(serverflags & SERVERFLAG_ALLOW_FULLBRIGHT)
+ if (!(serverflags & SERVERFLAG_ALLOW_FULLBRIGHT))
{
// apply night vision effect
vector tc_00, tc_01, tc_10, tc_11;
// crosshair goes VERY LAST
if(!scoreboard_active && !camera_active && intermission != 2 && spectatee_status != -1 && hud == HUD_NORMAL)
{
- if not(autocvar_crosshair_enabled) // main toggle for crosshair rendering
+ if (!autocvar_crosshair_enabled) // main toggle for crosshair rendering
return;
string wcross_style;
if(autocvar_crosshair_effect_time > 0)
{
f = (time - wcross_name_changestarttime) / autocvar_crosshair_effect_time;
- if not(f < 1)
+ if (!(f < 1))
{
wcross_ring_prev = ((ring_image) ? TRUE : FALSE);
}
if(time < startTime)
{
entity e = find(world, classname, "announcer_countdown");
- if not(e)
+ if (!e)
{
e = spawn();
e.classname = "announcer_countdown";
{
// FORCEMODEL
// which one is ALWAYS good?
- if not(forceplayermodels_goodmodel)
+ if (!forceplayermodels_goodmodel)
{
entity e;
e = spawn();
force = decompressShortVector(ReadShort());
species = ReadByte();
- if not(isNew)
+ if (!isNew)
return;
if(rad < 0)
gentle_prefix = "particlegibs_";
}
- if not(cl_gentle_gibs || autocvar_cl_gentle)
+ if (!(cl_gentle_gibs || autocvar_cl_gentle))
amount *= 1 - autocvar_cl_nogibs;
if(autocvar_ekg)
// skip this weapon if we don't own it (and onlyowned is enabled)-- or if weapons_complainbubble is showing for this weapon
if(autocvar_hud_panel_weapons_onlyowned)
- if not((weapons_stat & WepSet_FromWeapon(self.weapon)) || (self.weapon == complain_weapon))
+ if (!((weapons_stat & WepSet_FromWeapon(self.weapon)) || (self.weapon == complain_weapon)))
continue;
// figure out the drawing position of weapon
if(autocvar__menu_alpha == 1)
return;
- if not(autocvar_hud_cursormode)
+ if (!autocvar_hud_cursormode)
{
mousepos = mousepos + getmousepos() * autocvar_menu_mouse_speed;
Draw_CylindricLine(self.origin, trace_endpos, self.scale, "particles/laserbeam", 0, time * 3, self.colormod, 0.5, DRAWFLAG_ADDITIVE, view_origin);
}
}
- if not(trace_dphitq3surfaceflags & (Q3SURFACEFLAG_SKY | Q3SURFACEFLAG_NOIMPACT))
+ if (!(trace_dphitq3surfaceflags & (Q3SURFACEFLAG_SKY | Q3SURFACEFLAG_NOIMPACT)))
{
if(self.cnt >= 0)
pointparticles(self.cnt, trace_endpos, trace_plane_normal, drawframetime * 1000);
if(!mv_active)
return;
- if not(autocvar_hud_cursormode)
+ if (!autocvar_hud_cursormode)
{
mv_mousepos = mv_mousepos + getmousepos();
// remove votes that no longer apply
for(i = 0, power = 1; i < mv_num_maps; ++i, power *= 2)
- if not(mv_maps_mask & power)
+ if (!(mv_maps_mask & power))
mv_votes[i] = -1;
mv_top2_time = time;
num = (Team == NUM_SPECTATOR) ? 16 : Team;
if(teamslots[num])
return teamslots[num];
- if not(add)
+ if (!add)
return world;
tm = spawn();
tm.team = Team;
vector tri;
string tex;
tex = getsurfacetexture(e, i_s);
- if not(tex)
+ if (!tex)
return 0; // this is beyond the last one
n_t = getsurfacenumtriangles(e, i_s);
for(i_t = 0; i_t < n_t; ++i_t)
pattern = substring(str, 0, slash);
str = substring(str, slash + 1, strlen(str) - (slash + 1));
- if not(isGametypeInFilter(gametype, teamplay, FALSE, pattern))
+ if (!isGametypeInFilter(gametype, teamplay, FALSE, pattern))
continue;
}
}
else
{
- if not(nocomplain)
+ if (!nocomplain)
print(sprintf("^1Error:^7 Unknown score field: '%s'\n", str));
continue;
}
switch(field)
{
case SP_PING:
- if not(pl.gotscores)
+ if (!pl.gotscores)
return "\xEE\x82\x8D\xEE\x82\x8D\xEE\x82\x8D"; // >>> sign
//str = getplayerkeyvalue(pl.sv_entnum, "ping");
f = pl.ping;
return ftos(f);
case SP_PL:
- if not(pl.gotscores)
+ if (!pl.gotscores)
return _("N/A");
f = pl.ping_packetloss;
tmp = pl.ping_movementloss;
for(i = WEP_FIRST; i <= WEP_LAST; ++i)
{
self = get_weaponinfo(i);
- if not(self.weapon)
+ if (!self.weapon)
continue;
if ((i == WEP_NEX && g_minstagib) || i == WEP_PORTO || (i == WEP_MINSTANEX && !g_minstagib) || i == WEP_TUBA) // skip port-o-launch, nex || minstanex and tuba
continue;
rows = (stat_secrets_total ? 1 : 0);
// if no rows, return
- if not(rows)
+ if (!rows)
return pos;
// draw table header
scoreboard_fade_alpha = 0;
}
- if not(scoreboard_fade_alpha)
+ if (!scoreboard_fade_alpha)
return;
HUD_UpdatePlayerTeams();
if(e == ent)
continue;
eo = project_3d_to_2d(e.origin);
- if not(eo_z < 0 || eo_x < 0 || eo_y < 0 || eo_x > vid_conwidth || eo_y > vid_conheight)
+ if (!(eo_z < 0 || eo_x < 0 || eo_y < 0 || eo_x > vid_conwidth || eo_y > vid_conheight))
{
eo_z = 0;
if(vlen((eX * o_x + eY * o_y) - eo) < autocvar_hud_shownames_antioverlap_distance && vlen(ent.origin - view_origin) > vlen(e.origin - view_origin))
if(autocvar_hud_shownames_crosshairdistance > crosshairdistance)
ent.pointtime = time;
- if not(ent.pointtime + autocvar_hud_shownames_crosshairdistance_time > time)
+ if (!(ent.pointtime + autocvar_hud_shownames_crosshairdistance_time > time))
overlap = TRUE;
else
overlap = (autocvar_hud_shownames_crosshairdistance_antioverlap ? overlap : FALSE); // override what antioverlap says unless allowed by cvar.
psize = self.axh_scale * draw_getimagesize(self.axh_image);
loc = project_3d_to_2d(self.move_origin) - 0.5 * psize;
- if not (loc_z < 0 || loc_x < 0 || loc_y < 0 || loc_x > vid_conwidth || loc_y > vid_conheight)
+ if (!(loc_z < 0 || loc_x < 0 || loc_y < 0 || loc_x > vid_conwidth || loc_y > vid_conheight))
{
loc_z = 0;
psize_z = 0;
setorigin(dropmark, trace_endpos);
picsize = draw_getimagesize(raptor_drop) * 0.2;
- if not (where_z < 0 || where_x < 0 || where_y < 0 || where_x > vid_conwidth || where_y > vid_conheight)
+ if (!(where_z < 0 || where_x < 0 || where_y < 0 || where_x > vid_conwidth || where_y > vid_conheight))
{
where_x -= picsize_x * 0.5;
where_y -= picsize_y * 0.5;
where = project_3d_to_2d(dropmark.origin);
picsize = draw_getimagesize(raptor_drop) * 0.25;
- if not (where_z < 0 || where_x < 0 || where_y < 0 || where_x > vid_conwidth || where_y > vid_conheight)
+ if (!(where_z < 0 || where_x < 0 || where_y < 0 || where_x > vid_conwidth || where_y > vid_conheight))
{
where_x -= picsize_x * 0.5;
where_y -= picsize_y * 0.5;
strunzone(do_cvar);
}
if(!do_exec)
- if not(do_cvar)
+ if (!do_cvar)
print(data);
}
if(DEATH_ISSPECIAL(deathtype))
{
entity deathent = deathtypes[(deathtype - DT_FIRST)];
- if not(deathent) { backtrace("Deathtype_Name: Could not find deathtype entity!\n"); return ""; }
+ if (!deathent) { backtrace("Deathtype_Name: Could not find deathtype entity!\n"); return ""; }
return deathent.nent_name;
}
else { return ftos(deathtype); }
float MapInfo_FilterGametype(float pGametype, float pFeatures, float pFlagsRequired, float pFlagsForbidden, float pAbortOnGenerate)
{
float i, j;
- if not(_MapInfo_filtered_allocated)
+ if (!_MapInfo_filtered_allocated)
{
_MapInfo_filtered_allocated = 1;
_MapInfo_filtered = buf_create();
for(;;)
{
- if not((s = fgets(fh)))
+ if (!((s = fgets(fh))))
break;
if(inWorldspawn == 1)
if(startsWith(s, "}"))
{
for(;;)
{
- if not((s = fgets(fh)))
+ if (!((s = fgets(fh))))
break;
// catch different sorts of comments
}
else if(t == "")
print("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
- else if not(cvar_value_issafe(t))
+ else if (!cvar_value_issafe(t))
print("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
- else if not (cvar_value_issafe(s))
+ else if (!cvar_value_issafe(s))
print("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
else if(matchacl(MAPINFO_SETTEMP_ACL_SYSTEM, t) <= 0)
print("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
_MapInfo_Map_Reset();
for(;;)
{
- if not((s = fgets(fh)))
+ if (!((s = fgets(fh))))
break;
// catch different sorts of comments
}
else if(t == "fog")
{
- if not(cvar_value_issafe(s))
+ if (!cvar_value_issafe(s))
print("Map ", pFilename, " contains a potentially harmful fog setting, ignored\n");
else
MapInfo_Map_fog = s;
t = car(s); s = cdr(s);
if(pGametypeToSet) // FIXME is this check right here?
{
- if not(cvar_value_issafe(t))
+ if (!cvar_value_issafe(t))
print("Map ", pFilename, " contains a potentially harmful cdtrack, ignored\n");
else
MapInfo_Map_clientstuff = strcat(
if(cvar("g_tdm_on_dm_maps"))
{
// if this is set, all DM maps support TDM too
- if not(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_TEAM_DEATHMATCH)
+ if (!(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_TEAM_DEATHMATCH))
if(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_DEATHMATCH)
_MapInfo_Map_ApplyGametypeEx ("", pGametypeToSet, MAPINFO_TYPE_TEAM_DEATHMATCH);
}
f = MAPINFO_FLAG_FORBIDDEN;
#ifndef MENUQC
- if not(cvar("g_maplist_allow_hidden"))
+ if (!cvar("g_maplist_allow_hidden"))
#endif
f |= MAPINFO_FLAG_HIDDEN;
- if not(cvar("g_maplist_allow_frustrating"))
+ if (!cvar("g_maplist_allow_frustrating"))
f |= MAPINFO_FLAG_FRUSTRATING;
return f;
case NOTIF_TEAM:
{
- if not(teamplay)
+ if (!teamplay)
{ checkargs = sprintf("%sTeamplay not active!", checkargs); }
- //else if not(client.team) { checkargs = sprintf("%sNo team provided!", checkargs); }
+ //else if (!client.team) { checkargs = sprintf("%sNo team provided!", checkargs); }
break;
}
case NOTIF_TEAM_EXCEPT:
{
- if not(teamplay)
+ if (!teamplay)
{ checkargs = sprintf("%sTeamplay not active!", checkargs); }
else if(IS_NOT_A_CLIENT(client))
{ checkargs = sprintf("%sException can't be a non-client!", checkargs); }
for(i = 1; i <= count; ++i) \
{ \
notif = Get_Notif_Ent(type, i); \
- if not(notif) { backtrace("Destroy_All_Notifications(): Missing notification entity!\n"); return; } \
+ if (!notif) { backtrace("Destroy_All_Notifications(): Missing notification entity!\n"); return; } \
Destroy_Notification_Entity(notif); \
}
{
// Set MSG_ANNCE information and handle precaching
#ifdef CSQC
- if not(GENTLE && (var_cvar == 1))
+ if (!(GENTLE && (var_cvar == 1)))
{
if(snd != "")
{
for(i = 1; i <= NOTIF_ANNCE_COUNT; ++i)
{
e = Get_Notif_Ent(MSG_ANNCE, i);
- if not(e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
+ if (!e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
NOTIF_WRITE_ENTITY(
"Notification control cvar: 0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled)"
for(i = 1; i <= NOTIF_INFO_COUNT; ++i)
{
e = Get_Notif_Ent(MSG_INFO, i);
- if not(e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
+ if (!e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
NOTIF_WRITE_ENTITY(
"Notification control cvar: 0 = off, 1 = print to console, "
for(i = 1; i <= NOTIF_CENTER_COUNT; ++i)
{
e = Get_Notif_Ent(MSG_CENTER, i);
- if not(e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
+ if (!e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
NOTIF_WRITE_ENTITY(
"Notification control cvar: 0 = off, 1 = centerprint"
for(i = 1; i <= NOTIF_MULTI_COUNT; ++i)
{
e = Get_Notif_Ent(MSG_MULTI, i);
- if not(e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
+ if (!e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
NOTIF_WRITE_ENTITY(
"Notification control cvar: 0 = off, 1 = trigger subcalls"
for(i = 1; i <= NOTIF_CHOICE_COUNT; ++i)
{
e = Get_Notif_Ent(MSG_CHOICE, i);
- if not(e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
+ if (!e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
NOTIF_WRITE_ENTITY_CHOICE(
"Notification control cvar: 0 = off, 1 = trigger option A subcall, 2 = trigger option B subcall",
// retreive entity of this notification
entity notif = Get_Notif_Ent(net_type, net_name);
- if not(notif)
+ if (!notif)
{
#ifdef NOTIFICATIONS_DEBUG
Debug_Notification(sprintf(
}
// check if the notification is enabled
- if not(notif.nent_enabled)
+ if (!notif.nent_enabled)
{
#ifdef NOTIFICATIONS_DEBUG
Debug_Notification(sprintf(
else
{
notif = Get_Notif_Ent(net_type, net_name);
- if not(notif) { backtrace("Read_Notification: Could not find notification entity!\n"); return; }
+ if (!notif) { backtrace("Read_Notification: Could not find notification entity!\n"); return; }
#ifdef NOTIFICATIONS_DEBUG
Debug_Notification(sprintf(
#ifdef SVQC
void Net_Notification_Remove()
{
- if not(self) { backtrace(sprintf("Net_Notification_Remove() at %f: Missing self!?\n", time)); return; }
+ if (!self) { backtrace(sprintf("Net_Notification_Remove() at %f: Missing self!?\n", time)); return; }
#ifdef NOTIFICATIONS_DEBUG
Debug_Notification(sprintf(
if(net_name)
{
entity notif = Get_Notif_Ent(net_type, net_name);
- if not(notif) { backtrace("Kill_Notification: Could not find notification entity!\n"); return; }
+ if (!notif) { backtrace("Kill_Notification: Could not find notification entity!\n"); return; }
if(notif.nent_cpid)
killed_cpid = notif.nent_cpid;
// retreive entity of this notification
entity notif = Get_Notif_Ent(net_type, net_name);
- if not(notif)
+ if (!notif)
{
#ifdef NOTIFICATIONS_DEBUG
Debug_Notification(sprintf(
string notif_arg_frag_stats(float fhealth, float farmor, float fping)
{
- if not(fhealth < 1)
+ if (!(fhealth < 1))
return sprintf(CCR(_("\n(Health ^1%d^BG / Armor ^2%d^BG)%s")), fhealth, farmor, notif_arg_frag_ping(FALSE, fping));
else
return sprintf(CCR(_("\n(^F4Dead^BG)%s")), notif_arg_frag_ping(FALSE, fping));
KILL_SPREE_LIST
default:
{
- if not(autocvar_notification_show_sprees_center_specialonly)
+ if (!autocvar_notification_show_sprees_center_specialonly)
{
return
sprintf(
KILL_SPREE_LIST
default:
{
- if not(autocvar_notification_show_sprees_info_specialonly)
+ if (!autocvar_notification_show_sprees_info_specialonly)
{
return
sprintf(
string fstrunzone(string s)
{
string sc;
- if not(s)
+ if (!s)
return s;
sc = strcat(s, "");
strunzone(s);
created_saved_value = 0;
- if not(tmp_cvar || tmp_value)
+ if (!(tmp_cvar || tmp_value))
{
dprint("Error: Invalid usage of cvar_settemp(string, string); !\n");
return 0;
if(strstrofs(strcat(",", pattern, ","), subpattern2, 0) < 0)
if(strstrofs(strcat(",", pattern, ","), subpattern3, 0) < 0)
{
- if not(subpattern4)
+ if (!subpattern4)
return 0;
if(strstrofs(strcat(",", pattern, ","), subpattern4, 0) < 0)
return 0;
error("fteqcc bug introduced with revision 3178 detected. Please upgrade fteqcc to a later revision, downgrade fteqcc to revision 3177, or pester Spike until he fixes it. You can set _allow_unacceptable_compiler_bugs 1 to skip this check, but expect stuff to be horribly broken then.");
string s = "";
- if not(s)
+ if (!s)
error("The empty string counts as false. We do not want that!");
}
}
get_model_parameters_fixbone = 0;
- if not(m)
+ if (!m)
return 1;
if(substring(m, -9, 5) == "_lod1" || substring(m, -9, 5) == "_lod2")
me.mouseDrag(me, pos); // verify coordinates
if(me.pressed)
{
- if not(me.disabled)
+ if (!me.disabled)
{
if(cvar("menu_sounds"))
localsound("sound/misc/menu2.wav");
if(me.clickTime > 0 && me.clickTime <= frametime)
{
// keyboard click timer expired? Fire the event then.
- if not(me.disabled)
+ if (!me.disabled)
if(me.onClick)
me.onClick(me, me.onClickEntity);
}
void Container_hideNotify(entity me)
{
entity e;
- if not(me.shown)
+ if (!me.shown)
return;
me.shown = 0;
for(e = me.firstChild; e; e = e.nextSibling)
void Container_setFocus(entity me, entity other)
{
if(other)
- if not(me.focused)
+ if (!me.focused)
error("Trying to set focus in a non-focused control!");
if(me.focusedChild == other)
return;
me.frame.alpha = me.alpha;
me.addItem(me, me.frame, '0 0 0', '1 1 0', 1);
- if not(me.titleFontSize)
+ if (!me.titleFontSize)
me.titleHeight = 0; // no title bar
absWidth = me.intendedWidth * conwidth;
{
for(ff = f.prevSibling; ff; ff = ff.prevSibling)
{
- if not(ff.focusable)
+ if (!ff.focusable)
continue;
me.setFocus(me, ff);
return 1;
{
for(ff = me.lastChild; ff; ff = ff.prevSibling)
{
- if not(ff.focusable)
+ if (!ff.focusable)
continue;
me.setFocus(me, ff);
return 1;
{
for(ff = f.nextSibling; ff; ff = ff.nextSibling)
{
- if not(ff.focusable)
+ if (!ff.focusable)
continue;
me.setFocus(me, ff);
return 1;
{
for(ff = me.firstChild; ff; ff = ff.nextSibling)
{
- if not(ff.focusable)
+ if (!ff.focusable)
continue;
me.setFocus(me, ff);
return 1;
e = me.mouseFocusedChild;
ne = me.itemFromPoint(me, pos);
if(ne)
- if not(ne.focusable)
+ if (!ne.focusable)
ne = NULL;
me.mouseFocusedChild = ne;
if(ne)
}
else if(me.animationState == 2)
{
- if not(SUPER(Nexposee).mousePress(me, pos))
+ if (!(SUPER(Nexposee).mousePress(me, pos)))
{
me.animationState = 3;
SUPER(Nexposee).setFocus(me, NULL);
{
if(me.selectedChild)
me.selectedChild = me.selectedChild.prevSibling;
- if not(me.selectedChild)
+ if (!me.selectedChild)
me.selectedChild = me.lastChild;
}
else
{
if(me.selectedChild)
me.selectedChild = me.selectedChild.nextSibling;
- if not(me.selectedChild)
+ if (!me.selectedChild)
me.selectedChild = me.firstChild;
}
}
}
if(me.focusedChild)
me.selectedChild = me.focusedChild;
- if not(me.selectedChild)
+ if (!me.selectedChild)
me.animationState = 0;
SUPER(Nexposee).setFocus(me, NULL);
return 1;
for(i = 0; ; ++i)
{
s = getgamedirinfo(i, GETGAMEDIRINFO_NAME);
- if not(s)
+ if (!s)
break;
dprint(s, ": ", getgamedirinfo(i, GETGAMEDIRINFO_DESCRIPTION));
}
{
float m, d;
- if not(me.cvarName)
+ if (!me.cvarName)
return;
m = (me.yesValue + me.noValue) * 0.5;
}
void XonoticCheckBox_saveCvars(entity me)
{
- if not(me.cvarName)
+ if (!me.cvarName)
return;
if(me.checked)
}
void XonoticCheckBoxString_loadCvars(entity me)
{
- if not(me.cvarName)
+ if (!me.cvarName)
return;
if(cvar_string(me.cvarName) == me.yesString)
}
void XonoticCheckBoxString_saveCvars(entity me)
{
- if not(me.cvarName)
+ if (!me.cvarName)
return;
if(me.checked)
}
void XonoticColorButton_loadCvars(entity me)
{
- if not(me.cvarName)
+ if (!me.cvarName)
return;
if(cvar_string(me.cvarName) == cvar_defstring(me.cvarName))
}
void XonoticColorButton_saveCvars(entity me)
{
- if not(me.cvarName)
+ if (!me.cvarName)
return;
if(me.checked)
void XonoticColorPickerString_loadCvars(entity me)
{
- if not(me.cvarName)
+ if (!me.cvarName)
return;
if(substring(me.cvarName, -1, 1) == "_")
void XonoticColorPickerString_saveCvars(entity me)
{
- if not(me.cvarName)
+ if (!me.cvarName)
return;
if(substring(me.cvarName, -1, 1) == "_")
}
void XonoticCrosshairButton_loadCvars(entity me)
{
- if not(me.cvarName)
+ if (!me.cvarName)
return;
me.checked = (cvar(me.cvarName) == me.cvarValueFloat);
}
void XonoticCrosshairButton_saveCvars(entity me)
{
- if not(me.cvarName)
+ if (!me.cvarName)
return;
if(me.checked)
me.encryptLabel.setText(me.encryptLabel, me.currentServerEncrypt);
s = crypto_getidfp(me.currentServerCName);
- if not(s) { s = _("N/A"); }
+ if (!s) { s = _("N/A"); }
me.currentServerID = strzone(s);
me.idLabel.setText(me.idLabel, me.currentServerID);
s = crypto_getkeyfp(me.currentServerCName);
- if not(s) { s = _("N/A"); }
+ if (!s) { s = _("N/A"); }
me.currentServerKey = strzone(s);
me.keyLabel.setText(me.keyLabel, me.currentServerKey);
}
#ifdef IMPLEMENTATION
void HUDSetup_Start(entity me, entity btn)
{
- if not(gamestatus & (GAME_CONNECTED | GAME_ISSERVER))
+ if (!(gamestatus & (GAME_CONNECTED | GAME_ISSERVER)))
localcmd("map hudsetup/hudsetup", "\n");
else
localcmd("togglemenu 0\n");
}
void XonoticGametypeButton_loadCvars(entity me)
{
- if not(me.cvarName)
+ if (!me.cvarName)
return;
me.checked = cvar(me.cvarName);
}
void XonoticGametypeButton_saveCvars(entity me)
{
- if not(me.cvarName)
+ if (!me.cvarName)
return;
cvar_set(me.cvarName, ftos(me.checked));
}
void XonoticInputBox_loadCvars(entity me)
{
- if not(me.cvarName)
+ if (!me.cvarName)
return;
SUPER(XonoticInputBox).setText(me, cvar_string(me.cvarName));
}
void XonoticInputBox_saveCvars(entity me)
{
- if not(me.cvarName)
+ if (!me.cvarName)
return;
cvar_set(me.cvarName, me.text);
}
string a, b, c, s, bspname;
float n;
s = me.g_maplistCache;
- if not(s)
+ if (!s)
return;
b = substring(s, i, 1);
if(b == "0")
strunzone(s);
me.g_maplistCache = strzone(strcat(a, b, c));
// TODO also update the actual cvar
- if not((bspname = MapInfo_BSPName_ByID(i)))
+ if (!((bspname = MapInfo_BSPName_ByID(i))))
return;
if(b == "1")
cvar_set("g_maplist", strcat(bspname, " ", cvar_string("g_maplist")));
return;
m = MapInfo_BSPName_ByID(i);
- if not(m)
+ if (!m)
{
print(_("Huh? Can't play this (m is NULL). Refiltering so this won't happen again.\n"));
me.refilter(me);
}
else if(ascii == 43) // +
{
- if not(me.g_maplistCacheQuery(me, me.selectedItem))
+ if (!me.g_maplistCacheQuery(me, me.selectedItem))
me.g_maplistCacheToggle(me, me.selectedItem);
}
else if(ascii == 45) // -
}
void XonoticRadioButton_draw(entity me)
{
- if not(me.cvarValue)
- if not(me.cvarName)
+ if (!me.cvarValue)
+ if (!me.cvarName)
{
// this is the "other" option
// always select this if none other is
theAlpha = SKINALPHA_SERVERLIST_FULL;
else if(freeslots == 0)
theAlpha = SKINALPHA_SERVERLIST_FULL; // g_maxplayers support
- else if not(gethostcachenumber(SLIST_FIELD_NUMHUMANS, i))
+ else if (!gethostcachenumber(SLIST_FIELD_NUMHUMANS, i))
theAlpha = SKINALPHA_SERVERLIST_EMPTY;
else
theAlpha = 1;
string n;
- if not(me.seenIPv4 && me.seenIPv6)
+ if (!(me.seenIPv4 && me.seenIPv6))
{
iconPos_x += iconSize_x * 0.5;
}
}
void XonoticSlider_loadCvars(entity me)
{
- if not(me.cvarName)
+ if (!me.cvarName)
return;
me.setValue( me, cvar(me.cvarName) );
}
void XonoticSlider_saveCvars(entity me)
{
- if not(me.cvarName)
+ if (!me.cvarName)
return;
cvar_set(me.cvarName, ftos(me.value));
{
float v;
- if not(me.cvarName)
+ if (!me.cvarName)
return;
v = cvar(me.cvarName);
}
void XonoticDecibelsSlider_saveCvars(entity me)
{
- if not(me.cvarName)
+ if (!me.cvarName)
return;
if(me.value > me.valueMax - 0.5 * me.valueStep)
}
void XonoticTextSlider_loadCvars(entity me)
{
- if not(me.cvarName)
+ if (!me.cvarName)
return;
var float n = tokenize_console(me.cvarName);
}
void XonoticTextSlider_saveCvars(entity me)
{
- if not(me.cvarName)
+ if (!me.cvarName)
return;
if(me.value >= 0 && me.value < me.nValues)
draw_CenterText(mid - 1 * line, l1, fs, '1 0 0', 1, 0);
draw_CenterText(mid - 0 * line, l2, fs, '0 0 1', 1, 0);
}
- if not(campaign_name_previous)
+ if (!campaign_name_previous)
campaign_name_previous = strzone(strcat(campaign_name, "x")); // force unequal
if(campaign_name == campaign_name_previous)
{
a = a.accuracy;
if(to != a.owner)
- if not(self.owner.cvar_cl_accuracy_data_share && autocvar_sv_accuracy_data_share)
+ if (!(self.owner.cvar_cl_accuracy_data_share && autocvar_sv_accuracy_data_share))
sf = 0;
// note: zero sendflags can never be sent... so we can use that to say that we send no accuracy!
WriteInt24_t(MSG_ENTITY, sf);
void bot_clientdisconnect()
{
- if not(IS_BOT_CLIENT(self))
+ if (!IS_BOT_CLIENT(self))
return;
bot_clearqueue(self);
if(self.cleanname)
void bot_clientconnect()
{
- if not(IS_BOT_CLIENT(self))
+ if (!IS_BOT_CLIENT(self))
return;
self.bot_preferredcolors = self.clientcolors;
self.bot_nextthink = time - random();
}
else
{
- if not(self.jumppadcount)
+ if (!self.jumppadcount)
self.havocbot_role();
}
havocbot_movetogoal();
// if the bot is not attacking, consider reloading weapons
- if not(self.aistatus & AI_STATUS_ATTACKING)
+ if (!(self.aistatus & AI_STATUS_ATTACKING))
{
float i;
entity e;
if(self.aistatus & AI_STATUS_ROAMING)
if(self.goalcurrent.classname=="waypoint")
- if not(self.goalcurrent.wpflags & WAYPOINTFLAG_PERSONAL)
+ if (!(self.goalcurrent.wpflags & WAYPOINTFLAG_PERSONAL))
if(fabs(gco_z - self.origin_z) < self.maxs_z - self.mins_z)
if(self.goalstack01!=world)
{
}
// Take off
- if not(self.aistatus & AI_STATUS_JETPACK_FLYING)
+ if (!(self.aistatus & AI_STATUS_JETPACK_FLYING))
{
// Brake almost completely so it can get a good direction
if(vlen(self.velocity)>10)
// If there is a trigger_hurt right below try to use the jetpack or make a rocketjump
if(skill>6)
- if not(self.flags & FL_ONGROUND)
+ if (!(self.flags & FL_ONGROUND))
{
tracebox(self.origin, self.mins, self.maxs, self.origin + '0 0 -65536', MOVE_NOMONSTERS, self);
if(tracebox_hits_trigger_hurt(self.origin, self.mins, self.maxs, trace_endpos ))
cp = world;
for (; cp1; cp1 = cp1.chain)
{
- if not(cp1.wpconsidered)
+ if (!cp1.wpconsidered)
continue;
if(cp1.wpcost<bestvalue)
}
}
- if not(cp)
+ if (!cp)
return;
// dprint(self.netname, " chose cp ranked ", ftos(bestvalue), "\n");
found = FALSE;
// Look for auto generated waypoint
- if not(bot_waypoints_for_items)
+ if (!bot_waypoints_for_items)
for (wp = findradius(cp.origin,100); wp; wp = wp.chain)
{
if(wp.classname=="waypoint")
}
// Nothing found, rate the controlpoint itself
- if not(found)
+ if (!found)
navigation_routerating(cp, ratingscale, 10000);
}
}
break;
}
- if not (pointcontents(org + '0 0 1') == CONTENT_EMPTY)
+ if (!(pointcontents(org + '0 0 1') == CONTENT_EMPTY))
{
if(autocvar_bot_debug_tracewalk)
debugnodestatus(org, DEBUG_NODE_FAIL);
{
float c;
c = pointcontents(org + '0 0 1');
- if not(c == CONTENT_WATER || c == CONTENT_LAVA || c == CONTENT_SLIME)
+ if (!(c == CONTENT_WATER || c == CONTENT_LAVA || c == CONTENT_SLIME))
swimming = FALSE;
else
continue;
if(e.flags & FL_ITEM)
{
- if not(e.flags & FL_WEAPON)
+ if (!(e.flags & FL_WEAPON))
if(e.nearestwaypoint)
search = FALSE;
}
bot_debug(strcat("best goal ", self.goalcurrent.classname , "\n"));
// If the bot got stuck then try to reach the farthest waypoint
- if not (self.navigation_hasgoals)
+ if (!self.navigation_hasgoals)
if (autocvar_bot_wander_enable)
{
- if not(self.aistatus & AI_STATUS_STUCK)
+ if (!(self.aistatus & AI_STATUS_STUCK))
{
bot_debug(strcat(self.netname, " cannot walk to any goal\n"));
self.aistatus |= AI_STATUS_STUCK;
{
float search_radius = 1000;
- if not(autocvar_bot_wander_enable)
+ if (!autocvar_bot_wander_enable)
return;
- if not(bot_waypoint_queue_owner)
+ if (!bot_waypoint_queue_owner)
{
bot_debug(strcat(self.netname, " sutck, taking over the waypoints queue\n"));
bot_waypoint_queue_owner = self;
}
bot_waypoint_queue_goal = bot_waypoint_queue_goal.bot_waypoint_queue_nextgoal;
- if not(bot_waypoint_queue_goal)
+ if (!bot_waypoint_queue_goal)
{
if (bot_waypoint_queue_bestgoal)
{
void debugnode(vector node)
{
- if not(IS_PLAYER(self))
+ if (!IS_PLAYER(self))
return;
if(debuglastnode=='0 0 0')
ispressingkey = !!bot_presskeys();
// Handle conditions
- if not(bot_cmd.bot_cmd_type==BOT_CMD_FI||bot_cmd.bot_cmd_type==BOT_CMD_ELSE)
+ if (!(bot_cmd.bot_cmd_type==BOT_CMD_FI||bot_cmd.bot_cmd_type==BOT_CMD_ELSE))
if(self.bot_cmd_condition_status & CMD_CONDITION_TRUE && self.bot_cmd_condition_status & CMD_CONDITION_FALSE_BLOCK)
{
bot_command_executed(TRUE);
entity w;
w = find(world, classname, "waypoint");
- if not(f & WAYPOINTFLAG_PERSONAL)
+ if (!(f & WAYPOINTFLAG_PERSONAL))
while (w)
{
// if a matching spawnfunc_waypoint already exists, don't add a duplicate
{
m1 = stov(s);
s = fgets(file);
- if not(s)
+ if (!s)
break;
m2 = stov(s);
s = fgets(file);
- if not(s)
+ if (!s)
break;
fl = stof(s);
waypoint_spawn(m1, m2, fl);
WaypointSprite_PlayerDead();
- if not(g_ca) // don't reset teams when moving a ca player to the spectators
+ if (!g_ca) // don't reset teams when moving a ca player to the spectators
self.team = -1; // move this as it is needed to log the player spectating in eventlog
if(self.killcount != -666)
string s;
// NOTE: we do NOT check crypto_keyfp here, an unsigned ID is fine too for this
- if not(p.crypto_idfp)
+ if (!p.crypto_idfp)
return 0;
// this function allows abbreviated player IDs too!
if(self.vehicle)
vehicles_exit(VHEF_RELESE);
- if not(IS_CLIENT(self))
+ if (!IS_CLIENT(self))
{
print("Warning: ClientDisconnect without ClientConnect\n");
return;
Fire_ApplyDamage(self);
Fire_ApplyEffect(self);
- if not(g_minstagib)
+ if (!g_minstagib)
{
if (self.items & IT_STRENGTH)
{
self.event_damage(self, self, 1, DEATH_ROT, self.origin, '0 0 0');
}
- if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+ if (!(self.items & IT_UNLIMITED_WEAPON_AMMO))
self.ammo_fuel = CalcRotRegen(self.ammo_fuel, minf, autocvar_g_balance_fuel_regen, autocvar_g_balance_fuel_regenlinear, regen_mod * frametime * (time > self.pauseregen_finished) * ((self.items & IT_FUEL_REGEN) != 0), maxf, autocvar_g_balance_fuel_rot, autocvar_g_balance_fuel_rotlinear, rot_mod * frametime * (time > self.pauserotfuel_finished), limitf);
}
if (self == self.enemy)
return 0;
- if not(IS_PLAYER(self.enemy))
+ if (!IS_PLAYER(self.enemy))
return 0;
SpectateCopy(self.enemy);
{
// NOTE: chain order is from the highest to the lower entnum (unlike find)
other = findchain(classname, "player");
- if not(other) // no player
+ if (!other) // no player
return FALSE;
entity first = other;
do { other = other.chain; }
while(other && other.team != self.team);
- if not(other)
+ if (!other)
{
other = first;
while(other.team != self.team)
void PlayerUseKey()
{
- if not(IS_PLAYER(self))
+ if (!IS_PLAYER(self))
return;
if(self.vehicle)
if((g_cts || g_race) && self.cvar_cl_allow_uidtracking == 1 && self.cvar_cl_allow_uid2name == 1)
{
- if not(self.stored_netname)
+ if (!self.stored_netname)
self.stored_netname = strzone(uid2name(self.crypto_idfp));
if(self.stored_netname != self.netname)
{
case 33:
if(self.deadflag == DEAD_NO && teamplay)
{
- if not(MUTATOR_CALLHOOK(HelpMePing))
+ if (!MUTATOR_CALLHOOK(HelpMePing))
{
wp = WaypointSprite_Attach("helpme", TRUE, RADARICON_HELPME, '1 0.5 0');
if(!wp)
case 104:
e = navigation_findnearestwaypoint(self, FALSE);
if (e)
- if not(e.wpflags & WAYPOINTFLAG_GENERATED)
+ if (!(e.wpflags & WAYPOINTFLAG_GENERATED))
{
bprint(strcat("Waypoint removed at ",vtos(e.origin),"\n"));
waypoint_remove(e);
if(self.conveyor.state)
self.velocity -= self.conveyor.movedir;
- if not(IS_PLAYER(self))
+ if (!IS_PLAYER(self))
{
maxspd_mod = autocvar_sv_spectator_speed_multiplier;
if(!self.spectatorspeed)
if(self.waterlevel < WATERLEVEL_SWIMMING)
if(time >= self.ladder_time)
- if not(self.hook)
+ if (!self.hook)
{
self.nextstep = time + 0.3 + random() * 0.1;
trace_dphitq3surfaceflags = 0;
tracebox(self.origin, self.mins, self.maxs, self.origin - '0 0 1', MOVE_NOMONSTERS, self);
- if not(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOSTEPS)
+ if (!(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOSTEPS))
{
if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_METALSTEPS)
GlobalSound(globalsound_metalfall, CH_PLAYER, VOICETYPE_PLAYERSOUND);
if (f > 0 && wishvel != '0 0 0')
{
self.velocity = self.velocity + wishvel * f * frametime;
- if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+ if (!(self.items & IT_UNLIMITED_WEAPON_AMMO))
self.ammo_fuel -= autocvar_g_jetpack_fuel * frametime * fvel * f;
self.flags &= ~FL_ONGROUND;
self.items |= IT_USING_JETPACK;
msgin = formatmessage(msgin);
- if not(IS_PLAYER(source))
+ if (!IS_PLAYER(source))
colorstr = "^0"; // black for spectators
else if(teamplay)
colorstr = Team_ColorCode(source.team);
}
if(!privatesay)
- if not(IS_PLAYER(source))
+ if (!IS_PLAYER(source))
{
- if not(intermission_running)
+ if (!intermission_running)
if(teamsay || (autocvar_g_chat_nospectators == 1) || (autocvar_g_chat_nospectators == 2 && !(warmup_stage || gameover)))
teamsay = -1; // spectators
}
{
sprint(source, sourcemsgstr);
sprint(privatesay, msgstr);
- if not(autocvar_g_chat_tellprivacy) { dedicated_print(msgstr); } // send to server console too if "tellprivacy" is disabled
+ if (!autocvar_g_chat_tellprivacy) { dedicated_print(msgstr); } // send to server console too if "tellprivacy" is disabled
if(cmsgstr != "")
centerprint(privatesay, cmsgstr);
}
{
sprint(source, sourcemsgstr);
dedicated_print(msgstr); // send to server console too
- FOR_EACH_REALCLIENT(head) if not(IS_PLAYER(head))
+ FOR_EACH_REALCLIENT(head) if (!IS_PLAYER(head))
if(head != source)
sprint(head, msgstr);
}
}
fclose(fh);
- if not(allvoicesamples)
+ if (!allvoicesamples)
{
#define _VOICEMSG(m) allvoicesamples = strcat(allvoicesamples, " ", #m);
ALLVOICEMSGS
W_SwitchWeapon_Force(self, w_getbestweapon(self));
a = W_ThrowNewWeapon(self, w, doreduce, self.origin + delta, velo);
- if not(a) return;
+ if (!a) return;
Send_Notification(NOTIF_ONE, self, MSG_MULTI, ITEM_WEAPON_DROP, a, w);
}
lag = ANTILAG_LATENCY(player);
if(lag < 0.001)
lag = 0;
- if not(IS_REAL_CLIENT(player))
+ if (!IS_REAL_CLIENT(player))
lag = 0; // only antilag for clients
org = player.origin + player.view_ofs;
{
if(e.classname == "droppedweapon")
continue;
- if not(e.flags & FL_ITEM)
+ if (!(e.flags & FL_ITEM))
continue;
WaypointSprite_Spawn(
s,
.float prevwarntime;
float weapon_prepareattack_checkammo(float secondary)
{
- if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+ if (!(self.items & IT_UNLIMITED_WEAPON_AMMO))
if (!weapon_action(self.weapon, WR_CHECKAMMO1 + secondary))
{
// always keep the Mine Layer if we placed mines, so that we can detonate them
e = get_weaponinfo(self.weapon);
// don't reload weapons that don't have the RELOADABLE flag
- if not(e.spawnflags & WEP_FLAG_RELOADABLE)
+ if (!(e.spawnflags & WEP_FLAG_RELOADABLE))
{
dprint("Warning: Attempted to reload a weapon that does not have the WEP_FLAG_RELOADABLE flag. Fix your code!\n");
return;
// no ammo, so nothing to load
if(!self.(self.current_ammo) && self.reload_ammo_min)
- if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+ if (!(self.items & IT_UNLIMITED_WEAPON_AMMO))
{
if(IS_REAL_CLIENT(self) && self.reload_complain < time)
{
self.reload_complain = time + 1;
}
// switch away if the amount of ammo is not enough to keep using this weapon
- if not(weapon_action(self.weapon, WR_CHECKAMMO1) + weapon_action(self.weapon, WR_CHECKAMMO2))
+ if (!(weapon_action(self.weapon, WR_CHECKAMMO1) + weapon_action(self.weapon, WR_CHECKAMMO2)))
{
self.clip_load = -1; // reload later
W_SwitchToOtherWeapon(self);
float SV_ParseClientCommand_floodcheck()
{
- if not(timeout_status) // not while paused
+ if (!timeout_status) // not while paused
{
if(time <= (self.cmd_floodtime + autocvar_sv_clientcommand_antispam_time))
{
}
// cannot reset the game while a timeout is active!
- if not(timeout_status)
+ if (!timeout_status)
ReadyCount();
} else {
sprint(self, "^1Game has already been restarted\n");
{
if(teamplay)
if not(self.team_forced > 0)
- if not(lockteams)
+ if (!lockteams)
{
float selection;
// verify that the client provided is acceptable for use
float VerifyClientEntity(entity client, float must_be_real, float must_be_bots)
{
- if not(IS_CLIENT(client))
+ if (!IS_CLIENT(client))
return CLIENT_DOESNT_EXIST;
else if(must_be_real && !IS_REAL_CLIENT(client))
return CLIENT_NOT_REAL;
{
if(!caller || autocvar_sv_timeout)
{
- if not(timeout_status) { print_to(caller, "^7Error: There is no active timeout called."); }
+ if (!timeout_status) { print_to(caller, "^7Error: There is no active timeout called."); }
else if(caller && (caller != timeout_caller)) { print_to(caller, "^7Error: You are not allowed to stop the active timeout."); }
else // everything should be okay, continue aborting timeout
{
r = stof(db_get(ServerProgsDB, strcat(MapInfo_Map_bspname, "/captimerecord/time")));
- if not(r)
+ if (!r)
continue;
// TODO: uid2name
{
r = race_readTime(MapInfo_Map_bspname, 1);
- if not(r)
+ if (!r)
continue;
h = race_readName(MapInfo_Map_bspname, 1);
{
r = race_readTime(MapInfo_Map_bspname, 1);
- if not(r)
+ if (!r)
continue;
h = race_readName(MapInfo_Map_bspname, 1);
// sort through the random list of players made earlier
for(z = 1; z <= maxclients; ++z)
{
- if not(shuffleteams_teams[i] >= x)
+ if (!(shuffleteams_teams[i] >= x))
{
- if not(shuffleteams_players[z])
+ if (!(shuffleteams_players[z]))
continue; // not a player, move on to next random slot
if(VerifyClientNumber(shuffleteams_players[z]))
if(autocvar_sv_timeout) { FOR_EACH_REALPLAYER(tmp_player) { tmp_player.allowed_timeouts = autocvar_sv_timeout_number; } }
//reset map immediately if this cvar is not set
- if not(autocvar_sv_ready_restart_after_countdown) { reset_map(TRUE); }
+ if (!autocvar_sv_ready_restart_after_countdown) { reset_map(TRUE); }
if(autocvar_sv_eventlog) { GameLogEcho(":restart"); }
}
// Reset ALL scores, but only do that at the beginning of the countdown if sv_ready_restart_after_countdown is off!
// Otherwise scores could be manipulated during the countdown.
- if not(autocvar_sv_ready_restart_after_countdown) { Score_ClearAll(); }
+ if (!autocvar_sv_ready_restart_after_countdown) { Score_ClearAll(); }
ReadyRestart_force();
{
validated_map = MapInfo_FixName(validated_map);
- if not(validated_map)
+ if (!validated_map)
{
print_to(caller, "This map is not available on this server.");
return string_null;
)
return FALSE;
- if not(VoteCommand_checkinlist(first_command, vote_list))
+ if (!VoteCommand_checkinlist(first_command, vote_list))
return FALSE;
- if not(VoteCommand_checkargs(startpos, argc))
+ if (!VoteCommand_checkargs(startpos, argc))
return FALSE;
switch(first_command) // now go through and parse the proper commands to adjust as needed.
case "gotomap": // re-direct all map selection commands to gotomap
{
vote_command = ValidateMap(argv(startpos + 1), caller);
- if not(vote_command) { return FALSE; }
+ if (!vote_command) { return FALSE; }
vote_parsed_command = strcat("gotomap ", vote_command);
vote_parsed_display = strzone(strcat("^1", vote_parsed_command));
{
case CMD_REQUEST_COMMAND:
{
- if not(vote_called) { print_to(caller, "^1No vote called."); }
+ if (!vote_called) { print_to(caller, "^1No vote called."); }
else if not(caller.vote_selection == VOTE_SELECT_NULL || autocvar_sv_vote_change) { print_to(caller, "^1You have already voted."); }
else // everything went okay, continue changing vote
else if(!spectators_allowed && (caller && !IS_PLAYER(caller))) { print_to(caller, "^1Only players can call a vote."); }
else if(timeout_status) { print_to(caller, "^1You can not call a vote while a timeout is active."); }
else if(caller && (time < caller.vote_waittime)) { print_to(caller, strcat("^1You have to wait ^2", ftos(ceil(caller.vote_waittime - time)), "^1 seconds before you can again call a vote.")); }
- else if not(VoteCommand_checknasty(vote_command)) { print_to(caller, "^1Syntax error in command, see 'vhelp' for more info."); }
- else if not(VoteCommand_parse(caller, vote_command, autocvar_sv_vote_commands, 2, argc)) { print_to(caller, "^1This command is not acceptable, see 'vhelp' for more info."); }
+ else if (!VoteCommand_checknasty(vote_command)) { print_to(caller, "^1Syntax error in command, see 'vhelp' for more info."); }
+ else if (!VoteCommand_parse(caller, vote_command, autocvar_sv_vote_commands, 2, argc)) { print_to(caller, "^1This command is not acceptable, see 'vhelp' for more info."); }
else // everything went okay, continue with calling the vote
{
{
vote_command = VoteCommand_extractcommand(vote_command, 3, argc);
- if not(caller.vote_master) { print_to(caller, "^1You do not have vote master privelages."); }
- else if not(VoteCommand_checknasty(vote_command)) { print_to(caller, "^1Syntax error in command, see 'vhelp' for more info."); }
+ if (!caller.vote_master) { print_to(caller, "^1You do not have vote master privelages."); }
+ else if (!VoteCommand_checknasty(vote_command)) { print_to(caller, "^1Syntax error in command, see 'vhelp' for more info."); }
else if not(VoteCommand_parse(caller, vote_command, strcat(autocvar_sv_vote_commands, " ", autocvar_sv_vote_master_commands), 3, argc)) { print_to(caller, "^1This command is not acceptable, see 'vhelp' for more info."); }
else // everything went okay, proceed with command
|| ((autocvar_sv_vote_nospectators == 1) && warmup_stage)
|| (autocvar_sv_vote_nospectators == 0));
- if not(autocvar_sv_vote_master_callable) { print_to(caller, "^1Vote to become vote master is not allowed."); }
+ if (!autocvar_sv_vote_master_callable) { print_to(caller, "^1Vote to become vote master is not allowed."); }
else if(vote_called) { print_to(caller, "^1There is already a vote called."); }
else if(!spectators_allowed && (caller && !IS_PLAYER(caller))) { print_to(caller, "^1Only players can call a vote."); }
else if(timeout_status) { print_to(caller, "^1You can not call a vote while a timeout is active."); }
{
case CMD_REQUEST_COMMAND:
{
- if not(vote_called) { print_to(caller, "^1No vote called."); }
+ if (!vote_called) { print_to(caller, "^1No vote called."); }
else if not(caller.vote_selection == VOTE_SELECT_NULL || autocvar_sv_vote_change) { print_to(caller, "^1You have already voted."); }
else if(((caller == vote_caller) || caller.vote_master) && autocvar_sv_vote_no_stops_vote) { VoteStop(caller); }
{
case CMD_REQUEST_COMMAND:
{
- if not(vote_called) { print_to(caller, "^1No vote called."); }
+ if (!vote_called) { print_to(caller, "^1No vote called."); }
else if((caller == vote_caller) || !caller || caller.vote_master) { VoteStop(caller); }
else { print_to(caller, "^1You are not allowed to stop that vote."); }
{
case CMD_REQUEST_COMMAND:
{
- if not(vote_called) { print_to(caller, "^1No vote called."); }
+ if (!vote_called) { print_to(caller, "^1No vote called."); }
else if not(caller.vote_selection == VOTE_SELECT_NULL || autocvar_sv_vote_change) { print_to(caller, "^1You have already voted."); }
else // everything went okay, continue changing vote
o = self.owner;
if(o.deadflag != DEAD_NO)
return FALSE;
- if not(IS_PLAYER(o))
+ if (!IS_PLAYER(o))
return FALSE;
if(other == o)
return FALSE;
if((IS_PLAYER(other)) || other.caplayer)
if(!teamplay || o.team != other.team)
- if not (radar_showennemies)
+ if (!radar_showennemies)
return FALSE;
return TRUE;
}
void func_breakable_colormod()
{
float h;
- if not(self.spawnflags & 2)
+ if (!(self.spawnflags & 2))
return;
h = self.health / self.max_health;
if(h < 0.25)
}
// after a frag, choose another random weapon set
- if not(attacker.weapons & WepSet_FromWeapon(attacker.weapon))
+ if (!(attacker.weapons & WepSet_FromWeapon(attacker.weapon)))
W_SwitchWeapon_Force(attacker, w_getbestweapon(attacker));
}
if(DEATH_ISSPECIAL(deathtype))
{
entity deathent = deathtypes[(deathtype - DT_FIRST)];
- if not(deathent) { backtrace("Obituary_SpecialDeath: Could not find deathtype entity!\n"); return; }
+ if (!deathent) { backtrace("Obituary_SpecialDeath: Could not find deathtype entity!\n"); return; }
if(murder)
{
void Obituary(entity attacker, entity inflictor, entity targ, float deathtype)
{
// Sanity check
- if not(IS_PLAYER(targ)) { backtrace("Obituary called on non-player?!\n"); return; }
+ if (!IS_PLAYER(targ)) { backtrace("Obituary called on non-player?!\n"); return; }
// Declarations
float notif_firstblood = FALSE;
}
}
}
- else if not(Obituary_WeaponDeath(targ, FALSE, deathtype, targ.netname, deathlocation, "", targ.killcount, 0))
+ else if (!Obituary_WeaponDeath(targ, FALSE, deathtype, targ.netname, deathlocation, "", targ.killcount, 0))
{
backtrace("SUICIDE: what the hell happened here?\n");
return;
);
}
- if not(Obituary_WeaponDeath(targ, TRUE, deathtype, targ.netname, attacker.netname, deathlocation, targ.killcount, kill_count_to_attacker))
+ if (!Obituary_WeaponDeath(targ, TRUE, deathtype, targ.netname, attacker.netname, deathlocation, targ.killcount, kill_count_to_attacker))
Obituary_SpecialDeath(targ, TRUE, deathtype, targ.netname, attacker.netname, deathlocation, targ.killcount, kill_count_to_attacker, 0);
}
}
}
}
- if not(DEATH_ISSPECIAL(deathtype))
+ if (!DEATH_ISSPECIAL(deathtype))
{
damage *= g_weapondamagefactor;
mirrordamage *= g_weapondamagefactor;
mirrordamage = frag_mirrordamage;
force = frag_force;
- if not(g_minstagib)
+ if (!g_minstagib)
{
// apply strength multiplier
if (attacker.items & IT_STRENGTH)
damage_goodhits += 1;
damage_gooddamage += damage;
- if not(DEATH_ISSPECIAL(deathtype))
+ if (!DEATH_ISSPECIAL(deathtype))
{
if(IS_PLAYER(targ)) // don't do this for vehicles
if(IsFlying(victim))
float t, d, hi, ty;
entity o;
- if not(Fire_IsBurning(e))
+ if (!Fire_IsBurning(e))
return;
for(t = 0, o = e.owner; o.owner && t < 16; o = o.owner, ++t);
}
e.fire_hitsound = TRUE;
- if not(IS_INDEPENDENT_PLAYER(e))
+ if (!IS_INDEPENDENT_PLAYER(e))
FOR_EACH_PLAYER(other) if(e != other)
{
if(IS_PLAYER(other))
if(other.deadflag == DEAD_NO)
- if not(IS_INDEPENDENT_PLAYER(other))
+ if (!IS_INDEPENDENT_PLAYER(other))
if(boxesoverlap(e.absmin, e.absmax, other.absmin, other.absmax))
{
t = autocvar_g_balance_firetransfer_time * (e.fire_endtime - time);
// offhand hook controls
if(self.BUTTON_HOOK)
{
- if not(self.hook || (self.hook_state & HOOK_WAITING_FOR_RELEASE))
+ if (!(self.hook || (self.hook_state & HOOK_WAITING_FOR_RELEASE)))
{
self.hook_state |= HOOK_FIRING;
self.hook_state |= HOOK_WAITING_FOR_RELEASE;
// check whether antilagged traces are enabled
if (lag < 0.001)
lag = 0;
- if not(IS_REAL_CLIENT(forent))
+ if (!IS_REAL_CLIENT(forent))
lag = 0; // only antilag for clients
// change shooter to SOLID_BBOX so the shot can hit corpses
}
if(self.lodmodelindex1)
- if not(self.SendEntity)
+ if (!self.SendEntity)
SetCustomizer(self, LOD_customize, LOD_uncustomize);
}
if (self.classname == "trigger_secret")
{
- if not(IS_PLAYER(self.enemy))
+ if (!IS_PLAYER(self.enemy))
return;
found_secrets = found_secrets + 1;
WriteByte (MSG_ALL, SVC_FOUNDSECRET);
void multi_touch()
{
- if not(self.spawnflags & 2)
- if not(other.iscreature)
+ if (!(self.spawnflags & 2))
+ if (!other.iscreature)
return;
if(self.team)
entity own;
own = self.enemy;
- if not(IS_PLAYER(own))
+ if (!IS_PLAYER(own))
{
own = self;
self.enemy = world; // I still hate you all
g = self.gravity;
- if not(self.spawnflags & 1)
+ if (!(self.spawnflags & 1))
{
if(other.trigger_gravity_check)
{
void target_speaker_use_off();
void target_speaker_use_activator()
{
- if not(IS_REAL_CLIENT(activator))
+ if (!IS_REAL_CLIENT(activator))
return;
string snd;
if(substring(self.noise, 0, 1) == "*")
if(self.enemy)
{
o = self.enemy.origin;
- if not(self.spawnflags & 2)
+ if (!(self.spawnflags & 2))
o = self.origin + normalize(o - self.origin) * 32768;
}
else
return;
if(vs.message == "")
return;
- if not(IS_PLAYER(pl))
+ if (!IS_PLAYER(pl))
return;
if(gameover)
return;
dotrigger = ((IS_PLAYER(source)) && (source.deadflag == DEAD_NO) && ((ear.radius == 0) || (vlen(source.origin - ear.origin) <= ear.radius)));
domatch = ((ear.spawnflags & 32) || dotrigger);
- if not(domatch)
+ if (!domatch)
return msgin;
- if not(msgin)
+ if (!msgin)
{
// we are in TUBA mode!
- if not(ear.spawnflags & 256)
+ if (!(ear.spawnflags & 256))
return msgin;
if(!W_Tuba_HasPlayed(source, ear.message, ear.movedir_x, !(ear.spawnflags & 512), ear.movedir_y, ear.movedir_z))
for(ear = magicears; ear; ear = ear.enemy)
{
msgout = trigger_magicear_processmessage(ear, source, teamsay, privatesay, msgin);
- if not(ear.spawnflags & 64)
+ if (!(ear.spawnflags & 64))
if(magicear_matched)
return msgout;
msgin = msgout;
if(mapvote_initialized)
return "Can't suggest - voting is already in progress!";
m = MapInfo_FixName(m);
- if not(m)
+ if (!m)
return "The map you suggested is not available on this server.";
if(!autocvar_g_maplist_votable_suggestions_override_mostrecent)
if(Map_IsRecent(m))
{
if(!autocvar_g_banned_list_idmode)
return TRUE;
- if not(ban_idfp)
+ if (!ban_idfp)
return TRUE;
}
return FALSE;
float item_keys_usekey(entity l, entity p) {
float valid = l.itemkeys & p.itemkeys;
- if not(valid) {
+ if (!valid) {
// other has none of the needed keys
return FALSE;
} else if (l.itemkeys == valid) {
string n;
// no keys
- if not(keylist)
+ if (!keylist)
return "";
// one key
* Key touch handler.
*/
void item_key_touch(void) {
- if not(IS_PLAYER(other))
+ if (!IS_PLAYER(other))
return;
// player already picked up this key
started_delay = FALSE;
// only player may trigger the lock
- if not(IS_PLAYER(other))
+ if (!IS_PLAYER(other))
return;
#define FOR_EACH_REALCLIENT(v) FOR_EACH_CLIENT(v) if(IS_REAL_CLIENT(v))
#define FOR_EACH_PLAYER(v) FOR_EACH_CLIENT(v) if(IS_PLAYER(v))
-#define FOR_EACH_SPEC(v) FOR_EACH_CLIENT(v) if not(IS_PLAYER(v)) // Samual: shouldn't this be IS_SPEC(v)? and rather create a separate macro to include observers too
+#define FOR_EACH_SPEC(v) FOR_EACH_CLIENT(v) if (!IS_PLAYER(v)) // Samual: shouldn't this be IS_SPEC(v)? and rather create a separate macro to include observers too
#define FOR_EACH_REALPLAYER(v) FOR_EACH_REALCLIENT(v) if(IS_PLAYER(v))
#define CENTER_OR_VIEWOFS(ent) (ent.origin + (IS_PLAYER(ent) ? ent.view_ofs : ((ent.mins + ent.maxs) * 0.5)))
for (j = WEP_FIRST; j <= WEP_LAST; ++j)
{
e = get_weaponinfo(j);
- if not(e.spawnflags & WEP_FLAG_MUTATORBLOCKED)
+ if (!(e.spawnflags & WEP_FLAG_MUTATORBLOCKED))
g_weaponarena_weapons |= WepSet_FromWeapon(j);
}
}
for (j = WEP_FIRST; j <= WEP_LAST; ++j)
{
e = get_weaponinfo(j);
- if not(e.spawnflags & WEP_FLAG_MUTATORBLOCKED)
+ if (!(e.spawnflags & WEP_FLAG_MUTATORBLOCKED))
if (e.spawnflags & WEP_FLAG_NORMAL)
g_weaponarena_weapons |= WepSet_FromWeapon(j);
}
if(!g_weapon_stay)
g_weapon_stay = cvar("g_weapon_stay");
- if not(warmup_stage)
+ if (!warmup_stage)
game_starttime = time + cvar("g_start_delay");
readplayerstartcvars();
#else
string cvar_string_normal(string n)
{
- if not(cvar_type(n) & 1)
+ if (!(cvar_type(n) & 1))
backtrace(strcat("Attempt to access undefined cvar: ", n));
return builtin_cvar_string(n);
}
{
if(name == loaded_mutators[i])
return 1; // already added
- if not(loaded_mutators[i])
+ if (!(loaded_mutators[i]))
j = i;
}
if(j < 0)
// spawnfuncs
void spawnfunc_info_player_attacker()
{
- if not(g_assault) { remove(self); return; }
+ if (!g_assault) { remove(self); return; }
self.team = NUM_TEAM_1; // red, gets swapped every round
spawnfunc_info_player_deathmatch();
void spawnfunc_info_player_defender()
{
- if not(g_assault) { remove(self); return; }
+ if (!g_assault) { remove(self); return; }
self.team = NUM_TEAM_2; // blue, gets swapped every round
spawnfunc_info_player_deathmatch();
void spawnfunc_target_objective()
{
- if not(g_assault) { remove(self); return; }
+ if (!g_assault) { remove(self); return; }
self.classname = "target_objective";
self.use = assault_objective_use;
void spawnfunc_target_objective_decrease()
{
- if not(g_assault) { remove(self); return; }
+ if (!g_assault) { remove(self); return; }
self.classname = "target_objective_decrease";
// destructible walls that can be used to trigger target_objective_decrease
void spawnfunc_func_assault_destructible()
{
- if not(g_assault) { remove(self); return; }
+ if (!g_assault) { remove(self); return; }
self.spawnflags = 3;
self.classname = "func_assault_destructible";
void spawnfunc_func_assault_wall()
{
- if not(g_assault) { remove(self); return; }
+ if (!g_assault) { remove(self); return; }
self.classname = "func_assault_wall";
self.mdl = self.model;
void spawnfunc_target_assault_roundend()
{
- if not(g_assault) { remove(self); return; }
+ if (!g_assault) { remove(self); return; }
self.winning = 0; // round not yet won by attackers
self.classname = "target_assault_roundend";
void spawnfunc_target_assault_roundstart()
{
- if not(g_assault) { remove(self); return; }
+ if (!g_assault) { remove(self); return; }
assault_attacker_team = NUM_TEAM_1;
self.classname = "target_assault_roundstart";
if (ad.target == "")
continue;
- if not(ad.bot_attack)
+ if (!ad.bot_attack)
continue;
found = FALSE;
MUTATOR_HOOKFUNCTION(assault_TurretSpawn)
{
- if not (self.team)
+ if (!self.team)
self.team = 14;
return FALSE;
entity player = ((capturetype == CAPTURE_NORMAL) ? toucher : enemy_flag.ctf_dropper);
float old_time, new_time;
- if not(player) { return; } // without someone to give the reward to, we can't possibly cap
+ if (!player) { return; } // without someone to give the reward to, we can't possibly cap
// messages and sounds
Send_Notification(NOTIF_ONE, player, MSG_CENTER, APP_TEAM_ENT_2(enemy_flag, CENTER_CTF_CAPTURE_));
WaypointSprite_Spawn("enemyflagcarrier", 0, 0, tmp_entity.owner, FLAG_WAYPOINT_OFFSET, world, tmp_entity.team, tmp_entity.owner, wps_enemyflagcarrier, TRUE, RADARICON_FLAG, WPCOLOR_ENEMYFC(tmp_entity.owner.team));
}
- if not(wpforenemy_announced)
+ if (!wpforenemy_announced)
{
FOR_EACH_REALPLAYER(tmp_entity)
Send_Notification(NOTIF_ONE, tmp_entity, MSG_CENTER, ((tmp_entity.flagcarried) ? CENTER_CTF_STALEMATE_CARRIER : CENTER_CTF_STALEMATE_OTHER));
else
return; // do nothing
}
- else if not(IS_PLAYER(toucher)) // The flag just touched an object, most likely the world
+ else if (!IS_PLAYER(toucher)) // The flag just touched an object, most likely the world
{
if(time > self.wait) // if we haven't in a while, play a sound/effect
{
float havocbot_ctf_teamcount(entity bot, vector org, float tc_radius)
{
- if not(teamplay)
+ if (!teamplay)
return 0;
float c = 0;
break;
head = head.ctf_worldflagnext;
}
- if not(head)
+ if (!head)
return;
navigation_routerating(head.bot_basewaypoint, ratingscale, 10000);
void havocbot_goalrating_ctf_enemybase(float ratingscale)
{
- if not(bot_waypoints_for_items)
+ if (!bot_waypoints_for_items)
{
havocbot_goalrating_ctf_enemyflag(ratingscale);
return;
head = havocbot_ctf_find_enemy_flag(self);
- if not(head)
+ if (!head)
return;
navigation_routerating(head.bot_basewaypoint, ratingscale, 10000);
void dompointtouch()
{
entity head;
- if not(IS_PLAYER(other))
+ if (!IS_PLAYER(other))
return;
if (other.health < 1)
return;
MUTATOR_HOOKFUNCTION(freezetag_BotRoles)
{
- if not(self.deadflag)
+ if (!self.deadflag)
{
if (random() < 0.5)
self.havocbot_role = havocbot_role_ft_freeing;
return;
}
if(other.deadflag != DEAD_NO) { return; }
- if not(IS_PLAYER(other))
+ if (!IS_PLAYER(other))
{ // The ball just touched an object, most likely the world
pointparticles(particleeffectnum("kaball_sparks"), self.origin, '0 0 0', 1);
sound(self, CH_TRIGGER, "keepaway/touch.wav", VOL_BASE, ATTEN_NORM);
frag_force *= autocvar_g_keepaway_ballcarrier_force;
}
}
- else if not(frag_target.ballcarried) // if the target is a noncarrier
+ else if (!frag_target.ballcarried) // if the target is a noncarrier
{
if(frag_target == frag_attacker) // damage done to yourself
{
// maybe start a shorter countdown?
}
- if not(IS_PLAYER(other))
+ if (!IS_PLAYER(other))
return;
if(other.deadflag != DEAD_NO)
return;
if(tmp_player.team == t_team)
++players;
- if not(players) { return t_team; }
+ if (!players) { return t_team; }
}
return 0;
}
}
float p1 = kh_CheckPlayers(0), p2 = kh_CheckPlayers(1), p3 = kh_CheckPlayers(2), p4 = kh_CheckPlayers(3);
- if not(p1 || p2 || p3 || p4)
+ if (!(p1 || p2 || p3 || p4))
{
Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_KEYHUNT_ROUNDSTART, autocvar_g_balance_keyhunt_delay_round);
kh_Controller_SetThink(autocvar_g_balance_keyhunt_delay_round, kh_StartRound);
self.nextthink = time + autocvar_g_nexball_delay_idle;
return;
}
- if not(IS_PLAYER(other))
+ if (!IS_PLAYER(other))
return;
if(other.health < 1)
return;
{
nexball_mode |= NBM_BASKETBALL;
self.classname = "nexball_basketball";
- if not(balls & BALL_BASKET)
+ if (!(balls & BALL_BASKET))
{
/*
CVTOV(g_nexball_basketball_effects_default);
vector org;
float i;
- if not (self.count)
+ if (!self.count)
self.count = 40;
// White shockwave
#endif
self.lasthealth = self.health;
}
- else if not(warmup_stage)
+ else if (!warmup_stage)
{
if (attacker == self)
bprint(Team_ColoredFullName(self.team), " generator spontaneously exploded due to overtime!\n");
{
entity e;
float a;
- if not(IS_PLAYER(other))
+ if (!IS_PLAYER(other))
return;
a = onslaught_controlpoint_attackable(self, other.team);
if(a != 2 && a != 4)
void spawnfunc_item_minst_cells (void)
{
- if not(g_minstagib) { remove(self); return; }
- if not(self.ammo_cells)
+ if (!g_minstagib) { remove(self); return; }
+ if (!self.ammo_cells)
self.ammo_cells = autocvar_g_minstagib_ammo_drop;
StartItem ("models/items/a_cells.md3",
}
void minstagib_ammocheck()
{
- if not(IS_PLAYER(self))
+ if (!IS_PLAYER(self))
return; // not a player
if (time < self.minstagib_nextthink)
return;
MUTATOR_HOOKFUNCTION(minstagib_PlayerPowerups)
{
- if not(self.effects & EF_FULLBRIGHT)
+ if (!(self.effects & EF_FULLBRIGHT))
self.effects |= EF_FULLBRIGHT;
if (self.items & IT_STRENGTH)
MUTATOR_HOOKFUNCTION(minstagib_OnEntityPreSpawn)
{
- if not(autocvar_g_powerups) { return FALSE; }
- if not(self.classname == "item_strength" || self.classname == "item_invincible" || self.classname == "item_health_mega")
+ if (!autocvar_g_powerups) { return FALSE; }
+ if (!(self.classname == "item_strength" || self.classname == "item_invincible" || self.classname == "item_health_mega"))
return FALSE;
entity e = spawn();
if(self.deadflag != DEAD_NO)
return FALSE;
- if not(autocvar_g_nades)
+ if (!autocvar_g_nades)
return FALSE; // allow turning them off mid match
if(forbidWeaponUse())
return FALSE;
- if not(IS_PLAYER(self))
+ if (!IS_PLAYER(self))
return FALSE;
return TRUE;
if(m == NT_AUTOREPLACE_NEVER)
return w;
string s = nt_GetFullReplacement(w);
- if not(s)
+ if (!s)
return w;
if(m == NT_AUTOREPLACE_RANDOM)
s = strcat(w, " ", s);
return FALSE;
if(e.spawnflags & WEP_FLAG_MUTATORBLOCKED)
return FALSE;
- if not(e.spawnflags & WEP_FLAG_NORMAL)
+ if (!(e.spawnflags & WEP_FLAG_NORMAL))
return FALSE;
}
return TRUE;
// check if we have a physics engine
MUTATOR_ONADD
{
- if not(autocvar_physics_ode && checkextension("DP_PHYSICS_ODE"))
+ if (!(autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")))
{
dprint("Warning: Physical items are enabled but no physics engine can be used. Reverting to old items.\n");
return -1;
string fn = "superspec-local.options";
float fh;
- if not(_ISLOCAL)
+ if (!_ISLOCAL)
{
if(self.crypto_idfp == "")
return;
return;
if(_spamlevel > 1)
- if not(_to.superspec_flags & SSF_VERBOSE)
+ if (!(_to.superspec_flags & SSF_VERBOSE))
return;
centerprint(_to, strcat(_center_title, _msg));
_hello.think = superspec_hello;
_hello.nextthink = time + 5;
- if not(_ISLOCAL)
+ if (!_ISLOCAL)
{
if(self.crypto_idfp == "")
return FALSE;
MUTATOR_HOOKFUNCTION(touchexplode_PlayerThink)
{
if(time > self.touchexplode_time)
- if not(gameover)
+ if (!gameover)
if(IS_PLAYER(self))
if(self.deadflag == DEAD_NO)
- if not(IS_INDEPENDENT_PLAYER(self))
+ if (!IS_INDEPENDENT_PLAYER(self))
FOR_EACH_PLAYER(other) if(self != other)
{
if(time > other.touchexplode_time)
if(other.deadflag == DEAD_NO)
- if not(IS_INDEPENDENT_PLAYER(other))
+ if (!IS_INDEPENDENT_PLAYER(other))
if(boxesoverlap(self.absmin, self.absmax, other.absmin, other.absmax))
{
PlayerTouchExplode(self, other);
intensity = vlen(self.velocity) + vlen(other.velocity);
if(intensity) // avoid divisions by 0
intensity /= 2; // average the two velocities
- if not(intensity >= autocvar_g_sandbox_object_material_velocity_min)
+ if (!(intensity >= autocvar_g_sandbox_object_material_velocity_min))
return; // impact not strong enough to do anything
// now offset intensity and apply it to the effects
intensity -= autocvar_g_sandbox_object_material_velocity_min; // start from minimum velocity, not actual velocity
return trace_ent; // don't check permissions, anyone can edit this object
if(trace_ent.crypto_idfp == "")
return trace_ent; // the player who spawned this object did not have an UID, so anyone can edit it
- if not(trace_ent.realowner != self && autocvar_g_sandbox_editor_free < 2)
+ if (!(trace_ent.realowner != self && autocvar_g_sandbox_editor_free < 2))
return trace_ent; // object does not belong to the player, and players can only edit their own objects on this server
return world;
}
print_to(self, "^1SANDBOX - WARNING: ^7Attempted to spawn an object without specifying a model. Please specify the path to your model file after the 'object_spawn' command");
return TRUE;
}
- if not(fexists(argv(2)))
+ if (!(fexists(argv(2))))
{
print_to(self, "^1SANDBOX - WARNING: ^7Attempted to spawn an object with a non-existent model. Make sure the path to your model file is correct");
return TRUE;
case CONTENT_SKY:
return 0;
case CONTENT_EMPTY:
- if not (pointcontents(point - '0 0 1') == CONTENT_SOLID)
+ if (!(pointcontents(point - '0 0 1') == CONTENT_SOLID))
return 0;
break;
case CONTENT_WATER:
}
*/
-#define _pcheck(p) traceline(p+z_up,p-z_down,MOVE_WORLDONLY,self); if not(floor_ok(trace_endpos)) return 1
+#define _pcheck(p) traceline(p+z_up,p-z_down,MOVE_WORLDONLY,self); if (!floor_ok(trace_endpos)) return 1
float edge_check(vector point,float fsize)
{
vector z_up,z_down;
traceline(end + ('0 0 0.25' * pathlib_gridsize),end - ('0 0 1' * pathlib_gridsize),MOVE_WORLDONLY,self);
end = trace_endpos;
- if not(pointcontents(end - '0 0 1') == CONTENT_SOLID)
+ if (!(pointcontents(end - '0 0 1') == CONTENT_SOLID))
return end;
for(surface = start ; surface_z < (end_z + 32); ++surface_z)
return trace_endpos;
point = trace_endpos;
- if not(floor_ok(trace_endpos))
+ if (!floor_ok(trace_endpos))
return trace_endpos;
tracebox(last_point + walknode_boxup, walknode_boxmin,walknode_boxmax, point + walknode_boxup, MOVE_WORLDONLY, self);
point = trace_endpos;
- if not(floor_ok(trace_endpos))
+ if (!floor_ok(trace_endpos))
return trace_endpos;
tracebox(last_point + walknode_boxup, walknode_boxmin,walknode_boxmax, point + walknode_boxup, MOVE_WORLDONLY, self);
}
where = pathlib_movenode(parent.origin,to,0);
- if not(pathlib_movenode_goodnode)
+ if (!pathlib_movenode_goodnode)
return 0;
if(doedge)
node.path_prev = parent;
}
- if not (best_open_node)
+ if (!best_open_node)
best_open_node = node;
else if(best_open_node.pathlib_node_f > node.pathlib_node_f)
best_open_node = node;
node.pathlib_node_g = g;
node.pathlib_node_f = f;
- if not (best_open_node)
+ if (!best_open_node)
best_open_node = node;
else if(best_open_node.pathlib_node_f > node.pathlib_node_f)
best_open_node = node;
pathlib_movenode = pathlib_swimnode;
}
- if not(openlist)
+ if (!openlist)
openlist = spawn();
- if not(closedlist)
+ if (!closedlist)
closedlist = spawn();
- if not(scraplist)
+ if (!scraplist)
scraplist = spawn();
pathlib_closed_cnt = 0;
node.path_prev = parent;
}
- if not (best_open_node)
+ if (!best_open_node)
best_open_node = node;
else if(best_open_node.pathlib_node_f > node.pathlib_node_f)
best_open_node = node;
where = pathlib_movenode(parent.origin, to, 0);
- if not(pathlib_movenode_goodnode)
+ if (!pathlib_movenode_goodnode)
{
//pathlib_showsquare(where, 0 ,30);
//pathlib_showsquare(parent.origin, 1 ,30);
if(doedge)
- if not (tile_check(where))
+ if (!tile_check(where))
{
dprint("tile_check fail\n");
pathlib_showsquare(where, 0 ,30);
//}
}
- if not (best_open_node)
+ if (!best_open_node)
best_open_node = node;
else if(best_open_node.pathlib_node_f > node.pathlib_node_f)
best_open_node = node;
node.pathlib_node_g = g;
node.pathlib_node_f = f;
- if not (best_open_node)
+ if (!best_open_node)
best_open_node = node;
else if(best_open_node.pathlib_node_f > node.pathlib_node_f)
best_open_node = node;
pathlib_movenode = pathlib_swimnode;
}
- if not(openlist)
+ if (!openlist)
openlist = spawn();
- if not(closedlist)
+ if (!closedlist)
closedlist = spawn();
pathlib_closed_cnt = 0;
traceline(end + ('0 0 0.25' * pathlib_gridsize),end - ('0 0 1' * pathlib_gridsize),MOVE_WORLDONLY,self);
end = trace_endpos;
- if not(pointcontents(end - '0 0 1') == CONTENT_SOLID)
+ if (!(pointcontents(end - '0 0 1') == CONTENT_SOLID))
return end;
for(surface = start ; surface_z < (end_z + 32); ++surface_z)
pathlib_movecost = 300;
pathlib_movecost_diag = vlen('1 1 0' * pathlib_movecost);
- if not (pathlib_wpp_waypointcallback)
+ if (!pathlib_wpp_waypointcallback)
callback = FALSE;
if (callback)
pathlib_heuristic = pathlib_h_none;
- if not(openlist)
+ if (!openlist)
openlist = spawn();
- if not(closedlist)
+ if (!closedlist)
closedlist = spawn();
pathlib_closed_cnt = 0;
// forward-right
p = where + f + r;
traceline(p + tile_check_up, p - tile_check_down, MOVE_WORLDONLY, self);
- if not (location_isok(trace_endpos, 1, 0))
+ if (!location_isok(trace_endpos, 1, 0))
return 0;
// Forward-left
p = where + f - r;
traceline(p + tile_check_up, p - tile_check_down, MOVE_WORLDONLY, self);
- if not (location_isok(trace_endpos, 1, 0))
+ if (!location_isok(trace_endpos, 1, 0))
return 0;
// Back-right
p = where - f + r;
traceline(p + tile_check_up, p - tile_check_down, MOVE_WORLDONLY, self);
- if not (location_isok(trace_endpos, 1 ,0))
+ if (!location_isok(trace_endpos, 1 ,0))
return 0;
//Back-left
p = where - f - r;
traceline(p + tile_check_up, p - tile_check_down, MOVE_WORLDONLY, self);
- if not (location_isok(trace_endpos, 1, 0))
+ if (!location_isok(trace_endpos, 1, 0))
return 0;
return 1;
// forward
p = where + f;
traceline(p+tile_check_up,p-tile_check_down,MOVE_WORLDONLY,self);
- if not (location_isok(trace_endpos,1,0))
+ if (!location_isok(trace_endpos,1,0))
return 0;
//left
p = where - r;
traceline(p+tile_check_up,p-tile_check_down,MOVE_WORLDONLY,self);
- if not (location_isok(trace_endpos,1,0))
+ if (!location_isok(trace_endpos,1,0))
return 0;
// Right
p = where + r;
traceline(p+tile_check_up,p-tile_check_down,MOVE_WORLDONLY,self);
- if not (location_isok(trace_endpos,1,0))
+ if (!location_isok(trace_endpos,1,0))
return 0;
//Back
p = where - f;
traceline(p+tile_check_up,p-tile_check_down,MOVE_WORLDONLY,self);
- if not (location_isok(trace_endpos,1,0))
+ if (!location_isok(trace_endpos,1,0))
return 0;
return 1;
vector from, to, safe, step, transform, ang, newvel;
float planeshift, s, t;
- if not(teleporter.enemy)
+ if (!teleporter.enemy)
{
backtrace("Portal_TeleportPlayer called without other portal being set. Stop.");
return 0;
player = self;
self = oldself;
- if not(teleporter.enemy)
+ if (!teleporter.enemy)
{
backtrace("Portal_TeleportPlayer ended up without other portal being set BEFORE TeleportPlayer. Stop.");
return 0;
Send_Notification(NOTIF_ONE, player, MSG_ANNCE, ANNCE_ACHIEVEMENT_AMAZING);
}
- if not(teleporter.enemy)
+ if (!teleporter.enemy)
{
backtrace("Portal_TeleportPlayer ended up without other portal being set AFTER TeleportPlayer. Stop.");
return 0;
if(tvalid)
if(cp == race_timed_checkpoint) // finish line
- if not(e.race_completed)
+ if (!e.race_completed)
{
float s;
if(g_race_qualifying)
/*
* Trigger targets
*/
- if not((self.spawnflags & 2) && (IS_PLAYER(other)))
+ if (!((self.spawnflags & 2) && (IS_PLAYER(other))))
{
activator = other;
oldmsg = self.message;
self.message = oldmsg;
}
- if not(IS_PLAYER(other))
+ if (!IS_PLAYER(other))
return;
/*
EXACTTRIGGER_INIT;
self.use = checkpoint_use;
- if not(self.spawnflags & 1)
+ if (!(self.spawnflags & 1))
self.touch = checkpoint_touch;
o = (self.absmin + self.absmax) * 0.5;
EXACTTRIGGER_INIT;
self.use = checkpoint_use;
- if not(self.spawnflags & 1)
+ if (!(self.spawnflags & 1))
self.touch = checkpoint_touch;
o = (self.absmin + self.absmax) * 0.5;
EXACTTRIGGER_INIT;
self.use = penalty_use;
- if not(self.spawnflags & 1)
+ if (!(self.spawnflags & 1))
self.touch = penalty_touch;
if (self.race_penalty_reason == "")
pbest.field = j;
- if not(pfirst)
+ if (!pfirst)
pfirst = pbest;
if(plast)
plast.chain = pbest;
}
sk = teamscorekeepers[t - 1];
- if not(sk)
+ if (!sk)
return -999999999;
s = sk.teamscores_primary;
if(teamscores_flags_primary & SFL_ZERO_IS_WORST)
t = 0;
FOR_EACH_CLIENT(p)
- if not(IS_PLAYER(p))
+ if (!IS_PLAYER(p))
{
- if not(t)
+ if (!t)
Score_NicePrint_Spectators(to);
Score_NicePrint_Spectator(to, p);
t = 1;
if(score_enabled)
ScoreInfo_SetLabel_TeamScore (ST_SCORE, "score", stprio);
- if not(INDEPENDENT_PLAYERS)
+ if (!INDEPENDENT_PLAYERS)
ScoreInfo_SetLabel_PlayerScore(SP_KILLS, "kills", 0);
ScoreInfo_SetLabel_PlayerScore(SP_DEATHS, "deaths", SFL_LOWER_IS_BETTER);
- if not(INDEPENDENT_PLAYERS)
+ if (!INDEPENDENT_PLAYERS)
ScoreInfo_SetLabel_PlayerScore(SP_SUICIDES, "suicides", SFL_LOWER_IS_BETTER);
if(score_enabled)
*/
void trigger_secret_touch() {
// only a player can trigger this
- if not(IS_PLAYER(other))
+ if (!IS_PLAYER(other))
return;
// update secrets found counter
// set default sound
if (self.noise == "")
- if not(self.sounds)
+ if (!self.sounds)
self.sounds = 1; // misc/secret.wav
// this entity can't be a target itself!!!!
else
dprint(ftos(trace_dphitq3surfaceflags), "\n");
*/
- if not(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOSTEPS)
+ if (!(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOSTEPS))
{
if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_METALSTEPS)
GlobalSound(globalsound_metalstep, CH_PLAYER, VOICETYPE_PLAYERSOUND);
{
if (self)
if (self.gametypefilter != "")
- if not(isGametypeInFilter(MapInfo_LoadedGametype, teamplay, have_team_spawns, self.gametypefilter))
+ if (!isGametypeInFilter(MapInfo_LoadedGametype, teamplay, have_team_spawns, self.gametypefilter))
{
remove(self);
return;
else
{
k = s;
- if not(cvar(k))
+ if (!cvar(k))
goto cvar_fail;
}
}
inv = !inv;
:cvar_fail
// now inv is 1 if we want to keep the item, and 0 if we want to get rid of it
- if not(inv)
+ if (!inv)
{
//print("cvarfilter fail\n");
remove(self);
void func_ladder_touch()
{
- if not(other.iscreature)
+ if (!other.iscreature)
return;
if (other.vehicle_flags & VHF_ISVEHICLE)
return;
if (player.switchweapon == w_getbestweapon(player))
_switchweapon = TRUE;
- if not(player.weapons & WepSet_FromWeapon(player.switchweapon))
+ if (!(player.weapons & WepSet_FromWeapon(player.switchweapon)))
_switchweapon = TRUE;
pickedup |= Item_GiveAmmoTo(item, player, ammo_fuel, g_pickup_fuel_max, ITEM_MODE_FUEL);
}
}
- if not(IS_PLAYER(other))
+ if (!IS_PLAYER(other))
return;
if (other.deadflag)
return;
if (self.classname == "droppedweapon")
remove (self);
- else if not(self.spawnshieldtime)
+ else if (!self.spawnshieldtime)
return;
else
{
{
wi = get_weaponinfo(i);
- if not(player.weapons & WepSet_FromWeapon(i))
+ if (!(player.weapons & WepSet_FromWeapon(i)))
continue;
if(wi.items & IT_SHELLS)
return;
}
- if not(IS_PLAYER(activator))
+ if (!IS_PLAYER(activator))
return;
if(activator.deadflag != DEAD_NO)
return;
{
wi = get_weaponinfo(j);
if(wi.weapon)
- if not(wi.spawnflags & WEP_FLAG_MUTATORBLOCKED)
+ if (!(wi.spawnflags & WEP_FLAG_MUTATORBLOCKED))
got += GiveWeapon(e, j, op, val);
}
case "allammo":
if(wi.weapon)
{
POSTGIVE_WEAPON(e, j, "weapons/weaponpickup.wav", string_null);
- if not(save_weapons & WepSet_FromWeapon(j))
+ if (!(save_weapons & WepSet_FromWeapon(j)))
if(e.weapons & WepSet_FromWeapon(j))
weapon_action(wi.weapon, WR_PRECACHE);
}
else
e.superweapons_finished += time;
- if not(e.weapons & WepSet_FromWeapon(e.switchweapon))
+ if (!(e.weapons & WepSet_FromWeapon(e.switchweapon)))
_switchweapon = TRUE;
if(_switchweapon)
W_SwitchWeapon_Force(e, w_getbestweapon(e));
self.speed = 1000;
self.movedir = self.movedir * self.speed * 10;
- if not(self.noise)
+ if (!self.noise)
self.noise = "misc/jumppad.wav";
precache_sound (self.noise);
void plat_center_touch()
{
- if not(other.iscreature)
+ if (!other.iscreature)
return;
if (other.health <= 0)
void plat_outside_touch()
{
- if not(other.iscreature)
+ if (!other.iscreature)
return;
if (other.health <= 0)
self.angles = '0 0 0';
self.classname = "plat";
- if not(InitMovingBrushTrigger())
+ if (!InitMovingBrushTrigger())
return;
self.effects |= EF_LOWPRECISION;
setsize (self, self.mins , self.maxs);
else
self.view_ofs = self.mins;
- if not(InitMovingBrushTrigger())
+ if (!InitMovingBrushTrigger())
return;
self.effects |= EF_LOWPRECISION;
self.dmgtime2 = time;
- if not(InitMovingBrushTrigger())
+ if (!InitMovingBrushTrigger())
return;
// no EF_LOWPRECISION here, as rounding angles is bad
vector v;
self.nextthink = time + 0.1;
- if not (self.owner.active == ACTIVE_ACTIVE)
+ if (!(self.owner.active == ACTIVE_ACTIVE))
{
self.owner.velocity = '0 0 0';
return;
else // Z
self.movedir = '0 0 1' * self.height;
- if not(InitMovingBrushTrigger())
+ if (!InitMovingBrushTrigger())
return;
// wait for targets to spawn
float v;
self.nextthink = time + 0.1;
- if not (self.owner.active == ACTIVE_ACTIVE)
+ if (!(self.owner.active == ACTIVE_ACTIVE))
{
self.owner.avelocity_x = 0;
return;
self.blocked = generic_plat_blocked;
self.avelocity_z = 0.0000001;
- if not(InitMovingBrushTrigger())
+ if (!InitMovingBrushTrigger())
return;
if(!self.freq)
void button_use()
{
- if not (self.active == ACTIVE_ACTIVE)
+ if (!(self.active == ACTIVE_ACTIVE))
return;
self.enemy = activator;
{
if (!other)
return;
- if not(other.iscreature)
+ if (!other.iscreature)
return;
if(other.velocity * self.movedir < 0)
return;
{
SetMovedir ();
- if not(InitMovingBrushTrigger())
+ if (!InitMovingBrushTrigger())
return;
self.effects |= EF_LOWPRECISION;
door = self;
// no key needed
- if not(door.itemkeys)
+ if (!door.itemkeys)
return TRUE;
// this door require a key
// only a player can have a key
- if not(IS_PLAYER(other))
+ if (!IS_PLAYER(other))
return FALSE;
if (item_keys_usekey(door, other)) {
void door_trigger_touch()
{
if (other.health < 1)
- if not(other.iscreature && other.deadflag == DEAD_NO)
+ if (!(other.iscreature && other.deadflag == DEAD_NO))
return;
if (time < self.attack_finished_single)
*/
void door_touch()
{
- if not(IS_PLAYER(other))
+ if (!IS_PLAYER(other))
return;
if (self.owner.attack_finished_single > time)
return;
SetMovedir ();
self.max_health = self.health;
- if not(InitMovingBrushTrigger())
+ if (!InitMovingBrushTrigger())
return;
self.effects |= EF_LOWPRECISION;
self.classname = "door";
self.max_health = self.health;
self.avelocity = self.movedir;
- if not(InitMovingBrushTrigger())
+ if (!InitMovingBrushTrigger())
return;
self.velocity = '0 0 0';
//self.effects |= EF_LOWPRECISION;
*/
void secret_touch()
{
- if not(other.iscreature)
+ if (!other.iscreature)
return;
if (self.attack_finished_single > time)
return;
self.mangle = self.angles;
self.angles = '0 0 0';
self.classname = "door";
- if not(InitMovingBrushTrigger())
+ if (!InitMovingBrushTrigger())
return;
self.effects |= EF_LOWPRECISION;
float n, i, t;
self.nextthink = time + 0.1;
- if not (self.owner.active == ACTIVE_ACTIVE)
+ if (!(self.owner.active == ACTIVE_ACTIVE))
{
self.owner.velocity = '0 0 0';
return;
if(self.netname == "")
self.netname = "1 0 0 0 1";
- if not(InitMovingBrushTrigger())
+ if (!InitMovingBrushTrigger())
return;
self.active = ACTIVE_ACTIVE;
{
self.nextthink = time + 0.1;
- if not (self.owner.active == ACTIVE_ACTIVE)
+ if (!(self.owner.active == ACTIVE_ACTIVE))
{
self.owner.velocity = '0 0 0';
return;
if(self.netname == "")
self.netname = "1 0 0 0 1";
- if not(InitMovingBrushTrigger())
+ if (!InitMovingBrushTrigger())
return;
// wait for targets to spawn
return 1;
if(self.notta)
- if not(!teamplay || g_tdm || g_ctf)
+ if (!(!teamplay || g_tdm || g_ctf))
return 1;
if(self.notsingle)
{
TDEATHLOOP(org)
{
- if not(teamplay && autocvar_g_telefrags_teamplay && head.team == player.team)
+ if (!(teamplay && autocvar_g_telefrags_teamplay && head.team == player.team))
if(IS_PLAYER(head))
if(head.health >= 1)
return 1;
{
if (IS_PLAYER(player) && player.health >= 1)
{
- if not(teamplay && autocvar_g_telefrags_teamplay && head.team == player.team)
+ if (!(teamplay && autocvar_g_telefrags_teamplay && head.team == player.team))
{
if(IS_PLAYER(head))
if(head.health >= 1)
if (self.active != ACTIVE_ACTIVE)
return;
- if not(other.teleportable)
+ if (!other.teleportable)
return;
if(other.vehicle)
activator = other;
s = self.target; self.target = string_null;
SUB_UseTargets();
- if not(self.target) self.target = s;
+ if (!self.target) self.target = s;
oldself = self;
self = e;
teamplay = 0;
serverflags &= ~SERVERFLAG_TEAMPLAY;
- if not(cvar_value_issafe(world.fog))
+ if (!cvar_value_issafe(world.fog))
{
print("The current map contains a potentially harmful fog setting, ignored\n");
world.fog = string_null;
prep = pre_pos + (self.enemy.velocity * (impact_time + mintime));
if(self.aim_flags & TFL_AIM_ZPREDICT)
- if not(self.enemy.flags & FL_ONGROUND)
+ if (!(self.enemy.flags & FL_ONGROUND))
if(self.enemy.movetype == MOVETYPE_WALK || self.enemy.movetype == MOVETYPE_TOSS || self.enemy.movetype == MOVETYPE_BOUNCE)
{
float vz;
return;
// Inactive turrets take no damage. (hm..)
- if not (self.active)
+ if (!self.active)
return;
if (teamplay)
if (ent == world)
return;
- if not (ent.turret_scale_damage) ent.turret_scale_damage = 1;
- if not (ent.turret_scale_range) ent.turret_scale_range = 1;
- if not (ent.turret_scale_refire) ent.turret_scale_refire = 1;
- if not (ent.turret_scale_ammo) ent.turret_scale_ammo = 1;
- if not (ent.turret_scale_aim) ent.turret_scale_aim = 1;
- if not (ent.turret_scale_health) ent.turret_scale_health = 1;
- if not (ent.turret_scale_respawn) ent.turret_scale_respawn = 1;
+ if (!ent.turret_scale_damage) ent.turret_scale_damage = 1;
+ if (!ent.turret_scale_range) ent.turret_scale_range = 1;
+ if (!ent.turret_scale_refire) ent.turret_scale_refire = 1;
+ if (!ent.turret_scale_ammo) ent.turret_scale_ammo = 1;
+ if (!ent.turret_scale_aim) ent.turret_scale_aim = 1;
+ if (!ent.turret_scale_health) ent.turret_scale_health = 1;
+ if (!ent.turret_scale_respawn) ent.turret_scale_respawn = 1;
sbase = strcat(cvar_base,unitname);
if (is_reload)
if (self.track_flags == TFL_TRACK_NO)
return;
- if not (self.active)
+ if (!self.active)
target_angle = self.idle_aim - ('1 0 0' * self.aim_maxpitch);
else if (self.enemy == world)
{
if(e_target.owner == e_turret)
return -0.5;
- if not(checkpvs(e_target.origin, e_turret))
+ if (!checkpvs(e_target.origin, e_turret))
return -1;
- if not (e_target)
+ if (!e_target)
return -2;
if(g_onslaught)
// player
if (IS_CLIENT(e_target))
{
- if not (validate_flags & TFL_TARGETSELECT_PLAYERS)
+ if (!(validate_flags & TFL_TARGETSELECT_PLAYERS))
return -7;
if (e_target.deadflag != DEAD_NO)
// Missile
if (e_target.flags & FL_PROJECTILE)
- if not (validate_flags & TFL_TARGETSELECT_MISSILES)
+ if (!(validate_flags & TFL_TARGETSELECT_MISSILES))
return -10;
if (validate_flags & TFL_TARGETSELECT_MISSILESONLY)
- if not (e_target.flags & FL_PROJECTILE)
+ if (!(e_target.flags & FL_PROJECTILE))
return -10.5;
// Team check
#endif
// Handle ammo
- if not (self.spawnflags & TSF_NO_AMMO_REGEN)
+ if (!(self.spawnflags & TSF_NO_AMMO_REGEN))
if (self.ammo < self.ammo_max)
self.ammo = min(self.ammo + self.ammo_recharge, self.ammo_max);
// Inactive turrets needs to run the think loop,
// So they can handle animation and wake up if need be.
- if not (self.active)
+ if (!self.active)
{
turret_stdproc_track();
return;
// This one is doing something.. oddball. assume its handles what needs to be handled.
// Predict?
- if not(self.aim_flags & TFL_AIM_NO)
+ if (!(self.aim_flags & TFL_AIM_NO))
self.tur_aimpos = turret_stdproc_aim_generic();
// Turn & pitch?
- if not(self.track_flags & TFL_TRACK_NO)
+ if (!(self.track_flags & TFL_TRACK_NO))
turret_stdproc_track();
turret_do_updates(self);
if(self.volly_counter != self.shot_volly)
{
// Predict or whatnot
- if not(self.aim_flags & TFL_AIM_NO)
+ if (!(self.aim_flags & TFL_AIM_NO))
self.tur_aimpos = turret_stdproc_aim_generic();
// Turn & pitch
- if not(self.track_flags & TFL_TRACK_NO)
+ if (!(self.track_flags & TFL_TRACK_NO))
turret_stdproc_track();
turret_do_updates(self);
if (self.enemy == world)
{
// Turn & pitch
- if not(self.track_flags & TFL_TRACK_NO)
+ if (!(self.track_flags & TFL_TRACK_NO))
turret_stdproc_track();
// do any per-turret stuff
self.lip = time + autocvar_g_turrets_aimidle_delay; // Keep track of the last time we had a target.
// Predict?
- if not(self.aim_flags & TFL_AIM_NO)
+ if (!(self.aim_flags & TFL_AIM_NO))
self.tur_aimpos = turret_stdproc_aim_generic();
// Turn & pitch?
- if not(self.track_flags & TFL_TRACK_NO)
+ if (!(self.track_flags & TFL_TRACK_NO))
turret_stdproc_track();
turret_do_updates(self);
self.turret_type = _turret_type;
e = find(world, classname, "turret_manager");
- if not (e)
+ if (!e)
{
e = spawn();
e.classname = "turret_manager";
e.nextthink = time + 2;
}
- if not (self.spawnflags & TSF_SUSPENDED)
+ if (!(self.spawnflags & TSF_SUSPENDED))
builtin_droptofloor(); // why can't we use regular droptofloor here?
// Terrainbase spawnflag. This puts a enlongated model
self.effects = EF_NODRAW;
// Handle turret teams.
- if not (teamplay)
+ if (!teamplay)
self.team = MAX_SHOT_DISTANCE; // Group all turrets into the same team, so they dont kill eachother.
else if(g_onslaught && self.targetname)
{
* if it hits a glitch in my logic :P so try to set as mutch
* as possible beforehand.
*/
- if not(self.ticrate)
+ if (!self.ticrate)
{
if (self.turrcaps_flags & TFL_TURRCAPS_SUPPORT)
self.ticrate = 0.2; // Support units generaly dont need to have a high speed ai-loop
if (self.netname == "")
self.netname = self.classname;
- if not (self.respawntime)
+ if (!self.respawntime)
self.respawntime = 60;
self.respawntime = max(-1, self.respawntime);
- if not (self.health)
+ if (!self.health)
self.health = 1000;
self.tur_health = max(1, self.health);
- if not (self.turrcaps_flags)
+ if (!self.turrcaps_flags)
self.turrcaps_flags = TFL_TURRCAPS_RADIUSDMG | TFL_TURRCAPS_MEDPROJ | TFL_TURRCAPS_PLAYERKILL;
- if not (self.damage_flags)
+ if (!self.damage_flags)
self.damage_flags = TFL_DMG_YES | TFL_DMG_RETALIATE | TFL_DMG_AIMSHAKE;
// Shot stuff.
- if not (self.shot_refire)
+ if (!self.shot_refire)
self.shot_refire = 1;
self.shot_refire = bound(0.01, self.shot_refire, 9999);
- if not (self.shot_dmg)
+ if (!self.shot_dmg)
self.shot_dmg = self.shot_refire * 50;
self.shot_dmg = max(1, self.shot_dmg);
- if not (self.shot_radius)
+ if (!self.shot_radius)
self.shot_radius = self.shot_dmg * 0.5;
self.shot_radius = max(1, self.shot_radius);
- if not (self.shot_speed)
+ if (!self.shot_speed)
self.shot_speed = 2500;
self.shot_speed = max(1, self.shot_speed);
- if not (self.shot_spread)
+ if (!self.shot_spread)
self.shot_spread = 0.0125;
self.shot_spread = bound(0.0001, self.shot_spread, 500);
- if not (self.shot_force)
+ if (!self.shot_force)
self.shot_force = self.shot_dmg * 0.5 + self.shot_radius * 0.5;
self.shot_force = bound(0.001, self.shot_force, 5000);
- if not (self.shot_volly)
+ if (!self.shot_volly)
self.shot_volly = 1;
self.shot_volly = bound(1, self.shot_volly, floor(self.ammo_max / self.shot_dmg));
- if not (self.shot_volly_refire)
+ if (!self.shot_volly_refire)
self.shot_volly_refire = self.shot_refire * self.shot_volly;
self.shot_volly_refire = bound(self.shot_refire, self.shot_volly_refire, 60);
- if not (self.firecheck_flags)
+ if (!self.firecheck_flags)
self.firecheck_flags = TFL_FIRECHECK_DEAD | TFL_FIRECHECK_DISTANCES |
TFL_FIRECHECK_LOS | TFL_FIRECHECK_AIMDIST | TFL_FIRECHECK_TEAMCECK |
TFL_FIRECHECK_OWM_AMMO | TFL_FIRECHECK_REFIRE;
// Range stuff.
- if not (self.target_range)
+ if (!self.target_range)
self.target_range = self.shot_speed * 0.5;
self.target_range = bound(0, self.target_range, MAX_SHOT_DISTANCE);
- if not (self.target_range_min)
+ if (!self.target_range_min)
self.target_range_min = self.shot_radius * 2;
self.target_range_min = bound(0, self.target_range_min, MAX_SHOT_DISTANCE);
- if not (self.target_range_optimal)
+ if (!self.target_range_optimal)
self.target_range_optimal = self.target_range * 0.5;
self.target_range_optimal = bound(0, self.target_range_optimal, MAX_SHOT_DISTANCE);
// Aim stuff.
- if not (self.aim_maxrot)
+ if (!self.aim_maxrot)
self.aim_maxrot = 90;
self.aim_maxrot = bound(0, self.aim_maxrot, 360);
- if not (self.aim_maxpitch)
+ if (!self.aim_maxpitch)
self.aim_maxpitch = 20;
self.aim_maxpitch = bound(0, self.aim_maxpitch, 90);
- if not (self.aim_speed)
+ if (!self.aim_speed)
self.aim_speed = 36;
self.aim_speed = bound(0.1, self.aim_speed, 1000);
- if not (self.aim_firetolerance_dist)
+ if (!self.aim_firetolerance_dist)
self.aim_firetolerance_dist = 5 + (self.shot_radius * 2);
self.aim_firetolerance_dist = bound(0.1, self.aim_firetolerance_dist, MAX_SHOT_DISTANCE);
- if not (self.aim_flags)
+ if (!self.aim_flags)
{
self.aim_flags = TFL_AIM_LEAD | TFL_AIM_SHOTTIMECOMPENSATE;
if(self.turrcaps_flags & TFL_TURRCAPS_RADIUSDMG)
self.aim_flags |= TFL_AIM_GROUNDGROUND;
}
- if not (self.track_type)
+ if (!self.track_type)
self.track_type = TFL_TRACKTYPE_STEPMOTOR;
if (self.track_type != TFL_TRACKTYPE_STEPMOTOR)
// Fluid / Ineria mode. Looks mutch nicer.
// Can reduce aim preformance alot, needs a bit diffrent aimspeed
- if not (self.aim_speed)
+ if (!self.aim_speed)
self.aim_speed = 180;
self.aim_speed = bound(0.1, self.aim_speed, 1000);
- if not (self.track_accel_pitch)
+ if (!self.track_accel_pitch)
self.track_accel_pitch = 0.5;
- if not (self.track_accel_rot)
+ if (!self.track_accel_rot)
self.track_accel_rot = 0.5;
- if not (self.track_blendrate)
+ if (!self.track_blendrate)
self.track_blendrate = 0.35;
}
// Target selection stuff.
- if not (self.target_select_rangebias)
+ if (!self.target_select_rangebias)
self.target_select_rangebias = 1;
self.target_select_rangebias = bound(-10, self.target_select_rangebias, 10);
- if not (self.target_select_samebias)
+ if (!self.target_select_samebias)
self.target_select_samebias = 1;
self.target_select_samebias = bound(-10, self.target_select_samebias, 10);
- if not (self.target_select_anglebias)
+ if (!self.target_select_anglebias)
self.target_select_anglebias = 1;
self.target_select_anglebias = bound(-10, self.target_select_anglebias, 10);
- if not (self.target_select_missilebias)
+ if (!self.target_select_missilebias)
self.target_select_missilebias = -10;
self.target_select_missilebias = bound(-10, self.target_select_missilebias, 10);
self.target_select_playerbias = bound(-10, self.target_select_playerbias, 10);
- if not (self.target_select_flags)
+ if (!self.target_select_flags)
{
self.target_select_flags = TFL_TARGETSELECT_LOS | TFL_TARGETSELECT_TEAMCHECK
| TFL_TARGETSELECT_RANGELIMTS | TFL_TARGETSELECT_ANGLELIMITS;
self.target_validate_flags = self.target_select_flags;
// Ammo stuff
- if not (self.ammo_max)
+ if (!self.ammo_max)
self.ammo_max = self.shot_dmg * 10;
self.ammo_max = max(self.shot_dmg, self.ammo_max);
- if not (self.ammo)
+ if (!self.ammo)
self.ammo = self.shot_dmg * 5;
self.ammo = bound(0,self.ammo, self.ammo_max);
- if not (self.ammo_recharge)
+ if (!self.ammo_recharge)
self.ammo_recharge = self.shot_dmg * 0.5;
self.ammo_recharge = max(0 ,self.ammo_recharge);
// Convert the recharge from X per sec to X per ticrate
self.ammo_recharge = self.ammo_recharge * self.ticrate;
- if not (self.ammo_flags)
+ if (!self.ammo_flags)
self.ammo_flags = TFL_AMMO_ENERGY | TFL_AMMO_RECHARGE;
// Damage stuff
if(self.spawnflags & TSL_NO_RESPAWN)
- if not (self.damage_flags & TFL_DMG_DEATH_NORESPAWN)
+ if (!(self.damage_flags & TFL_DMG_DEATH_NORESPAWN))
self.damage_flags |= TFL_DMG_DEATH_NORESPAWN;
// Offsets & origins
self.tur_head.movetype = MOVETYPE_NOCLIP;
// Defend mode?
- if not (self.tur_defend)
+ if (!self.tur_defend)
if (self.target != "")
{
self.tur_defend = find(world, targetname, self.target);
if(self.team != self.enemy.team)
return 0;
- if not (self.enemy.ammo_flags & TFL_AMMO_ENERGY)
+ if (!(self.enemy.ammo_flags & TFL_AMMO_ENERGY))
return 0;
return 1;
self.turrcaps_flags = TFL_TURRCAPS_PLAYERKILL;
self.aim_flags = TFL_AIM_LEAD | TFL_AIM_SHOTTIMECOMPENSATE;
- if not (autocvar_g_antilag_bullets)
+ if (!autocvar_g_antilag_bullets)
self.turrcaps_flags |= TFL_TURRCAPS_HITSCAN;
if (turret_stdproc_init("machinegun_std", "models/turrets/base.md3", "models/turrets/machinegun.md3", TID_MACHINEGUN) == 0)
self.target_select_time = time;
}
- if not (turret_stdproc_firecheck())
+ if (!turret_stdproc_firecheck())
return 0;
if(self.enemy)
void turret_tesla_postthink()
{
- if not (self.active)
+ if (!self.active)
{
self.tur_head.avelocity = '0 0 0';
return;
float vehicles_valid_pilot()
{
- if not(IS_PLAYER(other))
+ if (!IS_PLAYER(other))
return FALSE;
if(other.deadflag != DEAD_NO)
if(other.vehicle != world)
return FALSE;
- if not(IS_REAL_CLIENT(other))
+ if (!IS_REAL_CLIENT(other))
if(!autocvar_g_vehicles_allow_bots)
return FALSE;
return;
}
- if not (self.realowner.vehicle)
+ if (!self.realowner.vehicle)
{
UpdateCSQCProjectile(self);
return;
return;
}
- if not (self.realowner.vehicle)
+ if (!self.realowner.vehicle)
{
UpdateCSQCProjectile(self);
return;
self.movetype = MOVETYPE_BOUNCE;
sound (self.tur_head, CH_TRIGGER_SINGLE, "misc/null.wav", VOL_VEHICLEENGINE, ATTEN_NORM);
- if not (self.owner)
+ if (!self.owner)
return;
makevectors(self.angles);
self.nextthink = time;
}
- if not (self.owner)
+ if (!self.owner)
return;
makevectors(self.angles);
self.nextthink = time;
- if not (self.realowner.vehicle)
+ if (!self.realowner.vehicle)
self.think = spiderbot_rocket_unguided;
crosshair_trace(self.realowner);
{
entity rkt;
rkt = findchainentity(realowner, self.owner);
- if not (rkt)
+ if (!rkt)
return;
crosshair_trace(self.owner);
}
if (self.wait != -10)
- if not (self.owner.BUTTON_ATCK2)
+ if (!self.owner.BUTTON_ATCK2)
return;
self.frame = 5;
self.movetype = MOVETYPE_WALK;
- if not (self.owner)
+ if (!self.owner)
return;
makevectors(self.angles);
void UpdateAuxiliaryXhair(entity own, vector loc, vector clr, float axh_id)
{
- if not(IS_REAL_CLIENT(own))
+ if (!IS_REAL_CLIENT(own))
return;
entity axh;
**/
void CSQCVehicleSetup(entity own, float vehicle_id)
{
- if not(IS_REAL_CLIENT(own))
+ if (!IS_REAL_CLIENT(own))
return;
msg_entity = own;
return;
}
- if not(IS_PLAYER(other))
+ if (!IS_PLAYER(other))
return;
if(other.deadflag != DEAD_NO)
float() _framefunc,
void(float) _exitfunc)
{
- if not (_owner.vehicle_flags & VHF_MULTISLOT)
+ if (!(_owner.vehicle_flags & VHF_MULTISLOT))
_owner.vehicle_flags |= VHF_MULTISLOT;
_slot.PlayerPhysplug = _framefunc;
}
setsize(self, min_s, max_s);
- if not (nodrop)
+ if (!nodrop)
{
setorigin(self, self.origin);
tracebox(self.origin + '0 0 100', min_s, max_s, self.origin - '0 0 10000', MOVE_WORLDONLY, self);
// common/weapclip (intended)
// common/noimpact (is supposed to eat projectiles, but is erased farther above)
if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NODRAW)
- if not(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NONSOLID)
- if not(trace_dphitcontents & DPCONTENTS_OPAQUE)
+ if (!(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NONSOLID))
+ if (!(trace_dphitcontents & DPCONTENTS_OPAQUE))
{
remove(self);
return;
lag = ANTILAG_LATENCY(self);
if(lag < 0.001)
lag = 0;
- if not(IS_REAL_CLIENT(self))
+ if (!IS_REAL_CLIENT(self))
lag = 0;
if(autocvar_g_antilag == 0 || self.cvar_cl_noantilag)
lag = 0; // only do hitscan, but no antilag
// common/weapclip (intended)
// common/noimpact (is supposed to eat projectiles, but is erased farther above)
if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NODRAW)
- if not(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NONSOLID)
- if not(trace_dphitcontents & DPCONTENTS_OPAQUE)
+ if (!(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NONSOLID))
+ if (!(trace_dphitcontents & DPCONTENTS_OPAQUE))
break;
// go through solid!
if (pointcontents (trace_endpos) != CONTENT_SKY)
{
- if not (trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
+ if (!(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT))
Damage_DamageInfo(trace_endpos, damage, 0, 0, dir * max(1, force), dtype, trace_ent.species, self);
Damage (trace_ent, self, self, damage, dtype, trace_endpos, dir * force);
{
if(is_from_exception)
return (exception); // if exception is detected, allow it to override
- else if not(is_from_contents)
+ else if (!is_from_contents)
return FALSE; // otherwise, only allow damage from contents
}
else if(autocvar_g_projectiles_damage == 1)
{
if(is_from_exception)
return (exception); // if exception is detected, allow it to override
- else if not(is_from_contents || is_from_owner)
+ else if (!(is_from_contents || is_from_owner))
return FALSE; // otherwise, only allow self damage and damage from contents
}
else if(autocvar_g_projectiles_damage == 2) // allow any damage, but override for exceptions
}
self.crylink_waitrelease = 0;
if(!w_crylink(WR_CHECKAMMO1) && !w_crylink(WR_CHECKAMMO2))
- if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+ if (!(self.items & IT_UNLIMITED_WEAPON_AMMO))
{
// ran out of ammo!
self.cnt = WEP_CRYLINK;
dt = frametime;
// if this weapon is reloadable, decrease its load. Else decrease the player's ammo
- if not(owner_player.items & IT_UNLIMITED_WEAPON_AMMO)
+ if (!(owner_player.items & IT_UNLIMITED_WEAPON_AMMO))
{
if(autocvar_g_balance_electro_primary_ammo)
{
}
// we aren't checking ammo during an attack, so we must do it here
- if not(weapon_action(self.weapon, WR_CHECKAMMO1) + weapon_action(self.weapon, WR_CHECKAMMO2))
+ if (!(weapon_action(self.weapon, WR_CHECKAMMO1) + weapon_action(self.weapon, WR_CHECKAMMO2)))
{
// note: this doesn't force the switch
W_SwitchToOtherWeapon(self);
}
else if (req == WR_RELOAD)
{
- if not(self.hagar_load) // require releasing loaded rockets first
+ if (!self.hagar_load) // require releasing loaded rockets first
W_Reload(min(autocvar_g_balance_hagar_primary_ammo, autocvar_g_balance_hagar_secondary_ammo), autocvar_g_balance_hagar_reload_ammo, autocvar_g_balance_hagar_reload_time, "weapons/reload.wav");
}
else if (req == WR_SUICIDEMESSAGE)
if (self.BUTTON_ATCK)
{
if (!weapon_action(self.weapon, WR_CHECKAMMO1))
- if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+ if (!(self.items & IT_UNLIMITED_WEAPON_AMMO))
{
W_SwitchWeapon_Force(self, w_getbestweapon(self));
w_ready();
if (self.BUTTON_ATCK || (!(self.items & IT_JETPACK) && self.BUTTON_HOOK))
{
if(!self.hook)
- if not(self.hook_state & HOOK_WAITING_FOR_RELEASE)
- if not(self.hook_state & HOOK_FIRING)
+ if (!(self.hook_state & HOOK_WAITING_FOR_RELEASE))
+ if (!(self.hook_state & HOOK_FIRING))
if (time > self.hook_refire)
if (weapon_prepareattack(0, -1))
{
self.hook_refire = max(self.hook_refire, time + autocvar_g_balance_hook_primary_refire * W_WeaponRateFactor());
// hook also inhibits health regeneration, but only for 1 second
- if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+ if (!(self.items & IT_UNLIMITED_WEAPON_AMMO))
self.pauseregen_finished = max(self.pauseregen_finished, time + autocvar_g_balance_pause_fuel_regen);
}
{
if ( time > self.hook_time_fueldecrease )
{
- if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+ if (!(self.items & IT_UNLIMITED_WEAPON_AMMO))
{
if ( self.ammo_fuel >= (time - self.hook_time_fueldecrease) * hooked_fuel )
{
if(autocvar_g_balance_minelayer_reload_ammo && self.clip_load < autocvar_g_balance_minelayer_ammo) // forced reload
{
// not if we're holding the minelayer without enough ammo, but can detonate existing mines
- if not (W_PlacedMines(FALSE) && self.ammo_rockets < autocvar_g_balance_minelayer_ammo)
+ if (!(W_PlacedMines(FALSE) && self.ammo_rockets < autocvar_g_balance_minelayer_ammo))
weapon_action(self.weapon, WR_RELOAD);
}
else if (self.BUTTON_ATCK)
if(self.BUTTON_ATCK2) // only eat ammo when the button is pressed
{
dt = min(dt, (1 - self.nex_charge) / autocvar_g_balance_nex_secondary_charge_rate);
- if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+ if (!(self.items & IT_UNLIMITED_WEAPON_AMMO))
{
// if this weapon is reloadable, decrease its load. Else decrease the player's ammo
if(autocvar_g_balance_nex_reload_ammo)
if (self.realowner.weapon == WEP_ROCKET_LAUNCHER)
{
if(self == self.realowner.lastrocket)
- if not(self.realowner.rl_release)
- if not(self.BUTTON_ATCK2)
+ if (!self.realowner.rl_release)
+ if (!self.BUTTON_ATCK2)
if(autocvar_g_balance_rocketlauncher_guiderate)
if(time > self.pushltime)
if(self.realowner.deadflag == DEAD_NO)
if(autocvar_g_balance_shotgun_reload_ammo && self.clip_load < autocvar_g_balance_shotgun_primary_ammo) // forced reload
{
// don't force reload an empty shotgun if its melee attack is active
- if not(autocvar_g_balance_shotgun_secondary && self.ammo_shells < autocvar_g_balance_shotgun_primary_ammo)
+ if (!(autocvar_g_balance_shotgun_secondary && self.ammo_shells < autocvar_g_balance_shotgun_primary_ammo))
weapon_action(self.weapon, WR_RELOAD);
}
else
}
}
- if not(self.tuba_note)
+ if (!self.tuba_note)
{
self.tuba_note = spawn();
self.tuba_note.owner = self.tuba_note.realowner = self;
if (self.BUTTON_ATCK)
{
if (!weapon_action(self.weapon, WR_CHECKAMMO2))
- if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+ if (!(self.items & IT_UNLIMITED_WEAPON_AMMO))
{
W_SwitchWeapon_Force(self, w_getbestweapon(self));
w_ready();
}
if (!weapon_action(self.weapon, WR_CHECKAMMO1))
- if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+ if (!(self.items & IT_UNLIMITED_WEAPON_AMMO))
{
W_SwitchWeapon_Force(self, w_getbestweapon(self));
w_ready();
if(weapon_prepareattack(1, 0))
{
if (!weapon_action(self.weapon, WR_CHECKAMMO2))
- if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+ if (!(self.items & IT_UNLIMITED_WEAPON_AMMO))
{
W_SwitchWeapon_Force(self, w_getbestweapon(self));
w_ready();
{
if(self.team != e.team)
return FALSE;
- if not(IS_PLAYER(e))
+ if (!IS_PLAYER(e))
return FALSE;
}
float f;
warpzone_warpzones_exist = 1;
- if not(self.enemy)
+ if (!self.enemy)
{
self.enemy = spawn();
self.enemy.classname = "warpzone_from";
return 0;
}
#endif
- if not(trace_ent)
+ if (!trace_ent)
return 0;
if (trace_ent == WarpZoneLib_BoxTouchesBrush_ent)
return 1;
o10 = o1 = WarpZone_TransformOrigin(wz, o0);
v1 = WarpZone_TransformVelocity(wz, v0);
- if not(IS_NOT_A_CLIENT(player))
+ if (!IS_NOT_A_CLIENT(player))
a1 = WarpZone_TransformVAngles(wz, player.v_angle);
else
a1 = WarpZone_TransformAngles(wz, a0);
save1 = self.target; self.target = string_null;
save2 = self.target3; self.target3 = string_null;
SUB_UseTargets();
- if not(self.target) self.target = save1;
- if not(self.target3) self.target3 = save2;
+ if (!self.target) self.target = save1;
+ if (!self.target3) self.target3 = save2;
oldself = self;
self = self.enemy;
save1 = self.target; self.target = string_null;
save2 = self.target2; self.target2 = string_null;
SUB_UseTargets();
- if not(self.target) self.target = save1;
- if not(self.target2) self.target2 = save2;
+ if (!self.target) self.target = save1;
+ if (!self.target2) self.target2 = save2;
self = oldself;
}
else
save1 = self.target; self.target = string_null;
save2 = self.target3; self.target3 = string_null;
SUB_UseTargets();
- if not(self.target) self.target = save1;
- if not(self.target3) self.target3 = save2;
+ if (!self.target) self.target = save1;
+ if (!self.target3) self.target3 = save2;
self = self.enemy;
save1 = self.target; self.target = string_null;
save2 = self.target2; self.target2 = string_null;
SUB_UseTargets();
- if not(self.target) self.target = save1;
- if not(self.target2) self.target2 = save2;
+ if (!self.target) self.target = save1;
+ if (!self.target2) self.target2 = save2;
self = oldself;
}
else
for(i_s = 0; ; ++i_s)
{
tex = getsurfacetexture(self, i_s);
- if not(tex)
+ if (!tex)
break; // this is beyond the last one
if(tex == "textures/common/trigger" || tex == "trigger")
continue;