Compare commits
No commits in common. "6bca60e74a2a4a278b23ec499ad007dba9c3ac10" and "df8107d247d241c929caf44846fefacf8376936c" have entirely different histories.
6bca60e74a
...
df8107d247
|
@ -316,7 +316,6 @@ void() become_spectator = {
|
|||
self.flags |= FL_NOTARGET;
|
||||
self.deadflag = DEAD_DEAD;
|
||||
self.view_ofs = VEC_ORIGIN;
|
||||
self.frame = 0;
|
||||
self.modelindex = modelindex_eyes;
|
||||
W_SetCurrentAmmo();
|
||||
};
|
||||
|
@ -1080,10 +1079,10 @@ void() cheat = {
|
|||
return;
|
||||
}
|
||||
|
||||
self.ammo_cells = AMMAX_CELLS;
|
||||
self.ammo_nails = AMMAX_NAILS;
|
||||
self.ammo_rockets = AMMAX_ROCKETS;
|
||||
self.ammo_shells = AMMAX_SHELLS;
|
||||
self.ammo_rockets = 100;
|
||||
self.ammo_nails = 200;
|
||||
self.ammo_shells = 100;
|
||||
self.ammo_cells = 200;
|
||||
|
||||
self.items |= IT_AXE |
|
||||
IT_SHOTGUN |
|
||||
|
@ -1394,7 +1393,7 @@ float(entity targ, entity attacker) obit_monster = {
|
|||
|
||||
float(entity targ, entity attacker) obit_falling = {
|
||||
if(targ.deathtype == "falling") {
|
||||
targ.deathtype = string_null;
|
||||
targ.deathtype = "";
|
||||
if(targ.pronoun == PRO_NONE) {
|
||||
bprint(" hit the ground too hard\n");
|
||||
} else {
|
||||
|
|
|
@ -1,15 +1,11 @@
|
|||
// combat.qc: entity-entity damage functions
|
||||
|
||||
float(entity targ, entity attacker) SameTeam = {
|
||||
return targ != attacker &&
|
||||
targ.team > 0 &&
|
||||
targ.team == attacker.team;
|
||||
return targ.team > 0 && targ.team == attacker.team;
|
||||
};
|
||||
|
||||
float(entity targ, entity attacker) BothPlayers = {
|
||||
return targ != attacker &&
|
||||
targ.classname == "player" &&
|
||||
attacker.classname == "player";
|
||||
return targ.classname == "player" && attacker.classname == "player";
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -275,11 +275,6 @@ const vector VEC_ORIGIN = '0 0 0';
|
|||
|
||||
const float BODYQUE_MAX = 16;
|
||||
|
||||
const float AMMAX_CELLS = 100;
|
||||
const float AMMAX_NAILS = 200;
|
||||
const float AMMAX_ROCKETS = 100;
|
||||
const float AMMAX_SHELLS = 100;
|
||||
|
||||
const string WEPNAME_AXE = "Axe";
|
||||
const string WEPNAME_SHOTGUN = "Shotgun";
|
||||
const string WEPNAME_SUPER_SHOTGUN = "Double-barrelled Shotgun";
|
||||
|
@ -559,25 +554,11 @@ enum {
|
|||
};
|
||||
|
||||
enum {
|
||||
AMTYPE_SHELLS = 1,
|
||||
AMTYPE_NAILS,
|
||||
AMTYPE_ROCKETS,
|
||||
AMTYPE_CELLS,
|
||||
};
|
||||
|
||||
enum {
|
||||
SIGIL_1 = 1,
|
||||
SIGIL_2 = 2,
|
||||
SIGIL_3 = 4,
|
||||
SIGIL_4 = 8,
|
||||
};
|
||||
|
||||
enum {
|
||||
SF_CHEATS = 1,
|
||||
SF_CHEATS = 1 << 0,
|
||||
SF_LIVES_BEG = 1,
|
||||
SF_LIVES_END = 3,
|
||||
SF_LIVES_MSK = 14,
|
||||
SF_DIST_AMMO = 16,
|
||||
SF_LIVES_MSK = 0x0E,
|
||||
SF_DIST_AMMO = 1 << 4,
|
||||
};
|
||||
#pragma noref 0
|
||||
|
||||
|
|
|
@ -128,9 +128,9 @@ void() door_fire = {
|
|||
void() door_use = {
|
||||
entity oself;
|
||||
|
||||
self.message = string_null; // door message are for touch only
|
||||
self.owner.message = string_null;
|
||||
self.enemy.message = string_null;
|
||||
self.message = ""; // door message are for touch only
|
||||
self.owner.message = "";
|
||||
self.enemy.message = "";
|
||||
oself = self;
|
||||
self = self.owner;
|
||||
door_fire();
|
||||
|
@ -181,7 +181,7 @@ void() door_touch = {
|
|||
|
||||
self.owner.attack_finished = time + 2;
|
||||
|
||||
if(self.owner.message != string_null) {
|
||||
if(self.owner.message != "") {
|
||||
centerprint(other, self.owner.message);
|
||||
sound(other, CHAN_VOICE, "misc/talk.wav", 1, ATTN_NORM);
|
||||
}
|
||||
|
@ -287,7 +287,7 @@ void() LinkDoors = {
|
|||
if(self.targetname) {
|
||||
starte.targetname = self.targetname;
|
||||
}
|
||||
if(self.message != string_null) {
|
||||
if(self.message != "") {
|
||||
starte.message = self.message;
|
||||
}
|
||||
t = find(t, classname, self.classname);
|
||||
|
|
336
source/items.qc
336
source/items.qc
|
@ -97,13 +97,16 @@ HEALTH BOX
|
|||
// "ignore" will ignore max_health limit
|
||||
//
|
||||
float(entity e, float healamount, float ignore) T_Heal = {
|
||||
if(e.health <= 0 || (!ignore && e.health >= other.max_health)) {
|
||||
if(e.health <= 0) {
|
||||
return 0;
|
||||
}
|
||||
if((!ignore) && (e.health >= other.max_health)) {
|
||||
return 0;
|
||||
}
|
||||
healamount = ceil(healamount);
|
||||
|
||||
e.health = e.health + healamount;
|
||||
if(!ignore && e.health >= other.max_health) {
|
||||
if((!ignore) && (e.health >= other.max_health)) {
|
||||
e.health = other.max_health;
|
||||
}
|
||||
|
||||
|
@ -158,11 +161,16 @@ void() health_touch = {
|
|||
}
|
||||
|
||||
if(self.healtype == 2) { // Megahealth? Ignore max_health...
|
||||
if(other.health >= 250 || !T_Heal(other, self.healamount, TRUE)) {
|
||||
if(other.health >= 250) {
|
||||
return;
|
||||
}
|
||||
if(!T_Heal(other, self.healamount, 1)) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if(!T_Heal(other, self.healamount, 0)) {
|
||||
return;
|
||||
}
|
||||
} else if(!T_Heal(other, self.healamount, FALSE)) {
|
||||
return;
|
||||
}
|
||||
|
||||
sprint(other, "You receive ", ftos(self.healamount), " health\n");
|
||||
|
@ -224,28 +232,28 @@ ARMOR
|
|||
void() armor_touch = {
|
||||
float type, value, bit;
|
||||
|
||||
if(other.health <= 0 || other.classname != "player") {
|
||||
if(other.health <= 0) {
|
||||
return;
|
||||
}
|
||||
if(other.classname != "player") {
|
||||
return;
|
||||
}
|
||||
|
||||
switch(self.classname) {
|
||||
case "item_armor1":
|
||||
type = 0.3;
|
||||
value = 100;
|
||||
bit = IT_ARMOR1;
|
||||
break;
|
||||
case "item_armor2":
|
||||
type = 0.6;
|
||||
value = 150;
|
||||
bit = IT_ARMOR2;
|
||||
break;
|
||||
case "item_armorInv":
|
||||
type = 0.8;
|
||||
value = 200;
|
||||
bit = IT_ARMOR3;
|
||||
break;
|
||||
if(self.classname == "item_armor1") {
|
||||
type = 0.3;
|
||||
value = 100;
|
||||
bit = IT_ARMOR1;
|
||||
}
|
||||
if(self.classname == "item_armor2") {
|
||||
type = 0.6;
|
||||
value = 150;
|
||||
bit = IT_ARMOR2;
|
||||
}
|
||||
if(self.classname == "item_armorInv") {
|
||||
type = 0.8;
|
||||
value = 200;
|
||||
bit = IT_ARMOR3;
|
||||
}
|
||||
|
||||
if(other.armortype * other.armorvalue >= type * value) {
|
||||
return;
|
||||
}
|
||||
|
@ -315,32 +323,42 @@ WEAPONS
|
|||
===============================================================================
|
||||
*/
|
||||
|
||||
void(entity e) bound_ammo = {
|
||||
if(e.ammo_shells > AMMAX_SHELLS) {
|
||||
e.ammo_shells = AMMAX_SHELLS;
|
||||
void() bound_other_ammo = {
|
||||
if(other.ammo_shells > 100) {
|
||||
other.ammo_shells = 100;
|
||||
}
|
||||
if(e.ammo_nails > AMMAX_NAILS) {
|
||||
e.ammo_nails = AMMAX_NAILS;
|
||||
if(other.ammo_nails > 200) {
|
||||
other.ammo_nails = 200;
|
||||
}
|
||||
if(e.ammo_rockets > AMMAX_ROCKETS) {
|
||||
e.ammo_rockets = AMMAX_ROCKETS;
|
||||
if(other.ammo_rockets > 100) {
|
||||
other.ammo_rockets = 100;
|
||||
}
|
||||
if(e.ammo_cells > AMMAX_CELLS) {
|
||||
e.ammo_cells = AMMAX_CELLS;
|
||||
if(other.ammo_cells > 100) {
|
||||
other.ammo_cells = 100;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
float(float w) RankForWeapon = {
|
||||
switch(w) {
|
||||
case IT_LIGHTNING: return 1;
|
||||
case IT_ROCKET_LAUNCHER: return 2;
|
||||
case IT_SUPER_NAILGUN: return 3;
|
||||
case IT_GRENADE_LAUNCHER: return 4;
|
||||
case IT_SUPER_SHOTGUN: return 5;
|
||||
case IT_NAILGUN: return 6;
|
||||
default: return 7;
|
||||
if(w == IT_LIGHTNING) {
|
||||
return 1;
|
||||
}
|
||||
if(w == IT_ROCKET_LAUNCHER) {
|
||||
return 2;
|
||||
}
|
||||
if(w == IT_SUPER_NAILGUN) {
|
||||
return 3;
|
||||
}
|
||||
if(w == IT_GRENADE_LAUNCHER) {
|
||||
return 4;
|
||||
}
|
||||
if(w == IT_SUPER_SHOTGUN) {
|
||||
return 5;
|
||||
}
|
||||
if(w == IT_NAILGUN) {
|
||||
return 6;
|
||||
}
|
||||
return 7;
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -375,66 +393,62 @@ void() weapon_touch = {
|
|||
return;
|
||||
}
|
||||
|
||||
// if the player was using their best weapon, change up to the new one if
|
||||
// better
|
||||
// if the player was using their best weapon, change up to the new one if better
|
||||
stemp = self;
|
||||
self = other;
|
||||
best = W_BestWeapon();
|
||||
self = stemp;
|
||||
|
||||
leave = (deathmatch == 2 || coop);
|
||||
if(deathmatch == 2 || coop) {
|
||||
leave = 1;
|
||||
} else {
|
||||
leave = 0;
|
||||
}
|
||||
|
||||
switch(self.classname) {
|
||||
case "weapon_nailgun":
|
||||
if(leave && other.items & IT_NAILGUN) {
|
||||
return;
|
||||
}
|
||||
hadammo = other.ammo_nails;
|
||||
new = IT_NAILGUN;
|
||||
other.ammo_nails = other.ammo_nails + 30;
|
||||
break;
|
||||
case "weapon_supernailgun":
|
||||
if(leave && other.items & IT_SUPER_NAILGUN) {
|
||||
return;
|
||||
}
|
||||
hadammo = other.ammo_rockets;
|
||||
new = IT_SUPER_NAILGUN;
|
||||
other.ammo_nails = other.ammo_nails + 30;
|
||||
break;
|
||||
case "weapon_supershotgun":
|
||||
if(leave && other.items & IT_SUPER_SHOTGUN) {
|
||||
return;
|
||||
}
|
||||
hadammo = other.ammo_rockets;
|
||||
new = IT_SUPER_SHOTGUN;
|
||||
other.ammo_shells = other.ammo_shells + 5;
|
||||
break;
|
||||
case "weapon_rocketlauncher":
|
||||
if(leave && other.items & IT_ROCKET_LAUNCHER) {
|
||||
return;
|
||||
}
|
||||
hadammo = other.ammo_rockets;
|
||||
new = IT_ROCKET_LAUNCHER;
|
||||
other.ammo_rockets = other.ammo_rockets + 5;
|
||||
break;
|
||||
case "weapon_grenadelauncher":
|
||||
if(leave && other.items & IT_GRENADE_LAUNCHER) {
|
||||
return;
|
||||
}
|
||||
hadammo = other.ammo_rockets;
|
||||
new = IT_GRENADE_LAUNCHER;
|
||||
other.ammo_rockets = other.ammo_rockets + 5;
|
||||
break;
|
||||
case "weapon_lightning":
|
||||
if(leave && other.items & IT_LIGHTNING) {
|
||||
return;
|
||||
}
|
||||
hadammo = other.ammo_rockets;
|
||||
new = IT_LIGHTNING;
|
||||
other.ammo_cells = other.ammo_cells + 15;
|
||||
break;
|
||||
default:
|
||||
objerror("weapon_touch: unknown classname");
|
||||
if(self.classname == "weapon_nailgun") {
|
||||
if(leave && (other.items & IT_NAILGUN)) {
|
||||
return;
|
||||
}
|
||||
hadammo = other.ammo_nails;
|
||||
new = IT_NAILGUN;
|
||||
other.ammo_nails = other.ammo_nails + 30;
|
||||
} else if(self.classname == "weapon_supernailgun") {
|
||||
if(leave && (other.items & IT_SUPER_NAILGUN)) {
|
||||
return;
|
||||
}
|
||||
hadammo = other.ammo_rockets;
|
||||
new = IT_SUPER_NAILGUN;
|
||||
other.ammo_nails = other.ammo_nails + 30;
|
||||
} else if(self.classname == "weapon_supershotgun") {
|
||||
if(leave && (other.items & IT_SUPER_SHOTGUN)) {
|
||||
return;
|
||||
}
|
||||
hadammo = other.ammo_rockets;
|
||||
new = IT_SUPER_SHOTGUN;
|
||||
other.ammo_shells = other.ammo_shells + 5;
|
||||
} else if(self.classname == "weapon_rocketlauncher") {
|
||||
if(leave && (other.items & IT_ROCKET_LAUNCHER)) {
|
||||
return;
|
||||
}
|
||||
hadammo = other.ammo_rockets;
|
||||
new = IT_ROCKET_LAUNCHER;
|
||||
other.ammo_rockets = other.ammo_rockets + 5;
|
||||
} else if(self.classname == "weapon_grenadelauncher") {
|
||||
if(leave && (other.items & IT_GRENADE_LAUNCHER)) {
|
||||
return;
|
||||
}
|
||||
hadammo = other.ammo_rockets;
|
||||
new = IT_GRENADE_LAUNCHER;
|
||||
other.ammo_rockets = other.ammo_rockets + 5;
|
||||
} else if(self.classname == "weapon_lightning") {
|
||||
if(leave && (other.items & IT_LIGHTNING)) {
|
||||
return;
|
||||
}
|
||||
hadammo = other.ammo_rockets;
|
||||
new = IT_LIGHTNING;
|
||||
other.ammo_cells = other.ammo_cells + 15;
|
||||
} else {
|
||||
objerror("weapon_touch: unknown classname");
|
||||
}
|
||||
|
||||
sprint(other, "You got the ", self.netname, "\n");
|
||||
|
@ -442,7 +456,7 @@ void() weapon_touch = {
|
|||
sound(other, CHAN_ITEM, "weapons/pkup.wav", 1, ATTN_NORM);
|
||||
stuffcmd(other, "bf\n");
|
||||
|
||||
bound_ammo(other);
|
||||
bound_other_ammo();
|
||||
|
||||
// change to the weapon
|
||||
old = other.items;
|
||||
|
@ -566,66 +580,65 @@ AMMO
|
|||
===============================================================================
|
||||
*/
|
||||
|
||||
void(.float ammo, float max) distribute_ammo = {
|
||||
entity pl, stemp;
|
||||
|
||||
if(sf_dist_ammo) {
|
||||
pl = find(world, classname, "player");
|
||||
while(pl != world) {
|
||||
pl.ammo += self.aflag;
|
||||
bound_ammo(pl);
|
||||
stemp = self;
|
||||
self = pl;
|
||||
W_SetCurrentAmmo();
|
||||
self = stemp;
|
||||
pl = find(pl, classname, "player");
|
||||
}
|
||||
} else {
|
||||
if(other.ammo >= max) {
|
||||
return;
|
||||
}
|
||||
other.ammo += self.aflag;
|
||||
bound_ammo(other);
|
||||
}
|
||||
};
|
||||
|
||||
void() ammo_touch = {
|
||||
entity stemp;
|
||||
float best;
|
||||
|
||||
if(other.classname != "player" || other.health <= 0) {
|
||||
if(other.classname != "player") {
|
||||
return;
|
||||
}
|
||||
if(other.health <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
// if the player was using their best weapon, change up to the new one if
|
||||
// better
|
||||
// if the player was using their best weapon, change up to the new one if better
|
||||
stemp = self;
|
||||
self = other;
|
||||
best = W_BestWeapon();
|
||||
self = stemp;
|
||||
|
||||
switch(self.weapon) {
|
||||
case AMTYPE_SHELLS:
|
||||
distribute_ammo(ammo_shells, AMMAX_SHELLS);
|
||||
break;
|
||||
case AMTYPE_NAILS:
|
||||
distribute_ammo(ammo_nails, AMMAX_NAILS);
|
||||
break;
|
||||
case AMTYPE_ROCKETS:
|
||||
distribute_ammo(ammo_rockets, AMMAX_ROCKETS);
|
||||
break;
|
||||
case AMTYPE_CELLS:
|
||||
distribute_ammo(ammo_cells, AMMAX_CELLS);
|
||||
break;
|
||||
|
||||
// shotgun
|
||||
if(self.weapon == 1) {
|
||||
if(other.ammo_shells >= 100) {
|
||||
return;
|
||||
}
|
||||
other.ammo_shells = other.ammo_shells + self.aflag;
|
||||
}
|
||||
|
||||
sprint(other, "You got the ", self.netname, "\n");
|
||||
// spikes
|
||||
if(self.weapon == 2) {
|
||||
if(other.ammo_nails >= 200) {
|
||||
return;
|
||||
}
|
||||
other.ammo_nails = other.ammo_nails + self.aflag;
|
||||
}
|
||||
|
||||
// rockets
|
||||
if(self.weapon == 3) {
|
||||
if(other.ammo_rockets >= 100) {
|
||||
return;
|
||||
}
|
||||
other.ammo_rockets = other.ammo_rockets + self.aflag;
|
||||
}
|
||||
|
||||
// cells
|
||||
if(self.weapon == 4) {
|
||||
if(other.ammo_cells >= 100) {
|
||||
return;
|
||||
}
|
||||
other.ammo_cells = other.ammo_cells + self.aflag;
|
||||
}
|
||||
|
||||
bound_other_ammo();
|
||||
|
||||
sprint(other, "You got the ", self.netname, "\n");
|
||||
// ammo touch sound
|
||||
sound(other, CHAN_ITEM, "weapons/lock4.wav", 1, ATTN_NORM);
|
||||
stuffcmd(other, "bf\n");
|
||||
|
||||
// change to a better weapon if appropriate
|
||||
|
||||
if(other.weapon == best) {
|
||||
stemp = self;
|
||||
self = other;
|
||||
|
@ -746,9 +759,13 @@ void() key_touch = {
|
|||
entity stemp;
|
||||
float best;
|
||||
|
||||
if(other.classname != "player" ||
|
||||
other.health <= 0 ||
|
||||
other.items & self.items) {
|
||||
if(other.classname != "player") {
|
||||
return;
|
||||
}
|
||||
if(other.health <= 0) {
|
||||
return;
|
||||
}
|
||||
if(other.items & self.items) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -867,7 +884,10 @@ void() sigil_touch = {
|
|||
entity stemp;
|
||||
float best;
|
||||
|
||||
if(other.classname != "player" || other.health <= 0) {
|
||||
if(other.classname != "player") {
|
||||
return;
|
||||
}
|
||||
if(other.health <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -878,7 +898,7 @@ void() sigil_touch = {
|
|||
self.solid = SOLID_NOT;
|
||||
self.model = string_null;
|
||||
serverflags = serverflags | (self.spawnflags & 15);
|
||||
self.classname = string_null; // so rune doors won't find it
|
||||
self.classname = ""; // so rune doors won't find it
|
||||
|
||||
activator = other;
|
||||
SUB_UseTargets(); // fire all targets / killtargets
|
||||
|
@ -897,19 +917,19 @@ void() item_sigil = {
|
|||
precache_sound("misc/runekey.wav");
|
||||
self.noise = "misc/runekey.wav";
|
||||
|
||||
if(self.spawnflags & SIGIL_1) {
|
||||
if(self.spawnflags & 1) {
|
||||
precache_model("progs/end1.mdl");
|
||||
setmodel(self, "progs/end1.mdl");
|
||||
}
|
||||
if(self.spawnflags & SIGIL_2) {
|
||||
if(self.spawnflags & 2) {
|
||||
precache_model2("progs/end2.mdl");
|
||||
setmodel(self, "progs/end2.mdl");
|
||||
}
|
||||
if(self.spawnflags & SIGIL_3) {
|
||||
if(self.spawnflags & 4) {
|
||||
precache_model2("progs/end3.mdl");
|
||||
setmodel(self, "progs/end3.mdl");
|
||||
}
|
||||
if(self.spawnflags & SIGIL_4) {
|
||||
if(self.spawnflags & 8) {
|
||||
precache_model2("progs/end4.mdl");
|
||||
setmodel(self, "progs/end4.mdl");
|
||||
}
|
||||
|
@ -931,7 +951,10 @@ void() powerup_touch = {
|
|||
entity stemp;
|
||||
float best;
|
||||
|
||||
if(other.classname != "player" || other.health <= 0) {
|
||||
if(other.classname != "player") {
|
||||
return;
|
||||
}
|
||||
if(other.health <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -939,8 +962,8 @@ void() powerup_touch = {
|
|||
|
||||
if(deathmatch) {
|
||||
self.mdl = self.model;
|
||||
if(self.classname == "item_artifact_invulnerability" ||
|
||||
self.classname == "item_artifact_invisibility") {
|
||||
if((self.classname == "item_artifact_invulnerability") ||
|
||||
(self.classname == "item_artifact_invisibility")) {
|
||||
self.nextthink = time + 60 * 5;
|
||||
} else {
|
||||
self.nextthink = time + 60;
|
||||
|
@ -1081,18 +1104,17 @@ void() BackpackTouch = {
|
|||
sprint(other, "the ", self.netname);
|
||||
}
|
||||
|
||||
// if the player was using their best weapon, change up to the new one if
|
||||
// better
|
||||
// if the player was using their best weapon, change up to the new one if better
|
||||
stemp = self;
|
||||
self = other;
|
||||
best = W_BestWeapon();
|
||||
self = stemp;
|
||||
|
||||
// change weapons
|
||||
other.ammo_shells = other.ammo_shells + self.ammo_shells;
|
||||
other.ammo_nails = other.ammo_nails + self.ammo_nails;
|
||||
other.ammo_shells = other.ammo_shells + self.ammo_shells;
|
||||
other.ammo_nails = other.ammo_nails + self.ammo_nails;
|
||||
other.ammo_rockets = other.ammo_rockets + self.ammo_rockets;
|
||||
other.ammo_cells = other.ammo_cells + self.ammo_cells;
|
||||
other.ammo_cells = other.ammo_cells + self.ammo_cells;
|
||||
|
||||
new = self.items;
|
||||
if(!new) {
|
||||
|
@ -1101,7 +1123,7 @@ void() BackpackTouch = {
|
|||
old = other.items;
|
||||
other.items = other.items | new;
|
||||
|
||||
bound_ammo(other);
|
||||
bound_other_ammo();
|
||||
|
||||
if(self.ammo_shells) {
|
||||
if(acount) {
|
||||
|
@ -1204,14 +1226,14 @@ entity() DropBackpack = {
|
|||
item.netname = WEPNAME_LIGHTNING;
|
||||
break;
|
||||
default:
|
||||
item.netname = string_null;
|
||||
item.netname = "";
|
||||
break;
|
||||
}
|
||||
|
||||
item.ammo_shells = self.ammo_shells;
|
||||
item.ammo_nails = self.ammo_nails;
|
||||
item.ammo_shells = self.ammo_shells;
|
||||
item.ammo_nails = self.ammo_nails;
|
||||
item.ammo_rockets = self.ammo_rockets;
|
||||
item.ammo_cells = self.ammo_cells;
|
||||
item.ammo_cells = self.ammo_cells;
|
||||
|
||||
item.velocity_z = 300;
|
||||
item.velocity_x = -100 + (random() * 200);
|
||||
|
|
|
@ -112,7 +112,7 @@ void() finale_1 = {
|
|||
remove(pl);
|
||||
|
||||
WriteByte(MSG_ALL, SVC_FINALE);
|
||||
WriteString(MSG_ALL, string_null);
|
||||
WriteString(MSG_ALL, "");
|
||||
|
||||
pl = find(world, classname, "player");
|
||||
while(pl != world) {
|
||||
|
|
|
@ -284,7 +284,7 @@ void() PainSound = {
|
|||
|
||||
rs = rint((random() * 5) + 1);
|
||||
|
||||
self.noise = string_null;
|
||||
self.noise = "";
|
||||
if(rs == 1) {
|
||||
self.noise = "player/pain1.wav";
|
||||
} else if(rs == 2) {
|
||||
|
@ -504,7 +504,7 @@ void() PlayerDie = {
|
|||
DropBackpack();
|
||||
}
|
||||
|
||||
self.weaponmodel = string_null;
|
||||
self.weaponmodel = "";
|
||||
self.view_ofs = '0 0 -8';
|
||||
self.deadflag = DEAD_DYING;
|
||||
self.solid = SOLID_NOT;
|
||||
|
|
|
@ -36,7 +36,7 @@ void() InitTrigger = {
|
|||
setmodel(self, self.model); // set size and link into world
|
||||
self.movetype = MOVETYPE_NONE;
|
||||
self.modelindex = 0;
|
||||
self.model = string_null;
|
||||
self.model = "";
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -219,7 +219,7 @@ void() SUB_UseTargets = {
|
|||
//
|
||||
// print the message
|
||||
//
|
||||
if(activator.classname == "player" && self.message != string_null) {
|
||||
if(activator.classname == "player" && self.message != "") {
|
||||
centerprint(activator, self.message);
|
||||
if(!self.noise) {
|
||||
sound(activator, CHAN_VOICE, "misc/talk.wav", 1, ATTN_NORM);
|
||||
|
|
|
@ -384,7 +384,7 @@ void() info_teleport_destination = {
|
|||
// this does nothing, just serves as a target spot
|
||||
self.mangle = self.angles;
|
||||
self.angles = VEC_ORIGIN;
|
||||
self.model = string_null;
|
||||
self.model = "";
|
||||
self.origin = self.origin + '0 0 27';
|
||||
if(!self.targetname) {
|
||||
objerror("no targetname");
|
||||
|
@ -463,11 +463,11 @@ void() trigger_onlyregistered_touch = {
|
|||
|
||||
self.attack_finished = time + 2;
|
||||
if(cvar("registered")) {
|
||||
self.message = string_null;
|
||||
self.message = "";
|
||||
SUB_UseTargets();
|
||||
remove(self);
|
||||
} else {
|
||||
if(self.message != string_null) {
|
||||
if(self.message != "") {
|
||||
centerprint(other, self.message);
|
||||
sound(other, CHAN_BODY, "misc/talk.wav", 1, ATTN_NORM);
|
||||
}
|
||||
|
|
|
@ -731,7 +731,7 @@ void() W_SetCurrentAmmo = {
|
|||
break;
|
||||
default:
|
||||
self.currentammo = 0;
|
||||
self.weaponmodel = string_null;
|
||||
self.weaponmodel = "";
|
||||
self.weaponframe = 0;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -186,9 +186,9 @@ void() StartFrame = {
|
|||
temp1flag = cvar("temp1");
|
||||
framecount = framecount + 1;
|
||||
|
||||
sf_cheats = (temp1flag & SF_CHEATS) != 0;
|
||||
sf_cheats = temp1flag & SF_CHEATS;
|
||||
sf_lives = bit_shift_right(temp1flag & SF_LIVES_MSK, SF_LIVES_BEG);
|
||||
sf_dist_ammo = (temp1flag & SF_DIST_AMMO) != 0;
|
||||
sf_dist_ammo = temp1flag & SF_DIST_AMMO;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
6
todo
6
todo
|
@ -9,8 +9,7 @@ rename all functions to be lower_underscore
|
|||
|
||||
core features:
|
||||
|
||||
add registercvar support
|
||||
restart map after 10 seconds when everyone is dead
|
||||
distributed ammo
|
||||
|
||||
useful features:
|
||||
|
||||
|
@ -22,7 +21,7 @@ extraneous features:
|
|||
|
||||
emotes
|
||||
player sound effect option
|
||||
players shoot through eachother (teamplay 4?)
|
||||
players shoot through eachother
|
||||
selectable player models and skins
|
||||
sound clips
|
||||
third person player weapon models
|
||||
|
@ -31,6 +30,5 @@ done:
|
|||
|
||||
corpse pickups have keys
|
||||
custom pronouns
|
||||
distributed ammo
|
||||
lives counting
|
||||
no friendly fire
|
||||
|
|
Loading…
Reference in New Issue
Block a user