本当の弾丸地獄
This commit is contained in:
@@ -345,7 +345,7 @@ void CG_ParseServerinfo( void ) {
|
||||
cgs.timelimit = atoi( Info_ValueForKey( info, "timelimit" ) );
|
||||
cgs.maxclients = atoi( Info_ValueForKey( info, "sv_maxclients" ) );
|
||||
cgs.roundtime = atoi( Info_ValueForKey( info, "elimination_roundtime" ) );
|
||||
cgs.nopickup = atoi( Info_ValueForKey( info, "g_rockets" ) ) + atoi( Info_ValueForKey( info, "g_instantgib" ) ) + atoi( Info_ValueForKey( info, "g_elimination" ) );
|
||||
cgs.nopickup = atoi( Info_ValueForKey( info, "g_rockets" ) ) + atoi( Info_ValueForKey( info, "g_instantgib" ) ) + atoi( Info_ValueForKey( info, "g_elimination" ) ) + atoi( Info_ValueForKey( info, "g_bullethell" ) );
|
||||
cgs.lms_mode = atoi( Info_ValueForKey( info, "g_lms_mode" ) );
|
||||
cgs.multiKill = atoi( Info_ValueForKey( info, "g_multiKill" ) );
|
||||
mapname = Info_ValueForKey( info, "mapname" );
|
||||
|
@@ -188,7 +188,7 @@ int BotAI_GetEntityState( int entityNum, entityState_t *state ) {
|
||||
memset( state, 0, sizeof(entityState_t) );
|
||||
if (!ent->inuse) return qfalse;
|
||||
if (!ent->r.linked) return qfalse;
|
||||
if ( !(g_gametype.integer == GT_ELIMINATION || g_gametype.integer == GT_LMS ||g_instantgib.integer || g_rockets.integer || g_elimination_allgametypes.integer || g_gametype.integer==GT_CTF_ELIMINATION)
|
||||
if ( !(g_gametype.integer == GT_ELIMINATION || g_gametype.integer == GT_LMS ||g_instantgib.integer || g_rockets.integer || g_bullethell.integer || g_elimination_allgametypes.integer || g_gametype.integer==GT_CTF_ELIMINATION)
|
||||
&& (ent->r.svFlags & SVF_NOCLIENT) ) return qfalse;
|
||||
memcpy( state, &ent->s, sizeof(entityState_t) );
|
||||
return qtrue;
|
||||
@@ -1498,7 +1498,7 @@ int BotAIStartFrame(int time) {
|
||||
trap_BotLibUpdateEntity(i, NULL);
|
||||
continue;
|
||||
}
|
||||
if ( !(g_gametype.integer == GT_ELIMINATION || g_gametype.integer == GT_LMS ||g_instantgib.integer || g_rockets.integer || g_elimination_allgametypes.integer || g_gametype.integer==GT_CTF_ELIMINATION)
|
||||
if ( !(g_gametype.integer == GT_ELIMINATION || g_gametype.integer == GT_LMS ||g_instantgib.integer || g_rockets.integer || g_bullethell.integer || g_elimination_allgametypes.integer || g_gametype.integer==GT_CTF_ELIMINATION)
|
||||
&& ent->r.svFlags & SVF_NOCLIENT) {
|
||||
trap_BotLibUpdateEntity(i, NULL);
|
||||
continue;
|
||||
|
@@ -1855,9 +1855,9 @@ void ClientSpawn(gentity_t *ent) {
|
||||
// savedAreaBits = client->areabits;
|
||||
accuracy_hits = client->accuracy_hits;
|
||||
accuracy_shots = client->accuracy_shots;
|
||||
memcpy(accuracy,client->accuracy,sizeof(accuracy));
|
||||
memcpy(accuracy,client->accuracy,sizeof(accuracy));
|
||||
|
||||
memcpy(persistant,client->ps.persistant,MAX_PERSISTANT*sizeof(int));
|
||||
memcpy(persistant,client->ps.persistant,MAX_PERSISTANT*sizeof(int));
|
||||
eventSequence = client->ps.eventSequence;
|
||||
|
||||
Com_Memset (client, 0, sizeof(*client));
|
||||
@@ -2009,8 +2009,40 @@ else
|
||||
client->ps.stats[STAT_WEAPONS] = ( 1 << WP_ROCKET_LAUNCHER );
|
||||
client->ps.ammo[WP_ROCKET_LAUNCHER] = -1;
|
||||
}
|
||||
|
||||
G_SetOrigin( ent, spawn_origin );
|
||||
// True Bullet Hell (all weapons w/ inf. ammo)
|
||||
if(g_bullethell.integer) {
|
||||
client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_GAUNTLET );
|
||||
client->ps.ammo[WP_GAUNTLET] = -1;
|
||||
client->ps.ammo[WP_GRAPPLING_HOOK] = -1;
|
||||
// Machinegun
|
||||
client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_MACHINEGUN );
|
||||
client->ps.ammo[WP_MACHINEGUN] = -1;
|
||||
// Shotgun
|
||||
client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_SHOTGUN );
|
||||
client->ps.ammo[WP_SHOTGUN] = -1;
|
||||
// Grenade Launcher
|
||||
client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_GRENADE_LAUNCHER );
|
||||
client->ps.ammo[WP_GRENADE_LAUNCHER] = -1;
|
||||
// Rocket Launcher
|
||||
client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_ROCKET_LAUNCHER );
|
||||
client->ps.ammo[WP_ROCKET_LAUNCHER] = -1;
|
||||
// Lightning Gun (aka Shaft, aka Thunderbolt)
|
||||
client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_LIGHTNING );
|
||||
client->ps.ammo[WP_LIGHTNING] = -1;
|
||||
// Railgun
|
||||
client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_RAILGUN );
|
||||
client->ps.ammo[WP_RAILGUN] = -1;
|
||||
// Plasma Gun
|
||||
client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_PLASMAGUN );
|
||||
client->ps.ammo[WP_PLASMAGUN] = -1;
|
||||
// BFG10K
|
||||
client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_BFG);
|
||||
client->ps.ammo[WP_BFG] = -1;
|
||||
// Grappling Hook
|
||||
// This one doesn't cause any harm, but it can be a handy tool
|
||||
client->ps.stats[STAT_WEAPONS] |= ( 1 << WP_GRAPPLING_HOOK);
|
||||
}
|
||||
G_SetOrigin( ent, spawn_origin );
|
||||
VectorCopy( spawn_origin, client->ps.origin );
|
||||
|
||||
// the respawned flag will be cleared after the attack and jump keys come up
|
||||
|
@@ -130,7 +130,7 @@ void TossClientItems( gentity_t *self ) {
|
||||
}
|
||||
}
|
||||
|
||||
if (g_instantgib.integer || g_rockets.integer || g_gametype.integer == GT_CTF_ELIMINATION || g_elimination_allgametypes.integer){
|
||||
if (g_instantgib.integer || g_rockets.integer || g_bullethell.integer || g_gametype.integer == GT_CTF_ELIMINATION || g_elimination_allgametypes.integer){
|
||||
//Nothing!
|
||||
}
|
||||
else
|
||||
|
@@ -416,7 +416,7 @@ void Touch_Item (gentity_t *ent, gentity_t *other, trace_t *trace) {
|
||||
qboolean predict;
|
||||
|
||||
//instant gib
|
||||
if ((g_instantgib.integer || g_rockets.integer || g_gametype.integer == GT_CTF_ELIMINATION || g_elimination_allgametypes.integer)
|
||||
if ((g_instantgib.integer || g_rockets.integer || g_bullethell.integer || g_gametype.integer == GT_CTF_ELIMINATION || g_elimination_allgametypes.integer)
|
||||
&& ent->item->giType != IT_TEAM)
|
||||
return;
|
||||
|
||||
@@ -461,11 +461,9 @@ void Touch_Item (gentity_t *ent, gentity_t *other, trace_t *trace) {
|
||||
switch( ent->item->giType ) {
|
||||
case IT_WEAPON:
|
||||
respawn = Pickup_Weapon(ent, other);
|
||||
// predict = qfalse;
|
||||
break;
|
||||
case IT_AMMO:
|
||||
respawn = Pickup_Ammo(ent, other);
|
||||
// predict = qfalse;
|
||||
break;
|
||||
case IT_ARMOR:
|
||||
respawn = Pickup_Armor(ent, other);
|
||||
@@ -712,8 +710,7 @@ void FinishSpawningItem( gentity_t *ent ) {
|
||||
|
||||
|
||||
// powerups don't spawn in for a while (but not in elimination)
|
||||
if(g_gametype.integer != GT_ELIMINATION && g_gametype.integer != GT_CTF_ELIMINATION && g_gametype.integer != GT_LMS
|
||||
&& !g_instantgib.integer && !g_elimination_allgametypes.integer && !g_rockets.integer )
|
||||
if(g_gametype.integer != GT_ELIMINATION && g_gametype.integer != GT_CTF_ELIMINATION && g_gametype.integer != GT_LMS && !g_instantgib.integer && !g_elimination_allgametypes.integer && !g_rockets.integer && !g_bullethell.integer )
|
||||
if ( ent->item->giType == IT_POWERUP ) {
|
||||
float respawn;
|
||||
|
||||
@@ -825,15 +822,24 @@ void ClearRegisteredItems( void ) {
|
||||
if(g_instantgib.integer) {
|
||||
if(g_instantgib.integer & 2)
|
||||
RegisterItem( BG_FindItemForWeapon( WP_GAUNTLET ) );
|
||||
//RegisterItem( BG_FindItemForWeapon( WP_MACHINEGUN ) );
|
||||
RegisterItem( BG_FindItemForWeapon( WP_RAILGUN ) );
|
||||
}
|
||||
else
|
||||
if(g_rockets.integer) {
|
||||
//RegisterItem( BG_FindItemForWeapon( WP_GAUNTLET ) );
|
||||
//RegisterItem( BG_FindItemForWeapon( WP_MACHINEGUN ) );
|
||||
RegisterItem( BG_FindItemForWeapon( WP_ROCKET_LAUNCHER ) );
|
||||
}
|
||||
else
|
||||
if(g_bullethell.integer) {
|
||||
RegisterItem( BG_FindItemForWeapon( WP_GAUNTLET ) );
|
||||
RegisterItem( BG_FindItemForWeapon( WP_MACHINEGUN ) );
|
||||
RegisterItem( BG_FindItemForWeapon( WP_SHOTGUN ) );
|
||||
RegisterItem( BG_FindItemForWeapon( WP_GRENADE_LAUNCHER ) );
|
||||
RegisterItem( BG_FindItemForWeapon( WP_ROCKET_LAUNCHER ) );
|
||||
RegisterItem( BG_FindItemForWeapon( WP_LIGHTNING ) );
|
||||
RegisterItem( BG_FindItemForWeapon( WP_RAILGUN ) );
|
||||
RegisterItem( BG_FindItemForWeapon( WP_PLASMAGUN ) );
|
||||
RegisterItem( BG_FindItemForWeapon( WP_BFG ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
// players always start with the base weapon
|
||||
@@ -968,7 +974,7 @@ void G_SpawnItem (gentity_t *ent, gitem_t *item) {
|
||||
ent->physicsBounce = 0.50; // items are bouncy
|
||||
|
||||
if (g_gametype.integer == GT_ELIMINATION || g_gametype.integer == GT_LMS ||
|
||||
( item->giType != IT_TEAM && (g_instantgib.integer || g_rockets.integer || g_elimination_allgametypes.integer || g_gametype.integer==GT_CTF_ELIMINATION) ) ) {
|
||||
( item->giType != IT_TEAM && (g_instantgib.integer || g_rockets.integer || g_bullethell.integer || g_elimination_allgametypes.integer || g_gametype.integer==GT_CTF_ELIMINATION) ) ) {
|
||||
ent->s.eFlags |= EF_NODRAW; //Invisible in elimination
|
||||
ent->r.svFlags |= SVF_NOCLIENT; //Don't broadcast
|
||||
}
|
||||
|
@@ -1071,6 +1071,9 @@ extern vmCvar_t g_elimination_lockspectator;
|
||||
|
||||
extern vmCvar_t g_rockets;
|
||||
|
||||
// True Bullet Hell
|
||||
extern vmCvar_t g_bullethell;
|
||||
|
||||
//new in elimination Beta2
|
||||
extern vmCvar_t g_instantgib;
|
||||
extern vmCvar_t g_vampire;
|
||||
|
@@ -126,6 +126,9 @@ vmCvar_t g_elimination_lockspectator;
|
||||
|
||||
vmCvar_t g_rockets;
|
||||
|
||||
// True Bullet Hell
|
||||
vmCvar_t g_bullethell;
|
||||
|
||||
//dmn_clowns suggestions (with my idea of implementing):
|
||||
vmCvar_t g_instantgib;
|
||||
vmCvar_t g_vampire;
|
||||
@@ -332,7 +335,6 @@ static cvarTable_t gameCvarTable[] = {
|
||||
|
||||
// Nexuiz-style Rocket Arena
|
||||
{ &g_rockets, "g_rockets", "0", CVAR_SERVERINFO | CVAR_LATCH | CVAR_NORESTART, 0, qfalse },
|
||||
|
||||
// Instagib
|
||||
{ &g_instantgib, "g_instantgib", "0", CVAR_SERVERINFO | CVAR_LATCH, 0, qfalse },
|
||||
// Vampire
|
||||
@@ -343,10 +345,11 @@ static cvarTable_t gameCvarTable[] = {
|
||||
// Last Man Standing
|
||||
{ &g_lms_lives, "g_lms_lives", "1", CVAR_NORESTART, 0, qtrue },
|
||||
{ &g_lms_mode, "g_lms_mode", "0", CVAR_SERVERINFO | CVAR_ARCHIVE | CVAR_NORESTART, 0, qtrue },
|
||||
|
||||
// Catch-up
|
||||
{ &g_catchup, "g_catchup", "0", CVAR_ARCHIVE | CVAR_NORESTART, 0, qtrue},
|
||||
|
||||
// True Bullet Hell
|
||||
{ &g_bullethell, "g_bullethell", "0", CVAR_SERVERINFO | CVAR_LATCH | CVAR_NORESTART, 0, qfalse },
|
||||
|
||||
{ &g_autonextmap, "g_autonextmap", "0", CVAR_ARCHIVE | CVAR_NORESTART, 0, qfalse},
|
||||
{ &g_mappools, "g_mappools", "0\\maps_dm.cfg\\1\\maps_tourney.cfg\\3\\maps_tdm.cfg\\4\\maps_ctf.cfg\\5\\maps_oneflag.cfg\\6\\maps_obelisk.cfg\
|
||||
\\7\\maps_harvester.cfg\\8\\maps_elimination.cfg\\9\\maps_ctf.cfg\\10\\maps_lms.cfg\\11\\maps_dd.cfg\\12\\maps_dom.cfg\\", CVAR_ARCHIVE | CVAR_NORESTART, 0, qfalse},
|
||||
@@ -583,7 +586,7 @@ void G_UpdateCvars( void ) {
|
||||
VoteParseCustomVotes();
|
||||
|
||||
//Here comes the cvars that must trigger a map_restart
|
||||
if (cv->vmCvar == &g_instantgib || cv->vmCvar == &g_rockets || cv->vmCvar == &g_elimination_allgametypes) {
|
||||
if (cv->vmCvar == &g_instantgib || cv->vmCvar == &g_rockets || cv->vmCvar == &g_bullethell || cv->vmCvar == &g_elimination_allgametypes) {
|
||||
trap_Cvar_Set("sv_dorestart","1");
|
||||
}
|
||||
|
||||
@@ -669,6 +672,7 @@ void G_InitGame( int levelTime, int randomSeed, int restart ) {
|
||||
{
|
||||
g_instantgib.integer = 0;
|
||||
g_rockets.integer = 0;
|
||||
g_bullethell.integer = 0;
|
||||
g_vampire.value = 0.0f;
|
||||
}
|
||||
|
||||
|
@@ -734,6 +734,7 @@ typedef struct {
|
||||
menuradiobutton_s oneway;
|
||||
menuradiobutton_s instantgib;
|
||||
menuradiobutton_s rockets;
|
||||
menuradiobutton_s bullethell;
|
||||
menulist_s lmsMode;
|
||||
menulist_s botSkill;
|
||||
|
||||
@@ -847,6 +848,7 @@ static void ServerOptions_Start( void ) {
|
||||
int lan;
|
||||
int instantgib;
|
||||
int rockets;
|
||||
int bullethell;
|
||||
int oneway;
|
||||
int lmsMode;
|
||||
int skill;
|
||||
@@ -864,7 +866,8 @@ static void ServerOptions_Start( void ) {
|
||||
pmove = s_serveroptions.pmove.curvalue;
|
||||
instantgib = s_serveroptions.instantgib.curvalue;
|
||||
rockets = s_serveroptions.rockets.curvalue;
|
||||
oneway = s_serveroptions.oneway.curvalue;
|
||||
bullethell = s_serveroptions.bullethell.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;
|
||||
skill = s_serveroptions.botSkill.curvalue + 1;
|
||||
@@ -956,6 +959,7 @@ static void ServerOptions_Start( void ) {
|
||||
trap_Cvar_SetValue( "sv_lanForceRate", lan );
|
||||
trap_Cvar_SetValue( "g_instantgib", instantgib );
|
||||
trap_Cvar_SetValue( "g_rockets", rockets );
|
||||
trap_Cvar_SetValue( "g_bullethell", bullethell );
|
||||
trap_Cvar_SetValue( "g_lms_mode", lmsMode);
|
||||
trap_Cvar_SetValue( "elimination_ctf_oneway", oneway );
|
||||
switch(pmove) {
|
||||
@@ -1204,6 +1208,15 @@ static void ServerOptions_StatusBar_Allrockets( void* ptr ) {
|
||||
UI_DrawString( 320, 440, "Only Rocket launcher with Inf. ammo", UI_CENTER|UI_SMALLFONT, colorWhite );
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
ServerOptions_StatusBar_BulletHell
|
||||
=================
|
||||
*/
|
||||
static void ServerOptions_StatusBar_BulletHell( void* ptr ) {
|
||||
UI_DrawString( 320, 440, "All standard weapons with Inf. ammo", UI_CENTER|UI_SMALLFONT, colorWhite );
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
ServerOptions_StatusBar_Pure
|
||||
@@ -1462,7 +1475,8 @@ static void ServerOptions_SetMenuItems( void ) {
|
||||
s_serveroptions.lan.curvalue = Com_Clamp( 0, 1, trap_Cvar_VariableValue( "sv_lanforcerate" ) );
|
||||
s_serveroptions.instantgib.curvalue = Com_Clamp( 0, 1, trap_Cvar_VariableValue( "g_instantgib" ) );
|
||||
s_serveroptions.rockets.curvalue = Com_Clamp( 0, 1, trap_Cvar_VariableValue( "g_rockets" ) );
|
||||
s_serveroptions.lmsMode.curvalue = Com_Clamp( 0, 3, trap_Cvar_VariableValue("g_lms_mode") );
|
||||
s_serveroptions.bullethell.curvalue = Com_Clamp( 0, 1, trap_Cvar_VariableValue( "g_bullethell" ) );
|
||||
s_serveroptions.lmsMode.curvalue = Com_Clamp( 0, 3, trap_Cvar_VariableValue("g_lms_mode") );
|
||||
s_serveroptions.oneway.curvalue = Com_Clamp( 0, 1, trap_Cvar_VariableValue( "elimination_ctf_oneway" ) );
|
||||
s_serveroptions.pmove.curvalue = 0;
|
||||
if(trap_Cvar_VariableValue( "pmove_fixed" ))
|
||||
@@ -1667,7 +1681,17 @@ static void ServerOptions_MenuInit( qboolean multiplayer ) {
|
||||
s_serveroptions.rockets.generic.y = y;
|
||||
s_serveroptions.rockets.generic.name = "All rockets:";
|
||||
s_serveroptions.rockets.generic.statusbar = ServerOptions_StatusBar_Allrockets;
|
||||
|
||||
|
||||
// True Bullet Hell
|
||||
y += BIGCHAR_HEIGHT+2;
|
||||
s_serveroptions.bullethell.generic.type = MTYPE_RADIOBUTTON;
|
||||
s_serveroptions.bullethell.generic.flags = QMF_PULSEIFFOCUS|QMF_SMALLFONT;
|
||||
s_serveroptions.bullethell.generic.x = OPTIONS_X;
|
||||
s_serveroptions.bullethell.generic.y = y;
|
||||
s_serveroptions.bullethell.generic.name = "Bullet hell:";
|
||||
s_serveroptions.bullethell.generic.statusbar = ServerOptions_StatusBar_BulletHell;
|
||||
|
||||
|
||||
if( s_serveroptions.gametype == GT_LMS ) {
|
||||
y += BIGCHAR_HEIGHT+2;
|
||||
s_serveroptions.lmsMode.generic.type = MTYPE_SPINCONTROL;
|
||||
@@ -1814,6 +1838,7 @@ static void ServerOptions_MenuInit( qboolean multiplayer ) {
|
||||
Menu_AddItem( &s_serveroptions.menu, &s_serveroptions.pure );
|
||||
Menu_AddItem( &s_serveroptions.menu, &s_serveroptions.instantgib );
|
||||
Menu_AddItem( &s_serveroptions.menu, &s_serveroptions.rockets );
|
||||
Menu_AddItem( &s_serveroptions.menu, &s_serveroptions.bullethell );
|
||||
if( s_serveroptions.gametype == GT_LMS) {
|
||||
Menu_AddItem( &s_serveroptions.menu, &s_serveroptions.lmsMode );
|
||||
}
|
||||
|
Reference in New Issue
Block a user