add impulse command for spectating

master
an 2019-09-20 19:52:15 -04:00
parent d3372f846a
commit bcac79a048
3 changed files with 32 additions and 1 deletions

View File

@ -8,6 +8,8 @@ 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

View File

@ -1148,6 +1148,34 @@ 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);
@ -1159,6 +1187,7 @@ void() ImpulseCommands = {
case 10: W_CycleWeapon(); break;
case 11: cheat_quad(); break;
case 12: W_CycleWeaponReverse(); break;
case 13: spectate(); break;
}
}

2
todo
View File

@ -14,7 +14,6 @@ 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>")
@ -34,6 +33,7 @@ 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