Skip to content

Removed Radiation and Mine Zones (afghan and wasteland) #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions mod/maps/mp/gametypes/cj.gsc
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ onPlayerSpawned()
{
self waittill("spawned_player");

self thread RemoveFields();
self thread watch_player_buttons();
self thread watch_player_commands();
self thread replenish_ammo();
Expand Down Expand Up @@ -414,3 +415,39 @@ delete_unwanted_entities()
ents[i] delete ();
}
}

RemoveFields()
{
if(!isdefined(level.FieldsRemoved))
{
level.FieldsRemoved = false;
}
if(level.FieldsRemoved == true)
{
return;
}
level.FieldsRemoved = true;
minefields = getentarray("minefield", "targetname");
radiationFields = getentarray("radiation", "targetname");
for (i = 0; i < minefields.size; i++)
{
if (minefields[i])
{
self iPrintln("^3Removed " + minefields.size + " Minefields Fields");
minefields[i] delete();
wait .1;

}
}

for (i = 0; i < radiationFields.size; i++)
{
if (radiationFields[i])
{
self iPrintln("^3Removed " + radiationFields.size + " Radiation Fields");
radiationFields[i] delete();
wait .1;

}
}
}