|| (warmup_stage && autocvar_g_warmup_limit > 0 && warmup_timeleft < 300 && warmup_timeleft > 299))
{
//if we're in warmup mode, check whether there's a warmup timelimit
- if not(autocvar_g_warmup_limit == -1 && warmup_stage)
+ if(!(autocvar_g_warmup_limit == -1 && warmup_stage))
{
announcer_5min = TRUE;
Local_Notification(MSG_ANNCE, ANNCE_REMAINING_MIN_5);
|| (warmup_stage && autocvar_g_warmup_limit > 0 && warmup_timeleft < 60))
{
// if we're in warmup mode, check whether there's a warmup timelimit
- if not(autocvar_g_warmup_limit == -1 && warmup_stage)
+ if(!(autocvar_g_warmup_limit == -1 && warmup_stage))
{
announcer_1min = TRUE;
Local_Notification(MSG_ANNCE, ANNCE_REMAINING_MIN_1);
// TODO spawn particle effects and sounds based on w_deathtype
if(!DEATH_ISSPECIAL(w_deathtype))
- if not(hitplayer && !rad) // don't show ground impacts for hitscan weapons if a player was hit
+ if(!hitplayer || rad) // don't show ground impacts for hitscan weapons if a player was hit
{
float hitwep;
float GetPlayerColor(float i)
{
- if not(playerslots[i].gotscores) // unconnected
+ if(!playerslots[i].gotscores) // unconnected
return NUM_SPECTATOR;
else if(stof(getplayerkeyvalue(i, "frags")) == FRAGS_SPECTATOR)
return NUM_SPECTATOR;
{
if(!autocvar_hud_panel_powerups) return;
if(spectatee_status == -1) return;
- if not(getstati(STAT_ITEMS, 0, 24) & (IT_STRENGTH | IT_INVINCIBLE | IT_SUPERWEAPON)) return;
+ if(!(getstati(STAT_ITEMS, 0, 24) & (IT_STRENGTH | IT_INVINCIBLE | IT_SUPERWEAPON))) return;
if (getstati(STAT_HEALTH) <= 0) return;
strength_time = bound(0, getstatf(STAT_STRENGTH_FINISHED) - time, 99);
float f; // yet another function has this
score = me.(scores[ps_primary]);
- if not((scores_flags[ps_primary] & SFL_TIME) && !teamplay) // race/cts record display on HUD
+ if(!(scores_flags[ps_primary] & SFL_TIME) || teamplay) // race/cts record display on HUD
return; // no records in the actual race
// clientside personal record
#else
if(ent.sv_entnum == player_localentnum) // ent is me or person i'm spectating
#endif
- if not (autocvar_hud_shownames_self && autocvar_chase_active)
+ if(!(autocvar_hud_shownames_self && autocvar_chase_active))
return;
makevectors(view_angles);
#ifdef IMPLEMENTATION
void HUDSetup_Check_Gamestatus(entity me, entity btn)
{
- if not(gamestatus & (GAME_CONNECTED | GAME_ISSERVER)) // we're not in a match, ask the player if they want to start one anyway
+ if(!(gamestatus & (GAME_CONNECTED | GAME_ISSERVER))) // we're not in a match, ask the player if they want to start one anyway
{
DialogOpenButton_Click(me, main.hudconfirmDialog);
}
e.onClick = Dialog_Close;
e.onClickEntity = me;
}
-#endif
\ No newline at end of file
+#endif
{
print("cannot reach me: ", etos(e), " ", vtos(e.origin), "\n");
e.colormod_x = 8;
- if not(e.effects & EF_NODEPTHTEST) // not already reported before
+ if(!(e.effects & EF_NODEPTHTEST)) // not already reported before
++m;
e.effects |= EF_NODEPTHTEST | EF_RED;
++i;
if(IS_CLIENT(self))
{
if(teamplay)
- if not(self.team_forced > 0)
+ if(self.team_forced <= 0)
if (!lockteams)
{
float selection;
client = GetFilteredEntity(t);
accepted = VerifyClientEntity(client, TRUE, FALSE);
- if not(accepted > 0)
+ if(accepted <= 0)
{
print("adminmsg: ", GetClientErrorString(accepted, t), (targets ? ", skipping to next player.\n" : ".\n"));
continue;
client = GetFilteredEntity(t);
accepted = VerifyClientEntity(client, FALSE, FALSE);
- if not(accepted > 0)
+ if(accepted <= 0)
{
print("moveplayer: ", GetClientErrorString(accepted, t), (targets ? ", skipping to next player.\n" : ".\n"));
continue;
client = GetIndexedEntity(argc, 2);
accepted = VerifyClientEntity(client, FALSE, TRUE);
- if not(accepted > 0)
+ if(accepted <= 0)
{
print("playerdemo: read: ", GetClientErrorString(accepted, argv(2)), ".\n");
return;
client = GetIndexedEntity(argc, 2);
accepted = VerifyClientEntity(client, FALSE, FALSE);
- if not(accepted > 0)
+ if(accepted <= 0)
{
print("playerdemo: write: ", GetClientErrorString(accepted, argv(2)), ".\n");
return;
case CMD_REQUEST_COMMAND:
{
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_selection != VOTE_SELECT_NULL && !autocvar_sv_vote_change) { print_to(caller, "^1You have already voted."); }
else // everything went okay, continue changing vote
{
vote_command = VoteCommand_extractcommand(vote_command, 2, argc);
- if not(autocvar_sv_vote_call || !caller) { print_to(caller, "^1Vote calling is not allowed."); }
+ if(!autocvar_sv_vote_call && caller) { print_to(caller, "^1Vote calling is not allowed."); }
else if(!autocvar_sv_vote_gamestart && time < game_starttime) { print_to(caller, "^1Vote calling is not allowed before the match has started."); }
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."); }
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 if (!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
{
case "login":
{
- if not(autocvar_sv_vote_master_password != "") { print_to(caller, "^1Login to vote master is not allowed."); }
+ if(autocvar_sv_vote_master_password == "") { print_to(caller, "^1Login to vote master is not allowed."); }
else if(caller.vote_master) { print_to(caller, "^1You are already logged in as vote master."); }
- else if not(autocvar_sv_vote_master_password == argv(3)) { print_to(caller, strcat("Rejected vote master login from ", GetCallerName(caller))); }
+ else if(autocvar_sv_vote_master_password != argv(3)) { print_to(caller, strcat("Rejected vote master login from ", GetCallerName(caller))); }
else // everything went okay, proceed with giving this player master privilages
{
case CMD_REQUEST_COMMAND:
{
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_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); }
else // everything went okay, continue changing vote
case CMD_REQUEST_COMMAND:
{
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_selection != VOTE_SELECT_NULL && autocvar_sv_vote_change) { print_to(caller, "^1You have already voted."); }
else // everything went okay, continue changing vote
{
void adaptor_think2use_hittype_splash() // for timed projectile detonation
{
- if not(self.flags & FL_ONGROUND) // if onground, we ARE touching something, but HITTYPE_SPLASH is to be networked if the damage causing projectile is not touching ANYTHING
+ if(!(self.flags & FL_ONGROUND)) // if onground, we ARE touching something, but HITTYPE_SPLASH is to be networked if the damage causing projectile is not touching ANYTHING
self.projectiledeathtype |= HITTYPE_SPLASH;
adaptor_think2use();
}
float randombit(float bits)
{
- if not(bits & (bits-1)) // this ONLY holds for powers of two!
+ if(!(bits & (bits-1))) // this ONLY holds for powers of two!
return bits;
float n, f, b, r;
entity s;
if(gameover)
- if not(g_lms && scorefield == SP_LMS_RANK) // allow writing to this field in intermission as it is needed for newly joining players
+ if(!(g_lms && scorefield == SP_LMS_RANK)) // allow writing to this field in intermission as it is needed for newly joining players
score = 0;
if(!scores_initialized) return 0; // FIXME remove this when everything uses this system
if(autocvar_g_vehicle_bumblebee_health_regen)
self.vehicle_flags |= VHF_HEALTHREGEN;
- if not(vehicle_initialize(
+ if(!vehicle_initialize(
"Bumblebee", "models/vehicles/bumblebee_body.dpm",
"", "models/vehicles/spiderbot_cockpit.dpm", "", "", "tag_viewport",
HUD_BUMBLEBEE, BUMB_MIN, BUMB_MAX, FALSE,
if(autocvar_g_vehicle_racer_health_regen)
self.vehicle_flags |= VHF_HEALTHREGEN;
- if not (vehicle_initialize(
+ if(!vehicle_initialize(
"Wakizashi",
"models/vehicles/wakizashi.dpm",
"null", // we need this so tur_head is networked and usable for sounds
precache_sound ("vehicles/raptor_speed.wav");
precache_sound ("vehicles/missile_alarm.wav");
- if not (vehicle_initialize(
+ if(!vehicle_initialize(
"Raptor",
"models/vehicles/raptor.dpm",
"",
if(autocvar_g_vehicle_spiderbot_health_regen)
self.vehicle_flags |= VHF_HEALTHREGEN;
- if not (vehicle_initialize(
+ if(!vehicle_initialize(
"Spiderbot",
"models/vehicles/spiderbot.dpm",
"models/vehicles/spiderbot_top.dpm",
if(trace_ent.deadflag != DEAD_NO)
trace_ent = world;
- if not (trace_ent.vehicle_flags & VHF_ISVEHICLE ||
+ if(!trace_ent.vehicle_flags & VHF_ISVEHICLE ||
trace_ent.turrcaps_flags & TFL_TURRCAPS_ISTURRET ||
trace_ent.takedamage == DAMAGE_TARGETDRONE)
trace_ent = world;
// Find all non-hit players the beam passed close by
if(deathtype == WEP_MINSTANEX || deathtype == WEP_NEX)
{
- FOR_EACH_REALCLIENT(msg_entity) if(msg_entity != self) if(!msg_entity.railgunhit) if not(IS_SPEC(msg_entity) && msg_entity.enemy == self) // we use realclient, so spectators can hear the whoosh too
+ FOR_EACH_REALCLIENT(msg_entity)
+ if(msg_entity != self)
+ if(!msg_entity.railgunhit)
+ if(!(IS_SPEC(msg_entity) && msg_entity.enemy == self)) // we use realclient, so spectators can hear the whoosh too
{
// nearest point on the beam
beampos = start + dir * bound(0, (msg_entity.origin - start) * dir, length);