Compare commits
No commits in common. "10d98c67c0147e9b659da2df6e8965e78698990d" and "6933e8bf6892ee2cd6ee91307379ac6bb628752c" have entirely different histories.
10d98c67c0
...
6933e8bf68
|
@ -8,8 +8,6 @@ alias pronoun_xey "impulse 26"
|
|||
alias pronoun_ze_hir "impulse 27"
|
||||
alias pronoun_ze_zir "impulse 28"
|
||||
|
||||
alias spectate "impulse 13"
|
||||
|
||||
set sc_cheats 0
|
||||
set sc_lives 0
|
||||
set sc_dist_ammo 0
|
||||
|
|
336
source/client.qc
336
source/client.qc
|
@ -1,35 +1,5 @@
|
|||
// client.qc: player-adjacent functions
|
||||
|
||||
string(float pro) pronoun_subject = {
|
||||
switch(pro) {
|
||||
case PRO_NONE: return "none";
|
||||
case PRO_FAE: return "fae";
|
||||
case PRO_HE: return "he";
|
||||
case PRO_IT: return "it";
|
||||
case PRO_SHE: return "she";
|
||||
case PRO_THEY: return "they";
|
||||
case PRO_XEY: return "xey";
|
||||
case PRO_ZE_H: return "ze";
|
||||
case PRO_ZE_Z: return "ze";
|
||||
default: return "unknown";
|
||||
}
|
||||
};
|
||||
|
||||
string(float pro) pronoun_possessive = {
|
||||
switch(pro) {
|
||||
case PRO_NONE: return "none";
|
||||
case PRO_FAE: return "faer";
|
||||
case PRO_HE: return "his";
|
||||
case PRO_IT: return "its";
|
||||
case PRO_SHE: return "her";
|
||||
case PRO_THEY: return "their";
|
||||
case PRO_XEY: return "xyr";
|
||||
case PRO_ZE_H: return "hir";
|
||||
case PRO_ZE_Z: return "zir";
|
||||
default: return "unknown";
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
=============================================================================
|
||||
|
||||
|
@ -52,21 +22,28 @@ void() SetChangeParms = {
|
|||
}
|
||||
|
||||
// remove items
|
||||
self.items &= ~(IT_KEY1 | IT_KEY2 | IT_INVISIBILITY | IT_INVULNERABILITY |
|
||||
IT_SUIT | IT_QUAD);
|
||||
self.items &= ~(IT_KEY1 | IT_KEY2 | IT_INVISIBILITY | IT_INVULNERABILITY | IT_SUIT | IT_QUAD);
|
||||
|
||||
// cap super health
|
||||
self.health = minmax(self.health, 50, 100);
|
||||
|
||||
parm1 = self.items;
|
||||
parm2 = self.health;
|
||||
parm3 = self.armorvalue;
|
||||
parm4 = (self.ammo_shells < 25 ? 25 : self.ammo_shells);
|
||||
parm5 = self.ammo_nails;
|
||||
parm6 = self.ammo_rockets;
|
||||
parm7 = self.ammo_cells;
|
||||
parm8 = self.weapon;
|
||||
parm9 = self.armortype * 100;
|
||||
if(self.health > 100) {
|
||||
self.health = 100;
|
||||
}
|
||||
if(self.health < 50) {
|
||||
self.health = 50;
|
||||
}
|
||||
parm1 = self.items;
|
||||
parm2 = self.health;
|
||||
parm3 = self.armorvalue;
|
||||
if(self.ammo_shells < 25) {
|
||||
parm4 = 25;
|
||||
} else {
|
||||
parm4 = self.ammo_shells;
|
||||
}
|
||||
parm5 = self.ammo_nails;
|
||||
parm6 = self.ammo_rockets;
|
||||
parm7 = self.ammo_cells;
|
||||
parm8 = self.weapon;
|
||||
parm9 = self.armortype * 100;
|
||||
parm10 = self.pronoun;
|
||||
};
|
||||
|
||||
|
@ -83,37 +60,22 @@ void() SetNewParms = {
|
|||
};
|
||||
|
||||
void() DecodeLevelParms = {
|
||||
float ofs, ofs2, pro;
|
||||
|
||||
if(serverflags) {
|
||||
if(world.model == "maps/start.bsp") {
|
||||
SetNewParms(); // take away all stuff on starting new episode
|
||||
}
|
||||
}
|
||||
|
||||
self.items = parm1;
|
||||
self.health = parm2;
|
||||
self.armorvalue = parm3;
|
||||
self.ammo_shells = parm4;
|
||||
self.ammo_nails = parm5;
|
||||
self.items = parm1;
|
||||
self.health = parm2;
|
||||
self.armorvalue = parm3;
|
||||
self.ammo_shells = parm4;
|
||||
self.ammo_nails = parm5;
|
||||
self.ammo_rockets = parm6;
|
||||
self.ammo_cells = parm7;
|
||||
self.weapon = parm8;
|
||||
self.armortype = parm9 * 0.01;
|
||||
self.pronoun = parm10;
|
||||
|
||||
if(ext_strings) {
|
||||
ofs = strstrofs(self.netname, "(", 0);
|
||||
if(ofs != -1) {
|
||||
for(pro = PRO_NONE; pro < PRO_MAX; pro++) {
|
||||
ofs2 = strstrofs(self.netname, pronoun_possessive(pro), ofs);
|
||||
if(ofs2 == ofs + 1 && strstrofs(self.netname, ")", ofs) != -1) {
|
||||
self.pronoun = pro;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
self.ammo_cells = parm7;
|
||||
self.weapon = parm8;
|
||||
self.armortype = parm9 * 0.01;
|
||||
self.pronoun = parm10;
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -269,15 +231,14 @@ void() execute_changelevel = {
|
|||
|
||||
other = find(world, classname, "player");
|
||||
while(other != world) {
|
||||
other.view_ofs = VEC_ORIGIN;
|
||||
other.angles = other.v_angle = pos.mangle;
|
||||
other.fixangle = TRUE; // turn this way immediately
|
||||
other.nextthink = time + 0.5;
|
||||
other.view_ofs = VEC_ORIGIN;
|
||||
other.angles = other.v_angle = pos.mangle;
|
||||
other.fixangle = TRUE; // turn this way immediately
|
||||
other.nextthink = time + 0.5;
|
||||
other.takedamage = DAMAGE_NO;
|
||||
other.solid = SOLID_NOT;
|
||||
other.movetype = MOVETYPE_NONE;
|
||||
other.solid = SOLID_NOT;
|
||||
other.movetype = MOVETYPE_NONE;
|
||||
other.modelindex = 0;
|
||||
other.spectating = SPECTATING_INTERMISSION;
|
||||
setorigin(other, pos.origin);
|
||||
other = find(other, classname, "player");
|
||||
}
|
||||
|
@ -334,7 +295,7 @@ void() trigger_changelevel = {
|
|||
/*
|
||||
=============================================================================
|
||||
|
||||
PLAYER GAME EDGE FUNCTIONS
|
||||
PLAYER GAME EDGE FUNCTIONS
|
||||
|
||||
=============================================================================
|
||||
*/
|
||||
|
@ -343,7 +304,6 @@ void() become_spectator = {
|
|||
float not_dead;
|
||||
entity pl;
|
||||
|
||||
self.spectating = (self.lives ? SPECTATING_SPECTATING : SPECTATING_DEAD);
|
||||
self.health = self.max_health;
|
||||
self.armortype = 0;
|
||||
self.armorvalue = 0;
|
||||
|
@ -495,7 +455,7 @@ void() PutClientInServer = {
|
|||
} else {
|
||||
bprint(ftos(self.lives), " lives left\n");
|
||||
}
|
||||
} else if(self.lives == 0) {
|
||||
} else {
|
||||
self.lives = sf_lives;
|
||||
dprint("lives reset to ", ftos(sf_lives), "\n");
|
||||
}
|
||||
|
@ -505,23 +465,22 @@ void() PutClientInServer = {
|
|||
|
||||
spot = SelectSpawnPoint();
|
||||
|
||||
self.classname = "player";
|
||||
self.health = 100;
|
||||
self.takedamage = DAMAGE_AIM;
|
||||
self.solid = SOLID_SLIDEBOX;
|
||||
self.movetype = MOVETYPE_WALK;
|
||||
self.show_hostile = 0;
|
||||
self.max_health = 100;
|
||||
self.flags = FL_CLIENT;
|
||||
self.air_finished = time + 12;
|
||||
self.dmg = 2; // initial water damage
|
||||
self.classname = "player";
|
||||
self.health = 100;
|
||||
self.takedamage = DAMAGE_AIM;
|
||||
self.solid = SOLID_SLIDEBOX;
|
||||
self.movetype = MOVETYPE_WALK;
|
||||
self.show_hostile = 0;
|
||||
self.max_health = 100;
|
||||
self.flags = FL_CLIENT;
|
||||
self.air_finished = time + 12;
|
||||
self.dmg = 2; // initial water damage
|
||||
self.super_damage_finished = 0;
|
||||
self.radsuit_finished = 0;
|
||||
self.invisible_finished = 0;
|
||||
self.invincible_finished = 0;
|
||||
self.effects = 0;
|
||||
self.invincible_time = 0;
|
||||
self.spectating = SPECTATING_NOT;
|
||||
self.radsuit_finished = 0;
|
||||
self.invisible_finished = 0;
|
||||
self.invincible_finished = 0;
|
||||
self.effects = 0;
|
||||
self.invincible_time = 0;
|
||||
|
||||
DecodeLevelParms();
|
||||
|
||||
|
@ -532,12 +491,13 @@ void() PutClientInServer = {
|
|||
self.th_die = PlayerDie;
|
||||
|
||||
self.deadflag = DEAD_NO;
|
||||
|
||||
// pausetime is set by teleporters to keep the player from moving for a bit
|
||||
// paustime is set by teleporters to keep the player from moving a while
|
||||
self.pausetime = 0;
|
||||
|
||||
self.origin = spot.origin + '0 0 1';
|
||||
self.angles = spot.angles;
|
||||
// spot = SelectSpawnPoint();
|
||||
|
||||
self.origin = spot.origin + '0 0 1';
|
||||
self.angles = spot.angles;
|
||||
self.fixangle = TRUE; // turn this way immediately
|
||||
|
||||
// oh, this is a hack!
|
||||
|
@ -564,7 +524,7 @@ void() PutClientInServer = {
|
|||
/*
|
||||
=============================================================================
|
||||
|
||||
QUAKED FUNCTIONS
|
||||
QUAKED FUNCTIONS
|
||||
|
||||
=============================================================================
|
||||
*/
|
||||
|
@ -660,7 +620,8 @@ Exit deathmatch games upon conditions
|
|||
============
|
||||
*/
|
||||
void() CheckRules = {
|
||||
float timelimit, fraglimit;
|
||||
float timelimit;
|
||||
float fraglimit;
|
||||
|
||||
if(gameover) { // someone else quit the game already
|
||||
return;
|
||||
|
@ -669,8 +630,12 @@ void() CheckRules = {
|
|||
timelimit = cvar("timelimit") * 60;
|
||||
fraglimit = cvar("fraglimit");
|
||||
|
||||
if((timelimit && time >= timelimit) ||
|
||||
(fraglimit && self.frags >= fraglimit)) {
|
||||
if(timelimit && time >= timelimit) {
|
||||
NextLevel();
|
||||
return;
|
||||
}
|
||||
|
||||
if(fraglimit && self.frags >= fraglimit) {
|
||||
NextLevel();
|
||||
return;
|
||||
}
|
||||
|
@ -742,12 +707,17 @@ void() PlayerJump = {
|
|||
return;
|
||||
}
|
||||
|
||||
if(!(self.flags & FL_ONGROUND) || !(self.flags & FL_JUMPRELEASED)) {
|
||||
if(!(self.flags & FL_ONGROUND)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(!(self.flags & FL_JUMPRELEASED)) {
|
||||
return; // don't pogo stick
|
||||
}
|
||||
|
||||
self.flags -= (self.flags & FL_JUMPRELEASED);
|
||||
self.flags -= FL_ONGROUND; // don't stairwalk
|
||||
self.flags = self.flags - (self.flags & FL_JUMPRELEASED);
|
||||
|
||||
self.flags = self.flags - FL_ONGROUND; // don't stairwalk
|
||||
|
||||
self.button2 = 0;
|
||||
// player jumping sound
|
||||
|
@ -762,8 +732,11 @@ WaterMove
|
|||
============
|
||||
*/
|
||||
void() WaterMove = {
|
||||
string water_snd;
|
||||
if(self.movetype == MOVETYPE_NOCLIP || self.health < 0) {
|
||||
//dprint(ftos(self.waterlevel));
|
||||
if(self.movetype == MOVETYPE_NOCLIP) {
|
||||
return;
|
||||
}
|
||||
if(self.health < 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -796,39 +769,41 @@ void() WaterMove = {
|
|||
return;
|
||||
}
|
||||
|
||||
switch(self.watertype) {
|
||||
case CONTENT_LAVA:
|
||||
if(self.dmgtime < time) {
|
||||
if(self.radsuit_finished > time) {
|
||||
self.dmgtime = time + 1;
|
||||
} else {
|
||||
self.dmgtime = time + 0.2;
|
||||
}
|
||||
T_Damage(self, world, world, 10 * self.waterlevel);
|
||||
}
|
||||
break;
|
||||
case CONTENT_SLIME:
|
||||
if(self.dmgtime < time && self.radsuit_finished < time) {
|
||||
if(self.watertype == CONTENT_LAVA) {
|
||||
// do damage
|
||||
if(self.dmgtime < time) {
|
||||
if(self.radsuit_finished > time) {
|
||||
self.dmgtime = time + 1;
|
||||
T_Damage(self, world, world, 4 * self.waterlevel);
|
||||
} else {
|
||||
self.dmgtime = time + 0.2;
|
||||
}
|
||||
break;
|
||||
T_Damage(self, world, world, 10 * self.waterlevel);
|
||||
}
|
||||
} else if(self.watertype == CONTENT_SLIME) {
|
||||
// do damage
|
||||
if(self.dmgtime < time && self.radsuit_finished < time) {
|
||||
self.dmgtime = time + 1;
|
||||
T_Damage(self, world, world, 4 * self.waterlevel);
|
||||
}
|
||||
}
|
||||
|
||||
if(!(self.flags & FL_INWATER)) {
|
||||
// player enter water sound
|
||||
switch(self.watertype) {
|
||||
case CONTENT_LAVA: water_snd = "player/inlava.wav"; break;
|
||||
case CONTENT_WATER: water_snd = "player/inh2o.wav"; break;
|
||||
case CONTENT_SLIME: water_snd = "player/slimbrn2.wav"; break;
|
||||
if(self.watertype == CONTENT_LAVA) {
|
||||
sound(self, CHAN_BODY, "player/inlava.wav", 1, ATTN_NORM);
|
||||
}
|
||||
if(self.watertype == CONTENT_WATER) {
|
||||
sound(self, CHAN_BODY, "player/inh2o.wav", 1, ATTN_NORM);
|
||||
}
|
||||
if(self.watertype == CONTENT_SLIME) {
|
||||
sound(self, CHAN_BODY, "player/slimbrn2.wav", 1, ATTN_NORM);
|
||||
}
|
||||
sound(self, CHAN_BODY, water_snd, 1, ATTN_NORM);
|
||||
self.flags = self.flags + FL_INWATER;
|
||||
self.dmgtime = 0;
|
||||
}
|
||||
|
||||
if(!(self.flags & FL_WATERJUMP)) {
|
||||
self.velocity -= 0.8 * self.waterlevel * frametime * self.velocity;
|
||||
self.velocity = self.velocity - 0.8 * self.waterlevel * frametime * self.velocity;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -868,14 +843,17 @@ Called every frame before physics are run
|
|||
================
|
||||
*/
|
||||
void() PlayerPreThink = {
|
||||
// otherwise a button could be missed between the think tics
|
||||
if(intermission_running) {
|
||||
IntermissionThink();
|
||||
return;
|
||||
} else if(self.spectating) {
|
||||
return;
|
||||
IntermissionThink(); // otherwise a button could be missed between
|
||||
return; // the think tics
|
||||
}
|
||||
|
||||
if(self.view_ofs == VEC_ORIGIN) {
|
||||
return; // intermission, finale or spectating
|
||||
}
|
||||
|
||||
makevectors(self.v_angle); // is this still used
|
||||
|
||||
CheckRules();
|
||||
WaterMove();
|
||||
|
||||
|
@ -917,7 +895,7 @@ Check for turning off powerups
|
|||
================
|
||||
*/
|
||||
void() CheckPowerups = {
|
||||
if(self.health <= 0 || self.spectating) {
|
||||
if(self.health <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1042,18 +1020,16 @@ Called every frame after physics are run
|
|||
================
|
||||
*/
|
||||
void() PlayerPostThink = {
|
||||
if(time >= self.attack_finished) {
|
||||
ImpulseCommands();
|
||||
if(self.view_ofs == VEC_ORIGIN) {
|
||||
return; // intermission, finale or spectating
|
||||
}
|
||||
|
||||
if(self.spectating || self.deadflag) {
|
||||
if(self.deadflag) {
|
||||
return;
|
||||
}
|
||||
|
||||
// do weapon stuff
|
||||
if(time >= self.attack_finished) {
|
||||
W_WeaponFrame();
|
||||
}
|
||||
|
||||
W_WeaponFrame();
|
||||
|
||||
// check to see if player landed and play landing sound
|
||||
if(self.jump_flag < -300 && self.flags & FL_ONGROUND && self.health > 0) {
|
||||
|
@ -1100,23 +1076,20 @@ called when a player disconnects from a server
|
|||
============
|
||||
*/
|
||||
void() ClientDisconnect = {
|
||||
// if the level end trigger has been activated, just return
|
||||
// since they aren't *really* leaving
|
||||
if(gameover) {
|
||||
return;
|
||||
}
|
||||
// if the level end trigger has been activated, just return
|
||||
// since they aren't *really* leaving
|
||||
|
||||
// let everyone else know
|
||||
bprint(self.netname, " left the game with ", ftos(self.frags), " frags\n");
|
||||
|
||||
if(!self.spectating) {
|
||||
sound(self, CHAN_BODY, "player/tornoff2.wav", 1, ATTN_NONE);
|
||||
set_suicide_frame();
|
||||
}
|
||||
sound(self, CHAN_BODY, "player/tornoff2.wav", 1, ATTN_NONE);
|
||||
set_suicide_frame();
|
||||
};
|
||||
|
||||
void() cheat = {
|
||||
if(((deathmatch || coop) && !sf_cheats) || self.spectating) {
|
||||
if((deathmatch || coop) && !sf_cheats) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1141,13 +1114,43 @@ void() cheat = {
|
|||
};
|
||||
|
||||
void() cheat_quad = {
|
||||
if(((deathmatch || coop) && !sf_cheats) || self.spectating) {
|
||||
if((deathmatch || coop) && !sf_cheats) {
|
||||
return;
|
||||
}
|
||||
|
||||
self.super_time = 1;
|
||||
self.super_time = 1;
|
||||
self.super_damage_finished = time + 30;
|
||||
self.items = self.items | IT_QUAD;
|
||||
self.items = self.items | IT_QUAD;
|
||||
};
|
||||
|
||||
string(float pro) pronoun_subject = {
|
||||
switch(pro) {
|
||||
case PRO_NONE: return "none";
|
||||
case PRO_FAE: return "fae";
|
||||
case PRO_HE: return "he";
|
||||
case PRO_IT: return "it";
|
||||
case PRO_SHE: return "she";
|
||||
case PRO_THEY: return "they";
|
||||
case PRO_XEY: return "xey";
|
||||
case PRO_ZE_H: return "ze";
|
||||
case PRO_ZE_Z: return "ze";
|
||||
default: return "unknown";
|
||||
}
|
||||
};
|
||||
|
||||
string(float pro) pronoun_possessive = {
|
||||
switch(pro) {
|
||||
case PRO_NONE: return "none";
|
||||
case PRO_FAE: return "faer";
|
||||
case PRO_HE: return "his";
|
||||
case PRO_IT: return "its";
|
||||
case PRO_SHE: return "her";
|
||||
case PRO_THEY: return "their";
|
||||
case PRO_XEY: return "xyr";
|
||||
case PRO_ZE_H: return "hir";
|
||||
case PRO_ZE_Z: return "zir";
|
||||
default: return "unknown";
|
||||
}
|
||||
};
|
||||
|
||||
void(float pro) change_pronoun = {
|
||||
|
@ -1159,34 +1162,6 @@ void(float pro) change_pronoun = {
|
|||
pronoun_possessive(pro), "\n");
|
||||
};
|
||||
|
||||
void() spectate = {
|
||||
switch(self.spectating) {
|
||||
case SPECTATING_NOT:
|
||||
bprint(self.netname, " has become a spectator\n");
|
||||
become_spectator();
|
||||
break;
|
||||
case SPECTATING_SPECTATING:
|
||||
bprint(self.netname, " has returned from spectating\n");
|
||||
setspawnparms(self);
|
||||
PutClientInServer();
|
||||
break;
|
||||
case SPECTATING_DEAD:
|
||||
centerprint(self,
|
||||
"You have no life force left\n"
|
||||
"and cannot return to\n"
|
||||
"the mortal world yet");
|
||||
break;
|
||||
case SPECTATING_INTERMISSION:
|
||||
case SPECTATING_FINALE:
|
||||
centerprint(self,
|
||||
"You are incorporeal as you wait\n"
|
||||
"for the next cycle\n"
|
||||
"and cannot return to\n"
|
||||
"the mortal world yet");
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
void() ImpulseCommands = {
|
||||
if(self.impulse >= 1 && self.impulse <= 8) {
|
||||
W_ChangeWeapon(self.impulse);
|
||||
|
@ -1198,7 +1173,6 @@ void() ImpulseCommands = {
|
|||
case 10: W_CycleWeapon(); break;
|
||||
case 11: cheat_quad(); break;
|
||||
case 12: W_CycleWeaponReverse(); break;
|
||||
case 13: spectate(); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1571,7 +1545,7 @@ Player entered the suicide command
|
|||
============
|
||||
*/
|
||||
void() ClientKill = {
|
||||
if(!self.spectating) {
|
||||
if(self.view_ofs != VEC_ORIGIN) {
|
||||
reset_death_vel();
|
||||
self.frags--; // extra penalty
|
||||
ClientObituary(self, self);
|
||||
|
|
|
@ -52,15 +52,15 @@ entity msg_entity; // destination of single entity writes
|
|||
// required prog functions
|
||||
void() main; // only for testing
|
||||
|
||||
void() StartFrame; // called every frame
|
||||
void() StartFrame;
|
||||
|
||||
void() PlayerPreThink; // called each frame on each client before physics
|
||||
void() PlayerPostThink; // called each frame on each client after physics
|
||||
void() PlayerPreThink;
|
||||
void() PlayerPostThink;
|
||||
|
||||
void() ClientKill; // called when the "kill" cmd is entered
|
||||
void() ClientConnect; // called upon client "connect"
|
||||
void() ClientKill;
|
||||
void() ClientConnect;
|
||||
void() PutClientInServer; // call after setting the parm1... parms
|
||||
void() ClientDisconnect; // called upon client "disconnect"
|
||||
void() ClientDisconnect;
|
||||
|
||||
/* called when a client first connects to a server. sets parms so they can be
|
||||
* saved off for restarts
|
||||
|
@ -271,17 +271,6 @@ void(entity e) setspawnparms = #78;
|
|||
|
||||
float(string s) checkextension = #99;
|
||||
|
||||
float(string str, string sub, float startpos) strstrofs = #221;
|
||||
float(string str, float ofs) str2chr = #222;
|
||||
string(float... c) chr2str = #223;
|
||||
string(float ccase, float calpha, float cnum, string... s) strconv = #224;
|
||||
string(float chars, string... s) strpad = #225;
|
||||
string(string info, string key, string... value) infoadd = #226;
|
||||
string(string info, string key) infoget = #227;
|
||||
float(string s1, string s2, float len) strncmp = #228;
|
||||
float(string s1, string s2) strcasecmp = #229;
|
||||
float(string s1, string s2, float len) strncasecmp = #230;
|
||||
|
||||
// constants -----------------------------------------------------------------|
|
||||
|
||||
const vector VEC_ORIGIN = '0 0 0';
|
||||
|
@ -496,6 +485,22 @@ enum {
|
|||
WORLD_BASE,
|
||||
};
|
||||
|
||||
enum {
|
||||
PRO_NONE,
|
||||
|
||||
// alphabetically sorted, based on pronoun.is and what i've seen used
|
||||
PRO_FAE,
|
||||
PRO_HE,
|
||||
PRO_IT,
|
||||
PRO_SHE,
|
||||
PRO_THEY,
|
||||
PRO_XEY,
|
||||
PRO_ZE_H,
|
||||
PRO_ZE_Z,
|
||||
|
||||
PRO_MAX,
|
||||
};
|
||||
|
||||
enum {
|
||||
DOOR_START_OPEN = 1,
|
||||
DOOR_DONT_LINK = 4,
|
||||
|
@ -569,23 +574,6 @@ enum {
|
|||
SIGIL_4 = 8,
|
||||
};
|
||||
|
||||
// super co-op additions
|
||||
enum {
|
||||
PRO_NONE,
|
||||
|
||||
// alphabetically sorted, based on pronoun.is and what i've seen used
|
||||
PRO_FAE,
|
||||
PRO_HE,
|
||||
PRO_IT,
|
||||
PRO_SHE,
|
||||
PRO_THEY,
|
||||
PRO_XEY,
|
||||
PRO_ZE_H,
|
||||
PRO_ZE_Z,
|
||||
|
||||
PRO_MAX,
|
||||
};
|
||||
|
||||
enum {
|
||||
SF_CHEATS = 1,
|
||||
SF_LIVES_BEG = 1,
|
||||
|
@ -593,14 +581,6 @@ enum {
|
|||
SF_LIVES_MSK = 14,
|
||||
SF_DIST_AMMO = 16,
|
||||
};
|
||||
|
||||
enum {
|
||||
SPECTATING_NOT,
|
||||
SPECTATING_DEAD,
|
||||
SPECTATING_SPECTATING,
|
||||
SPECTATING_INTERMISSION,
|
||||
SPECTATING_FINALE,
|
||||
};
|
||||
#pragma noref 0
|
||||
|
||||
// globals -------------------------------------------------------------------|
|
||||
|
@ -655,7 +635,6 @@ float player_respawned;
|
|||
float all_players_are_dead;
|
||||
|
||||
float ext_con_set;
|
||||
float ext_strings;
|
||||
|
||||
// fields --------------------------------------------------------------------|
|
||||
|
||||
|
@ -774,7 +753,6 @@ float ext_strings;
|
|||
// super co-op additions
|
||||
.float pronoun;
|
||||
.float lives;
|
||||
.float spectating;
|
||||
|
||||
// functions -----------------------------------------------------------------|
|
||||
|
||||
|
@ -943,6 +921,4 @@ void() func_train_find;
|
|||
|
||||
void(vector p) boss_missile;
|
||||
|
||||
void() ImpulseCommands;
|
||||
|
||||
// EOF
|
||||
|
|
|
@ -116,16 +116,15 @@ void() finale_1 = {
|
|||
|
||||
pl = find(world, classname, "player");
|
||||
while(pl != world) {
|
||||
pl.view_ofs = VEC_ORIGIN;
|
||||
pl.angles = other.v_angle = pos.mangle;
|
||||
pl.fixangle = TRUE; // turn this way immediately
|
||||
pl.map = self.map;
|
||||
pl.nextthink = time + 0.5;
|
||||
pl.view_ofs = VEC_ORIGIN;
|
||||
pl.angles = other.v_angle = pos.mangle;
|
||||
pl.fixangle = TRUE; // turn this way immediately
|
||||
pl.map = self.map;
|
||||
pl.nextthink = time + 0.5;
|
||||
pl.takedamage = DAMAGE_NO;
|
||||
pl.solid = SOLID_NOT;
|
||||
pl.movetype = MOVETYPE_NONE;
|
||||
pl.solid = SOLID_NOT;
|
||||
pl.movetype = MOVETYPE_NONE;
|
||||
pl.modelindex = 0;
|
||||
pl.spectating = SPECTATING_FINALE;
|
||||
setorigin(pl, pos.origin);
|
||||
pl = find(pl, classname, "player");
|
||||
}
|
||||
|
|
|
@ -1051,6 +1051,12 @@ Called every frame so impulse events can be handled as well as possible
|
|||
============
|
||||
*/
|
||||
void() W_WeaponFrame = {
|
||||
if(time < self.attack_finished) {
|
||||
return;
|
||||
}
|
||||
|
||||
ImpulseCommands();
|
||||
|
||||
// check for attack
|
||||
if(self.button0) {
|
||||
SuperDamageSound();
|
||||
|
|
|
@ -18,8 +18,9 @@ void() worldspawn = {
|
|||
InitBodyQue();
|
||||
|
||||
if(cvar("pr_checkextension")) {
|
||||
ext_con_set = checkextension("DP_CON_SET");
|
||||
ext_strings = checkextension("FTE_STRINGS");
|
||||
if(checkextension("DP_CON_SET")) {
|
||||
ext_con_set = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
// custom map attributes
|
||||
|
|
2
todo
2
todo
|
@ -14,6 +14,7 @@ all done
|
|||
useful features:
|
||||
|
||||
configurable enemy stats
|
||||
impulse command for spectating
|
||||
indicators for where other players are
|
||||
users can cancel map ends ("<name> initiated travel to <mapname>")
|
||||
|
||||
|
@ -33,7 +34,6 @@ corpse pickups have keys
|
|||
custom pronouns
|
||||
distributed ammo
|
||||
enforcers are broken
|
||||
impulse command for spectating
|
||||
lives counting
|
||||
no friendly fire
|
||||
restart map after 10 seconds when everyone is dead
|
||||
|
|
Loading…
Reference in New Issue
Block a user