flag.nextthink = time + FLAG_THINKRATE;
flag.ctf_status = FLAG_BASE;
- if(!flag.model) { flag.model = ((teamnumber) ? autocvar_g_ctf_flag_red_model : autocvar_g_ctf_flag_blue_model); }
- if(!flag.scale) { flag.scale = FLAG_SCALE; }
- if(!flag.skin) { flag.skin = ((teamnumber) ? autocvar_g_ctf_flag_red_skin : autocvar_g_ctf_flag_blue_skin); }
- if(!flag.toucheffect) { flag.toucheffect = ((teamnumber) ? "redflag_touch" : "blueflag_touch"); }
- if(!flag.passeffect) { flag.passeffect = ((teamnumber) ? "red_pass" : "blue_pass"); }
- if(!flag.capeffect) { flag.capeffect = ((teamnumber) ? "red_cap" : "blue_cap"); }
+
+ if(flag.model == "") { flag.model = ((teamnumber) ? autocvar_g_ctf_flag_red_model : autocvar_g_ctf_flag_blue_model); }
+ if(!flag.scale) { flag.scale = FLAG_SCALE; }
+ if(!flag.skin) { flag.skin = ((teamnumber) ? autocvar_g_ctf_flag_red_skin : autocvar_g_ctf_flag_blue_skin); }
+ if(flag.toucheffect == "") { flag.toucheffect = ((teamnumber) ? "redflag_touch" : "blueflag_touch"); }
+ if(flag.passeffect == "") { flag.passeffect = ((teamnumber) ? "red_pass" : "blue_pass"); }
+ if(flag.capeffect == "") { flag.capeffect = ((teamnumber) ? "red_cap" : "blue_cap"); }
// sound
- if(!flag.snd_flag_taken) { flag.snd_flag_taken = ((teamnumber) ? "ctf/red_taken.wav" : "ctf/blue_taken.wav"); }
- if(!flag.snd_flag_returned) { flag.snd_flag_returned = ((teamnumber) ? "ctf/red_returned.wav" : "ctf/blue_returned.wav"); }
- if(!flag.snd_flag_capture) { flag.snd_flag_capture = ((teamnumber) ? "ctf/red_capture.wav" : "ctf/blue_capture.wav"); } // blue team scores by capturing the red flag
- if(!flag.snd_flag_respawn) { flag.snd_flag_respawn = "ctf/flag_respawn.wav"; } // if there is ever a team-based sound for this, update the code to match.
- if(!flag.snd_flag_dropped) { flag.snd_flag_dropped = ((teamnumber) ? "ctf/red_dropped.wav" : "ctf/blue_dropped.wav"); }
- if(!flag.snd_flag_touch) { flag.snd_flag_touch = "ctf/touch.wav"; } // again has no team-based sound
- if(!flag.snd_flag_pass) { flag.snd_flag_pass = "ctf/pass.wav"; } // same story here
+ if(flag.snd_flag_taken == "") { flag.snd_flag_taken = ((teamnumber) ? "ctf/red_taken.wav" : "ctf/blue_taken.wav"); }
+ if(flag.snd_flag_returned == "") { flag.snd_flag_returned = ((teamnumber) ? "ctf/red_returned.wav" : "ctf/blue_returned.wav"); }
+ if(flag.snd_flag_capture == "") { flag.snd_flag_capture = ((teamnumber) ? "ctf/red_capture.wav" : "ctf/blue_capture.wav"); } // blue team scores by capturing the red flag
+ if(flag.snd_flag_respawn == "") { flag.snd_flag_respawn = "ctf/flag_respawn.wav"; } // if there is ever a team-based sound for this, update the code to match.
+ if(flag.snd_flag_dropped == "") { flag.snd_flag_dropped = ((teamnumber) ? "ctf/red_dropped.wav" : "ctf/blue_dropped.wav"); }
+ if(flag.snd_flag_touch == "") { flag.snd_flag_touch = "ctf/touch.wav"; } // again has no team-based sound
+ if(flag.snd_flag_pass == "") { flag.snd_flag_pass = "ctf/pass.wav"; } // same story here
// precache
precache_sound(flag.snd_flag_taken);
// balls += 4; // using the remaining bits to count balls will leave more than the max edict count, so it's fine
- if(!self.model)
+ if(self.model == "")
{
self.model = "models/nexball/ball.md3";
self.scale = 1.3;
if(!autocvar_g_nexball_sound_bounce)
self.noise = "";
- else if(!self.noise)
+ else if(self.noise == "")
self.noise = "sound/nexball/bounce.wav";
//bounce sound placeholder (FIXME)
- if(!self.noise1)
+ if(self.noise1 == "")
self.noise1 = "sound/nexball/drop.wav";
//ball drop sound placeholder (FIXME)
- if(!self.noise2)
+ if(self.noise2 == "")
self.noise2 = "sound/nexball/steal.wav";
//stealing sound placeholder (FIXME)
if(self.noise) precache_sound(self.noise);
}
EXACTTRIGGER_INIT;
self.classname = "nexball_goal";
- if(!self.noise)
+ if(self.noise == "")
self.noise = "ctf/respawn.wav";
precache_sound(self.noise);
self.touch = GoalTouch;
void spawnfunc_nexball_fault(void)
{
self.team = GOAL_FAULT;
- if(!self.noise)
+ if(self.noise == "")
self.noise = "misc/typehit.wav";
SpawnGoal();
}
void spawnfunc_nexball_out(void)
{
self.team = GOAL_OUT;
- if(!self.noise)
+ if(self.noise == "")
self.noise = "misc/typehit.wav";
SpawnGoal();
}
{
float i;
- if(!_for.superspec_itemfilter)
+ if(_for.superspec_itemfilter == "")
return TRUE;
if(_for.superspec_itemfilter == "")
return world; // entity is not an object
if(!permissions)
return trace_ent; // don't check permissions, anyone can edit this object
- if(!trace_ent.crypto_idfp)
+ 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)
return trace_ent; // object does not belong to the player, and players can only edit their own objects on this server
for(;;)
{
file_read = fgets(file_get);
- if(!file_read)
+ if(file_read == "")
break;
if(substring(file_read, 0, 2) == "//")
continue;
return TRUE;
}
self.object_flood = time + autocvar_g_sandbox_editor_flood;
- if(!argv(3)) // no object in clipboard
+ if(argv(3) == "") // no object in clipboard
{
print_to(self, "^1SANDBOX - WARNING: ^7No object in clipboard. You must copy an object before you can paste it");
return TRUE;
// ---------------- COMMAND: OBJECT, EDIT ----------------
case "object_edit":
- if(!argv(2))
+ if(argv(2) == "")
{
print_to(self, "^1SANDBOX - WARNING: ^7Too few parameters. You must specify a property to edit");
return TRUE;