add code for handling pronouns in obituaries
This commit is contained in:
parent
be61fb8b0e
commit
edb5ca9483
231
source/client.qc
231
source/client.qc
|
@ -324,21 +324,6 @@ void() respawn = {
|
|||
}
|
||||
};
|
||||
|
||||
/*
|
||||
============
|
||||
ClientKill
|
||||
|
||||
Player entered the suicide command
|
||||
============
|
||||
*/
|
||||
void() ClientKill = {
|
||||
bprint(self.netname, " suicides\n");
|
||||
set_suicide_frame();
|
||||
self.modelindex = modelindex_player;
|
||||
self.frags = self.frags - 2; // extra penalty
|
||||
respawn();
|
||||
};
|
||||
|
||||
float(vector v) CheckSpawnPoint = {
|
||||
return FALSE;
|
||||
};
|
||||
|
@ -1084,23 +1069,56 @@ void() cheat_quad = {
|
|||
self.items = self.items | IT_QUAD;
|
||||
};
|
||||
|
||||
void(float pronoun) change_pronoun = {
|
||||
pronoun = minmax(pronoun, PRO_NONE, PRO_MAX - 1);
|
||||
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";
|
||||
}
|
||||
};
|
||||
|
||||
dprint("pronoun set to ", ftos(pronoun), "\n");
|
||||
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 = {
|
||||
pro = minmax(pro, PRO_NONE, PRO_MAX - 1);
|
||||
|
||||
self.pronoun = pro;
|
||||
sprint(self, "pronoun set to ",
|
||||
pronoun_subject(pro), "/",
|
||||
pronoun_possessive(pro), "\n");
|
||||
};
|
||||
|
||||
void() ImpulseCommands = {
|
||||
if(self.impulse >= 1 && self.impulse <= 8) {
|
||||
W_ChangeWeapon(self.impulse);
|
||||
} else if(self.impulse >= 4000 && self.impulse < 5000) {
|
||||
change_pronoun(self.impulse - 4000);
|
||||
} else if(self.impulse >= 20 && self.impulse < 40) {
|
||||
change_pronoun(self.impulse - 20);
|
||||
} else {
|
||||
switch(self.impulse) {
|
||||
case 9: cheat(); break;
|
||||
case 10: W_CycleWeapon(); break;
|
||||
case 11: cheat_quad(); break;
|
||||
case 12: W_CycleWeaponReverse(); break;
|
||||
case 255: cheat_quad(); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1123,12 +1141,15 @@ float(entity targ, entity attacker) obit_suicide = {
|
|||
targ.frags = targ.frags - 1;
|
||||
|
||||
if(targ.weapon == IT_LIGHTNING && targ.waterlevel > 1) {
|
||||
bprint(" discharges into the water.\n");
|
||||
bprint(" discharges into the water\n");
|
||||
} else if(targ.weapon == IT_GRENADE_LAUNCHER) {
|
||||
bprint(" tries to put the pin back in\n");
|
||||
} else {
|
||||
// FIXME
|
||||
bprint(" becomes bored with life\n");
|
||||
bprint(" becomes bored with ");
|
||||
if(targ.pronoun != PRO_NONE) {
|
||||
bprint(pronoun_possessive(targ.pronoun), " ");
|
||||
}
|
||||
bprint("life\n");
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
@ -1143,8 +1164,13 @@ float(entity targ, entity attacker) obit_teamkill = {
|
|||
if(rnum < 0.25) {
|
||||
bprint(" mows down a teammate\n");
|
||||
} else if(rnum < 0.50) {
|
||||
// FIXME
|
||||
bprint(" checks his glasses\n");
|
||||
if(attacker.pronoun == PRO_NONE) {
|
||||
bprint(" needs new glasses\n");
|
||||
} else {
|
||||
bprint(" checks ",
|
||||
pronoun_possessive(attacker.pronoun),
|
||||
" glasses\n");
|
||||
}
|
||||
} else if(rnum < 0.75) {
|
||||
bprint(" gets a frag for the other team\n");
|
||||
} else {
|
||||
|
@ -1201,8 +1227,7 @@ float(entity targ, entity attacker) obit_pkill = {
|
|||
if(attacker.waterlevel > 1) {
|
||||
deathstring2 = "'s discharge\n";
|
||||
} else {
|
||||
// FIXME
|
||||
deathstring2 = "'s shaft\n";
|
||||
deathstring2 = "'s hot lightning injection\n";
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -1215,35 +1240,110 @@ float(entity targ, entity attacker) obit_pkill = {
|
|||
float(entity targ, entity attacker) obit_monster = {
|
||||
switch(attacker.classname) {
|
||||
case "monster_army":
|
||||
bprint(" was shot by a Grunt\n"); break;
|
||||
if(random() < 0.5) {
|
||||
bprint(" was shot by a Grunt\n");
|
||||
} else {
|
||||
bprint(" was blasted by a Grunt\n");
|
||||
}
|
||||
break;
|
||||
case "monster_demon1":
|
||||
bprint(" was eviscerated by a Fiend\n"); break;
|
||||
if(targ.pronoun == PRO_NONE) {
|
||||
bprint(" had a Fiend lobotomy\n");
|
||||
} else {
|
||||
bprint(" had ",
|
||||
pronoun_possessive(targ.pronoun),
|
||||
" head ripped off by a Fiend\n");
|
||||
}
|
||||
break;
|
||||
case "monster_dog":
|
||||
bprint(" was mauled by a Rottweiler\n"); break;
|
||||
if(random() < 0.5) {
|
||||
bprint(" was eaten by a Rottweiler\n");
|
||||
} else {
|
||||
bprint(" was mauled by a Rottweiler\n");
|
||||
}
|
||||
break;
|
||||
case "monster_enforcer":
|
||||
bprint(" was blasted by an Enforcer\n"); break;
|
||||
if(random() < 0.5) {
|
||||
bprint(" was lazed by an Enforcer\n");
|
||||
} else {
|
||||
bprint(" stood in an Enforcer's way\n");
|
||||
}
|
||||
break;
|
||||
case "monster_fish":
|
||||
bprint(" was fed to the Rotfish\n"); break;
|
||||
if(targ.pronoun == PRO_NONE || random() < 0.5) {
|
||||
bprint(" was fed to a Rotfish\n");
|
||||
} else {
|
||||
bprint(" enjoys ",
|
||||
pronoun_possessive(targ.pronoun),
|
||||
" new life under the sea\n");
|
||||
}
|
||||
break;
|
||||
case "monster_hell_knight":
|
||||
bprint(" was slain by a Death Knight\n"); break;
|
||||
if(random() < 0.5) {
|
||||
bprint(" was killed to death by a Death Knight\n");
|
||||
} else {
|
||||
bprint(" was slain by a Death Knight\n");
|
||||
}
|
||||
break;
|
||||
case "monster_knight":
|
||||
bprint(" was slashed by a Knight\n"); break;
|
||||
if(random() < 0.1) {
|
||||
bprint(" was enamored by the Knight's intricate animations\n");
|
||||
} else {
|
||||
bprint(" was slashed by a Knight\n");
|
||||
}
|
||||
break;
|
||||
case "monster_ogre":
|
||||
bprint(" was destroyed by an Ogre\n"); break;
|
||||
if(random() < 0.05) {
|
||||
bprint(" knows that it's all Ogre now\n");
|
||||
} else {
|
||||
bprint(" was destroyed by an Ogre\n");
|
||||
}
|
||||
break;
|
||||
case "monster_oldone":
|
||||
bprint(" became one with Shub-Niggurath\n"); break;
|
||||
if(targ.pronoun == PRO_NONE) {
|
||||
bprint(" became one with Shub-Niggurath\n");
|
||||
} else {
|
||||
bprint(" accepted ", pronoun_possessive(targ.pronoun), " fate\n");
|
||||
}
|
||||
break;
|
||||
case "monster_shalrath":
|
||||
bprint(" was exploded by a Vore\n"); break;
|
||||
if(random() < 0.5) {
|
||||
bprint(" was merged with a Shalrath\n");
|
||||
} else {
|
||||
bprint(" couldn't evade the Vore\n");
|
||||
}
|
||||
break;
|
||||
case "monster_shambler":
|
||||
bprint(" was smashed by a Shambler\n"); break;
|
||||
if(random() < 0.5) {
|
||||
bprint(" was Shambled off this mortal coil\n");
|
||||
} else {
|
||||
bprint(" was fried by a Shambler\n");
|
||||
}
|
||||
break;
|
||||
case "monster_tarbaby":
|
||||
bprint(" was slimed by a Spawn\n"); break;
|
||||
case "monster_vomit":
|
||||
bprint(" was vomited on by a Vomitus\n"); break;
|
||||
if(random() < 0.5) {
|
||||
bprint(" was consumed by the Spawn\n");
|
||||
} else {
|
||||
bprint(" found ",
|
||||
pronoun_possessive(targ.pronoun),
|
||||
" place with the Spawn\n");
|
||||
}
|
||||
break;
|
||||
case "monster_wizard":
|
||||
bprint(" was scragged by a Scrag\n"); break;
|
||||
if(random() < 0.5) {
|
||||
bprint(" wasn't ready for the Wizard\n");
|
||||
} else {
|
||||
bprint(" was scragged by a Scrag\n");
|
||||
}
|
||||
break;
|
||||
case "monster_zombie":
|
||||
bprint(" joins the Zombies\n"); break;
|
||||
if(random() < 0.05) {
|
||||
bprint(". You are the demons\nAnd then ",
|
||||
targ.netname, " was a zombie.");
|
||||
} else {
|
||||
bprint(" joins the Zombies\n");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -1254,8 +1354,11 @@ float(entity targ, entity attacker) obit_monster = {
|
|||
float(entity targ, entity attacker) obit_falling = {
|
||||
if(targ.deathtype == "falling") {
|
||||
targ.deathtype = "";
|
||||
// FIXME
|
||||
bprint(" fell to his death\n");
|
||||
if(targ.pronoun == PRO_NONE) {
|
||||
bprint(" hit the ground too hard\n");
|
||||
} else {
|
||||
bprint(" fell to ", pronoun_possessive(targ.pronoun), " death\n");
|
||||
}
|
||||
return TRUE;
|
||||
} else {
|
||||
return FALSE;
|
||||
|
@ -1264,22 +1367,24 @@ float(entity targ, entity attacker) obit_falling = {
|
|||
|
||||
float(entity targ, entity attacker) obit_water = {
|
||||
switch(targ.watertype) {
|
||||
case -3:
|
||||
case CONTENT_SKY:
|
||||
bprint(" tried to buy the sky and sell the sky\n");
|
||||
break;
|
||||
case CONTENT_WATER:
|
||||
if(random() < 0.5) {
|
||||
bprint(" sleeps with the fishes\n");
|
||||
} else {
|
||||
// FIXME
|
||||
bprint(" sucks it down\n");
|
||||
bprint(" was quite thirsty\n");
|
||||
}
|
||||
break;
|
||||
case -4:
|
||||
case CONTENT_SLIME:
|
||||
if(random() < 0.5) {
|
||||
bprint(" gulped a load of slime\n");
|
||||
} else {
|
||||
bprint(" can't exist on slime alone\n");
|
||||
}
|
||||
break;
|
||||
case -5:
|
||||
case CONTENT_LAVA:
|
||||
if(targ.health < -15) {
|
||||
bprint(" burst into flames\n");
|
||||
} else if(random() < 0.5) {
|
||||
|
@ -1305,7 +1410,14 @@ float(entity targ, entity attacker) obit_trap = {
|
|||
case "fireball":
|
||||
bprint(" ate a lavaball\n"); break;
|
||||
case "trigger_changelevel":
|
||||
bprint(" tried to leave\n"); break;
|
||||
if(targ.pronoun == PRO_NONE) {
|
||||
bprint(" tried to leave\n");
|
||||
} else {
|
||||
bprint(" tried to leave, but ",
|
||||
pronoun_subject(targ.pronoun),
|
||||
" failed\n");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -1370,3 +1482,18 @@ void(entity targ, entity attacker) ClientObituary = {
|
|||
bprint(" died\n");
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
============
|
||||
ClientKill
|
||||
|
||||
Player entered the suicide command
|
||||
============
|
||||
*/
|
||||
void() ClientKill = {
|
||||
self.frags = self.frags - 1; // extra penalty
|
||||
ClientObituary(self, self);
|
||||
set_suicide_frame();
|
||||
self.modelindex = modelindex_player;
|
||||
respawn();
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user