Compare commits

..

No commits in common. "master" and "v1.05beta" have entirely different histories.

4 changed files with 42 additions and 110 deletions

View file

@ -294,17 +294,13 @@ void() changelevel_touch =
if (other.classname != "player")
return;
if ((cvar("noexit") == 1) || ((cvar("noexit") == 2) && (mapname != "start")))
if (cvar("noexit"))
{
T_Damage (other, self, self, 50000);
return;
}
if (coop || deathmatch)
{
bprint (other.netname);
bprint (" exited the level\n");
}
bprint (other.netname);
bprint (" exited the level\n");
nextmap = self.map;
@ -407,8 +403,6 @@ Returns the entity to spawn at
entity() SelectSpawnPoint =
{
local entity spot;
local entity thing;
local float pcount;
// testinfo_player_start is only found in regioned levels
spot = find (world, classname, "testplayerstart");
@ -426,29 +420,11 @@ entity() SelectSpawnPoint =
}
else if (deathmatch)
{
spot = lastspawn;
while (1)
{
spot = find(spot, classname, "info_player_deathmatch");
if (spot != world)
{
if (spot == lastspawn)
return lastspawn;
pcount = 0;
thing = findradius(spot.origin, 32);
while(thing)
{
if (thing.classname == "player")
pcount = pcount + 1;
thing = thing.chain;
}
if (pcount == 0)
{
lastspawn = spot;
return spot;
}
}
}
lastspawn = find(lastspawn, classname, "info_player_deathmatch");
if (lastspawn == world)
lastspawn = find (lastspawn, classname, "info_player_deathmatch");
if (lastspawn != world)
return lastspawn;
}
if (serverflags)
@ -480,8 +456,6 @@ void() PutClientInServer =
{
local entity spot;
spot = SelectSpawnPoint ();
self.classname = "player";
self.health = 100;
self.takedamage = DAMAGE_AIM;
@ -511,7 +485,7 @@ void() PutClientInServer =
// paustime is set by teleporters to keep the player from moving a while
self.pausetime = 0;
// spot = SelectSpawnPoint ();
spot = SelectSpawnPoint ();
self.origin = spot.origin + '0 0 1';
self.angles = spot.angles;
@ -611,22 +585,27 @@ void() NextLevel =
else if (!(serverflags & 1))
{
mapname = "e1m1";
serverflags = serverflags | 1;
serverflags = serverflags + 1;
}
else if (!(serverflags & 2))
{
mapname = "e2m1";
serverflags = serverflags | 2;
serverflags = serverflags + 2;
}
else if (!(serverflags & 4))
{
mapname = "e3m1";
serverflags = serverflags | 4;
serverflags = serverflags + 4;
}
else if (!(serverflags & 8))
{
mapname = "e4m1";
serverflags = serverflags - 7;
serverflags = serverflags + 8;
}
else
{
mapname = "start";
serverflags = serverflags - 15;
}
o = spawn();
@ -937,12 +916,6 @@ void() PlayerPreThink =
// teleporters can force a non-moving pause time
if (time < self.pausetime)
self.velocity = '0 0 0';
if(time > self.attack_finished && self.currentammo == 0 && self.weapon != IT_AXE)
{
self.weapon = W_BestWeapon ();
W_SetCurrentAmmo ();
}
};
/*

View file

@ -1,8 +0,0 @@
/*QUAKED item_deathball (.3 .3 1) (0 0 0) (32 32 32)
*/
void() deathball_touch;
void() item_deathball =
{
self.touch = deathball_touch;
};

View file

