タイプミスを正しく、ランダム化された死のメッセージを追加します (「Haste」さん、ありがとうございます!)

This commit is contained in:
2025-07-09 22:19:01 -03:00
parent 5d3414f1d0
commit 4a446796c3
9 changed files with 100 additions and 54 deletions

View File

@@ -314,5 +314,5 @@ void CG_InitConsoleCommands( void ) {
trap_AddCommand ("teamvote");
trap_AddCommand ("stats");
trap_AddCommand ("teamtask");
trap_AddCommand ("loaddefered"); // spelled wrong, but not changing for demo
trap_AddCommand ("loaddeferred");
}

View File

@@ -87,6 +87,10 @@ static void CG_Obituary( entityState_t *ent ) {
gender_t gender;
clientInfo_t *ci;
// Haste/AF
static int seed = 0x4A;
int r;
target = ent->otherEntityNum;
attacker = ent->otherEntityNum2;
mod = ent->eventParm;
@@ -111,6 +115,9 @@ static void CG_Obituary( entityState_t *ent ) {
strcat( targetName, S_COLOR_WHITE );
message2 = "";
// Haste/AF
r = abs( Q_rand( &seed ) ) % 3;
// check for single client messages
@@ -250,48 +257,109 @@ static void CG_Obituary( entityState_t *ent ) {
message = "was caught by";
break;
case MOD_GAUNTLET:
message = "was pummeled by";
if (r == 0) {
message = "was pummeled by";
} else if (r == 1) {
message = "dies from a thousand cuts from";
} else if (r == 2) {
message = "got slashed by";
}
break;
case MOD_MACHINEGUN:
message = "was machinegunned by";
if (r == 0) {
message = "was perforated by";
message2 = "'s greaser";
} else if (r == 1) {
message = "was ripped through by";
message2 = "'s Pseudo Stradivarius";
} else if (r == 2) {
message = "was shot up by";
}
break;
case MOD_SHOTGUN:
message = "was gunned down by";
if (r == 0) {
message = "chewed on";
message2 = "'s broomstick";
} else if (r == 1) {
message = "took a fistful of";
message2 = "'s buckshot";
} else if (r == 2) {
message = "paletted a peck of";
message2 = "'s pellets";
}
break;
case MOD_GRENADE:
message = "ate";
message2 = "'s grenade";
if (r == 0) {
message = "ate";
message2 = "'s pineapple";
} else if (r == 1) {
message = "couldn't stomach";
message2 = "'s grenade";
} else if (r == 2) {
message = "ingested an explosive gift from";
}
break;
case MOD_GRENADE_SPLASH:
message = "was shredded by";
message2 = "'s shrapnel";
if (r == 0) {
message = "was shredded by";
message2 = "'s shrapnel";
} else if (r == 1) {
message = "got too close to";
message2 = "'s ticker";
} else if (r == 2) {
message = "was deformed by";
message2 = "'s metal bits";
}
break;
case MOD_ROCKET:
message = "ate";
message2 = "'s rocket";
if (r == 0) {
message = "ate";
message2 = "'s Magic Drain Missile";
} else if (r == 1) {
message = "was masticated by";
message2 = "'s Mimi-chan";
} else if (r == 2) {
message = "didn't dodge";
message2 = "'s Aerial Torpedo";
}
break;
case MOD_ROCKET_SPLASH:
message = "almost dodged";
message2 = "'s rocket";
message2 = "'s Stardust Missile";
break;
case MOD_PLASMA:
message = "was melted by";
message2 = "'s plasmagun";
break;
case MOD_PLASMA_SPLASH:
message = "was melted by";
message2 = "'s plasmagun";
message2 = "'s blue-hot plasma";
break;
case MOD_RAILGUN:
message = "was railed by";
if (r == 0) {
message = "was ripped apart by";
message2 = "'s Illusion Laser";
} else if (r == 1) {
message = "was brutally battered by";
message2 = "'s Luminary Shot";
} else if (r == 2) {
message = "swallowed";
message2 = "'s Dual Spark";
}
break;
case MOD_LIGHTNING:
message = "was electrocuted by";
if (r == 0) {
message = "was vaporized by";
message2 = "'s Thunderbolt";
} else if (r == 1) {
message = "was negatively charged by";
} else if (r == 2) {
message = "was turned into ash by";
}
break;
case MOD_BFG:
message = "was reduced to nothing by";
message2 = "'s Shooting Star";
case MOD_BFG_SPLASH:
message = "was blasted by";
message2 = "'s BFG";
message = "was obliterated by";
message2 = "'s Break Sun";
break;
case MOD_NAIL:
message = "was nailed by";

View File

@@ -1119,7 +1119,7 @@ static void CG_ServerCommand( void ) {
}
// loaddeferred can be both a servercmd and a consolecmd
if ( !strcmp( cmd, "loaddefered" ) ) { // FIXME: spelled wrong, but not changing for demo
if ( !strcmp( cmd, "loaddeferred" ) ) {
CG_LoadDeferredPlayers();
return;
}

View File

@@ -763,7 +763,7 @@ void Svcmd_AddBot_f( void ) {
// go ahead and load the bot's media immediately
if ( level.time - level.startTime > 1000 &&
trap_Cvar_VariableIntegerValue( "cl_running" ) ) {
trap_SendServerCommand( -1, "loaddefered\n" ); // FIXME: spelled wrong, but not changing for demo
trap_SendServerCommand( -1, "loaddeferred\n" );
}
}

View File

@@ -1987,9 +1987,6 @@ else
ent->health = client->ps.stats[STAT_ARMOR] = g_elimination_startArmor.integer; //client->ps.stats[STAT_MAX_HEALTH]*2;
ent->health = client->ps.stats[STAT_HEALTH] = g_elimination_startHealth.integer; //client->ps.stats[STAT_MAX_HEALTH]*2;
// ent->health = client->ps.stats[STAT_HEALTH] = 0;
}
//Instantgib mode, replace weapons with rail (and maybe gauntlet)
if(g_instantgib.integer)
@@ -2055,11 +2052,6 @@ else
if ( (ent->client->sess.sessionTeam == TEAM_SPECTATOR) || ((client->ps.pm_type == PM_SPECTATOR || client->isEliminated) &&
(g_gametype.integer == GT_ELIMINATION || g_gametype.integer == GT_CTF_ELIMINATION || g_gametype.integer == GT_LMS) ) ) {
//Sago: Lets see if this fixes the bots only bug - loose all point on dead bug. (It didn't)
/*if(g_gametype.integer == GT_ELIMINATION || g_gametype.integer == GT_CTF_ELIMINATION || g_gametype.integer == GT_LMS) {
G_KillBox( ent );
trap_LinkEntity (ent);
}*/
} else {
G_KillBox( ent );
trap_LinkEntity (ent);

View File

@@ -338,7 +338,7 @@ static cvarTable_t gameCvarTable[] = {
// Instagib
{ &g_instantgib, "g_instantgib", "0", CVAR_SERVERINFO | CVAR_LATCH, 0, qfalse },
// True Bullet Hell
{ &g_danmaku, "g_danmaku", "0", CVAR_SERVERINFO | CVAR_LATCH | CVAR_NORESTART, 0, qtrue },
{ &g_danmaku, "g_danmaku", "0", CVAR_SERVERINFO | CVAR_LATCH | CVAR_NORESTART, 0, qfalse },
// Vampire
{ &g_vampire, "g_vampire", "0.0", CVAR_NORESTART, 0, qtrue },
{ &g_vampireMaxHealth, "g_vampire_max_health", "500", CVAR_NORESTART, 0, qtrue },
@@ -2223,7 +2223,7 @@ void CheckElimination(void) {
else if(((double)countsLiving[TEAM_RED])/((double)level.roundRedPlayers)>((double)countsLiving[TEAM_BLUE])/((double)level.roundBluePlayers))
{
//Red team has higher procentage survivors
trap_SendServerCommand( -1, "print \"Red team has most survivers!\n\"");
trap_SendServerCommand( -1, "print \"Red team has most survivors!\n\"");
AddTeamScore(level.intermission_origin,TEAM_RED,1);
if(g_gametype.integer == GT_ELIMINATION) {
G_LogPrintf( "ELIMINATION: %i %i %i: %s wins round %i due to more survivors!\n", level.roundNumber, TEAM_RED, 2, TeamName(TEAM_RED), level.roundNumber );
@@ -2234,7 +2234,7 @@ void CheckElimination(void) {
else if(((double)countsLiving[TEAM_RED])/((double)level.roundRedPlayers)<((double)countsLiving[TEAM_BLUE])/((double)level.roundBluePlayers))
{
//Blue team has higher procentage survivors
trap_SendServerCommand( -1, "print \"Blue team has most survivers!\n\"");
trap_SendServerCommand( -1, "print \"Blue team has most survivors!\n\"");
AddTeamScore(level.intermission_origin,TEAM_BLUE,1);
if(g_gametype.integer == GT_ELIMINATION) {
G_LogPrintf( "ELIMINATION: %i %i %i: %s wins round %i due to more survivors!\n", level.roundNumber, TEAM_BLUE, 2, TeamName(TEAM_BLUE), level.roundNumber );

View File

@@ -895,8 +895,6 @@ void CalcMuzzlePointOrigin ( gentity_t *ent, vec3_t origin, vec3_t forward, vec3
SnapVector( muzzlePoint );
}
/*
===============
FireWeapon

View File

@@ -205,7 +205,6 @@ static void Main_MenuDraw( void ) {
UI_DrawProportionalString( 320, 372, "", UI_CENTER|UI_SMALLFONT, color );
UI_DrawString( 320, 400, "Illusion Arena (c) 2025 Yakumo Laboratories", UI_CENTER|UI_SMALLFONT, color );
UI_DrawString( 320, 414, "Based on OpenArena (c) 2005-2012 OpenArena Team", UI_CENTER|UI_SMALLFONT, color );
UI_DrawString( 0, 480-14, va("^7Protocol: %i",(int)trap_Cvar_VariableValue("protocol")), UI_SMALLFONT, color);
}

View File

@@ -756,18 +756,10 @@ typedef struct {
int newBotIndex;
char newBotName[16];
//menulist_s punkbuster;
} serveroptions_t;
static serveroptions_t s_serveroptions;
/*static const char *dedicated_list[] = {
"No",
"LAN",
"Internet",
NULL
};*/
static const char *playerType_list[] = {
"Open",
"Bot",
@@ -860,13 +852,13 @@ static void ServerOptions_Start( void ) {
timelimit = atoi( s_serveroptions.timelimit.field.buffer );
fraglimit = atoi( s_serveroptions.fraglimit.field.buffer );
flaglimit = atoi( s_serveroptions.flaglimit.field.buffer );
friendlyfire = s_serveroptions.friendlyfire.curvalue;
friendlyfire = s_serveroptions.friendlyfire.curvalue;
pure = s_serveroptions.pure.curvalue;
lan = s_serveroptions.lan.curvalue;
pmove = s_serveroptions.pmove.curvalue;
instantgib = s_serveroptions.instantgib.curvalue;
rockets = s_serveroptions.rockets.curvalue;
danmaku = s_serveroptions.danmaku.curvalue;
danmaku = s_serveroptions.danmaku.curvalue;
oneway = s_serveroptions.oneway.curvalue;
//Sago: For some reason you need to add 1 to curvalue to get the UI to show the right thing (fixed?)
lmsMode = s_serveroptions.lmsMode.curvalue; //+1;
@@ -898,43 +890,41 @@ static void ServerOptions_Start( void ) {
case GT_TEAM:
trap_Cvar_SetValue( "ui_team_fraglimit", fraglimit );
trap_Cvar_SetValue( "ui_team_timelimit", timelimit );
trap_Cvar_SetValue( "ui_team_friendlt", friendlyfire );
trap_Cvar_SetValue( "ui_team_friendly", friendlyfire );
break;
case GT_CTF:
trap_Cvar_SetValue( "ui_ctf_fraglimit", fraglimit );
trap_Cvar_SetValue( "ui_ctf_timelimit", timelimit );
trap_Cvar_SetValue( "ui_ctf_friendlt", friendlyfire );
trap_Cvar_SetValue( "ui_ctf_friendly", friendlyfire );
break;
case GT_1FCTF:
trap_Cvar_SetValue( "ui_1fctf_capturelimit", fraglimit );
trap_Cvar_SetValue( "ui_1fctf_timelimit", timelimit );
trap_Cvar_SetValue( "ui_1fctf_friendlt", friendlyfire );
trap_Cvar_SetValue( "ui_1fctf_friendly", friendlyfire );
break;
case GT_OBELISK:
trap_Cvar_SetValue( "ui_overload_capturelimit", fraglimit );
trap_Cvar_SetValue( "ui_overload_timelimit", timelimit );
trap_Cvar_SetValue( "ui_overload_friendlt", friendlyfire );
trap_Cvar_SetValue( "ui_overload_friendly", friendlyfire );
break;
case GT_HARVESTER:
trap_Cvar_SetValue( "ui_harvester_capturelimit", fraglimit );
trap_Cvar_SetValue( "ui_harvester_timelimit", timelimit );
trap_Cvar_SetValue( "ui_harvester_friendlt", friendlyfire );
trap_Cvar_SetValue( "ui_harvester_friendly", friendlyfire );
break;
case GT_ELIMINATION:
trap_Cvar_SetValue( "ui_elimination_capturelimit", fraglimit );
trap_Cvar_SetValue( "ui_elimination_timelimit", timelimit );
//trap_Cvar_SetValue( "ui_elimination_friendlt", friendlyfire );
break;
case GT_CTF_ELIMINATION:
trap_Cvar_SetValue( "ui_ctf_elimination_capturelimit", fraglimit );
trap_Cvar_SetValue( "ui_ctf_elimination_timelimit", timelimit );
//trap_Cvar_SetValue( "ui_ctf_elimination_friendlt", friendlyfire );
break;
case GT_LMS:
@@ -945,12 +935,11 @@ static void ServerOptions_Start( void ) {
case GT_DOUBLE_D:
trap_Cvar_SetValue( "ui_dd_capturelimit", fraglimit );
trap_Cvar_SetValue( "ui_dd_timelimit", timelimit );
trap_Cvar_SetValue( "ui_dd_friendlt", friendlyfire );
trap_Cvar_SetValue( "ui_dd_friendly", friendlyfire );
break;
}
trap_Cvar_SetValue( "sv_maxclients", Com_Clamp( 0, 12, maxclients ) );
// trap_Cvar_SetValue( "dedicated", Com_Clamp( 0, 2, dedicated ) );
trap_Cvar_SetValue ("timelimit", Com_Clamp( 0, timelimit, timelimit ) );
trap_Cvar_SetValue ("fraglimit", Com_Clamp( 0, fraglimit, fraglimit ) );
trap_Cvar_SetValue ("capturelimit", Com_Clamp( 0, flaglimit, flaglimit ) );