add code for handling pronouns in obituaries
This commit is contained in:
parent
be61fb8b0e
commit
edb5ca9483
237
source/client.qc
237
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 = {
|
float(vector v) CheckSpawnPoint = {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
};
|
};
|
||||||
|
@ -1084,23 +1069,56 @@ void() cheat_quad = {
|
||||||
self.items = self.items | IT_QUAD;
|
self.items = self.items | IT_QUAD;
|
||||||
};
|
};
|
||||||
|
|
||||||
void(float pronoun) change_pronoun = {
|
string(float pro) pronoun_subject = {
|
||||||
pronoun = minmax(pronoun, PRO_NONE, PRO_MAX - 1);
|
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 = {
|
void() ImpulseCommands = {
|
||||||
if(self.impulse >= 1 && self.impulse <= 8) {
|
if(self.impulse >= 1 && self.impulse <= 8) {
|
||||||
W_ChangeWeapon(self.impulse);
|
W_ChangeWeapon(self.impulse);
|
||||||
} else if(self.impulse >= 4000 && self.impulse < 5000) {
|
} else if(self.impulse >= 20 && self.impulse < 40) {
|
||||||
change_pronoun(self.impulse - 4000);
|
change_pronoun(self.impulse - 20);
|
||||||
} else {
|
} else {
|
||||||
switch(self.impulse) {
|
switch(self.impulse) {
|
||||||
case 9: cheat(); break;
|
case 9: cheat(); break;
|
||||||
case 10: W_CycleWeapon(); break;
|
case 10: W_CycleWeapon(); break;
|
||||||
case 12: W_CycleWeaponReverse(); break;
|
case 11: cheat_quad(); break;
|
||||||
case 255: cheat_quad(); break;
|
case 12: W_CycleWeaponReverse(); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1123,12 +1141,15 @@ float(entity targ, entity attacker) obit_suicide = {
|
||||||
targ.frags = targ.frags - 1;
|
targ.frags = targ.frags - 1;
|
||||||
|
|
||||||
if(targ.weapon == IT_LIGHTNING && targ.waterlevel > 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) {
|
} else if(targ.weapon == IT_GRENADE_LAUNCHER) {
|
||||||
bprint(" tries to put the pin back in\n");
|
bprint(" tries to put the pin back in\n");
|
||||||
} else {
|
} else {
|
||||||
// FIXME
|
bprint(" becomes bored with ");
|
||||||
bprint(" becomes bored with life\n");
|
if(targ.pronoun != PRO_NONE) {
|
||||||
|
bprint(pronoun_possessive(targ.pronoun), " ");
|
||||||
|
}
|
||||||
|
bprint("life\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -1143,8 +1164,13 @@ float(entity targ, entity attacker) obit_teamkill = {
|
||||||
if(rnum < 0.25) {
|
if(rnum < 0.25) {
|
||||||
bprint(" mows down a teammate\n");
|
bprint(" mows down a teammate\n");
|
||||||
} else if(rnum < 0.50) {
|
} else if(rnum < 0.50) {
|
||||||
// FIXME
|
if(attacker.pronoun == PRO_NONE) {
|
||||||
bprint(" checks his glasses\n");
|
bprint(" needs new glasses\n");
|
||||||
|
} else {
|
||||||
|
bprint(" checks ",
|
||||||
|
pronoun_possessive(attacker.pronoun),
|
||||||
|
" glasses\n");
|
||||||
|
}
|
||||||
} else if(rnum < 0.75) {
|
} else if(rnum < 0.75) {
|
||||||
bprint(" gets a frag for the other team\n");
|
bprint(" gets a frag for the other team\n");
|
||||||
} else {
|
} else {
|
||||||
|
@ -1201,8 +1227,7 @@ float(entity targ, entity attacker) obit_pkill = {
|
||||||
if(attacker.waterlevel > 1) {
|
if(attacker.waterlevel > 1) {
|
||||||
deathstring2 = "'s discharge\n";
|
deathstring2 = "'s discharge\n";
|
||||||
} else {
|
} else {
|
||||||
// FIXME
|
deathstring2 = "'s hot lightning injection\n";
|
||||||
deathstring2 = "'s shaft\n";
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1215,35 +1240,110 @@ float(entity targ, entity attacker) obit_pkill = {
|
||||||
float(entity targ, entity attacker) obit_monster = {
|
float(entity targ, entity attacker) obit_monster = {
|
||||||
switch(attacker.classname) {
|
switch(attacker.classname) {
|
||||||
case "monster_army":
|
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":
|
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":
|
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":
|
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":
|
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":
|
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":
|
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":
|
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":
|
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":
|
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":
|
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":
|
case "monster_tarbaby":
|
||||||
bprint(" was slimed by a Spawn\n"); break;
|
if(random() < 0.5) {
|
||||||
case "monster_vomit":
|
bprint(" was consumed by the Spawn\n");
|
||||||
bprint(" was vomited on by a Vomitus\n"); break;
|
} else {
|
||||||
|
bprint(" found ",
|
||||||
|
pronoun_possessive(targ.pronoun),
|
||||||
|
" place with the Spawn\n");
|
||||||
|
}
|
||||||
|
break;
|
||||||
case "monster_wizard":
|
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":
|
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:
|
default:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1254,8 +1354,11 @@ float(entity targ, entity attacker) obit_monster = {
|
||||||
float(entity targ, entity attacker) obit_falling = {
|
float(entity targ, entity attacker) obit_falling = {
|
||||||
if(targ.deathtype == "falling") {
|
if(targ.deathtype == "falling") {
|
||||||
targ.deathtype = "";
|
targ.deathtype = "";
|
||||||
// FIXME
|
if(targ.pronoun == PRO_NONE) {
|
||||||
bprint(" fell to his death\n");
|
bprint(" hit the ground too hard\n");
|
||||||
|
} else {
|
||||||
|
bprint(" fell to ", pronoun_possessive(targ.pronoun), " death\n");
|
||||||
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
} else {
|
} else {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -1264,22 +1367,24 @@ float(entity targ, entity attacker) obit_falling = {
|
||||||
|
|
||||||
float(entity targ, entity attacker) obit_water = {
|
float(entity targ, entity attacker) obit_water = {
|
||||||
switch(targ.watertype) {
|
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) {
|
if(random() < 0.5) {
|
||||||
bprint(" sleeps with the fishes\n");
|
bprint(" sleeps with the fishes\n");
|
||||||
} else {
|
} else {
|
||||||
// FIXME
|
bprint(" was quite thirsty\n");
|
||||||
bprint(" sucks it down\n");
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case -4:
|
case CONTENT_SLIME:
|
||||||
if(random() < 0.5) {
|
if(random() < 0.5) {
|
||||||
bprint(" gulped a load of slime\n");
|
bprint(" gulped a load of slime\n");
|
||||||
} else {
|
} else {
|
||||||
bprint(" can't exist on slime alone\n");
|
bprint(" can't exist on slime alone\n");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case -5:
|
case CONTENT_LAVA:
|
||||||
if(targ.health < -15) {
|
if(targ.health < -15) {
|
||||||
bprint(" burst into flames\n");
|
bprint(" burst into flames\n");
|
||||||
} else if(random() < 0.5) {
|
} else if(random() < 0.5) {
|
||||||
|
@ -1305,7 +1410,14 @@ float(entity targ, entity attacker) obit_trap = {
|
||||||
case "fireball":
|
case "fireball":
|
||||||
bprint(" ate a lavaball\n"); break;
|
bprint(" ate a lavaball\n"); break;
|
||||||
case "trigger_changelevel":
|
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:
|
default:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -1370,3 +1482,18 @@ void(entity targ, entity attacker) ClientObituary = {
|
||||||
bprint(" died\n");
|
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