@ -1231,24 +1231,12 @@ void() BackpackTouch =
local string s;
local float best, old, new;
local entity stemp;
local float acount;
if (other.classname != "player")
return;
if (other.health <= 0)
return;
acount = 0;
sprint (other, "You get ");
if (self.items)
if ((other.items & self.items) == 0)
{
acount = 1;
sprint (other, "the ");
sprint (other, self.netname);
}
// if the player was using his best weapon, change up to the new one if better
stemp = self;
self = other;
@ -1261,49 +1249,37 @@ void() BackpackTouch =
other.ammo_rockets = other.ammo_rockets + self.ammo_rockets;
other.ammo_cells = other.ammo_cells + self.ammo_cells;
new = self.items;
if (!new)
new = other.weapon;
old = other.items;
new = self.items;
other.items = other.items | new;
bound_other_ammo ();
sprint (other, "You get ");
if (self.ammo_shells)
{
if (acount)
sprint(other, ", ");
acount = 1;
s = ftos(self.ammo_shells);
sprint (other, s);
sprint (other, " shells");
sprint (other, " shells ");
}
if (self.ammo_nails)
{
if (acount)
sprint(other, ", ");
acount = 1;
s = ftos(self.ammo_nails);
sprint (other, s);
sprint (other, " nails");
sprint (other, " nails ");
}
if (self.ammo_rockets)
{
if (acount)
sprint(other, ", ");
acount = 1;
s = ftos(self.ammo_rockets);
sprint (other, s);
sprint (other, " rockets");
sprint (other, " rockets ");
}
if (self.ammo_cells)
{
if (acount)
sprint(other, ", ");
acount = 1;
s = ftos(self.ammo_cells);
sprint (other, s);
sprint (other, " cells");
sprint (other, " cells ");
}
sprint (other, "\n");
@ -1340,24 +1316,6 @@ void() DropBackpack =
item.origin = self.origin - '0 0 24';
item.items = self.weapon;
if (item.items == IT_AXE)
item.netname = "Axe";
else if (item.items == IT_SHOTGUN)
item.netname = "Shotgun";
else if (item.items == IT_SUPER_SHOTGUN)
item.netname = "Double-barrelled Shotgun";
else if (item.items == IT_NAILGUN)
item.netname = "Nailgun";
else if (item.items == IT_SUPER_NAILGUN)
item.netname = "Super Nailgun";
else if (item.items == IT_GRENADE_LAUNCHER)
item.netname = "Grenade Launcher";
else if (item.items == IT_ROCKET_LAUNCHER)
item.netname = "Rocket Launcher";
else if (item.items == IT_LIGHTNING)
item.netname = "Thunderbolt";
else
item.netname = "";
item.ammo_shells = self.ammo_shells;
item.ammo_nails = self.ammo_nails;

View file

@ -479,8 +479,8 @@ void() W_FireLightning =
{
cells = self.ammo_cells;
self.ammo_cells = 0;
W_SetCurrentAmmo ();
T_RadiusDamage (self, self, 35*cells, world);
W_SetCurrentAmmo ();
return;
}
@ -830,16 +830,25 @@ float() W_BestWeapon =
it = self.items;
if (self.waterlevel <= 1 && self.ammo_cells >= 1 && (it & IT_LIGHTNING) )
return IT_LIGHTNING;
if(self.ammo_nails >= 2 && (it & IT_SUPER_NAILGUN) )
if(self.ammo_cells >= 1 && (it & IT_LIGHTNING) )
return IT_LIGHTNING;
else if(self.ammo_nails >= 2 && (it & IT_SUPER_NAILGUN) )
return IT_SUPER_NAILGUN;
if(self.ammo_shells >= 2 && (it & IT_SUPER_SHOTGUN) )
else if(self.ammo_shells >= 2 && (it & IT_SUPER_SHOTGUN) )
return IT_SUPER_SHOTGUN;
if(self.ammo_nails >= 1 && (it & IT_NAILGUN) )
else if(self.ammo_nails >= 1 && (it & IT_NAILGUN) )
return IT_NAILGUN;
if(self.ammo_shells >= 1 && (it & IT_SHOTGUN) )
else if(self.ammo_shells >= 1 && (it & IT_SHOTGUN) )
return IT_SHOTGUN;
/*
if(self.ammo_rockets >= 1 && (it & IT_ROCKET_LAUNCHER) )
return IT_ROCKET_LAUNCHER;
else if(self.ammo_rockets >= 1 && (it & IT_GRENADE_LAUNCHER) )
return IT_GRENADE_LAUNCHER;
*/
return IT_AXE;
};