* Added bugfixes for builder, now much more useful command. (See Issue 64)

* Added extreme mod
  * `g_modBuildableHealth`: Buildable health *(Percent)*
  * `g_modBuildableSpeed`: Buildable fire rate *(Percent)*
  * `g_modHumanStamina`: Human stamina *(Percent)*
  * `g_modHumanHealth`: Human health *(Percent)*
  * `g_modAlienHealth`: Alien health *(Percent)*
  * `g_modHumanRate`: Human fire rate *(Percent)*
  * `g_modAlienRate`: Alien fire rate *(Percent)*
  * `g_modWeaponAmmo`: Weapon ammo per clip *(Percent)*
  * `g_modWeaponReload`: Adjust's Weapon reload time *(Percent)*

Wiki updated as well.
This matches release 1.5.0.4
This commit is contained in:
Paradox460 committed 2008-03-15 20:00:49 +00:00
1 parent 56a06e3ff0
commit 9a5647df1d
9 files changed
+253 -21

No files matched your search

+119
View File
@@ -32,6 +32,8 @@ void trap_FS_Write( const void *buffer, int len, fileHandle_t f );
void trap_FS_FCloseFile( fileHandle_t f );
void trap_FS_Seek( fileHandle_t f, long offset, fsOrigin_t origin ); // fsOrigin_t
modExtremeType_t modEntry[ MOD_BG_COUNT ];
buildableAttributes_t bg_buildableList[ ] =
{
{
@@ -5767,4 +5769,121 @@ void BG_ClientListParse( clientList_t *list, const char *s )
sscanf( s, "%x%x", &list->hi, &list->lo );
}
void BG_MOD_set( modExtremeType_t entry, int value )
{
if( entry >= 0 && entry < MOD_BG_COUNT )
{
if( value < 0 )
value = 0;
modEntry[ entry ] = value;
}
}
void BG_MOD_update( void )
{
static qboolean updated = qfalse;
int i;
if( updated ) return;
updated = qtrue;
for( i = 0; i < bg_numBuildables; i++ )
{
if( modEntry[ MOD_BG_BUILDABLE_HEALTH ] )
{
bg_buildableList[ i ].health =
bg_buildableList[ i ].health * modEntry[ MOD_BG_BUILDABLE_HEALTH ] / 100;
}
if( modEntry[ MOD_BG_BUILDABLE_SPEED ] )
{
bg_buildableList[ i ].turretFireSpeed =
bg_buildableList[ i ].turretFireSpeed * 100 / modEntry[ MOD_BG_BUILDABLE_SPEED ];
}
}
for( i = 0; i < bg_numPclasses; i++ )
{
if( bg_classList[ i ].classNum == PCL_HUMAN ||
bg_classList[ i ].classNum == PCL_HUMAN_BSUIT )
{
if( modEntry[ MOD_BG_HUMAN_HEALTH ] )
{
bg_classList[ i ].health =
bg_classList[ i ].health * modEntry[ MOD_BG_HUMAN_HEALTH ] / 100;
}
}
else
{
if( modEntry[ MOD_BG_ALIEN_HEALTH ] )
bg_classList[ i ].health =
bg_classList[ i ].health * modEntry[ MOD_BG_ALIEN_HEALTH ] / 100;
}
}
for( i = 0; i < bg_numWeapons; i++ )
{
if( modEntry[ MOD_BG_WEAPON_AMMO ] &&
bg_weapons[ i ].weaponNum != WP_ALEVEL3_UPG )
{
bg_weapons[ i ].maxAmmo =
bg_weapons[ i ].maxAmmo * modEntry[ MOD_BG_WEAPON_AMMO ] / 100;
}
if( modEntry[ MOD_BG_ALIEN_RATE ] &&
bg_weapons[ i ].weaponNum >= WP_ALEVEL0 &&
bg_weapons[ i ].weaponNum <= WP_ALEVEL4 )
{
bg_weapons[ i ].repeatRate1 =
bg_weapons[ i ].repeatRate1 * 100 / modEntry[ MOD_BG_ALIEN_RATE ];
bg_weapons[ i ].repeatRate2 =
bg_weapons[ i ].repeatRate2 * 100 / modEntry[ MOD_BG_ALIEN_RATE ];
bg_weapons[ i ].repeatRate3 =
bg_weapons[ i ].repeatRate3 * 100 / modEntry[ MOD_BG_ALIEN_RATE ];
}
if( modEntry[ MOD_BG_HUMAN_RATE ] &&
bg_weapons[ i ].weaponNum >= WP_BLASTER &&
bg_weapons[ i ].weaponNum <= WP_LUCIFER_CANNON )
{
bg_weapons[ i ].repeatRate1 =
bg_weapons[ i ].repeatRate1 * 100 / modEntry[ MOD_BG_HUMAN_RATE ];
bg_weapons[ i ].repeatRate2 =
bg_weapons[ i ].repeatRate2 * 100 / modEntry[ MOD_BG_HUMAN_RATE ];
bg_weapons[ i ].repeatRate3 =
bg_weapons[ i ].repeatRate3 * 100 / modEntry[ MOD_BG_HUMAN_RATE ];
}
if( modEntry[ MOD_BG_BUILDABLE_HEALTH ] &&
modEntry[ MOD_BG_HUMAN_RATE ] &&
( bg_weapons[ i ].weaponNum == WP_ABUILD || bg_weapons[ i ].weaponNum == WP_ABUILD2 ) )
{
int avg;
avg = ( modEntry[ MOD_BG_BUILDABLE_HEALTH ] + MOD_BG_HUMAN_RATE ) / 2;
bg_weapons[ i ].repeatRate1 = bg_weapons[ i ].repeatRate1 * 100 / avg;
bg_weapons[ i ].repeatRate2 = bg_weapons[ i ].repeatRate2 * 100 / avg;
bg_weapons[ i ].repeatRate3 = bg_weapons[ i ].repeatRate3 * 100 / avg;
}
if( modEntry[ MOD_BG_BUILDABLE_HEALTH ] &&
modEntry[ MOD_BG_ALIEN_RATE ] &&
( bg_weapons[ i ].weaponNum == WP_HBUILD || bg_weapons[ i ].weaponNum == WP_HBUILD2 ) )
{
int avg;
avg = ( modEntry[ MOD_BG_BUILDABLE_HEALTH ] + MOD_BG_ALIEN_RATE ) / 2;
bg_weapons[ i ].repeatRate1 = bg_weapons[ i ].repeatRate1 * 100 / avg;
bg_weapons[ i ].repeatRate2 = bg_weapons[ i ].repeatRate2 * 100 / avg;
bg_weapons[ i ].repeatRate3 = bg_weapons[ i ].repeatRate3 * 100 / avg;
}
if( modEntry[ MOD_BG_WEAPON_RELOAD ] )
{
bg_weapons[ i ].reloadTime =
bg_weapons[ i ].reloadTime * 100 / modEntry[ MOD_BG_WEAPON_RELOAD ];
}
}
}