mirror of
https://github.com/dhewm/dhewm3-sdk.git
synced 2025-04-05 00:50:56 +00:00
Sikkmod v1.2 (game/ only)
doesn't seem to exist for d3xp/ ?
This commit is contained in:
parent
ac07261d2f
commit
2bb7f6ae3d
23 changed files with 845 additions and 610 deletions
|
@ -1099,7 +1099,8 @@ void idAFEntity_Gibbable::Damage( idEntity *inflictor, idEntity *attacker, const
|
|||
return;
|
||||
}
|
||||
idAFEntity_Base::Damage( inflictor, attacker, dir, damageDefName, damageScale, location );
|
||||
if ( health < -20 && spawnArgs.GetBool( "gib" ) ) {
|
||||
// sikk - Changed gib health from -20 to -health
|
||||
if ( health < -spawnArgs.GetInt( "health" ) && spawnArgs.GetBool( "gib" ) ) {
|
||||
Gib( dir, damageDefName );
|
||||
}
|
||||
}
|
||||
|
@ -2695,7 +2696,7 @@ idGameEdit::AF_CreateMesh
|
|||
idRenderModel *idGameEdit::AF_CreateMesh( const idDict &args, idVec3 &meshOrigin, idMat3 &meshAxis, bool &poseIsSet ) {
|
||||
int i, jointNum;
|
||||
const idDeclAF *af;
|
||||
const idDeclAF_Body *fb;
|
||||
const idDeclAF_Body *fb = NULL; // sikk - warning C4701: potentially uninitialized local variable used
|
||||
renderEntity_t ent;
|
||||
idVec3 origin, *bodyOrigin, *newBodyOrigin, *modifiedOrigin;
|
||||
idMat3 axis, *bodyAxis, *newBodyAxis, *modifiedAxis;
|
||||
|
|
|
@ -608,8 +608,16 @@ void idActor::Spawn( void ) {
|
|||
blink_min = SEC2MS( spawnArgs.GetFloat( "blink_min", "0.5" ) );
|
||||
blink_max = SEC2MS( spawnArgs.GetFloat( "blink_max", "8" ) );
|
||||
|
||||
// sikk---> Player Head Type
|
||||
// set up the head anim if necessary
|
||||
int headAnim = headAnimator->GetAnim( "def_head" );
|
||||
int headAnim;
|
||||
if ( g_playerHeadType.GetBool() && spawnArgs.GetString( "def_head_custom" )[ 0 ] ) {
|
||||
headAnim = headAnimator->GetAnim( "def_head_custom" );
|
||||
} else {
|
||||
headAnim = headAnimator->GetAnim( "def_head" );
|
||||
}
|
||||
// <---sikk
|
||||
|
||||
if ( headAnim ) {
|
||||
if ( headEnt ) {
|
||||
headAnimator->CycleAnim( ANIMCHANNEL_ALL, headAnim, gameLocal.time, 0 );
|
||||
|
@ -668,7 +676,14 @@ void idActor::SetupHead( void ) {
|
|||
return;
|
||||
}
|
||||
|
||||
headModel = spawnArgs.GetString( "def_head", "" );
|
||||
// sikk---> Player Head Type
|
||||
if ( g_playerHeadType.GetBool() && spawnArgs.GetString( "def_head_custom" )[ 0 ] ) {
|
||||
headModel = spawnArgs.GetString( "def_head_custom" );
|
||||
} else {
|
||||
headModel = spawnArgs.GetString( "def_head", "" );
|
||||
}
|
||||
// <---sikk
|
||||
|
||||
if ( headModel[ 0 ] ) {
|
||||
jointName = spawnArgs.GetString( "head_joint" );
|
||||
joint = animator.GetJointHandle( jointName );
|
||||
|
@ -2179,13 +2194,17 @@ void idActor::Damage( idEntity *inflictor, idEntity *attacker, const idVec3 &dir
|
|||
gameLocal.Error( "Unknown damageDef '%s'", damageDefName );
|
||||
}
|
||||
|
||||
// sikk---> Ammo Management: Custom Ammo Damage
|
||||
// sikk---> Damage Type
|
||||
int damage;
|
||||
if ( g_ammoDamageType.GetBool() && damageDef->GetInt( "custom_damage" ) )
|
||||
damage = damageDef->GetInt( "custom_damage" ) * damageScale;
|
||||
else
|
||||
damage = damageDef->GetInt( "damage" ) * damageScale;
|
||||
if ( g_damageType.GetInteger() == 1 && damageDef->GetInt( "damage_doom_scale" ) ) {
|
||||
damage = damageDef->GetInt( "damage_doom_scale" ) * ( gameLocal.random.RandomInt( 255 ) % damageDef->GetInt( "damage_doom_range" ) + 1 );
|
||||
} else if ( g_damageType.GetInteger() == 2 && damageDef->GetInt( "damage_custom" ) ) {
|
||||
damage = damageDef->GetInt( "damage_custom" );
|
||||
} else {
|
||||
damage = damageDef->GetInt( "damage" );
|
||||
}
|
||||
// <---sikk
|
||||
damage *= damageScale;
|
||||
damage = GetDamageForLocation( damage, location );
|
||||
|
||||
// inform the attacker that they hit someone
|
||||
|
@ -2197,7 +2216,8 @@ void idActor::Damage( idEntity *inflictor, idEntity *attacker, const idVec3 &dir
|
|||
health = -999;
|
||||
}
|
||||
Killed( inflictor, attacker, damage, dir, location );
|
||||
if ( ( health < -20 ) && spawnArgs.GetBool( "gib" ) && damageDef->GetBool( "gib" ) ) {
|
||||
// sikk - Changed gib health from -20 to -health
|
||||
if ( ( health < -spawnArgs.GetInt( "health" ) ) && spawnArgs.GetBool( "gib" ) && damageDef->GetBool( "gib" ) ) {
|
||||
Gib( dir, damageDefName );
|
||||
}
|
||||
} else {
|
||||
|
@ -2353,19 +2373,29 @@ void idActor::SetupDamageGroups( void ) {
|
|||
damageScale[ i ] = 1.0f;
|
||||
}
|
||||
|
||||
// sikk---> Doom 1/2 & custom Damage zones
|
||||
// set the percentage on damage zones
|
||||
arg = spawnArgs.MatchPrefix( "damage_scale ", NULL );
|
||||
const char* scalePrefix;
|
||||
if ( g_damageZoneType.GetInteger() == 1 )
|
||||
scalePrefix = "damage_scale_doom ";
|
||||
else if ( g_damageZoneType.GetInteger() == 2 )
|
||||
scalePrefix = "damage_scale_custom ";
|
||||
else
|
||||
scalePrefix = "damage_scale ";
|
||||
|
||||
arg = spawnArgs.MatchPrefix( scalePrefix, NULL );
|
||||
while ( arg ) {
|
||||
scale = atof( arg->GetValue() );
|
||||
groupname = arg->GetKey();
|
||||
groupname.Strip( "damage_scale " );
|
||||
groupname.Strip( scalePrefix );
|
||||
for( i = 0; i < damageScale.Num(); i++ ) {
|
||||
if ( damageGroups[ i ] == groupname ) {
|
||||
damageScale[ i ] = scale;
|
||||
}
|
||||
}
|
||||
arg = spawnArgs.MatchPrefix( "damage_scale ", arg );
|
||||
arg = spawnArgs.MatchPrefix( scalePrefix, arg );
|
||||
}
|
||||
// <---sikk
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -209,6 +209,8 @@ public:
|
|||
bool AnimDone( int channel, int blendFrames ) const;
|
||||
virtual void SpawnGibs( const idVec3 &dir, const char *damageDefName );
|
||||
|
||||
bool GetFinalBoss( void ) const { return finalBoss; }; // sikk - Cyberdemon Damage Type
|
||||
|
||||
protected:
|
||||
friend class idAnimState;
|
||||
|
||||
|
|
|
@ -541,7 +541,15 @@ void idEntity::Spawn( void ) {
|
|||
}
|
||||
}
|
||||
|
||||
health = spawnArgs.GetInt( "health" );
|
||||
// sikk---> Doom/Custom Health Values
|
||||
if ( g_enemyHealthType.GetInteger() == 1 && spawnArgs.GetInt( "health_doom" ) ) {
|
||||
health = spawnArgs.GetInt( "health_doom" );
|
||||
} else if ( g_enemyHealthType.GetInteger() == 2 && spawnArgs.GetInt( "health_custom" ) ) {
|
||||
health = spawnArgs.GetInt( "health_custom" );
|
||||
} else {
|
||||
health = spawnArgs.GetInt( "health" );
|
||||
}
|
||||
// <---sikk
|
||||
|
||||
InitDefaultPhysics( origin, axis );
|
||||
|
||||
|
@ -1457,7 +1465,7 @@ bool idEntity::UpdateRenderEntity( renderEntity_s *renderEntity, const renderVie
|
|||
return animator->CreateFrame( gameLocal.time, false );
|
||||
}
|
||||
|
||||
return false;
|
||||
return false; // sikk - warning C4702: unreachable code - DG: sikk commented this out, but why would this be unreachable?
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2558,7 +2566,7 @@ bool idEntity::RunPhysics( void ) {
|
|||
endTime = gameLocal.time;
|
||||
|
||||
gameLocal.push.InitSavingPushedEntityPositions();
|
||||
blockedPart = NULL;
|
||||
blockedPart = blockingEntity = NULL; // sikk - warning C4701: potentially uninitialized local variable used
|
||||
|
||||
// save the physics state of the whole team and disable the team for collision detection
|
||||
for ( part = this; part != NULL; part = part->teamChain ) {
|
||||
|
@ -2998,12 +3006,15 @@ void idEntity::Damage( idEntity *inflictor, idEntity *attacker, const idVec3 &di
|
|||
gameLocal.Error( "Unknown damageDef '%s'\n", damageDefName );
|
||||
}
|
||||
|
||||
// sikk---> Ammo Management: Custom Ammo Damage
|
||||
// sikk---> Damage Type
|
||||
int damage;
|
||||
if ( g_ammoDamageType.GetBool() && damageDef->GetInt( "custom_damage" ) )
|
||||
damage = damageDef->GetInt( "custom_damage" );
|
||||
else
|
||||
if ( g_damageType.GetInteger() == 1 && damageDef->GetInt( "damage_doom_scale" ) ) {
|
||||
damage = damageDef->GetInt( "damage_doom_scale" ) * ( gameLocal.random.RandomInt( 255 ) % damageDef->GetInt( "damage_doom_range" ) + 1 );
|
||||
} else if ( g_damageType.GetInteger() == 2 && damageDef->GetInt( "damage_custom" ) ) {
|
||||
damage = damageDef->GetInt( "damage_custom" );
|
||||
} else {
|
||||
damage = damageDef->GetInt( "damage" );
|
||||
}
|
||||
// <---sikk
|
||||
|
||||
// inform the attacker that they hit someone
|
||||
|
|
|
@ -227,6 +227,10 @@ void idGameLocal::Clear( void ) {
|
|||
gravity.Set( 0, 0, -1 );
|
||||
playerPVS.h = (unsigned int)-1;
|
||||
playerConnectedAreas.h = (unsigned int)-1;
|
||||
#if 0 // DG: sikk changed the following to shut up silly compiler warnings; I hope the code doesn't rely on these changes..
|
||||
playerPVS.h = 0;//-1; // sikk - warning C4245: '=' : conversion from 'int' to 'unsigned int', signed/unsigned mismatch
|
||||
playerConnectedAreas.h = 0;//-1; // sikk - warning C4245: '=' : conversion from 'int' to 'unsigned int', signed/unsigned mismatch
|
||||
#endif
|
||||
gamestate = GAMESTATE_UNINITIALIZED;
|
||||
skipCinematic = false;
|
||||
influenceActive = false;
|
||||
|
@ -3150,6 +3154,29 @@ bool idGameLocal::SpawnEntityDef( const idDict &args, idEntity **ent, bool setDe
|
|||
|
||||
spawnArgs.GetString( "classname", NULL, &classname );
|
||||
|
||||
// sikk---> Spectre Factor
|
||||
if ( !idStr::Icmp( classname, "monster_demon_pinky" ) ) {
|
||||
classname = ( ( random.RandomFloat() * 0.99999f ) < g_enemySpectreFactor.GetFloat() ) ? "monster_demon_spectre" : classname;
|
||||
}
|
||||
// <---sikk
|
||||
// sikk---> Baron of Hell Factor
|
||||
if ( !idStr::Icmp( classname, "monster_demon_hellknight" ) ) {
|
||||
classname = ( ( random.RandomFloat() * 0.99999f ) < g_enemyBaronFactor.GetFloat() ) ? "monster_demon_baronofhell" : classname;
|
||||
}
|
||||
// <---sikk
|
||||
// sikk---> Pain Elemental Factor
|
||||
if ( !idStr::Icmp( classname, "monster_flying_cacodemon" ) ) {
|
||||
classname = ( ( random.RandomFloat() * 0.99999f ) < g_enemyPainElementalFactor.GetFloat() ) ? "monster_flying_painelemental" : classname;
|
||||
}
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Item Management: Helmet factor (replaces security armor)
|
||||
if ( !idStr::Icmp( classname, "item_armor_security" ) ) {
|
||||
classname = ( ( random.RandomFloat() * 0.99999f ) < g_itemHelmetFactor.GetFloat() ) ? "item_armor_helmet" : classname;
|
||||
}
|
||||
// <---sikk
|
||||
|
||||
|
||||
const idDeclEntityDef *def = FindEntityDef( classname, false );
|
||||
|
||||
if ( !def ) {
|
||||
|
@ -3247,14 +3274,16 @@ bool idGameLocal::InhibitEntitySpawn( idDict &spawnArgs ) {
|
|||
}
|
||||
|
||||
const char *name;
|
||||
|
||||
name = spawnArgs.GetString( "classname" ); // DG: sikk moved this out here
|
||||
|
||||
if ( g_skill.GetInteger() == 3 || g_healthManagementType.GetInteger() == 2 ) { // sikk - Health Management System (Health Regen) - inhibit medkits when using health regen
|
||||
name = spawnArgs.GetString( "classname" );
|
||||
if ( idStr::Icmp( name, "item_medkit" ) == 0 || idStr::Icmp( name, "item_medkit_small" ) == 0 ) {
|
||||
result = true;
|
||||
|
||||
// sikk---> Health Management System (Health Regen)
|
||||
// if medkit has a target, replace it with an adrenaline - This should be done in Nightmare difficulty as well
|
||||
if ( spawnArgs.GetString( "target" ) != "" ) {
|
||||
if ( idStr::Icmp( spawnArgs.GetString( "target" ), "" ) ) {
|
||||
idEntity *ent;
|
||||
idDict args;
|
||||
args.Set( "classname", "powerup_adrenaline" );
|
||||
|
@ -3268,8 +3297,14 @@ bool idGameLocal::InhibitEntitySpawn( idDict &spawnArgs ) {
|
|||
}
|
||||
}
|
||||
|
||||
// sikk---> Item Management: Random Item Removal
|
||||
if ( spawnArgs.GetBool( "removeable" ) && !idStr::Icmp( spawnArgs.GetString( "target" ), "" ) &&
|
||||
( gameLocal.random.RandomFloat() * 0.99999f ) < g_itemRemovalFactor.GetFloat() ) {
|
||||
result = true;
|
||||
}
|
||||
// <---sikk
|
||||
|
||||
if ( gameLocal.isMultiplayer ) {
|
||||
name = spawnArgs.GetString( "classname" );
|
||||
if ( idStr::Icmp( name, "weapon_bfg" ) == 0 || idStr::Icmp( name, "weapon_soulcube" ) == 0 ) {
|
||||
result = true;
|
||||
}
|
||||
|
@ -3743,6 +3778,13 @@ void idGameLocal::RadiusDamage( const idVec3 &origin, idEntity *inflictor, idEnt
|
|||
continue;
|
||||
}
|
||||
|
||||
// sikk---> Cyberdemon Damage Type
|
||||
if ( !idStr::Icmp( ent->GetClassname(), "monster_boss_cyberdemon" ) && !static_cast< idActor * >( ent )->GetFinalBoss() ) {
|
||||
continue;
|
||||
}
|
||||
// <---sikk
|
||||
|
||||
|
||||
// find the distance from the edge of the bounding box
|
||||
for ( i = 0; i < 3; i++ ) {
|
||||
if ( origin[ i ] < ent->GetPhysics()->GetAbsBounds()[0][ i ] ) {
|
||||
|
@ -4525,12 +4567,11 @@ bool idGameLocal::SpawnRandomEnemy()
|
|||
if ( randomEnemyTally >= g_randomEncountersMaxSpawns.GetInteger() )
|
||||
return false;
|
||||
|
||||
idStr mapscript = world->spawnArgs.GetString( "call" );
|
||||
const char* map = GetLevelMap()->GetName();
|
||||
// we don't want random spawns in first or last level
|
||||
if ( mapscript == "map_hellhole::main" || mapscript == "map_marscity1::main" )
|
||||
if ( !idStr::Icmp( map, "maps/game/marscity1" ) || !idStr::Icmp( map, "maps/game/hellhole" ) )
|
||||
return false;
|
||||
|
||||
|
||||
idAAS *pAAS48 = gameLocal.GetAAS( "aas48" );
|
||||
idAAS *pAAS96 = gameLocal.GetAAS( "aas96" );
|
||||
idAAS *pAASMan = gameLocal.GetAAS( "aas_mancubus" );
|
||||
|
@ -4540,7 +4581,7 @@ bool idGameLocal::SpawnRandomEnemy()
|
|||
idDict args;
|
||||
idVec3 origin;
|
||||
idVec3 playerPos, enemyPos;
|
||||
int playerAreaNum, enemyAreaNum;
|
||||
int /*playerAreaNum = 0,*/ enemyAreaNum = 0;
|
||||
aasPath_t aaspath;
|
||||
|
||||
float randFloat = gameLocal.random.RandomFloat();
|
||||
|
@ -4554,7 +4595,7 @@ bool idGameLocal::SpawnRandomEnemy()
|
|||
return false;
|
||||
|
||||
// we only want demons or monster_zombie_boney in Hell
|
||||
if ( mapscript == "map_hell1::main" && ( num > 1 && num < 31 ) )
|
||||
if ( !idStr::Icmp( map, "maps/game/hell1" ) && ( num > 1 && num < 31 ) )
|
||||
return false;
|
||||
|
||||
if ( num >= 39 && pAAS96 ) {
|
||||
|
@ -4601,7 +4642,7 @@ bool idGameLocal::SpawnRandomEnemy()
|
|||
if ( num >= 31 )
|
||||
args.Set( "teleport", "1" );
|
||||
// use Hell skin if we're in Hell
|
||||
if ( mapscript == "map_hell1::main" && ( num == 1 || num == 31 || num == 41 ) ) {
|
||||
if ( !idStr::Icmp( map, "maps/game/hell1" ) && ( num == 1 || num == 31 || num == 40 ) ) {
|
||||
args.Set( "skin", GetHellSkin( num ) );
|
||||
}
|
||||
|
||||
|
@ -4752,9 +4793,10 @@ idStr idGameLocal::GetHellSkin( int num )
|
|||
switch ( num ) {
|
||||
case 1: name = "skins/monsters/zombies/adrianboney01"; break;
|
||||
case 31: name = "skins/models/monsters/a_hellimp"; break;
|
||||
case 41: name = "skins/models/monsters/a_hk_branded"; break;
|
||||
case 40: name = "skins/models/monsters/a_hk_branded"; break;
|
||||
default: name = ""; break;
|
||||
}
|
||||
|
||||
return name;
|
||||
}// <---sikk
|
||||
}
|
||||
// <---sikk
|
||||
|
|
|
@ -137,7 +137,7 @@ idGrabEntity::Update
|
|||
*/
|
||||
void idGrabEntity::Update( idPlayer *player ) {
|
||||
trace_t trace;
|
||||
idEntity *newEnt;
|
||||
// idEntity *newEnt;
|
||||
|
||||
owner = player;
|
||||
|
||||
|
|
|
@ -77,7 +77,6 @@ idItem::idItem() {
|
|||
canPickUp = true;
|
||||
fl.networkSync = true;
|
||||
|
||||
removeable = true; // sikk - Item Management: Random Item Removal
|
||||
noPickup = false; // sikk - Item Management: Manual Item Pickup
|
||||
}
|
||||
|
||||
|
@ -111,8 +110,6 @@ void idItem::Save( idSaveGame *savefile ) const {
|
|||
savefile->WriteInt( inViewTime );
|
||||
savefile->WriteInt( lastCycle );
|
||||
savefile->WriteInt( lastRenderViewTime );
|
||||
|
||||
savefile->WriteBool( removeable ); // sikk - Item Management: Random Item Removal
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -134,8 +131,6 @@ void idItem::Restore( idRestoreGame *savefile ) {
|
|||
savefile->ReadInt( lastCycle );
|
||||
savefile->ReadInt( lastRenderViewTime );
|
||||
|
||||
savefile->ReadBool( removeable ); // sikk - Item Management: Random Item Removal
|
||||
|
||||
itemShellHandle = -1;
|
||||
}
|
||||
|
||||
|
@ -370,14 +365,6 @@ void idItem::Spawn( void ) {
|
|||
if ( spawnArgs.GetInt( "inv_air" ) )
|
||||
spawnArgs.SetInt( "inv_air", GetRandomValue( "inv_air" ) );
|
||||
}
|
||||
|
||||
// sikk---> Item Management: Random Item Removal
|
||||
if ( g_itemRemovalFactor.GetFloat() && ( spawnArgs.GetBool( "removeable", "0" ) && removeable ) ) {
|
||||
if ( ( gameLocal.random.RandomFloat() <= g_itemRemovalFactor.GetFloat() ) && spawnArgs.GetString( "target" ) == "" )
|
||||
PostEventMS( &EV_Remove, 0 );
|
||||
else
|
||||
removeable = false;
|
||||
}
|
||||
// <---sikk
|
||||
}
|
||||
|
||||
|
@ -522,7 +509,6 @@ idItem::ClientReceiveEvent
|
|||
================
|
||||
*/
|
||||
bool idItem::ClientReceiveEvent( int event, int time, const idBitMsg &msg ) {
|
||||
|
||||
switch( event ) {
|
||||
case EVENT_PICKUP: {
|
||||
|
||||
|
@ -966,6 +952,8 @@ idMoveableItem::idMoveableItem() {
|
|||
trigger = NULL;
|
||||
smoke = NULL;
|
||||
smokeTime = 0;
|
||||
|
||||
nextSoundTime = 0; // sikk - Moveable Items Collision Sound
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -991,6 +979,8 @@ void idMoveableItem::Save( idSaveGame *savefile ) const {
|
|||
|
||||
savefile->WriteParticle( smoke );
|
||||
savefile->WriteInt( smokeTime );
|
||||
|
||||
savefile->WriteInt( nextSoundTime ); // sikk - Moveable Items Collision Sound
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1006,6 +996,8 @@ void idMoveableItem::Restore( idRestoreGame *savefile ) {
|
|||
|
||||
savefile->ReadParticle( smoke );
|
||||
savefile->ReadInt( smokeTime );
|
||||
|
||||
savefile->ReadInt( nextSoundTime ); // sikk - Moveable Items Collision Sound
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1020,7 +1012,7 @@ void idMoveableItem::Spawn( void ) {
|
|||
idBounds bounds;
|
||||
|
||||
// create a trigger for item pickup
|
||||
spawnArgs.GetFloat( "triggersize", "32.0", tsize ); // sikk - Changed default trigger size from 16 to 32
|
||||
spawnArgs.GetFloat( "triggersize", "24.0", tsize ); // sikk - Increased default triggersize from 16 to 24
|
||||
trigger = new idClipModel( idTraceModel( idBounds( vec3_origin ).Expand( tsize ) ) );
|
||||
trigger->Link( gameLocal.clip, this, 0, GetPhysics()->GetOrigin(), GetPhysics()->GetAxis() );
|
||||
trigger->SetContents( CONTENTS_TRIGGER );
|
||||
|
@ -1052,7 +1044,7 @@ void idMoveableItem::Spawn( void ) {
|
|||
|
||||
// sikk---> Temp Fix for moveable items that spawn inside geometry
|
||||
idVec3 offset = idVec3( 0.0f, 0.0f, 0.0f );
|
||||
if ( spawnArgs.GetString( "bind" ) == "" )
|
||||
if ( !idStr::Icmp( spawnArgs.GetString( "bind" ), "" ) )
|
||||
offset = idVec3( 0.0f, 0.0f, 4.0f );
|
||||
// <---sikk
|
||||
|
||||
|
@ -1074,46 +1066,15 @@ void idMoveableItem::Spawn( void ) {
|
|||
|
||||
smoke = NULL;
|
||||
smokeTime = 0;
|
||||
|
||||
nextSoundTime = 0; // sikk - Moveable Items Collision Sound
|
||||
|
||||
const char *smokeName = spawnArgs.GetString( "smoke_trail" );
|
||||
if ( *smokeName != '\0' ) {
|
||||
smoke = static_cast<const idDeclParticle *>( declManager->FindType( DECL_PARTICLE, smokeName ) );
|
||||
smokeTime = gameLocal.time;
|
||||
BecomeActive( TH_UPDATEPARTICLES );
|
||||
}
|
||||
|
||||
// sikk---> Item Management: Helmet factor (replaces security armor)
|
||||
bool bRemoved = false;
|
||||
idStr defName = GetEntityDefName();
|
||||
if ( !idStr::Icmp( defName, "item_armor_security" ) && ( g_itemHelmetFactor.GetFloat() && gameLocal.random.RandomFloat() <= g_itemHelmetFactor.GetFloat() ) ) {
|
||||
idEntity *ent;
|
||||
idDict args;
|
||||
|
||||
args.Set( "classname", "item_armor_helmet" );
|
||||
args.Set( "name", GetName() );
|
||||
// args.Copy( spawnArgs );
|
||||
args.Set( "target", spawnArgs.GetString( "target" ) );
|
||||
args.Set( "origin", spawnArgs.GetString( "origin" ) );
|
||||
args.Set( "rotation", spawnArgs.GetString( "rotation" ) );
|
||||
args.Set( "no_touch", spawnArgs.GetString( "no_touch" ) );
|
||||
args.Set( "bind", spawnArgs.GetString( "bind" ) );
|
||||
args.Set( "triggerFirst", spawnArgs.GetString( "triggerFirst" ) );
|
||||
args.Set( "triggersize", spawnArgs.GetString( "triggersize" ) );
|
||||
|
||||
// PostEventMS( &EV_Remove, 0 );
|
||||
delete this;
|
||||
gameLocal.SpawnEntityDef( args, &ent );
|
||||
bRemoved = true;
|
||||
}
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Item Management: Random Item Removal
|
||||
if ( g_itemRemovalFactor.GetFloat() && ( spawnArgs.GetBool( "removeable", "0" ) && removeable ) && !bRemoved ) {
|
||||
if ( ( gameLocal.random.RandomFloat() < g_itemRemovalFactor.GetFloat() ) && ( spawnArgs.GetString( "target" ) == "" ) )
|
||||
PostEventMS( &EV_Remove, 0 );
|
||||
else
|
||||
removeable = false;
|
||||
}
|
||||
// <---sikk
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1140,6 +1101,30 @@ void idMoveableItem::Think( void ) {
|
|||
Present();
|
||||
}
|
||||
|
||||
// sikk---> Moveable Items Collision Sound
|
||||
/*
|
||||
=================
|
||||
idMoveableItem::Collide
|
||||
=================
|
||||
*/
|
||||
bool idMoveableItem::Collide( const trace_t &collision, const idVec3 &velocity ) {
|
||||
float v, f;
|
||||
|
||||
v = -( velocity * collision.c.normal );
|
||||
if ( v > 80 && gameLocal.time > nextSoundTime ) {
|
||||
f = v > 200 ? 1.0f : idMath::Sqrt( v - 80 ) * 0.091f;
|
||||
if ( StartSound( "snd_bounce", SND_CHANNEL_ANY, 0, false, NULL ) ) {
|
||||
// don't set the volume unless there is a bounce sound as it overrides the entire channel
|
||||
// which causes footsteps on ai's to not honor their shader parms
|
||||
SetSoundVolume( f );
|
||||
}
|
||||
nextSoundTime = gameLocal.time + 500;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
// <---sikk
|
||||
|
||||
/*
|
||||
================
|
||||
idMoveableItem::Pickup
|
||||
|
|
10
game/Item.h
10
game/Item.h
|
@ -71,9 +71,10 @@ public:
|
|||
virtual void WriteToSnapshot( idBitMsgDelta &msg ) const;
|
||||
virtual void ReadFromSnapshot( const idBitMsgDelta &msg );
|
||||
|
||||
// sikk---> Item Management: Random Item Value/Manual Item Pickup
|
||||
int GetRandomValue( const char* invName ); // sikk - Item Management: Random Item Value
|
||||
bool removeable; // sikk - Item Management: Random Item Removal
|
||||
bool noPickup; // sikk - Item Management: Manual Item Pickup
|
||||
bool noPickup; // sikk - Item Management: Manual Item Pickup
|
||||
// <---sikk
|
||||
|
||||
private:
|
||||
idVec3 orgOrigin;
|
||||
|
@ -166,6 +167,9 @@ public:
|
|||
|
||||
void Spawn( void );
|
||||
virtual void Think( void );
|
||||
|
||||
virtual bool Collide( const trace_t &collision, const idVec3 &velocity ); // sikk - Moveable Items Collision Sound
|
||||
|
||||
virtual bool Pickup( idPlayer *player );
|
||||
|
||||
static void DropItems( idAnimatedEntity *ent, const char *type, idList<idEntity *> *list );
|
||||
|
@ -180,6 +184,8 @@ private:
|
|||
const idDeclParticle * smoke;
|
||||
int smokeTime;
|
||||
|
||||
int nextSoundTime; // sikk - Moveable Items Collision Sound
|
||||
|
||||
void Gib( const idVec3 &dir, const char *damageDefName );
|
||||
|
||||
void Event_DropToFloor( void );
|
||||
|
|
|
@ -1158,7 +1158,6 @@ idLight::ClientReceiveEvent
|
|||
================
|
||||
*/
|
||||
bool idLight::ClientReceiveEvent( int event, int time, const idBitMsg &msg ) {
|
||||
|
||||
switch( event ) {
|
||||
case EVENT_BECOMEBROKEN: {
|
||||
BecomeBroken( NULL );
|
||||
|
@ -1185,4 +1184,4 @@ void idLight::UpdateShadowState( void ) {
|
|||
lightDefHandle = gameRenderWorld->AddLightDef( &renderLight );
|
||||
}
|
||||
}
|
||||
// <---sikk
|
||||
// <---sikk
|
||||
|
|
|
@ -3220,4 +3220,4 @@ idPortalSky::Event_Activate
|
|||
void idPortalSky::Event_Activate( idEntity *activator ) {
|
||||
gameLocal.SetPortalSkyEnt( this );
|
||||
}
|
||||
// <---sikk
|
||||
// <---sikk
|
||||
|
|
269
game/Player.cpp
269
game/Player.cpp
|
@ -334,7 +334,16 @@ void idInventory::RestoreInventory( idPlayer *owner, const idDict &dict ) {
|
|||
// health/armor
|
||||
maxHealth = dict.GetInt( "maxhealth", "100" );
|
||||
armor = dict.GetInt( "armor", "50" );
|
||||
maxarmor = dict.GetInt( "maxarmor", "100" );
|
||||
|
||||
// sikk---> Item Management: Max Armor Type
|
||||
if ( g_itemMaxArmorType.GetInteger() == 1 )
|
||||
maxarmor = dict.GetInt( "maxarmor_doom", "100" );
|
||||
else if ( g_itemMaxArmorType.GetInteger() == 1 )
|
||||
maxarmor = dict.GetInt( "maxarmor_custom", "100" );
|
||||
else
|
||||
maxarmor = dict.GetInt( "maxarmor", "100" );
|
||||
// <---sikk
|
||||
|
||||
deplete_armor = dict.GetInt( "deplete_armor", "0" );
|
||||
deplete_rate = dict.GetFloat( "deplete_rate", "2.0" );
|
||||
deplete_ammount = dict.GetInt( "deplete_ammount", "1" );
|
||||
|
@ -660,7 +669,9 @@ idInventory::AmmoIndexForAmmoClass
|
|||
*/
|
||||
int idInventory::MaxAmmoForAmmoClass( idPlayer *owner, const char *ammo_classname ) const {
|
||||
// sikk---> Ammo Capacity Type
|
||||
if ( g_ammoCapacityType.GetBool() )
|
||||
if ( g_ammoCapacityType.GetInteger() == 1 )
|
||||
return owner->spawnArgs.GetInt( va( "doom_max_%s", ammo_classname ), "0" );
|
||||
if ( g_ammoCapacityType.GetInteger() == 2 )
|
||||
return owner->spawnArgs.GetInt( va( "custom_max_%s", ammo_classname ), "0" );
|
||||
// <---sikk
|
||||
|
||||
|
@ -761,14 +772,23 @@ bool idInventory::Give( idPlayer *owner, const idDict &spawnArgs, const char *st
|
|||
i = AmmoIndexForAmmoClass( statname );
|
||||
max = MaxAmmoForAmmoClass( owner, statname );
|
||||
|
||||
// sikk---> Ammo Management: Ammo Usage Type/Capacity Type
|
||||
// sikk---> Ammo Management: Ammo Usage Type
|
||||
if ( g_ammoUsageType.GetBool() ) {
|
||||
int j = WeaponIndexForAmmoClass( spawnArgs, statname );
|
||||
const char *weapon_classname = spawnArgs.GetString( va( "def_weapon%d", j ) );
|
||||
if ( weapon_classname ) {
|
||||
const idDeclEntityDef *decl = gameLocal.FindEntityDef( weapon_classname, false );
|
||||
if ( decl )
|
||||
max -= atoi( g_ammoCapacityType.GetBool() ? decl->dict.GetString( "custom_clipSize" ) : decl->dict.GetString( "clipSize" ) ) - clip[ j ];
|
||||
if ( decl ) {
|
||||
// sikk---> Ammo Management: Ammo Clip Size Type
|
||||
if ( g_ammoClipSizeType.GetInteger() == 1 ) {
|
||||
max -= decl->dict.GetInt( "clipSize_doom" ) - clip[ j ];
|
||||
} else if ( g_ammoClipSizeType.GetInteger() == 2 ) {
|
||||
max -= decl->dict.GetInt( "clipSize_custom" ) - clip[ j ];
|
||||
} else {
|
||||
max -= decl->dict.GetInt( "clipSize" ) - clip[ j ];
|
||||
}
|
||||
// <---sikk
|
||||
}
|
||||
}
|
||||
}
|
||||
// <---sikk
|
||||
|
@ -1162,12 +1182,7 @@ idPlayer::idPlayer() {
|
|||
|
||||
selfSmooth = false;
|
||||
|
||||
// sikk---> Health Management System
|
||||
healthPackAmount = 0;
|
||||
healthPackTimer = 0;
|
||||
nextHealthRegen = 0;
|
||||
prevHeatlh = health;
|
||||
// <---sikk
|
||||
fSpreadModifier = 0.0f; // sikk - Weapon Management: Handling
|
||||
|
||||
focusMoveableTimer = 0; // sikk - Object Manipulation
|
||||
|
||||
|
@ -1181,12 +1196,22 @@ idPlayer::idPlayer() {
|
|||
|
||||
v3CrosshairPos.Zero(); // sikk - Crosshair Positioning
|
||||
|
||||
bIsZoomed = false; // sikk - Depth of Field PostProcess
|
||||
|
||||
bAmbientLightOn = false; // sikk - Global Ambient Light
|
||||
|
||||
nScreenFrostAlpha = 0; // sikk - Screen Frost
|
||||
|
||||
// sikk---> Depth of Field PostProcess
|
||||
bIsZoomed = false;
|
||||
focusDistance = 0.0f;
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Health Management System
|
||||
healthPackAmount = 0;
|
||||
healthPackTimer = 0;
|
||||
nextHealthRegen = 0;
|
||||
prevHeatlh = health;
|
||||
// <---sikk
|
||||
|
||||
// sikk--> Infrared Goggles/Headlight Mod
|
||||
bIRGogglesOn = false;
|
||||
bHeadlightOn = false;
|
||||
|
@ -1309,6 +1334,8 @@ void idPlayer::Init( void ) {
|
|||
talkCursor = 0;
|
||||
focusVehicle = NULL;
|
||||
|
||||
fSpreadModifier = 0.0f; // sikk - Weapon Management: Handling
|
||||
|
||||
focusMoveableTimer = 0; // sikk - Object Manipulation
|
||||
|
||||
focusItem = NULL; // sikk - Manual Item Pickup
|
||||
|
@ -1321,13 +1348,16 @@ void idPlayer::Init( void ) {
|
|||
|
||||
v3CrosshairPos.Zero(); // sikk - Crosshair Positioning
|
||||
|
||||
bIsZoomed = false; // sikk - Depth of Field PostProcess
|
||||
|
||||
bAmbientLightOn = false; // sikk - Global Ambient Light
|
||||
|
||||
nScreenFrostAlpha = 0; // sikk - Screen Frost
|
||||
|
||||
// sikk---> Health Management System
|
||||
// sikk---> Depth of Field PostProcess
|
||||
bIsZoomed = false;
|
||||
focusDistance = 0.0f;
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Health Management System
|
||||
healthPackAmount = 0;
|
||||
healthPackTimer = 0;
|
||||
nextHealthRegen = 0;
|
||||
|
@ -1550,9 +1580,14 @@ void idPlayer::Spawn( void ) {
|
|||
// load HUD
|
||||
if ( gameLocal.isMultiplayer ) {
|
||||
hud = uiManager->FindGui( "guis/mphud.gui", true, false, true );
|
||||
} else if ( spawnArgs.GetString( "hud", "", temp ) ) {
|
||||
// sikk---> Hud Management
|
||||
} else if ( spawnArgs.GetString( "hud", "", temp ) && !g_hudType.GetBool() ) {
|
||||
hud = uiManager->FindGui( temp, true, false, true );
|
||||
} else if ( spawnArgs.GetString( "hud_custom", "", temp ) && g_hudType.GetBool() ) {
|
||||
hud = uiManager->FindGui( temp, true, false, true );
|
||||
}
|
||||
// <---sikk
|
||||
|
||||
if ( hud ) {
|
||||
hud->Activate( true, gameLocal.time );
|
||||
}
|
||||
|
@ -1716,51 +1751,17 @@ void idPlayer::Spawn( void ) {
|
|||
// sikk---> Random Encounters System
|
||||
// preload monster defs to avoid hitching during play
|
||||
if ( g_useRandomEncounters.GetBool() ) {
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_zombie_boney" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_zombie_bernie" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_zombie_fat" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_zombie_fat2" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_zombie_fat_wrench" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_zombie_jumpsuit" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_zombie_labcoat_limb" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_zombie_labcoat_neckstump" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_zombie_labcoat_pipe" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_zombie_labcoat_skinny" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_zombie_maint" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_zombie_maint2" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_zombie_maint_bald" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_zombie_maint_fast" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_zombie_maint_flashlight" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_zombie_maint_no_jaw" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_zombie_maint_nojaw" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_zombie_maint_skinny" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_zombie_maint_wrench" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_zombie_morgue" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_zombie_suit_bloodymouth" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_zombie_suit_neckstump" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_zombie_suit_skinny" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_zombie_tshirt_bald" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_zombie_tshirt_blown" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_zombie_sawyer" );
|
||||
|
||||
// ZSecs
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_zsec_pistol" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_zsec_machinegun" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_zsec_shotgun" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_zsec_shield" );
|
||||
|
||||
// Demons (aas48)
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_demon_imp" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_demon_maggot" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_demon_wraith" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_demon_cherub" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_demon_revenant" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_zombie_commando" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_zombie_commando_cgun" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_demon_archvile" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_demon_pinky" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_demon_mancubus" );
|
||||
declManager->FindType( DECL_ENTITYDEF, "monster_demon_hellknight" );
|
||||
const char* mapname = gameLocal.GetLevelMap()->GetName();
|
||||
const idDeclEntityDef *decl = gameLocal.FindEntityDef( mapname, false );
|
||||
if ( decl ) {
|
||||
const idKeyValue *kv = decl->dict.MatchPrefix( "re_" );
|
||||
if ( kv ) {
|
||||
while( kv ) {
|
||||
declManager->FindType( DECL_ENTITYDEF, kv->GetValue().c_str() );
|
||||
kv = decl->dict.MatchPrefix( "re_", kv );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// <---sikk
|
||||
}
|
||||
|
@ -2711,16 +2712,24 @@ void idPlayer::UpdateHudAmmo( idUserInterface *_hud ) {
|
|||
_hud->SetStateString( "player_ammo", "" );
|
||||
_hud->SetStateString( "player_totalammo", "" );
|
||||
} else {
|
||||
// sikk---> Dynamic Hud System
|
||||
if ( atoi( _hud->GetStateString( "player_ammo" ) ) != inclip ||
|
||||
atoi( _hud->GetStateString( "player_totalammo" ) ) != ( ammoamount - inclip ) ) {
|
||||
bStatsChanged = true;
|
||||
|
||||
// sikk---> Dynamic Hud System & Ammo Management: Ammo Clip Size Type
|
||||
// show remaining ammo
|
||||
if ( weapon.GetEntity()->ClipSize() ) {
|
||||
if ( atoi( _hud->GetStateString( "player_ammo" ) ) != inclip ||
|
||||
atoi( _hud->GetStateString( "player_totalammo" ) ) != ( ammoamount - inclip ) ) {
|
||||
bStatsChanged = true;
|
||||
}
|
||||
_hud->SetStateString( "player_totalammo", va( "%i", ammoamount - inclip ) );
|
||||
_hud->SetStateString( "player_ammo", va( "%i", inclip ) ); // how much in the current clip
|
||||
} else {
|
||||
if ( atoi( _hud->GetStateString( "player_totalammo" ) ) != ammoamount )
|
||||
bStatsChanged = true;
|
||||
_hud->SetStateString( "player_totalammo", va( "%i", ammoamount ) );
|
||||
_hud->SetStateString( "player_ammo", "" ); // how much in the current clip
|
||||
}
|
||||
// <---sikk
|
||||
|
||||
// show remaining ammo
|
||||
_hud->SetStateString( "player_totalammo", va( "%i", ammoamount - inclip ) );
|
||||
_hud->SetStateString( "player_ammo", weapon.GetEntity()->ClipSize() ? va( "%i", inclip ) : "--" ); // how much in the current clip
|
||||
_hud->SetStateString( "player_clips", weapon.GetEntity()->ClipSize() ? va( "%i", ammoamount / weapon.GetEntity()->ClipSize() ) : "--" );
|
||||
_hud->SetStateString( "player_allammo", va( "%i/%i", inclip, ammoamount - inclip ) );
|
||||
}
|
||||
|
@ -2767,10 +2776,12 @@ void idPlayer::UpdateHudStats( idUserInterface *_hud ) {
|
|||
|
||||
// sikk---> Dynamic Hud System
|
||||
if ( _hud->GetStateInt( "player_health" ) != health ||
|
||||
_hud->GetStateInt( "player_armor" ) != inventory.armor ) {
|
||||
_hud->GetStateInt( "player_armor" ) != inventory.armor ) {
|
||||
bStatsChanged = true;
|
||||
}
|
||||
// <---sikk
|
||||
|
||||
_hud->SetStateFloat( "armorScale", 108.0f / inventory.maxarmor ); // sikk - Item Management: Max Armor Type
|
||||
|
||||
_hud->SetStateInt( "player_health", health );
|
||||
_hud->SetStateInt( "player_stamina", staminapercentage );
|
||||
|
@ -3377,8 +3388,8 @@ bool idPlayer::GivePowerUp( int powerup, int time ) {
|
|||
adrenalineAmount += 1;
|
||||
if ( adrenalineAmount > 1 )
|
||||
adrenalineAmount = 1;
|
||||
// <---sikk
|
||||
// stamina = 100.0f;
|
||||
// <---sikk
|
||||
break;
|
||||
}
|
||||
case MEGAHEALTH: {
|
||||
|
@ -3497,7 +3508,7 @@ void idPlayer::UpdatePowerUps( void ) {
|
|||
health < prevHeatlh &&
|
||||
!AI_DEAD ) {
|
||||
|
||||
int currentRegenStep;
|
||||
int currentRegenStep = 0;
|
||||
|
||||
if ( g_healthRegenSteps.GetInteger() > 1 ) {
|
||||
currentRegenStep = g_healthRegenLimit.GetInteger() / g_healthRegenSteps.GetInteger();
|
||||
|
@ -3879,7 +3890,7 @@ void idPlayer::NextWeapon( void ) {
|
|||
}
|
||||
|
||||
w = idealWeapon;
|
||||
while( 1 ) {
|
||||
while ( 1 ) {
|
||||
w++;
|
||||
if ( w >= MAX_WEAPONS ) {
|
||||
w = 0;
|
||||
|
@ -3929,7 +3940,7 @@ void idPlayer::PrevWeapon( void ) {
|
|||
}
|
||||
|
||||
w = idealWeapon;
|
||||
while( 1 ) {
|
||||
while ( 1 ) {
|
||||
w--;
|
||||
if ( w < 0 ) {
|
||||
w = MAX_WEAPONS - 1;
|
||||
|
@ -4393,17 +4404,19 @@ void idPlayer::UpdateWeapon( void ) {
|
|||
} else if ( focusCharacter && ( focusCharacter->health > 0 ) ) {
|
||||
Weapon_NPC();
|
||||
// sikk---> Health Management System (Health Pack)|Manual Item Pickup|Searchable Corpses|Object Manipulation
|
||||
} else if ( ( g_weaponHandlingType.GetBool() && ( healthPackTimer > gameLocal.time ) || ( searchTimer > gameLocal.time ) ) ||
|
||||
} else if ( ( g_weaponAwareness.GetBool() && ( healthPackTimer > gameLocal.time ) || ( searchTimer > gameLocal.time ) ) ||
|
||||
( g_grabMode.GetBool() && ( grabEntity.GetGrabEntity() || grabEntity.GetThrownTime() > gameLocal.time ) ) ) {
|
||||
StopFiring();
|
||||
weapon.GetEntity()->LowerWeapon();
|
||||
// <---sikk
|
||||
// sikk---> Weapon Handling System
|
||||
} else if ( GetWeaponHandling() ) {
|
||||
// sikk---> Weapon Management: Awareness
|
||||
} else if ( GetWeaponAwareness() ) {
|
||||
if ( idealWeapon != currentWeapon )
|
||||
Weapon_Combat();
|
||||
StopFiring();
|
||||
weapon.GetEntity()->LowerWeapon();
|
||||
if ( !OnLadder() )
|
||||
bWAUseHideDist = true;
|
||||
// <---sikk
|
||||
} else {
|
||||
Weapon_Combat();
|
||||
|
@ -4717,6 +4730,15 @@ void idPlayer::UpdateFocus( void ) {
|
|||
return;
|
||||
}
|
||||
|
||||
// sikk---> Depth of Field PostProcess
|
||||
if ( r_useDepthOfField.GetInteger() == 1 && renderView ) {
|
||||
start = renderView->vieworg;
|
||||
end = start + renderView->viewaxis.ToAngles().ToForward() * 8192.0f;
|
||||
gameLocal.clip.TracePoint( trace, start, end, MASK_SHOT_RENDERMODEL, this );
|
||||
focusDistance = focusDistance * 0.95 + trace.fraction * 0.05;
|
||||
}
|
||||
// <---sikk
|
||||
|
||||
// only update the focus character when attack button isn't pressed so players
|
||||
// can still chainsaw NPC's
|
||||
if ( gameLocal.isMultiplayer || ( !focusCharacter && ( usercmd.buttons & BUTTON_ATTACK ) ) ) {
|
||||
|
@ -5021,7 +5043,8 @@ void idPlayer::CrashLand( const idVec3 &oldOrigin, const idVec3 &oldVelocity ) {
|
|||
}
|
||||
|
||||
// no falling damage if touching a nodamage surface
|
||||
noDamage = false;
|
||||
noDamage = g_disableFallDamage.GetBool(); // sikk - Disable Fall Damage - was "false"
|
||||
|
||||
for ( int i = 0; i < physicsObj.GetNumContacts(); i++ ) {
|
||||
const contactInfo_t &contact = physicsObj.GetContact( i );
|
||||
if ( contact.material->GetSurfaceFlags() & SURF_NODAMAGE ) {
|
||||
|
@ -6173,6 +6196,23 @@ void idPlayer::AdjustSpeed( void ) {
|
|||
float speed;
|
||||
float rate;
|
||||
|
||||
// sikk---> Player Speed Type
|
||||
float crouchSpeed, walkSpeed, runSpeed;
|
||||
if ( g_playerSpeedType.GetInteger() == 0 ) {
|
||||
crouchSpeed = 80.0f;
|
||||
walkSpeed = 140.0f;
|
||||
runSpeed = 220.0f;
|
||||
} else if ( g_playerSpeedType.GetInteger() == 1 ) {
|
||||
crouchSpeed = 120.0f;
|
||||
walkSpeed = 220.0f;
|
||||
runSpeed = 320.0f;
|
||||
} else {
|
||||
crouchSpeed = pm_crouchspeed.GetFloat();
|
||||
walkSpeed = pm_walkspeed.GetFloat();
|
||||
runSpeed = pm_runspeed.GetFloat();
|
||||
}
|
||||
// <---sikk
|
||||
|
||||
if ( spectating ) {
|
||||
speed = pm_spectatespeed.GetFloat();
|
||||
bobFrac = 0.0f;
|
||||
|
@ -6193,8 +6233,7 @@ void idPlayer::AdjustSpeed( void ) {
|
|||
} else {
|
||||
bobFrac = stamina / pm_staminathreshold.GetFloat();
|
||||
}
|
||||
speed = pm_walkspeed.GetFloat() * ( 1.0f - bobFrac ) + pm_runspeed.GetFloat() * bobFrac;
|
||||
speed *= ( !g_weaponHandlingType.GetBool() && bIsZoomed ? 0.75f : 1.0f ); // sikk - Decreased movement speed when zoomed
|
||||
speed = walkSpeed * ( 1.0f - bobFrac ) + runSpeed * bobFrac; // sikk - Player Speed Type
|
||||
} else {
|
||||
rate = pm_staminarate.GetFloat();
|
||||
|
||||
|
@ -6207,17 +6246,17 @@ void idPlayer::AdjustSpeed( void ) {
|
|||
if ( stamina > pm_stamina.GetFloat() ) {
|
||||
stamina = pm_stamina.GetFloat();
|
||||
}
|
||||
speed = pm_walkspeed.GetFloat() * ( bIsZoomed ? 0.75f : 1.0f ); // sikk - Decreased movement speed when zoomed
|
||||
speed = walkSpeed * ( g_weaponAwareness.GetBool() && bIsZoomed ? 0.75f : 1.0f ); // sikk - Decreased movement speed when zoomed
|
||||
bobFrac = 0.0f;
|
||||
}
|
||||
|
||||
speed *= PowerUpModifier(SPEED);
|
||||
speed *= PowerUpModifier( SPEED );
|
||||
|
||||
if ( influenceActive == INFLUENCE_LEVEL3 ) {
|
||||
speed *= 0.33f;
|
||||
}
|
||||
|
||||
physicsObj.SetSpeed( speed, pm_crouchspeed.GetFloat() );
|
||||
physicsObj.SetSpeed( speed, crouchSpeed ); // sikk - Player Speed Type
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -6616,8 +6655,7 @@ void idPlayer::UpdateHud( void ) {
|
|||
|
||||
// detemine the point at which the weapon is aiming
|
||||
if ( weapon.GetEntity()->GetBarrelJointView() != INVALID_JOINT &&
|
||||
weapon.GetEntity()->GetProjectileDict().GetBool( "launchFromBarrel" ) &&
|
||||
( GetCurrentWeapon() < 6 || GetCurrentWeapon() > 8 ) ) {
|
||||
( weapon.GetEntity()->GetProjectileDict().GetBool( "launchFromBarrel" ) || g_weaponProjectileOrigin.GetBool() ) ) { // sikk - Weapon Management: Projectile Origin
|
||||
// there is an explicit joint for the muzzle
|
||||
weapon.GetEntity()->GetGlobalJointTransform( true, weapon.GetEntity()->GetBarrelJointView(), muzzleOrigin, muzzleAxis );
|
||||
} else {
|
||||
|
@ -6625,7 +6663,7 @@ void idPlayer::UpdateHud( void ) {
|
|||
muzzleOrigin = firstPersonViewOrigin;
|
||||
muzzleAxis = firstPersonViewAxis;
|
||||
}
|
||||
idVec3 endPos = muzzleOrigin + ( muzzleAxis.ToAngles().ToForward() * 65536.0f );
|
||||
idVec3 endPos = muzzleOrigin + ( firstPersonViewAxis.ToAngles().ToForward() * 65536.0f );
|
||||
gameLocal.clip.TracePoint( tr, muzzleOrigin, endPos, MASK_SHOT_RENDERMODEL, this );
|
||||
endPos = tr.endpos;
|
||||
v3CrosshairPos.Lerp( endPos, v3CrosshairPos, g_crosshairLerp.GetFloat() );
|
||||
|
@ -6654,7 +6692,7 @@ void idPlayer::UpdateHud( void ) {
|
|||
} else if ( crosshairType == 2 ) {
|
||||
cursor->SetStateString( "cursorposition", buf );
|
||||
if ( ( bIsZoomed || GetTalkCursor() ) &&
|
||||
!( g_weaponHandlingType.GetBool() && ( bWATrace || bWAIsSprinting || OnLadder() ) ) &&
|
||||
!( g_weaponAwareness.GetBool() && ( bWATrace || bWAIsSprinting || OnLadder() ) ) &&
|
||||
( GetCurrentWeapon() > 0 && GetCurrentWeapon() < 9 ) ) {
|
||||
if ( !grabEntity.GetGrabEntity() && ( focusItem || focusCorpse || focusMoveable ) ) {
|
||||
cursor->SetStateString( "combatcursor", "0" );
|
||||
|
@ -6810,12 +6848,17 @@ void idPlayer::Think( void ) {
|
|||
}
|
||||
}
|
||||
|
||||
// sikk---> Weapon Handling System
|
||||
if ( g_weaponHandlingType.GetBool() && !weapon.GetEntity()->IsReady() && bIsZoomed ) {
|
||||
// sikk---> Weapon Management: Handling/Awareness
|
||||
if ( g_weaponAwareness.GetBool() && !weapon.GetEntity()->IsReady() && bIsZoomed ) {
|
||||
zoomFov.Init( gameLocal.time, 200.0f, zoomFov.GetCurrentValue( gameLocal.time ), DefaultFov() );
|
||||
usercmd.buttons ^= BUTTON_ZOOM;
|
||||
bIsZoomed = false;
|
||||
}
|
||||
if ( g_weaponHandlingType.GetInteger() == 1 || g_weaponHandlingType.GetInteger() == 3 ) {
|
||||
fSpreadModifier -= 0.05f;
|
||||
if ( fSpreadModifier < 0.0f )
|
||||
fSpreadModifier = 0.0f;
|
||||
}
|
||||
// <---sikk
|
||||
|
||||
// if we have an active gui, we will unrotate the view angles as
|
||||
|
@ -6930,18 +6973,22 @@ void idPlayer::Think( void ) {
|
|||
}
|
||||
|
||||
// sikk---> First Person Body
|
||||
idStr skinname = spawnArgs.GetString( "spawn_skin" );
|
||||
const char* skinname = spawnArgs.GetString( "spawn_skin" );
|
||||
if ( g_showFirstPersonBody.GetBool() && !pm_thirdPerson.GetBool() && !gameLocal.inCinematic ) {
|
||||
if ( skinname == "skins/characters/player/tshirt_mp" ) {
|
||||
if ( !idStr::Icmp( skinname, "skins/characters/player/tshirt_mp" ) ) {
|
||||
SetSkin( declManager->FindSkin( "skins/characters/player/tshirt_mp_fpb" ) );
|
||||
head.GetEntity()->SetModel( "head_player" );
|
||||
if ( g_playerHeadType.GetBool() ) {
|
||||
head.GetEntity()->SetModel( "head_player" );
|
||||
}
|
||||
} else {
|
||||
SetSkin( declManager->FindSkin( "skins/characters/player/greenmarine_fpb" ) );
|
||||
}
|
||||
} else {
|
||||
if ( skinname == "skins/characters/player/tshirt_mp" ) {
|
||||
if ( !idStr::Icmp( skinname, "skins/characters/player/tshirt_mp" ) ) {
|
||||
SetSkin( declManager->FindSkin( "skins/characters/player/tshirt_mp" ) );
|
||||
head.GetEntity()->SetModel( "head_player" );
|
||||
if ( g_playerHeadType.GetBool() ) {
|
||||
head.GetEntity()->SetModel( "head_player" );
|
||||
}
|
||||
} else {
|
||||
SetSkin( declManager->FindSkin( "skins/characters/player/greenmarine" ) );
|
||||
}
|
||||
|
@ -7202,10 +7249,20 @@ would have killed the player, possibly allowing a "saving throw"
|
|||
*/
|
||||
void idPlayer::CalcDamagePoints( idEntity *inflictor, idEntity *attacker, const idDict *damageDef,
|
||||
const float damageScale, const int location, int *health, int *armor ) {
|
||||
int damage;
|
||||
int armorSave;
|
||||
int damage;
|
||||
int armorSave;
|
||||
|
||||
|
||||
// sikk---> Damage Type
|
||||
if ( g_damageType.GetInteger() == 1 && damageDef->GetInt( "damage_doom_scale" ) ) {
|
||||
damage = damageDef->GetInt( "damage_doom_scale" ) * ( gameLocal.random.RandomInt( 255 ) % damageDef->GetInt( "damage_doom_range" ) + 1 );
|
||||
} else if ( g_damageType.GetInteger() == 2 && damageDef->GetInt( "damage_custom" ) ) {
|
||||
damage = damageDef->GetInt( "damage_custom" );
|
||||
} else {
|
||||
damage = damageDef->GetInt( "damage", "20" );
|
||||
}
|
||||
// <---sikk
|
||||
|
||||
damageDef->GetInt( "damage", "20", damage );
|
||||
damage = GetDamageForLocation( damage, location );
|
||||
|
||||
idPlayer *player = attacker->IsType( idPlayer::Type ) ? static_cast<idPlayer*>(attacker) : NULL;
|
||||
|
@ -7230,7 +7287,7 @@ void idPlayer::CalcDamagePoints( idEntity *inflictor, idEntity *attacker, const
|
|||
}
|
||||
}
|
||||
|
||||
damage *= damageScale * ( PowerUpActive( ADRENALINE ) ? 0.5f : 1.0f );
|
||||
damage = damage * damageScale * ( PowerUpActive( ADRENALINE ) ? 0.5f : 1.0f ); // sikk - Adrenaline cuts damage in half
|
||||
|
||||
// always give half damage if hurting self
|
||||
if ( attacker == this ) {
|
||||
|
@ -7789,7 +7846,7 @@ void idPlayer::OffsetThirdPersonView( float angle, float range, float height, bo
|
|||
|
||||
// sikk---> Thirdpesron Camera - adjustable horizontal position
|
||||
// view += range * sideScale * renderView->viewaxis[ 1 ];
|
||||
view += range * ( sideScale - ( pm_thirdPersonOffest.GetFloat() * 0.01 ) ) * renderView->viewaxis[ 1 ];
|
||||
view += range * ( sideScale - ( pm_thirdPersonOffset.GetFloat() * 0.01 ) ) * renderView->viewaxis[ 1 ];
|
||||
// <---sikk
|
||||
|
||||
if ( clip ) {
|
||||
|
@ -9350,7 +9407,7 @@ void idPlayer::ToggleIRGoggles() {
|
|||
StartSoundShader( declManager->FindSound( "player_sounds_irgoggles_off" ), SND_CHANNEL_VOICE, 0, false, NULL );
|
||||
|
||||
// reset bloom parms
|
||||
r_useBloom.SetBool( (bool)fIRBloomParms[ 0 ] );
|
||||
r_useBloom.SetInteger( fIRBloomParms[ 0 ] );
|
||||
r_bloomBufferSize.SetInteger( (int)fIRBloomParms[ 1 ] );
|
||||
r_bloomBlurIterations.SetInteger( (int)fIRBloomParms[ 2 ] );
|
||||
r_bloomBlurScaleX.SetFloat( (int)fIRBloomParms[ 3 ] );
|
||||
|
@ -9527,14 +9584,14 @@ void idPlayer::SearchCorpse( idAFEntity_Gibbable* corpse ) {
|
|||
searchTimer = gameLocal.time + 1500;
|
||||
corpse->searchable = false;
|
||||
|
||||
if ( g_itemSearchFactor.GetFloat() >= gameLocal.random.RandomFloat() ) {
|
||||
if ( ( gameLocal.random.RandomFloat() * 0.99999f ) < g_itemSearchFactor.GetFloat() ) {
|
||||
idEntity *ent;
|
||||
idDict args;
|
||||
idVec3 itemOrg = GetEyePosition() + viewAngles.ToForward() * 32.0f;
|
||||
|
||||
float random = gameLocal.random.RandomFloat();
|
||||
const char* defItem = corpse->spawnArgs.GetString( "def_searchItem" );
|
||||
if ( defItem == "" ) {
|
||||
if ( !idStr::Icmp( defItem, "" ) ) {
|
||||
if ( random <= 0.1 )
|
||||
defItem = "powerup_adrenaline";
|
||||
else if ( random <= 0.5 )
|
||||
|
@ -9558,14 +9615,14 @@ void idPlayer::SearchCorpse( idAFEntity_Gibbable* corpse ) {
|
|||
}
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Weapon Handling System
|
||||
// sikk---> Weapon Management: Awareness
|
||||
/*
|
||||
==================
|
||||
idPlayer::GetWeaponHandling
|
||||
idPlayer::GetWeaponAwareness
|
||||
==================
|
||||
*/
|
||||
bool idPlayer::GetWeaponHandling() {
|
||||
if ( g_weaponHandlingType.GetBool() ) {
|
||||
bool idPlayer::GetWeaponAwareness() {
|
||||
if ( g_weaponAwareness.GetBool() ) {
|
||||
idEntity *ent;
|
||||
trace_t trace;
|
||||
idVec3 start = GetEyePosition();
|
||||
|
|
|
@ -530,7 +530,10 @@ public:
|
|||
|
||||
int nShowHudTimer; // sikk - Dynamic hud system - Used to say when to show the hud as well as fade it in/out (just for health/armor/ammo/weapon changes)
|
||||
|
||||
idItem* focusItem; // sikk - Manual Item Pickup
|
||||
// sikk---> Manual Item Pickup
|
||||
idItem* focusItem;
|
||||
int itemPickupTime;
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Searchable Corpses
|
||||
void SearchCorpse( idAFEntity_Gibbable* corpse );
|
||||
|
@ -563,10 +566,13 @@ public:
|
|||
idVec3 v3CrosshairPos;
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Weapon Handling System
|
||||
bool GetWeaponHandling( void );
|
||||
// sikk---> Weapon Management: Awareness
|
||||
bool GetWeaponAwareness( void );
|
||||
bool bWATrace;
|
||||
bool bWAIsSprinting;
|
||||
bool bWAUseHideDist;
|
||||
float fSpreadModifier;
|
||||
idEntity* entChainsawed;
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Depth Render
|
||||
|
@ -577,6 +583,7 @@ public:
|
|||
// sikk---> Depth of Field PostProcess
|
||||
int GetTalkCursor( void ) { return talkCursor; }; // used to check if character has focus
|
||||
bool bIsZoomed;
|
||||
float focusDistance;
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Global Ambient Light
|
||||
|
@ -751,7 +758,7 @@ private:
|
|||
void ExtractEmailInfo( const idStr &email, const char *scan, idStr &out );
|
||||
void UpdateObjectiveInfo( void );
|
||||
|
||||
void UseVehicle( bool drive );
|
||||
void UseVehicle( bool drive ); // sikk - function modified to support use function
|
||||
|
||||
void Event_GetButtons( void );
|
||||
void Event_GetMove( void );
|
||||
|
|
|
@ -103,8 +103,6 @@ idPlayerView::idPlayerView() {
|
|||
adrenalineMaterial = declManager->FindMaterial( "postProcess/adrenaline" );
|
||||
bSoftShadows = false;
|
||||
bDepthRendered = false;
|
||||
bDitherRendered = false;
|
||||
focusDistance = 0.0f;
|
||||
prevViewAngles.Zero();
|
||||
// <---sikk
|
||||
|
||||
|
@ -430,11 +428,25 @@ Called when a weapon fires, generates head twitches, etc
|
|||
void idPlayerView::WeaponFireFeedback( const idDict *weaponDef ) {
|
||||
int recoilTime = weaponDef->GetInt( "recoilTime" );
|
||||
|
||||
|
||||
// don't shorten a damage kick in progress
|
||||
if ( recoilTime && kickFinishTime < gameLocal.time ) {
|
||||
idAngles angles;
|
||||
weaponDef->GetAngles( "recoilAngles", "5 0 0", angles );
|
||||
kickAngles = angles;
|
||||
|
||||
// sikk---> Weapon Management: Handling/Awareness
|
||||
if ( g_weaponHandlingType.GetInteger() > 1 ) {
|
||||
float mod = ( ( player->GetCurrentWeapon() == 2 ) ? 1.0f : weaponDef->GetFloat( "spread" ) + 1.0f ) * player->fSpreadModifier;
|
||||
|
||||
idVec2 vec = idVec2( -gameLocal.random.RandomFloat(), gameLocal.random.CRandomFloat() );
|
||||
vec.NormalizeFast();
|
||||
vec *= gameLocal.random.RandomFloat() * mod;
|
||||
kickAngles.pitch += vec.x;
|
||||
kickAngles.yaw += vec.y;
|
||||
}
|
||||
// <---sikk
|
||||
|
||||
int finish = gameLocal.time + g_kickTime.GetFloat() * recoilTime;
|
||||
kickFinishTime = finish;
|
||||
}
|
||||
|
@ -483,10 +495,7 @@ idAngles idPlayerView::AngleOffset() const {
|
|||
float offset = kickFinishTime - gameLocal.time;
|
||||
ang = kickAngles * offset * offset * g_kickAmplitude.GetFloat();
|
||||
for ( int i = 0; i < 3; i++ ) {
|
||||
if ( ang[i] > 70.0f )
|
||||
ang[i] = 70.0f;
|
||||
else if ( ang[i] < -70.0f )
|
||||
ang[i] = -70.0f;
|
||||
ang[i] = idMath::ClampFloat( -70.0f, 70.0f, ang[i] );
|
||||
}
|
||||
}
|
||||
return ang;
|
||||
|
@ -776,37 +785,35 @@ void idPlayerView::RenderDepth( bool bCrop ) {
|
|||
int nWidth = renderSystem->GetScreenWidth() / 2;
|
||||
int nHeight = renderSystem->GetScreenHeight() / 2;
|
||||
|
||||
renderSystem->CropRenderSize( nWidth, nHeight, true );
|
||||
//float fWidthPoT = (float)renderSystem->GetScreenWidth() / (float)( MakePowerOfTwo( nWidth ) * 1 );
|
||||
//float fHeightPoT = (float)renderSystem->GetScreenHeight() / (float)( MakePowerOfTwo( nHeight ) * 1 );
|
||||
|
||||
// if ( r_useSoftShadows.GetBool() ) {
|
||||
// renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, shiftScale.y, shiftScale.x, 0.0f, declManager->FindMaterial( "crop/depth", false ) );
|
||||
// renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0, 1.0, 0.0f, declManager->FindMaterial( "crop/depth", false ) );
|
||||
// renderSystem->CaptureRenderToImage( "_depth" );
|
||||
// } else {
|
||||
renderSystem->CropRenderSize( nWidth, nHeight, true );
|
||||
//if ( r_useSoftShadows.GetBool() ) {
|
||||
// renderSystem->SetColor4( fWidthPoT, fHeightPoT, 1.0f, 1.0f );
|
||||
// renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0, 1.0, declManager->FindMaterial( "crop/depth", false ) );
|
||||
// renderSystem->CaptureRenderToImage( "_depth" );
|
||||
//} else {
|
||||
// set our depthView parms
|
||||
renderView_t depthView = hackedView;
|
||||
depthView.viewID = -8;
|
||||
// depthView.globalMaterial = depthMaterial;
|
||||
cvarSystem->SetCVarString( "r_materialOverride", "render/depth" );
|
||||
depthView.globalMaterial = depthMaterial;
|
||||
// render scene
|
||||
gameRenderWorld->RenderScene( &depthView );
|
||||
// capture image for our depth buffer
|
||||
renderSystem->CaptureRenderToImage( "_depth" );
|
||||
cvarSystem->SetCVarString( "r_materialOverride", "" );
|
||||
// }
|
||||
//}
|
||||
renderSystem->UnCrop();
|
||||
bDepthRendered = true;
|
||||
} else if ( !bCrop ) { // uncropped depth is used specifically for soft shadows
|
||||
// set our depthView parms
|
||||
renderView_t depthView = hackedView;
|
||||
depthView.viewID = -8;
|
||||
// depthView.globalMaterial = depthMaterial;
|
||||
cvarSystem->SetCVarString( "r_materialOverride", "render/depth" );
|
||||
depthView.globalMaterial = depthMaterial;
|
||||
// render scene
|
||||
gameRenderWorld->RenderScene( &depthView );
|
||||
// capture image for our depth buffer
|
||||
renderSystem->CaptureRenderToImage( "_ssDepth" );
|
||||
cvarSystem->SetCVarString( "r_materialOverride", "" );
|
||||
}
|
||||
|
||||
// Restore player models
|
||||
|
@ -826,7 +833,7 @@ void idPlayerView::RenderNormals( bool bFace ) {
|
|||
if ( bFace ) {
|
||||
renderSystem->CropRenderSize( nWidth, nHeight, true );
|
||||
renderSystem->SetColor4( g_fov.GetFloat(), 1.0f, 1.0f, bFace );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, normalsMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, normalsMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_normals" );
|
||||
renderSystem->UnCrop();
|
||||
} else {
|
||||
|
@ -865,21 +872,21 @@ void idPlayerView::PostFX_SoftShadows() {
|
|||
|
||||
// create shadow mask texture
|
||||
renderSystem->SetColor4( 1.0f, 1.0f, 1.0f, 0.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, softShadowsMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, softShadowsMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_ssMask" );
|
||||
|
||||
// blur shadow mask texture and modulate scene in the same pass
|
||||
if ( r_softShadowsBlurFilter.GetInteger() && r_softShadowsBlurFilter.GetInteger() < 4 ) {
|
||||
renderSystem->SetColor4( r_softShadowsBlurScale.GetFloat(), r_softShadowsBlurEpsilon.GetFloat(), g_fov.GetFloat(), r_softShadowsBlurFilter.GetFloat() );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, softShadowsMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, softShadowsMaterial );
|
||||
if ( r_softShadowsBlurFilter.GetInteger() == 3 ) {
|
||||
renderSystem->CaptureRenderToImage( "_ssMask" );
|
||||
renderSystem->SetColor4( r_softShadowsBlurScale.GetFloat(), r_softShadowsBlurEpsilon.GetFloat(), g_fov.GetFloat(), ( r_softShadowsBlurFilter.GetFloat() + 1.0f ) );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, softShadowsMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, softShadowsMaterial );
|
||||
}
|
||||
} else {
|
||||
renderSystem->SetColor4( 1.0f, 1.0f, 1.0f, 5.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, softShadowsMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, softShadowsMaterial );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -985,8 +992,8 @@ idPlayerView::PostFX_EdgeAA
|
|||
*/
|
||||
void idPlayerView::PostFX_EdgeAA() {
|
||||
renderSystem->CaptureRenderToImage( "_currentRender" );
|
||||
renderSystem->SetColor4( r_edgeAASampleScale.GetFloat(), r_edgeAAFilterScale.GetFloat(), 1.0f, 1.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, edgeAAMaterial );
|
||||
renderSystem->SetColor4( r_edgeAASampleScale.GetFloat(), r_edgeAAFilterScale.GetFloat(), 1.0f, r_useEdgeAA.GetFloat() );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, edgeAAMaterial );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -998,7 +1005,7 @@ void idPlayerView::PostFX_CelShading() {
|
|||
renderSystem->CaptureRenderToImage( "_currentRender" );
|
||||
RenderDepth( true );
|
||||
renderSystem->SetColor4( r_celShadingScale.GetFloat(), r_celShadingThreshold.GetFloat(), 1.0f, r_celShadingMethod.GetInteger() );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, celShadingMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, celShadingMaterial );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1020,7 +1027,7 @@ void idPlayerView::PostFX_HDR() {
|
|||
renderSystem->CropRenderSize( 256, 256, true, true );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, shiftScale.y, shiftScale.x, 0.0f, currentRenderMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrLum" );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrLumBaseMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, hdrLumBaseMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrLum" );
|
||||
renderSystem->CaptureRenderToImage( "_hdrLumAvg" );
|
||||
renderSystem->UnCrop();
|
||||
|
@ -1029,7 +1036,7 @@ void idPlayerView::PostFX_HDR() {
|
|||
// Output will be a 1x1 pixel of the average luminance
|
||||
for ( int i = 256; i > 1; i *= 0.5 ) {
|
||||
renderSystem->CropRenderSize( i, i, true, true );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrLumAverageMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, hdrLumAverageMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrLumAvg" );
|
||||
renderSystem->UnCrop();
|
||||
}
|
||||
|
@ -1037,7 +1044,7 @@ void idPlayerView::PostFX_HDR() {
|
|||
// create adapted luminance map based on current average luminance and previous adapted luminance maps
|
||||
renderSystem->CropRenderSize( 2, 2, true, true );
|
||||
renderSystem->SetColor4( r_hdrAdaptationRate.GetFloat(), fElapsedTime, r_hdrLumThresholdMin.GetFloat(), r_hdrLumThresholdMax.GetFloat() );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrLumAdaptedMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, hdrLumAdaptedMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrLumAdpt" );
|
||||
renderSystem->UnCrop();
|
||||
|
||||
|
@ -1048,15 +1055,15 @@ void idPlayerView::PostFX_HDR() {
|
|||
renderSystem->CaptureRenderToImage( "_hdrBloom" );
|
||||
renderSystem->SetColor4( r_hdrBloomMiddleGray.GetFloat(), r_hdrBloomWhitePoint.GetFloat(), r_hdrBloomThreshold.GetFloat(), r_hdrBloomOffset.GetFloat() );
|
||||
if ( r_hdrBloomToneMapper.GetInteger() == 0 )
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrBrightPass1Material );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, hdrBrightPass1Material );
|
||||
else if ( r_hdrBloomToneMapper.GetInteger() == 1 )
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrBrightPass2Material );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, hdrBrightPass2Material );
|
||||
else if ( r_hdrBloomToneMapper.GetInteger() == 2 )
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrBrightPass3Material );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, hdrBrightPass3Material );
|
||||
else if ( r_hdrBloomToneMapper.GetInteger() == 3 )
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrBrightPass4Material );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, hdrBrightPass4Material );
|
||||
else if ( r_hdrBloomToneMapper.GetInteger() == 4 )
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrBrightPass5Material );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, hdrBrightPass5Material );
|
||||
renderSystem->CaptureRenderToImage( "_hdrBloom" );
|
||||
renderSystem->CaptureRenderToImage( "_hdrFlare" );
|
||||
renderSystem->UnCrop();
|
||||
|
@ -1065,10 +1072,10 @@ void idPlayerView::PostFX_HDR() {
|
|||
for ( int i = 0; i < 2; i++ ) {
|
||||
renderSystem->CropRenderSize( nBloomWidth, nBloomHeight, true, true );
|
||||
renderSystem->SetColor4( r_hdrBloomSize.GetFloat(), 0.0f, 1.0f, 1.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrBloomMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, hdrBloomMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrBloom" );
|
||||
renderSystem->SetColor4( 0.0f, r_hdrBloomSize.GetFloat(), r_hdrBloomScale.GetFloat(), 1.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrBloomMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, hdrBloomMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrBloom" );
|
||||
renderSystem->UnCrop();
|
||||
}
|
||||
|
@ -1079,16 +1086,16 @@ void idPlayerView::PostFX_HDR() {
|
|||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 1.0f, 0.0f, 0.0f, 1.0f, declManager->FindMaterial( "_hdrFlare" ) );
|
||||
renderSystem->CaptureRenderToImage( "_hdrFlare" );
|
||||
renderSystem->SetColor4( r_hdrFlareGamma.GetFloat(), 1.0f, 1.0f, 0.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrFlareMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, hdrFlareMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrFlare" );
|
||||
renderSystem->SetColor4( r_hdrFlareSize.GetFloat(), 1.0f, 1.0f, 1.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrFlareMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, hdrFlareMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrFlare" );
|
||||
renderSystem->SetColor4( DEG2RAD( r_hdrFlareSize.GetFloat() ), 1.0f, 1.0f, 2.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrFlareMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, hdrFlareMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrFlare" );
|
||||
renderSystem->SetColor4( DEG2RAD( r_hdrFlareSize.GetFloat() ), r_hdrFlareScale.GetFloat(), 1.0f, 2.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrFlareMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, hdrFlareMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrFlare" );
|
||||
renderSystem->UnCrop();
|
||||
}
|
||||
|
@ -1098,7 +1105,7 @@ void idPlayerView::PostFX_HDR() {
|
|||
if ( r_hdrGlareStyle.GetInteger() == 0 ) {
|
||||
// bloom off (clear textures)
|
||||
renderSystem->CropRenderSize( 1, 1, true, true );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, blackMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, blackMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrBloom" );
|
||||
renderSystem->CaptureRenderToImage( "_hdrFlare" );
|
||||
renderSystem->CaptureRenderToImage( "_hdrGlare" );
|
||||
|
@ -1106,11 +1113,13 @@ void idPlayerView::PostFX_HDR() {
|
|||
} else if ( r_hdrGlareStyle.GetInteger() == 1 ) {
|
||||
// natural bloom (clear just _hdrGlare)
|
||||
renderSystem->CropRenderSize( 1, 1, true, true );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, blackMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, blackMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrGlare" );
|
||||
renderSystem->UnCrop();
|
||||
} else if ( r_hdrGlareStyle.GetInteger() > 1 ) {
|
||||
int nGlareBlend;
|
||||
int nGlareBlend = 0;
|
||||
idVec3 v3GlareParm;
|
||||
v3GlareParm.Zero();
|
||||
|
||||
// crop _hdrBloom1 for glare textures
|
||||
renderSystem->CropRenderSize( nGlareWidth, nGlareHeight, true, true );
|
||||
|
@ -1119,138 +1128,79 @@ void idPlayerView::PostFX_HDR() {
|
|||
renderSystem->CaptureRenderToImage( "_hdrGlareY" );
|
||||
renderSystem->CaptureRenderToImage( "_hdrGlareZ" );
|
||||
|
||||
switch ( r_hdrGlareStyle.GetInteger() ) {
|
||||
case 2: // star glare
|
||||
for ( int i = 1; i <= 3; i++ ) {
|
||||
renderSystem->SetColor4( r_hdrGlareSize.GetFloat(), i, 1.0f, 0.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrGlareMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrGlareX" );
|
||||
renderSystem->SetColor4( r_hdrGlareSize.GetFloat(), i, 1.0f, 1.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrGlareMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrGlareY" );
|
||||
}
|
||||
if ( r_hdrGlareStyle.GetInteger() == 2 ) { // star glare
|
||||
v3GlareParm = idVec3( 0.0f, 1.0, -1.0f );
|
||||
nGlareBlend = 2;
|
||||
break;
|
||||
case 3: // cross glare
|
||||
for ( int i = 1; i <= 3; i++ ) {
|
||||
renderSystem->SetColor4( r_hdrGlareSize.GetFloat(), i, 1.0f, 2.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrGlareMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrGlareX" );
|
||||
renderSystem->SetColor4( r_hdrGlareSize.GetFloat(), i, 1.0f, 3.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrGlareMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrGlareY" );
|
||||
}
|
||||
} else if ( r_hdrGlareStyle.GetInteger() == 3 ) { // cross glare
|
||||
v3GlareParm = idVec3( 2.0f, 3.0, -1.0f );
|
||||
nGlareBlend = 2;
|
||||
break;
|
||||
case 4: // snow cross glare
|
||||
for ( int i = 1; i <= 3; i++ ) {
|
||||
renderSystem->SetColor4( r_hdrGlareSize.GetFloat(), i, 1.0f, 4.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrGlareMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrGlareX" );
|
||||
renderSystem->SetColor4( r_hdrGlareSize.GetFloat(), i, 1.0f, 5.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrGlareMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrGlareY" );
|
||||
renderSystem->SetColor4( r_hdrGlareSize.GetFloat(), i, 1.0f, 6.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrGlareMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrGlareZ" );
|
||||
}
|
||||
} else if ( r_hdrGlareStyle.GetInteger() == 4 ) { // snow cross glare
|
||||
v3GlareParm = idVec3( 4.0f, 5.0, 6.0f );
|
||||
nGlareBlend = 3;
|
||||
break;
|
||||
case 5: // horizontal glare
|
||||
for ( int i = 1; i <= 3; i++ ) {
|
||||
renderSystem->SetColor4( r_hdrGlareSize.GetFloat(), i, 1.0f, 7.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrGlareMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrGlareX" );
|
||||
}
|
||||
} else if ( r_hdrGlareStyle.GetInteger() == 5 ) { // horizontal glare
|
||||
v3GlareParm = idVec3( 7.0f, -1.0, -1.0f );
|
||||
nGlareBlend = 0;
|
||||
break;
|
||||
case 6: // vertical glare
|
||||
for ( int i = 1; i <= 3; i++ ) {
|
||||
renderSystem->SetColor4( r_hdrGlareSize.GetFloat(), i, 1.0f, 8.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrGlareMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrGlareY" );
|
||||
}
|
||||
} else if ( r_hdrGlareStyle.GetInteger() == 6 ) { // vertical glare
|
||||
v3GlareParm = idVec3( -1.0f, 8.0, -1.0f );
|
||||
nGlareBlend = 1;
|
||||
break;
|
||||
case 7: // star glare with chromatic abberation
|
||||
for ( int i = 1; i <= 3; i++ ) {
|
||||
renderSystem->SetColor4( r_hdrGlareSize.GetFloat(), i, 1.0f, 9.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrGlareMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrGlareX" );
|
||||
renderSystem->SetColor4( r_hdrGlareSize.GetFloat(), i, 1.0f, 10.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrGlareMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrGlareY" );
|
||||
}
|
||||
} else if ( r_hdrGlareStyle.GetInteger() == 7 ) { // star glare with chromatic abberation
|
||||
v3GlareParm = idVec3( 9.0f, 10.0, -1.0f );
|
||||
nGlareBlend = 2;
|
||||
break;
|
||||
case 8: // cross glare with chromatic abberation
|
||||
for ( int i = 1; i <= 3; i++ ) {
|
||||
renderSystem->SetColor4( r_hdrGlareSize.GetFloat(), i, 1.0f, 11.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrGlareMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrGlareX" );
|
||||
renderSystem->SetColor4( r_hdrGlareSize.GetFloat(), i, 1.0f, 12.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrGlareMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrGlareY" );
|
||||
}
|
||||
} else if ( r_hdrGlareStyle.GetInteger() == 8 ) { // cross glare with chromatic abberation
|
||||
v3GlareParm = idVec3( 11.0f, 12.0, -1.0f );
|
||||
nGlareBlend = 2;
|
||||
break;
|
||||
case 9: // snow cross glare with chromatic abberation
|
||||
for ( int i = 1; i <= 3; i++ ) {
|
||||
renderSystem->SetColor4( r_hdrGlareSize.GetFloat(), i, 1.0f, 13.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrGlareMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrGlareX" );
|
||||
renderSystem->SetColor4( r_hdrGlareSize.GetFloat(), i, 1.0f, 14.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrGlareMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrGlareY" );
|
||||
renderSystem->SetColor4( r_hdrGlareSize.GetFloat(), i, 1.0f, 15.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrGlareMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrGlareZ" );
|
||||
}
|
||||
} else if ( r_hdrGlareStyle.GetInteger() == 9 ) { // snow cross glare with chromatic abberation
|
||||
v3GlareParm = idVec3( 13.0f, 14.0, 15.0f );
|
||||
nGlareBlend = 3;
|
||||
break;
|
||||
case 10: // horizontal glare with chromatic abberation
|
||||
for ( int i = 1; i <= 3; i++ ) {
|
||||
renderSystem->SetColor4( r_hdrGlareSize.GetFloat(), i, 1.0f, 16.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrGlareMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrGlareX" );
|
||||
}
|
||||
} else if ( r_hdrGlareStyle.GetInteger() == 10 ) { // horizontal glare with chromatic abberation
|
||||
v3GlareParm = idVec3( 16.0f, -1.0, -1.0f );
|
||||
nGlareBlend = 0;
|
||||
break;
|
||||
case 11: // vertical glare with chromatic abberation
|
||||
for ( int i = 1; i <= 3; i++ ) {
|
||||
renderSystem->SetColor4( r_hdrGlareSize.GetFloat(), i, 1.0f, 17.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrGlareMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrGlareY" );
|
||||
}
|
||||
} else if ( r_hdrGlareStyle.GetInteger() == 11 ) { // vertical glare with chromatic abberation
|
||||
v3GlareParm = idVec3( -1.0f, 17.0, -1.0f );
|
||||
nGlareBlend = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
for ( int i = 1; i <= 3; i++ ) {
|
||||
if ( v3GlareParm.x >= 0.0f ) {
|
||||
renderSystem->SetColor4( r_hdrGlareSize.GetFloat(), i, 1.0f, v3GlareParm.x );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, hdrGlareMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrGlareX" );
|
||||
}
|
||||
if ( v3GlareParm.y >= 0.0f ) {
|
||||
renderSystem->SetColor4( r_hdrGlareSize.GetFloat(), i, 1.0f, v3GlareParm.y );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, hdrGlareMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrGlareY" );
|
||||
}
|
||||
if ( v3GlareParm.z >= 0.0f ) {
|
||||
renderSystem->SetColor4( r_hdrGlareSize.GetFloat(), i, 1.0f, v3GlareParm.z );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, hdrGlareMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrGlareZ" );
|
||||
}
|
||||
}
|
||||
|
||||
// blend glare textures and capture to a single texture
|
||||
renderSystem->SetColor4( r_hdrGlareScale.GetFloat(), 1.0f, nGlareBlend, 18.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrGlareMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, hdrGlareMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrGlare" );
|
||||
renderSystem->UnCrop();
|
||||
}
|
||||
|
||||
if ( r_hdrDither.GetBool() && ( !bDitherRendered || ( fDitherSize != r_hdrDitherSize.GetFloat() ) ) ) {
|
||||
if ( r_hdrDither.GetBool() ) {
|
||||
float size = 16.0f * r_hdrDitherSize.GetFloat();
|
||||
renderSystem->SetColor4( renderSystem->GetScreenWidth() / size, renderSystem->GetScreenHeight() / size, 1.0f, -1.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrFinalMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, hdrFinalMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrDither" );
|
||||
bDitherRendered = true;
|
||||
} else if ( !r_hdrDither.GetBool() && bDitherRendered ) {
|
||||
} else {
|
||||
renderSystem->CropRenderSize( 1, 1, true, true );
|
||||
renderSystem->SetColor4( 1.0f, 1.0f, 1.0f, -2.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrFinalMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, hdrFinalMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_hdrDither" );
|
||||
renderSystem->UnCrop();
|
||||
bDitherRendered = false;
|
||||
}
|
||||
fDitherSize = r_hdrDitherSize.GetFloat();
|
||||
|
||||
// perform final tone mapping
|
||||
renderSystem->SetColor4( r_hdrMiddleGray.GetFloat(), r_hdrWhitePoint.GetFloat(), r_hdrBlueShiftFactor.GetFloat(), r_hdrToneMapper.GetInteger() + 5 * r_useVignetting.GetBool() );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, hdrFinalMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, hdrFinalMaterial );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1271,22 +1221,22 @@ void idPlayerView::PostFX_Bloom() {
|
|||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, shiftScale.y, shiftScale.x, 0.0f, currentRenderMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_bloom" );
|
||||
renderSystem->SetColor4( r_bloomGamma.GetFloat(), 1.0f, 1.0f, 0.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, bloomMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, bloomMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_bloom" );
|
||||
|
||||
for ( int i = 0; i < r_bloomBlurIterations.GetInteger(); i++ ) {
|
||||
renderSystem->SetColor4( r_bloomBlurScaleX.GetFloat(), 1.0f, 1.0f, 1.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, bloomMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, bloomMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_bloom" );
|
||||
renderSystem->SetColor4( r_bloomBlurScaleY.GetFloat(), 1.0f, 1.0f, 2.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, bloomMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, bloomMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_bloom" );
|
||||
}
|
||||
renderSystem->UnCrop();
|
||||
|
||||
// blend original and bloom textures
|
||||
renderSystem->SetColor4( r_bloomScale.GetFloat(), 1.0f, 1.0f, 3.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, bloomMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, bloomMaterial );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1308,22 +1258,22 @@ void idPlayerView::PostFX_SSIL() {
|
|||
renderSystem->CaptureRenderToImage( "_ssil" );
|
||||
|
||||
renderSystem->SetColor4( r_ssilRadius.GetFloat(), r_ssilAmount.GetFloat(), 1.0f, 0.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, ssilMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, ssilMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_ssil" );
|
||||
// blur ssil buffer
|
||||
for ( int i = 0; i < r_ssilBlurQuality.GetInteger(); i++ ) {
|
||||
renderSystem->SetColor4( r_ssilBlurScale.GetFloat(), 0.0f, r_ssilBlurEpsilon.GetFloat(), ( r_ssilBlurMethod.GetFloat() + 1.0f ) );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, ssilMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, ssilMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_ssil" );
|
||||
renderSystem->SetColor4( 0.0f, r_ssilBlurScale.GetFloat(), r_ssilBlurEpsilon.GetFloat(), ( r_ssilBlurMethod.GetFloat() + 1.0f ) );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, ssilMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, ssilMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_ssil" );
|
||||
}
|
||||
renderSystem->UnCrop();
|
||||
|
||||
// blend scene with ssil buffer
|
||||
renderSystem->SetColor4( 1.0f, 1.0f, 1.0f, 3.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, ssilMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, ssilMaterial );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1343,16 +1293,16 @@ void idPlayerView::PostFX_SSAO() {
|
|||
|
||||
// sample occlusion using our depth buffer
|
||||
renderSystem->SetColor4( r_ssaoRadius.GetFloat(), r_ssaoBias.GetFloat(), r_ssaoAmount.GetFloat(), ( r_ssaoMethod.GetFloat() < 0.0f ? 0.0f : r_ssaoMethod.GetFloat() ) );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, ssaoMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, ssaoMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_ssao" );
|
||||
// blur ssao buffer
|
||||
for ( int i = 0; i < r_ssaoBlurQuality.GetInteger(); i++ ) {
|
||||
renderSystem->SetColor4( r_ssaoBlurScale.GetFloat(), 0.0f, r_ssaoBlurEpsilon.GetFloat(), -( r_ssaoBlurMethod.GetFloat() + 1.0f ) );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, ssaoMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, ssaoMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_ssao" );
|
||||
if ( r_ssaoBlurMethod.GetInteger() >= 2 ) {
|
||||
renderSystem->SetColor4( 0.0f, r_ssaoBlurScale.GetFloat(), r_ssaoBlurEpsilon.GetFloat(), -( r_ssaoBlurMethod.GetFloat() + 1.0f ) );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, ssaoMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, ssaoMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_ssao" );
|
||||
}
|
||||
}
|
||||
|
@ -1360,7 +1310,7 @@ void idPlayerView::PostFX_SSAO() {
|
|||
|
||||
// modulate scene with ssao buffer
|
||||
renderSystem->SetColor4( r_ssaoBlendPower.GetFloat(), r_ssaoBlendScale.GetFloat(), 1.0f, -5.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, ssaoMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, ssaoMaterial );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1402,27 +1352,27 @@ void idPlayerView::PostFX_SunShafts() {
|
|||
renderSystem->CaptureRenderToImage( "_sunShafts" );
|
||||
|
||||
renderSystem->SetColor4( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, sunShaftsMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, sunShaftsMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_sunShafts" );
|
||||
|
||||
renderSystem->SetColor4( VdotS[0], 1.0f, 1.0f, 2.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, sunShaftsMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, sunShaftsMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_sunShaftsMask" );
|
||||
|
||||
// blur textures
|
||||
for ( int i = 0; i < r_sunShaftsQuality.GetInteger(); i++ ) {
|
||||
renderSystem->SetColor4( r_sunShaftsSize.GetFloat(), ndc.x, ndc.y, 3.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, sunShaftsMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, sunShaftsMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_sunShafts" );
|
||||
renderSystem->SetColor4( r_sunShaftsSize.GetFloat(), ndc.x, ndc.y, 4.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, sunShaftsMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, sunShaftsMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_sunShaftsMask" );
|
||||
}
|
||||
renderSystem->UnCrop();
|
||||
|
||||
// add mask to scene
|
||||
renderSystem->SetColor4( r_sunShaftsStrength.GetFloat(), r_sunShaftsMaskStrength.GetFloat(), 1.0f, 5.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, sunShaftsMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, sunShaftsMaterial );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1533,14 +1483,6 @@ idPlayerView::PostFX_DoF
|
|||
===================
|
||||
*/
|
||||
void idPlayerView::PostFX_DoF() {
|
||||
if ( r_useDepthOfField.GetInteger() == 1 && !gameLocal.inCinematic ) {
|
||||
trace_t trace;
|
||||
idVec3 start = hackedView.vieworg;
|
||||
idVec3 end = start + hackedView.viewaxis.ToAngles().ToForward() * 8192.0f;
|
||||
gameLocal.clip.TracePoint( trace, start, end, MASK_SHOT_RENDERMODEL, player );
|
||||
focusDistance = focusDistance * 0.9 + trace.fraction * 0.1;
|
||||
}
|
||||
|
||||
if ( DoFConditionCheck() ) {
|
||||
int nWidth = renderSystem->GetScreenWidth() / 2.0f;
|
||||
int nHeight = renderSystem->GetScreenHeight() / 2.0f;
|
||||
|
@ -1556,20 +1498,20 @@ void idPlayerView::PostFX_DoF() {
|
|||
else if ( player->weapon.GetEntity()->IsReloading() )
|
||||
renderSystem->SetColor4( -1.0f, 0.5f, 64.0f, 2.0f ); // use specific settings for reloading dof
|
||||
else if ( player->bIsZoomed )
|
||||
renderSystem->SetColor4( focusDistance, 1.0f, 1.0f, 1.0f ); // zoom uses a mask texture
|
||||
renderSystem->SetColor4( player->focusDistance, 1.0f, 1.0f, 1.0f ); // zoom uses a mask texture
|
||||
else
|
||||
renderSystem->SetColor4( focusDistance, 1.0f, 1.0f, 0.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, dofMaterial );
|
||||
renderSystem->SetColor4( player->focusDistance, 1.0f, 1.0f, 0.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, dofMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_dof" );
|
||||
renderSystem->UnCrop();
|
||||
|
||||
// blur scene using our depth of field mask
|
||||
renderSystem->SetColor4( r_dofBlurScale.GetFloat(), r_dofBlurQuality.GetInteger(), 1.0f, 3.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, dofMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, dofMaterial );
|
||||
if ( r_dofBlurQuality.GetInteger() == 2 ) {
|
||||
renderSystem->CaptureRenderToImage( "_currentRender" );
|
||||
renderSystem->SetColor4( r_dofBlurScale.GetFloat(), r_dofBlurQuality.GetInteger() + 2.0f, 1.0f, 3.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, dofMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, dofMaterial );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1642,16 +1584,16 @@ void idPlayerView::PostFX_MotionBlur() {
|
|||
renderSystem->CaptureRenderToImage( "_mbZ" );
|
||||
for ( int i = 0; i < nQuality; i++ ) {
|
||||
renderSystem->SetColor4( parm[0], parm[1], r_motionBlurMaskDistance.GetFloat(), 1.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, motionBlurMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, motionBlurMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_mbXY" );
|
||||
renderSystem->SetColor4( parm[0], parm[2], r_motionBlurMaskDistance.GetFloat(), 2.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, motionBlurMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, motionBlurMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_mbZ" );
|
||||
}
|
||||
renderSystem->UnCrop();
|
||||
|
||||
renderSystem->SetColor4( parm[3], parm[4], r_motionBlurMaskDistance.GetFloat(), 3.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, motionBlurMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, motionBlurMaterial );
|
||||
}
|
||||
|
||||
float fLerp = 0.5f;//idMath::ClampFloat( 0.0f, 0.99f, r_motionBlurLerp.GetFloat() );
|
||||
|
@ -1694,15 +1636,15 @@ void idPlayerView::PostFX_ColorGrading() {
|
|||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, shiftScale.y, shiftScale.x, 0.0f, currentRenderMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_blurRender" );
|
||||
renderSystem->SetColor4( 1.0f, 1.0f, 1.0f, 0.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, colorGradingMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, colorGradingMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_blurRender" );
|
||||
renderSystem->SetColor4( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, colorGradingMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, colorGradingMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_blurRender" );
|
||||
renderSystem->UnCrop();
|
||||
|
||||
renderSystem->SetColor4( r_colorGradingParm.GetInteger(), r_colorGradingSharpness.GetFloat(), 1.0f, ( r_colorGradingType.GetFloat() + 2.0f ) );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, colorGradingMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, colorGradingMaterial );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1715,32 +1657,28 @@ void idPlayerView::PostFX_ExplosionFX() {
|
|||
idMat3 axis;
|
||||
idVec3 origin;
|
||||
idVec3 viewVector[3];
|
||||
|
||||
player->GetViewPos( origin, axis );
|
||||
player->viewAngles.ToVectors( &viewVector[0], &viewVector[1], &viewVector[2] );
|
||||
|
||||
idVec3 expOrigin = gameLocal.explosionOrigin;
|
||||
idVec3 dist = origin - expOrigin;
|
||||
float length = dist.Length();
|
||||
idVec3 expVector = dist / length;
|
||||
|
||||
float VdotE = idMath::ClampFloat( 0.0f, 1.0f, viewVector[ 0 ] * -expVector );
|
||||
player->viewAngles.ToVectors( &viewVector[ 0 ], &viewVector[ 1 ], &viewVector[ 2 ] );
|
||||
idVec3 expVector = origin - gameLocal.explosionOrigin;
|
||||
float length = expVector.Normalize();
|
||||
|
||||
idVec3 ndc;
|
||||
renderSystem->GlobalToNormalizedDeviceCoordinates( gameLocal.explosionOrigin, ndc );
|
||||
|
||||
renderSystem->CaptureRenderToImage( "_currentRender" );
|
||||
ndc.x = ndc.x * 0.5 + 0.5;
|
||||
ndc.y = ndc.y * 0.5 + 0.5;
|
||||
|
||||
float time = (float)gameLocal.explosionTime - (float)gameLocal.time;
|
||||
float radius = idMath::ClampFloat( 0.0f, 1.0f, gameLocal.explosionRadius / 200.0f );
|
||||
float damage = idMath::ClampFloat( 0.0f, 1.0f, gameLocal.explosionDamage / 250.0f );
|
||||
float time = (float)gameLocal.explosionTime - (float)gameLocal.time;
|
||||
float radius = idMath::ClampFloat( 0.0f, 1.0f, gameLocal.explosionRadius / 200.0f );
|
||||
float damage = idMath::ClampFloat( 0.0f, 1.0f, gameLocal.explosionDamage / 250.0f );
|
||||
float distance = 1.0f - idMath::ClampFloat( 0.0f, 1.0f, length / 1024.0f );
|
||||
float atten = idMath::ClampFloat( 0.0f, 1.0f, time / ( g_explosionFXTime.GetFloat() * 1000 ) );
|
||||
float scale = radius * damage * distance * atten * VdotE * g_explosionFXScale.GetFloat();
|
||||
float atten = idMath::ClampFloat( 0.0f, 1.0f, time / ( g_explosionFXTime.GetFloat() * 1000 ) );
|
||||
float VdotE = idMath::ClampFloat( 0.0f, 1.0f, viewVector[ 0 ] * -expVector );
|
||||
float scale = radius * damage * distance * atten * VdotE * g_explosionFXScale.GetFloat();
|
||||
|
||||
renderSystem->CaptureRenderToImage( "_currentRender" );
|
||||
renderSystem->SetColor4( ndc.x, ndc.y, scale, 1.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, explosionFXMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, explosionFXMaterial );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1753,7 +1691,7 @@ void idPlayerView::PostFX_IRGoggles() {
|
|||
if ( player->bIRGogglesOn && !player->PowerUpActive( BERSERK ) ) {
|
||||
renderSystem->CaptureRenderToImage( "_currentRender" );
|
||||
renderSystem->SetColor4( renderSystem->GetScreenWidth() / 256.0f, renderSystem->GetScreenHeight() / 256.0f, 1.0f, g_goggleType.GetFloat() );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, irGogglesMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, irGogglesMaterial );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1767,7 +1705,7 @@ void idPlayerView::PostFX_ScreenFrost() {
|
|||
if ( alpha ) {
|
||||
renderSystem->CaptureRenderToImage( "_currentRender" );
|
||||
renderSystem->SetColor4( alpha, 1.0f, 1.0f, 1.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, screenFrostMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, screenFrostMaterial );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1808,10 +1746,10 @@ void idPlayerView::PostFX_AdrenalineVision() {
|
|||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, shiftScale.y, shiftScale.x, 0.0f, currentRenderMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_blurRender" );
|
||||
renderSystem->SetColor4( 1.0f, 1.0f, 1.0f, 0.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, adrenalineMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, adrenalineMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_blurRender" );
|
||||
renderSystem->SetColor4( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, adrenalineMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, adrenalineMaterial );
|
||||
renderSystem->CaptureRenderToImage( "_blurRender" );
|
||||
renderSystem->UnCrop();
|
||||
|
||||
|
@ -1820,7 +1758,7 @@ void idPlayerView::PostFX_AdrenalineVision() {
|
|||
alpha = ( alpha < 0.0f ) ? 0.0f : alpha;
|
||||
|
||||
renderSystem->SetColor4( alpha, ( alpha + 1.0f ), 1.0f, 2.0f );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 1.0f, 1.0f, 0.0f, adrenalineMaterial );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, adrenalineMaterial );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1903,10 +1841,10 @@ void idPlayerView::PostFX_InfluenceVision() {
|
|||
renderSystem->CaptureRenderToImage( "_currentRender" );
|
||||
renderSystem->SetColor4( 1.0f, 1.0f, 1.0f, pct );
|
||||
renderSystem->DrawStretchPic( 0.0f, 0.0f, SCREEN_WIDTH, SCREEN_HEIGHT, 0.0f, 0.0f, 1.0f, 1.0f, player->GetInfluenceMaterial() );
|
||||
} else if ( player->GetInfluenceEntity() ) {
|
||||
int offset = 25 + sinf( gameLocal.time );
|
||||
}// else if ( player->GetInfluenceEntity() ) {
|
||||
// int offset = 25 + sinf( gameLocal.time ); // sikk - variable initialized but not used
|
||||
// PostFX_DoubleVision( view, pct * offset );
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -197,12 +197,9 @@ private:
|
|||
const idMaterial * explosionFXMaterial; // Explosion FX material
|
||||
|
||||
renderView_t hackedView;
|
||||
float focusDistance; // Holds focus distance for depth of field
|
||||
idAngles prevViewAngles; // Holds previous frame's player view angles
|
||||
int prevTime; // Holds previous frame's time
|
||||
bool bDepthRendered; // Holds whether the depth map has been rendered for the current frame
|
||||
bool bDitherRendered; // Holds whether the dither map has been rendered
|
||||
float fDitherSize; // Holds previous frame's dither size to check for changes
|
||||
pvsHandle_t playerPVS; // Holds player's current pvs (for soft shadows)
|
||||
bool bSoftShadows; // a soft shadows toggle used so ResetShadows() is only run once when r_useSoftShadows = 0
|
||||
// <---sikk
|
||||
|
|
|
@ -370,7 +370,7 @@ void idProjectile::Launch( const idVec3 &start, const idVec3 &dir, const idVec3
|
|||
}
|
||||
|
||||
// don't do tracers on client, we don't know origin and direction
|
||||
if ( spawnArgs.GetBool( "tracers" ) && ( gameLocal.random.RandomFloat() < g_tracerFrequency.GetFloat() ) ) { // sikk - Tracer Frequency
|
||||
if ( spawnArgs.GetBool( "tracers" ) && ( ( gameLocal.random.RandomFloat() * 0.99999f ) < g_tracerFrequency.GetFloat() ) ) { // sikk - Tracer Frequency
|
||||
SetModel( spawnArgs.GetString( "model_tracer" ) );
|
||||
projectileFlags.isTracer = true;
|
||||
}
|
||||
|
@ -593,7 +593,7 @@ bool idProjectile::Collide( const trace_t &collision, const idVec3 &velocity ) {
|
|||
// sikk---> Blood Spray Screen Effect
|
||||
if ( g_showBloodSpray.GetBool() ) {
|
||||
idVec3 vLength = player->GetEyePosition() - ent->GetPhysics()->GetOrigin();
|
||||
if ( vLength.Length() <= g_bloodSprayDistance.GetFloat() && gameLocal.random.RandomFloat() < g_bloodSprayFrequency.GetFloat() )
|
||||
if ( vLength.Length() <= g_bloodSprayDistance.GetFloat() && ( gameLocal.random.RandomFloat() * 0.99999f ) < g_bloodSprayFrequency.GetFloat() )
|
||||
player->playerView.AddBloodSpray( g_bloodSprayTime.GetFloat() );
|
||||
}
|
||||
// <---sikk
|
||||
|
@ -843,6 +843,20 @@ void idProjectile::Explode( const trace_t &collision, idEntity *ignore ) {
|
|||
} else {
|
||||
fxname = spawnArgs.GetString( "model_smoke" );
|
||||
}
|
||||
|
||||
/* switch ( surfaceType ) {
|
||||
case SURFTYPE_NONE: fxname = spawnArgs.GetString( "model_smokespark" ); break;
|
||||
case SURFTYPE_METAL: fxname = spawnArgs.GetString( "model_impact_metal" ); break;
|
||||
case SURFTYPE_STONE: fxname = spawnArgs.GetString( "model_impact_stone" ); break;
|
||||
case SURFTYPE_FLESH: fxname = spawnArgs.GetString( "model_impact_flesh" ); break;
|
||||
case SURFTYPE_WOOD: fxname = spawnArgs.GetString( "model_impact_wood" ); break;
|
||||
case SURFTYPE_CARDBOARD: fxname = spawnArgs.GetString( "model_impact_cardboard" ); break;
|
||||
case SURFTYPE_LIQUID: fxname = spawnArgs.GetString( "model_impact_liquid" ); break;
|
||||
case SURFTYPE_GLASS: fxname = spawnArgs.GetString( "model_impact_glass" ); break;
|
||||
case SURFTYPE_PLASTIC: fxname = spawnArgs.GetString( "model_impact_plastic" ); break;
|
||||
case SURFTYPE_RICOCHET: fxname = spawnArgs.GetString( "model_ricochet" ); break;
|
||||
default: fxname = spawnArgs.GetString( "model_smoke" ); break;
|
||||
}*/
|
||||
}
|
||||
|
||||
if ( fxname && *fxname ) {
|
||||
|
|
|
@ -166,7 +166,7 @@ Called by game code to drop another particle into the list
|
|||
================
|
||||
*/
|
||||
bool idSmokeParticles::EmitSmoke( const idDeclParticle *smoke, const int systemStartTime, const float diversity, const idVec3 &origin, const idMat3 &axis ) {
|
||||
bool continues = false;
|
||||
bool continues = false;
|
||||
|
||||
if ( !smoke ) {
|
||||
return false;
|
||||
|
@ -205,9 +205,9 @@ bool idSmokeParticles::EmitSmoke( const idDeclParticle *smoke, const int systemS
|
|||
}
|
||||
|
||||
// see how many particles we should emit this tic
|
||||
// FIXME: smoke.privateStartTime += stage->timeOffset;
|
||||
int finalParticleTime = stage->cycleMsec * stage->spawnBunching;
|
||||
int deltaMsec = gameLocal.time - systemStartTime;
|
||||
// FIXME: smoke.privateStartTime += stage->timeOffset;
|
||||
int finalParticleTime = stage->cycleMsec * stage->spawnBunching;
|
||||
int deltaMsec = gameLocal.time - systemStartTime;
|
||||
|
||||
int nowCount=0, prevCount=0;
|
||||
if ( finalParticleTime == 0 ) {
|
||||
|
@ -264,7 +264,7 @@ bool idSmokeParticles::EmitSmoke( const idDeclParticle *smoke, const int systemS
|
|||
gameLocal.Printf( "idSmokeParticles::EmitSmoke: no free smokes with %d active stages\n", activeStages.Num() );
|
||||
return true;
|
||||
}
|
||||
singleSmoke_t *newSmoke = freeSmokes;
|
||||
singleSmoke_t *newSmoke = freeSmokes;
|
||||
freeSmokes = freeSmokes->next;
|
||||
numActiveSmokes++;
|
||||
|
||||
|
|
101
game/Weapon.cpp
101
game/Weapon.cpp
|
@ -376,7 +376,7 @@ void idWeapon::Save( idSaveGame *savefile ) const {
|
|||
savefile->WriteBool( allowDrop );
|
||||
savefile->WriteObject( projectileEnt );
|
||||
|
||||
savefile->WriteFloat( wh_hide_distance ); // sikk - Weapon Handling System
|
||||
savefile->WriteFloat( wm_hide_distance ); // sikk - Weapon Management: Awareness
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -543,7 +543,7 @@ void idWeapon::Restore( idRestoreGame *savefile ) {
|
|||
savefile->ReadBool( allowDrop );
|
||||
savefile->ReadObject( reinterpret_cast<idClass *&>( projectileEnt ) );
|
||||
|
||||
savefile->ReadFloat( wh_hide_distance ); // sikk - Weapon Handling System
|
||||
savefile->ReadFloat( wm_hide_distance ); // sikk - Weapon Management: Awareness
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -725,7 +725,7 @@ void idWeapon::Clear( void ) {
|
|||
|
||||
isFiring = false;
|
||||
|
||||
wh_hide_distance = -15; // sikk - Weapon Handling System
|
||||
wm_hide_distance = -15; // sikk - Weapon Management: Awareness
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -801,7 +801,17 @@ void idWeapon::GetWeaponDef( const char *objectname, int ammoinclip ) {
|
|||
|
||||
ammoType = GetAmmoNumForName( weaponDef->dict.GetString( "ammoType" ) );
|
||||
ammoRequired = weaponDef->dict.GetInt( "ammoRequired" );
|
||||
clipSize = g_ammoCapacityType.GetBool() ? weaponDef->dict.GetInt( "custom_clipSize" ) : weaponDef->dict.GetInt( "clipSize" ); // sikk---> Ammo Management: Ammo Capacity Type
|
||||
|
||||
// sikk---> Ammo Management: Ammo Clip Size Type
|
||||
if ( g_ammoClipSizeType.GetInteger() == 1 ) {
|
||||
clipSize = weaponDef->dict.GetInt( "clipSize_doom" );
|
||||
} else if ( g_ammoClipSizeType.GetInteger() == 2 ) {
|
||||
clipSize = weaponDef->dict.GetInt( "clipSize_custom" );
|
||||
} else {
|
||||
clipSize = weaponDef->dict.GetInt( "clipSize" );
|
||||
}
|
||||
// <---sikk
|
||||
|
||||
lowAmmo = weaponDef->dict.GetInt( "lowAmmo" );
|
||||
|
||||
icon = weaponDef->dict.GetString( "icon" );
|
||||
|
@ -816,7 +826,7 @@ void idWeapon::GetWeaponDef( const char *objectname, int ammoinclip ) {
|
|||
hideTime = SEC2MS( weaponDef->dict.GetFloat( "hide_time", "0.3" ) );
|
||||
hideDistance = weaponDef->dict.GetFloat( "hide_distance", "-15" );
|
||||
|
||||
wh_hide_distance = weaponDef->dict.GetFloat( "wh_hide_distance", "-15" ); // sikk - Weapon Handling System
|
||||
wm_hide_distance = weaponDef->dict.GetFloat( "wm_hide_distance", "-15" ); // sikk - Weapon Management: Awareness
|
||||
|
||||
// muzzle smoke
|
||||
smokeName = weaponDef->dict.GetString( "smoke_muzzle" );
|
||||
|
@ -1089,9 +1099,17 @@ void idWeapon::UpdateGUI( void ) {
|
|||
renderEntity.gui[ 0 ]->SetStateString( "player_ammo", "" );
|
||||
} else {
|
||||
// show remaining ammo
|
||||
renderEntity.gui[ 0 ]->SetStateString( "player_totalammo", va( "%i", ammoamount - inclip) );
|
||||
renderEntity.gui[ 0 ]->SetStateString( "player_ammo", ClipSize() ? va( "%i", inclip ) : "--" );
|
||||
renderEntity.gui[ 0 ]->SetStateString( "player_clips", ClipSize() ? va("%i", ammoamount / ClipSize()) : "--" );
|
||||
// sikk---> Ammo Management: Ammo Clip Size Type
|
||||
if ( g_ammoClipSizeType.GetInteger() == 1 ) {
|
||||
renderEntity.gui[ 0 ]->SetStateString( "player_totalammo", ClipSize() ? va( "%i", ammoamount - inclip ) : va( "%i", ammoamount ) );
|
||||
renderEntity.gui[ 0 ]->SetStateString( "player_ammo", ClipSize() ? va( "%i", inclip ) : "" );
|
||||
renderEntity.gui[ 0 ]->SetStateString( "player_clips", ClipSize() ? va("%i", ammoamount / ClipSize()) : "" );
|
||||
} else {
|
||||
renderEntity.gui[ 0 ]->SetStateString( "player_totalammo", va( "%i", ammoamount - inclip ) );
|
||||
renderEntity.gui[ 0 ]->SetStateString( "player_ammo", ClipSize() ? va( "%i", inclip ) : "--" );
|
||||
renderEntity.gui[ 0 ]->SetStateString( "player_clips", ClipSize() ? va("%i", ammoamount / ClipSize()) : "--" );
|
||||
}
|
||||
// <---sikk
|
||||
renderEntity.gui[ 0 ]->SetStateString( "player_allammo", va( "%i/%i", inclip, ammoamount - inclip ) );
|
||||
}
|
||||
renderEntity.gui[ 0 ]->SetStateBool( "player_ammo_empty", ( ammoamount == 0 ) );
|
||||
|
@ -1310,7 +1328,7 @@ idWeapon::LowerWeapon
|
|||
void idWeapon::LowerWeapon( void ) {
|
||||
if ( !hide ) {
|
||||
hideStart = 0.0f;
|
||||
hideEnd = ( owner->GetWeaponHandling() && !owner->OnLadder() ) ? wh_hide_distance : hideDistance; // sikk - Weapon Handling System
|
||||
hideEnd = owner->bWAUseHideDist ? wm_hide_distance : hideDistance; // sikk - Weapon Management: Awareness
|
||||
if ( gameLocal.time - hideStartTime < hideTime ) {
|
||||
hideStartTime = gameLocal.time - ( hideTime - ( gameLocal.time - hideStartTime ) );
|
||||
} else {
|
||||
|
@ -1329,7 +1347,7 @@ void idWeapon::RaiseWeapon( void ) {
|
|||
Show();
|
||||
|
||||
if ( hide ) {
|
||||
hideStart = ( owner->GetWeaponHandling() && !owner->OnLadder() ) ? wh_hide_distance : hideDistance; // sikk - Weapon Handling System;
|
||||
hideStart = owner->bWAUseHideDist ? wm_hide_distance : hideDistance; // sikk - Weapon Management: Awareness
|
||||
hideEnd = 0.0f;
|
||||
if ( gameLocal.time - hideStartTime < hideTime ) {
|
||||
hideStartTime = gameLocal.time - ( hideTime - ( gameLocal.time - hideStartTime ) );
|
||||
|
@ -2224,6 +2242,12 @@ idWeapon::AmmoInClip
|
|||
================
|
||||
*/
|
||||
int idWeapon::AmmoInClip( void ) const {
|
||||
// sikk---> Ammo Management: Ammo Clip Size Type
|
||||
if ( !clipSize ) {
|
||||
return AmmoAvailable();
|
||||
}
|
||||
// <---sikk
|
||||
|
||||
return ammoClip;
|
||||
}
|
||||
|
||||
|
@ -2884,7 +2908,7 @@ void idWeapon::Event_LaunchProjectiles( int num_projectiles, float spread, float
|
|||
}
|
||||
|
||||
// calculate the muzzle position
|
||||
if ( barrelJointView != INVALID_JOINT && projectileDict.GetBool( "launchFromBarrel" ) ) {
|
||||
if ( barrelJointView != INVALID_JOINT && ( projectileDict.GetBool( "launchFromBarrel" ) || g_weaponProjectileOrigin.GetBool() ) ) { // sikk - Weapon Management: Projectile Origin
|
||||
// there is an explicit joint for the muzzle
|
||||
GetGlobalJointTransform( true, barrelJointView, muzzleOrigin, muzzleAxis );
|
||||
} else {
|
||||
|
@ -2902,9 +2926,17 @@ void idWeapon::Event_LaunchProjectiles( int num_projectiles, float spread, float
|
|||
kick_endtime = gameLocal.realClientTime + muzzle_kick_maxtime;
|
||||
}
|
||||
|
||||
// sikk---> Zoom Spread Reduction
|
||||
if ( g_weaponHandlingType.GetBool() )
|
||||
spread = spawnArgs.GetFloat( "wh_spread", "0" );
|
||||
// sikk---> Weapon Management: Handling/Awareness
|
||||
if ( ( g_weaponHandlingType.GetInteger() == 1 || g_weaponHandlingType.GetInteger() == 3 ) && owner->GetCurrentWeapon() != 2 ) {
|
||||
spread = ( spread + 2.0f ) * owner->fSpreadModifier;
|
||||
|
||||
owner->fSpreadModifier += 0.25f;
|
||||
if ( owner->fSpreadModifier > 2.0f )
|
||||
owner->fSpreadModifier = 2.0f;
|
||||
}
|
||||
|
||||
if ( g_weaponAwareness.GetBool() && owner->bIsZoomed )
|
||||
spread *= 0.5f;
|
||||
// <---sikk
|
||||
|
||||
if ( gameLocal.isClient ) {
|
||||
|
@ -2913,7 +2945,7 @@ void idWeapon::Event_LaunchProjectiles( int num_projectiles, float spread, float
|
|||
float spreadRad = DEG2RAD( spread );
|
||||
muzzle_pos = muzzleOrigin + playerViewAxis[ 0 ] * 2.0f;
|
||||
for( i = 0; i < num_projectiles; i++ ) {
|
||||
ang = idMath::Sin( spreadRad * gameLocal.random.RandomFloat() * ( ( owner->bIsZoomed && g_weaponHandlingType.GetBool() ) ? ( ( GetEntityDefName() == "weapon_shotgun" ) ? 0.5 : 0.25f ) : 1.0f ) ); // sikk - Weapon Handling System: Zoom Spread Reduction
|
||||
ang = idMath::Sin( spreadRad * gameLocal.random.RandomFloat() );
|
||||
spin = (float)DEG2RAD( 360.0f ) * gameLocal.random.RandomFloat();
|
||||
dir = playerViewAxis[ 0 ] + playerViewAxis[ 2 ] * ( ang * idMath::Sin( spin ) ) - playerViewAxis[ 1 ] * ( ang * idMath::Cos( spin ) );
|
||||
dir.Normalize();
|
||||
|
@ -2930,11 +2962,17 @@ void idWeapon::Event_LaunchProjectiles( int num_projectiles, float spread, float
|
|||
|
||||
float spreadRad = DEG2RAD( spread );
|
||||
for( i = 0; i < num_projectiles; i++ ) {
|
||||
ang = idMath::Sin( spreadRad * gameLocal.random.RandomFloat() * ( ( owner->bIsZoomed && g_weaponHandlingType.GetBool() ) ? 0.25f : 1.0f ) ); // sikk - Weapon Handling System: Zoom Spread Reduction
|
||||
ang = idMath::Sin( spreadRad * gameLocal.random.RandomFloat() );
|
||||
spin = (float)DEG2RAD( 360.0f ) * gameLocal.random.RandomFloat();
|
||||
dir = playerViewAxis[ 0 ] + playerViewAxis[ 2 ] * ( ang * idMath::Sin( spin ) ) - playerViewAxis[ 1 ] * ( ang * idMath::Cos( spin ) );
|
||||
dir.Normalize();
|
||||
|
||||
// sikk---> Weapon Management: Handling
|
||||
if ( g_weaponHandlingType.GetInteger() > 1 && !( g_weaponAwareness.GetBool() && owner->bIsZoomed ) ) {
|
||||
owner->SetViewAngles( owner->viewAngles + idAngles( -0.5f * owner->fSpreadModifier, 0.0f, 0.0f ) );
|
||||
}
|
||||
// <---sikk
|
||||
|
||||
if ( projectileEnt ) {
|
||||
ent = projectileEnt;
|
||||
ent->Show();
|
||||
|
@ -3029,7 +3067,6 @@ void idWeapon::Event_Melee( void ) {
|
|||
const char *hitSound = meleeDef->dict.GetString( "snd_miss" );
|
||||
|
||||
if ( ent ) {
|
||||
|
||||
float push = meleeDef->dict.GetFloat( "push" );
|
||||
idVec3 impulse = -push * owner->PowerUpModifier( SPEED ) * tr.c.normal;
|
||||
|
||||
|
@ -3056,18 +3093,34 @@ void idWeapon::Event_Melee( void ) {
|
|||
globalKickDir = muzzleAxis * kickDir;
|
||||
ent->Damage( owner, owner, globalKickDir, meleeDefName, owner->PowerUpModifier( MELEE_DAMAGE ), tr.c.id );
|
||||
hit = true;
|
||||
|
||||
// sikk---> Chainsaw View Sticking
|
||||
if ( ent->IsType( idAI::Type ) && !idStr::Icmp( weaponDef->GetName(), "weapon_chainsaw" ) ) {
|
||||
idVec3 playerOrigin;
|
||||
idMat3 playerAxis;
|
||||
idVec3 targetVec = ent->GetPhysics()->GetAbsBounds().GetCenter();
|
||||
owner->GetViewPos( playerOrigin, playerAxis );
|
||||
targetVec = ent->GetPhysics()->GetAbsBounds().GetCenter() - playerOrigin;
|
||||
targetVec[2] *= 0.5f;
|
||||
targetVec.Normalize();
|
||||
idAngles delta = targetVec.ToAngles() - owner->cmdAngles - owner->GetDeltaViewAngles();
|
||||
delta.Normalize180();
|
||||
float fade = 1.0f - idMath::Fabs( playerAxis[ 0 ].z );
|
||||
|
||||
// move the view towards the monster
|
||||
owner->SetDeltaViewAngles( owner->GetDeltaViewAngles() + delta * fade );
|
||||
|
||||
// push the player towards the monster
|
||||
owner->ApplyImpulse( ent, 0, playerOrigin, playerAxis[ 0 ] * 20000.0f );
|
||||
}
|
||||
// <---sikk
|
||||
}
|
||||
|
||||
if ( weaponDef->dict.GetBool( "impact_damage_effect" ) ) {
|
||||
|
||||
if ( ent->spawnArgs.GetBool( "bleed" ) ) {
|
||||
|
||||
hitSound = meleeDef->dict.GetString( owner->PowerUpActive( BERSERK ) ? "snd_hit_berserk" : "snd_hit" );
|
||||
|
||||
ent->AddDamageEffect( tr, impulse, meleeDef->dict.GetString( "classname" ) );
|
||||
|
||||
} else {
|
||||
|
||||
int type = tr.c.material->GetSurfaceType();
|
||||
if ( type == SURFTYPE_NONE ) {
|
||||
type = GetDefaultSurfaceType();
|
||||
|
@ -3110,7 +3163,7 @@ void idWeapon::Event_Melee( void ) {
|
|||
|
||||
// sikk---> Blood Spray Screen Effect
|
||||
if ( g_showBloodSpray.GetBool() ) {
|
||||
if ( GetOwner()->GetCurrentWeapon() == 10 && gameLocal.random.RandomFloat() < g_bloodSprayFrequency.GetFloat() && hit )
|
||||
if ( GetOwner()->GetCurrentWeapon() == 10 && ( gameLocal.random.RandomFloat() * 0.99999f ) < g_bloodSprayFrequency.GetFloat() && hit )
|
||||
GetOwner()->playerView.AddBloodSpray( g_bloodSprayTime.GetFloat() );
|
||||
}
|
||||
// <---sikk
|
||||
|
@ -3207,4 +3260,4 @@ idWeapon::ClientPredictionThink
|
|||
*/
|
||||
void idWeapon::ClientPredictionThink( void ) {
|
||||
UpdateAnimation();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -158,7 +158,7 @@ public:
|
|||
|
||||
virtual void ClientPredictionThink( void );
|
||||
|
||||
float wh_hide_distance; // sikk - Weapon Handling System
|
||||
float wm_hide_distance; // sikk - Weapon Management: Awareness
|
||||
|
||||
idEntityPtr<idAnimatedEntity>* GetWorldModel( void ) { return &worldModel; }; // sikk - Depth Render
|
||||
|
||||
|
|
|
@ -931,11 +931,11 @@ void idAI::Spawn( void ) {
|
|||
spawnArgs.SetFloat( "burnaway", g_burnAwayDelay.GetFloat() );
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Enemy Health Management (also modifies friendlies but it doesn't make any difference)
|
||||
// sikk---> Enemy Health Management (also modifies friendlies but that doesn't matter)
|
||||
health *= g_enemyHealthScale.GetFloat();
|
||||
|
||||
if ( g_enemyHealthType.GetBool() )
|
||||
health = ( health * 0.5f ) + ( health * gameLocal.random.RandomFloat() );
|
||||
if ( g_enemyHealthRandom.GetBool() )
|
||||
health += health * 0.5f * gameLocal.random.CRandomFloat();
|
||||
|
||||
health = ( health <= 0 ) ? 1 : health;
|
||||
// <---sikk
|
||||
|
@ -1044,7 +1044,6 @@ void idAI::DormantBegin( void ) {
|
|||
enemyNode.Remove();
|
||||
}
|
||||
|
||||
|
||||
// sikk---> Random Encounters System
|
||||
if ( isRandom )
|
||||
dormantTime = gameLocal.time;
|
||||
|
@ -3711,7 +3710,7 @@ void idAI::SetEnemyPosition( void ) {
|
|||
idActor *enemyEnt = enemy.GetEntity();
|
||||
int enemyAreaNum;
|
||||
int areaNum;
|
||||
int lastVisibleReachableEnemyAreaNum;
|
||||
int lastVisibleReachableEnemyAreaNum = 0; // sikk - warning C4701: potentially uninitialized local variable used
|
||||
aasPath_t path;
|
||||
idVec3 pos;
|
||||
bool onGround;
|
||||
|
@ -4157,8 +4156,35 @@ idProjectile *idAI::LaunchProjectile( const char *jointname, idEntity *target, b
|
|||
|
||||
attack_accuracy = spawnArgs.GetFloat( "attack_accuracy", "7" );
|
||||
attack_cone = spawnArgs.GetFloat( "attack_cone", "70" );
|
||||
projectile_spread = spawnArgs.GetFloat( "projectile_spread", "0" );
|
||||
num_projectiles = spawnArgs.GetInt( "num_projectiles", "1" );
|
||||
|
||||
// sikk---> Damage Type/Spread
|
||||
if ( g_damageType.GetInteger() == 1 ) {
|
||||
if ( spawnArgs.GetFloat( "projectile_spread_doom", "-1.0" ) != -1.0 )
|
||||
projectile_spread = spawnArgs.GetFloat( "projectile_spread_doom", "0" );
|
||||
else
|
||||
projectile_spread = spawnArgs.GetFloat( "projectile_spread", "0" );
|
||||
|
||||
if ( spawnArgs.GetInt( "num_projectiles_doom" ) )
|
||||
num_projectiles = spawnArgs.GetInt( "num_projectiles_doom", "1" );
|
||||
else
|
||||
num_projectiles = spawnArgs.GetInt( "num_projectiles", "1" );
|
||||
|
||||
} else if ( g_damageType.GetInteger() == 2 ) {
|
||||
if ( spawnArgs.GetFloat( "projectile_spread_custom", "-1.0" ) != -1.0 )
|
||||
projectile_spread = spawnArgs.GetFloat( "projectile_spread_custom", "0" );
|
||||
else
|
||||
projectile_spread = spawnArgs.GetFloat( "projectile_spread", "0" );
|
||||
|
||||
if ( spawnArgs.GetInt( "num_projectiles_custom" ) )
|
||||
num_projectiles = spawnArgs.GetInt( "num_projectiles_custom", "1" );
|
||||
else
|
||||
num_projectiles = spawnArgs.GetInt( "num_projectiles", "1" );
|
||||
|
||||
} else {
|
||||
projectile_spread = spawnArgs.GetFloat( "projectile_spread", "0" );
|
||||
num_projectiles = spawnArgs.GetInt( "num_projectiles", "1" );
|
||||
}
|
||||
// <---sikk
|
||||
|
||||
GetMuzzle( jointname, muzzle, axis );
|
||||
|
||||
|
|
|
@ -277,9 +277,8 @@ public:
|
|||
// Finds the best collision free trajectory for a clip model.
|
||||
static bool PredictTrajectory( const idVec3 &firePos, const idVec3 &target, float projectileSpeed, const idVec3 &projGravity, const idClipModel *clip, int clipmask, float max_height, const idEntity *ignore, const idEntity *targetEntity, int drawtime, idVec3 &aimDir );
|
||||
|
||||
int IsDead( void ) { return AI_DEAD; };
|
||||
|
||||
// sikk---> Random Encounters System
|
||||
int IsDead( void ) { return AI_DEAD; };
|
||||
int dormantTime; // holds the time when a random enemy goes dormant
|
||||
bool isRandom; // holds whether the entity was a random spawn or not
|
||||
// <---sikk
|
||||
|
|
|
@ -850,6 +850,8 @@ idAI::Event_StopRagdoll
|
|||
void idAI::Event_StopRagdoll( void ) {
|
||||
StopRagdoll();
|
||||
|
||||
physicsObj.SetOrigin( af.GetPhysics()->GetOrigin() ); // sikk - Zombie Ressurection Fix
|
||||
|
||||
// set back the monster physics
|
||||
SetPhysics( &physicsObj );
|
||||
}
|
||||
|
|
|
@ -122,13 +122,13 @@ idCVar g_debugMover( "g_debugMover", "0", CVAR_GAME | CVAR_BOOL, "" );
|
|||
idCVar g_debugTriggers( "g_debugTriggers", "0", CVAR_GAME | CVAR_BOOL, "" );
|
||||
idCVar g_debugCinematic( "g_debugCinematic", "0", CVAR_GAME | CVAR_BOOL, "" );
|
||||
idCVar g_stopTime( "g_stopTime", "0", CVAR_GAME | CVAR_BOOL, "" );
|
||||
idCVar g_damageScale( "g_damageScale", "1", CVAR_GAME | CVAR_FLOAT | CVAR_ARCHIVE, "scale final damage on player by this factor" );
|
||||
idCVar g_armorProtection( "g_armorProtection", "0.3", CVAR_GAME | CVAR_FLOAT | CVAR_ARCHIVE, "armor takes this percentage of damage" );
|
||||
idCVar g_armorProtectionMP( "g_armorProtectionMP", "0.6", CVAR_GAME | CVAR_FLOAT | CVAR_ARCHIVE, "armor takes this percentage of damage in mp" );
|
||||
idCVar g_useDynamicProtection( "g_useDynamicProtection", "1", CVAR_GAME | CVAR_BOOL | CVAR_ARCHIVE, "scale damage and armor dynamically to keep the player alive more often" );
|
||||
idCVar g_healthTakeTime( "g_healthTakeTime", "5", CVAR_GAME | CVAR_INTEGER | CVAR_ARCHIVE, "how often to take health in nightmare mode" );
|
||||
idCVar g_healthTakeAmt( "g_healthTakeAmt", "5", CVAR_GAME | CVAR_INTEGER | CVAR_ARCHIVE, "how much health to take in nightmare mode" );
|
||||
idCVar g_healthTakeLimit( "g_healthTakeLimit", "25", CVAR_GAME | CVAR_INTEGER | CVAR_ARCHIVE, "how low can health get taken in nightmare mode" );
|
||||
idCVar g_damageScale( "g_damageScale", "1", CVAR_GAME | CVAR_ARCHIVE | CVAR_FLOAT, "scale final damage on player by this factor" );
|
||||
idCVar g_armorProtection( "g_armorProtection", "0.3", CVAR_GAME | CVAR_ARCHIVE | CVAR_FLOAT, "armor takes this percentage of damage" );
|
||||
idCVar g_armorProtectionMP( "g_armorProtectionMP", "0.6", CVAR_GAME | CVAR_ARCHIVE | CVAR_FLOAT, "armor takes this percentage of damage in mp" );
|
||||
idCVar g_useDynamicProtection( "g_useDynamicProtection", "1", CVAR_GAME | CVAR_ARCHIVE | CVAR_BOOL, "scale damage and armor dynamically to keep the player alive more often" );
|
||||
idCVar g_healthTakeTime( "g_healthTakeTime", "5", CVAR_GAME | CVAR_ARCHIVE | CVAR_INTEGER, "how often to take health in nightmare mode" );
|
||||
idCVar g_healthTakeAmt( "g_healthTakeAmt", "5", CVAR_GAME | CVAR_ARCHIVE | CVAR_INTEGER, "how much health to take in nightmare mode" );
|
||||
idCVar g_healthTakeLimit( "g_healthTakeLimit", "25", CVAR_GAME | CVAR_ARCHIVE | CVAR_INTEGER, "how low can health get taken in nightmare mode" );
|
||||
|
||||
idCVar g_showPVS( "g_showPVS", "0", CVAR_GAME | CVAR_INTEGER, "", 0, 2 );
|
||||
idCVar g_showTargets( "g_showTargets", "0", CVAR_GAME | CVAR_BOOL, "draws entities and their targets. hidden entities are drawn grey." );
|
||||
|
@ -139,7 +139,8 @@ idCVar g_showCollisionTraces( "g_showCollisionTraces", "0", CVAR_GAME | CVAR_
|
|||
idCVar g_maxShowDistance( "g_maxShowDistance", "128", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
idCVar g_showEntityInfo( "g_showEntityInfo", "0", CVAR_GAME | CVAR_BOOL, "" );
|
||||
idCVar g_showviewpos( "g_showviewpos", "0", CVAR_GAME | CVAR_BOOL, "" );
|
||||
idCVar g_showcamerainfo( "g_showcamerainfo", "0", CVAR_GAME | CVAR_ARCHIVE, "displays the current frame # for the camera when playing cinematics" );
|
||||
// sikk - g_showcamerainfo was archived and type bool was not set
|
||||
idCVar g_showcamerainfo( "g_showcamerainfo", "0", CVAR_GAME | CVAR_BOOL, "displays the current frame # for the camera when playing cinematics" );
|
||||
idCVar g_showTestModelFrame( "g_showTestModelFrame", "0", CVAR_GAME | CVAR_BOOL, "displays the current animation and frame # for testmodels" );
|
||||
idCVar g_showActiveEntities( "g_showActiveEntities", "0", CVAR_GAME | CVAR_BOOL, "draws boxes around thinking entities. dormant entities (outside of pvs) are drawn yellow. non-dormant are green." );
|
||||
idCVar g_showEnemies( "g_showEnemies", "0", CVAR_GAME | CVAR_BOOL, "draws boxes around monsters that have targeted the the player" );
|
||||
|
@ -228,59 +229,64 @@ idCVar rb_showInertia( "rb_showInertia", "0", CVAR_GAME | CVAR_BOOL, "sho
|
|||
idCVar rb_showVelocity( "rb_showVelocity", "0", CVAR_GAME | CVAR_BOOL, "show the velocity of each rigid body" );
|
||||
idCVar rb_showActive( "rb_showActive", "0", CVAR_GAME | CVAR_BOOL, "show rigid bodies that are not at rest" );
|
||||
|
||||
// sikk---> Added "CVAR_ARCHIVE" to all player movement cvars
|
||||
// The default values for player movement cvars are set in def/player.def
|
||||
idCVar pm_jumpheight( "pm_jumpheight", "48", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "approximate height the player can jump" );
|
||||
idCVar pm_stepsize( "pm_stepsize", "16", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "maximum height the player can step up without jumping" );
|
||||
idCVar pm_crouchspeed( "pm_crouchspeed", "80", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "speed the player can move while crouched" );
|
||||
idCVar pm_walkspeed( "pm_walkspeed", "140", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "speed the player can move while walking" );
|
||||
idCVar pm_runspeed( "pm_runspeed", "220", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "speed the player can move while running" );
|
||||
idCVar pm_noclipspeed( "pm_noclipspeed", "200", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "speed the player can move while in noclip" );
|
||||
idCVar pm_spectatespeed( "pm_spectatespeed", "450", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "speed the player can move while spectating" );
|
||||
idCVar pm_spectatebbox( "pm_spectatebbox", "32", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "size of the spectator bounding box" );
|
||||
idCVar pm_usecylinder( "pm_usecylinder", "0", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_BOOL, "use a cylinder approximation instead of a bounding box for player collision detection" );
|
||||
idCVar pm_minviewpitch( "pm_minviewpitch", "-89", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "amount player's view can look up (negative values are up)" );
|
||||
idCVar pm_maxviewpitch( "pm_maxviewpitch", "89", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "amount player's view can look down" );
|
||||
idCVar pm_stamina( "pm_stamina", "24", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "length of time player can run" );
|
||||
idCVar pm_staminathreshold( "pm_staminathreshold", "45", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "when stamina drops below this value, player gradually slows to a walk" );
|
||||
idCVar pm_staminarate( "pm_staminarate", "0.75", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "rate that player regains stamina. divide pm_stamina by this value to determine how long it takes to fully recharge." );
|
||||
idCVar pm_crouchheight( "pm_crouchheight", "38", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "height of player's bounding box while crouched" );
|
||||
idCVar pm_crouchviewheight( "pm_crouchviewheight", "32", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "height of player's view while crouched" );
|
||||
idCVar pm_normalheight( "pm_normalheight", "74", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "height of player's bounding box while standing" );
|
||||
idCVar pm_normalviewheight( "pm_normalviewheight", "68", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "height of player's view while standing" );
|
||||
idCVar pm_deadheight( "pm_deadheight", "20", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "height of player's bounding box while dead" );
|
||||
idCVar pm_deadviewheight( "pm_deadviewheight", "10", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "height of player's view while dead" );
|
||||
idCVar pm_crouchrate( "pm_crouchrate", "0.87", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "time it takes for player's view to change from standing to crouching" );
|
||||
idCVar pm_bboxwidth( "pm_bboxwidth", "32", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "x/y size of player's bounding box" );
|
||||
idCVar pm_crouchbob( "pm_crouchbob", "0.5", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "bob much faster when crouched" );
|
||||
idCVar pm_walkbob( "pm_walkbob", "0.3", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "bob slowly when walking" );
|
||||
idCVar pm_runbob( "pm_runbob", "0.4", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "bob faster when running" );
|
||||
idCVar pm_runpitch( "pm_runpitch", "0.002", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "" );
|
||||
idCVar pm_runroll( "pm_runroll", "0.005", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "" );
|
||||
idCVar pm_bobup( "pm_bobup", "0.005", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "" );
|
||||
idCVar pm_bobpitch( "pm_bobpitch", "0.002", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "" );
|
||||
idCVar pm_bobroll( "pm_bobroll", "0.002", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "" );
|
||||
idCVar pm_jumpheight( "pm_jumpheight", "48", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_FLOAT, "approximate hieght the player can jump" );
|
||||
idCVar pm_stepsize( "pm_stepsize", "16", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_FLOAT, "maximum height the player can step up without jumping" );
|
||||
idCVar pm_crouchspeed( "pm_crouchspeed", "80", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_FLOAT, "speed the player can move while crouched" );
|
||||
idCVar pm_walkspeed( "pm_walkspeed", "140", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_FLOAT, "speed the player can move while walking" );
|
||||
idCVar pm_runspeed( "pm_runspeed", "220", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_FLOAT, "speed the player can move while running" );
|
||||
idCVar pm_noclipspeed( "pm_noclipspeed", "200", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_FLOAT, "speed the player can move while in noclip" );
|
||||
idCVar pm_spectatespeed( "pm_spectatespeed", "450", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_FLOAT, "speed the player can move while spectating" );
|
||||
idCVar pm_spectatebbox( "pm_spectatebbox", "32", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_FLOAT, "size of the spectator bounding box" );
|
||||
idCVar pm_usecylinder( "pm_usecylinder", "0", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_BOOL, "use a cylinder approximation instead of a bounding box for player collision detection" );
|
||||
idCVar pm_minviewpitch( "pm_minviewpitch", "-89", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_FLOAT, "amount player's view can look up (negative values are up)" );
|
||||
idCVar pm_maxviewpitch( "pm_maxviewpitch", "89", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_FLOAT, "amount player's view can look down" );
|
||||
idCVar pm_stamina( "pm_stamina", "24", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "length of time player can run" );
|
||||
idCVar pm_staminathreshold( "pm_staminathreshold", "4", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_FLOAT, "when stamina drops below this value, player gradually slows to a walk" );
|
||||
idCVar pm_staminarate( "pm_staminarate", "0.75", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_FLOAT, "rate that player regains stamina. divide pm_stamina by this value to determine how long it takes to fully recharge." );
|
||||
idCVar pm_crouchheight( "pm_crouchheight", "38", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_FLOAT, "height of player's bounding box while crouched" );
|
||||
idCVar pm_crouchviewheight( "pm_crouchviewheight", "32", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_FLOAT, "height of player's view while crouched" );
|
||||
idCVar pm_normalheight( "pm_normalheight", "74", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_FLOAT, "height of player's bounding box while standing" );
|
||||
idCVar pm_normalviewheight( "pm_normalviewheight", "68", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_FLOAT, "height of player's view while standing" );
|
||||
idCVar pm_deadheight( "pm_deadheight", "20", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_FLOAT, "height of player's bounding box while dead" );
|
||||
idCVar pm_deadviewheight( "pm_deadviewheight", "10", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_FLOAT, "height of player's view while dead" );
|
||||
idCVar pm_crouchrate( "pm_crouchrate", "0.87", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_FLOAT, "time it takes for player's view to change from standing to crouching" );
|
||||
idCVar pm_bboxwidth( "pm_bboxwidth", "32", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_FLOAT, "x/y size of player's bounding box" );
|
||||
idCVar pm_crouchbob( "pm_crouchbob", "0.5", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_FLOAT, "bob much faster when crouched" );
|
||||
idCVar pm_walkbob( "pm_walkbob", "0.3", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_FLOAT, "bob slowly when walking" );
|
||||
idCVar pm_runbob( "pm_runbob", "0.4", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_FLOAT, "bob faster when running" );
|
||||
idCVar pm_runpitch( "pm_runpitch", "0.002", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_FLOAT, "" );
|
||||
idCVar pm_runroll( "pm_runroll", "0.005", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_FLOAT, "" );
|
||||
idCVar pm_bobup( "pm_bobup", "0.005", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_FLOAT, "" );
|
||||
idCVar pm_bobpitch( "pm_bobpitch", "0.002", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_FLOAT, "" );
|
||||
idCVar pm_bobroll( "pm_bobroll", "0.002", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_FLOAT, "" );
|
||||
|
||||
idCVar pm_thirdPersonRange( "pm_thirdPersonRange", "80", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "camera distance from player in 3rd person" );
|
||||
idCVar pm_thirdPersonHeight( "pm_thirdPersonHeight", "0", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "height of camera from normal view height in 3rd person" );
|
||||
idCVar pm_thirdPersonAngle( "pm_thirdPersonAngle", "0", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "direction of camera from player in 3rd person in degrees (0 = behind player, 180 = in front)" );
|
||||
idCVar pm_thirdPersonClip( "pm_thirdPersonClip", "1", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_BOOL, "clip third person view into world space" );
|
||||
idCVar pm_thirdPerson( "pm_thirdPerson", "0", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_BOOL, "enables third person view" );
|
||||
idCVar pm_thirdPersonDeath( "pm_thirdPersonDeath", "0", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_BOOL, "enables third person view when player dies" );
|
||||
idCVar pm_modelView( "pm_modelView", "0", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_INTEGER, "draws camera from POV of player model (1 = always, 2 = when dead)", 0, 2, idCmdSystem::ArgCompletion_Integer<0,2> );
|
||||
idCVar pm_airTics( "pm_air", "1800", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_INTEGER, "how long in milliseconds the player can go without air before he starts taking damage" );
|
||||
idCVar pm_thirdPersonRange( "pm_thirdPersonRange", "80", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_FLOAT, "camera distance from player in 3rd person" );
|
||||
idCVar pm_thirdPersonHeight( "pm_thirdPersonHeight", "0", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_FLOAT, "height of camera from normal view height in 3rd person" );
|
||||
idCVar pm_thirdPersonAngle( "pm_thirdPersonAngle", "0", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_FLOAT, "direction of camera from player in 3rd person in degrees (0 = behind player, 180 = in front)" );
|
||||
idCVar pm_thirdPersonClip( "pm_thirdPersonClip", "1", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_BOOL, "clip third person view into world space" );
|
||||
idCVar pm_thirdPerson( "pm_thirdPerson", "0", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_BOOL, "enables third person view" );
|
||||
idCVar pm_thirdPersonDeath( "pm_thirdPersonDeath", "0", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_BOOL, "enables third person view when player dies" );
|
||||
idCVar pm_modelView( "pm_modelView", "0", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_INTEGER, "draws camera from POV of player model (1 = always, 2 = when dead)", 0, 2, idCmdSystem::ArgCompletion_Integer<0,2> );
|
||||
idCVar pm_airTics( "pm_air", "1800", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_INTEGER, "how long in milliseconds the player can go without air before he starts taking damage" );
|
||||
// <---sikk
|
||||
|
||||
idCVar g_showPlayerShadow( "g_showPlayerShadow", "0", CVAR_GAME | CVAR_ARCHIVE | CVAR_BOOL, "enables shadow of player model" );
|
||||
idCVar g_showHud( "g_showHud", "1", CVAR_GAME | CVAR_ARCHIVE | CVAR_BOOL, "" );
|
||||
idCVar g_showProjectilePct( "g_showProjectilePct", "0", CVAR_GAME | CVAR_ARCHIVE | CVAR_BOOL, "enables display of player hit percentage" );
|
||||
idCVar g_showBrass( "g_showBrass", "1", CVAR_GAME | CVAR_ARCHIVE | CVAR_BOOL, "enables ejected shells from weapon" );
|
||||
idCVar g_gun_x( "g_gunX", "0", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
idCVar g_gun_y( "g_gunY", "0", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
idCVar g_gun_z( "g_gunZ", "0", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
idCVar g_viewNodalX( "g_viewNodalX", "0", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
idCVar g_viewNodalZ( "g_viewNodalZ", "0", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
idCVar g_fov( "g_fov", "90", CVAR_GAME | CVAR_INTEGER | CVAR_NOCHEAT, "" );
|
||||
idCVar g_skipViewEffects( "g_skipViewEffects", "0", CVAR_GAME | CVAR_BOOL, "skip damage and other view effects" );
|
||||
idCVar g_mpWeaponAngleScale( "g_mpWeaponAngleScale", "0", CVAR_GAME | CVAR_FLOAT, "Control the weapon sway in MP" );
|
||||
|
||||
// sikk---> Added "CVAR_ARCHIVE" to all select game cvars
|
||||
idCVar g_gun_x( "g_gunX", "0", CVAR_GAME | CVAR_ARCHIVE | CVAR_FLOAT, "" );
|
||||
idCVar g_gun_y( "g_gunY", "0", CVAR_GAME | CVAR_ARCHIVE | CVAR_FLOAT, "" );
|
||||
idCVar g_gun_z( "g_gunZ", "0", CVAR_GAME | CVAR_ARCHIVE | CVAR_FLOAT, "" );
|
||||
idCVar g_viewNodalX( "g_viewNodalX", "0", CVAR_GAME | CVAR_ARCHIVE | CVAR_FLOAT, "" );
|
||||
idCVar g_viewNodalZ( "g_viewNodalZ", "0", CVAR_GAME | CVAR_ARCHIVE | CVAR_FLOAT, "" );
|
||||
idCVar g_fov( "g_fov", "90", CVAR_GAME | CVAR_ARCHIVE | CVAR_INTEGER | CVAR_NOCHEAT, "" );
|
||||
idCVar g_skipViewEffects( "g_skipViewEffects", "0", CVAR_GAME | CVAR_ARCHIVE | CVAR_BOOL, "skip damage and other view effects" );
|
||||
idCVar g_mpWeaponAngleScale( "g_mpWeaponAngleScale", "0", CVAR_GAME | CVAR_ARCHIVE | CVAR_FLOAT, "Control the weapon sway in MP" );
|
||||
// <---sikk
|
||||
|
||||
idCVar g_testParticle( "g_testParticle", "0", CVAR_GAME | CVAR_INTEGER, "test particle visualation, set by the particle editor" );
|
||||
idCVar g_testParticleName( "g_testParticleName", "", CVAR_GAME, "name of the particle being tested by the particle editor" );
|
||||
|
@ -336,7 +342,9 @@ idCVar net_serverDlBaseURL( "net_serverDlBaseURL", "", CVAR_GAME | CVAR_AR
|
|||
idCVar net_serverDlTable( "net_serverDlTable", "", CVAR_GAME | CVAR_ARCHIVE, "pak names for which download is provided, separated by ;" );
|
||||
|
||||
|
||||
|
||||
// sikk - New Cvars -
|
||||
//-------------------------------------------------
|
||||
// sikk---> Crosshair Cvar
|
||||
idCVar g_crosshair( "g_crosshair", "1", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "0 = crosshair off, 1 = crosshair on, 2 = crosshair on only when zoomed or npc has focus" );
|
||||
idCVar g_crosshairType( "g_crosshairType", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "toggle between static and precise crosshair positioning" );
|
||||
|
@ -344,10 +352,28 @@ idCVar g_crosshairLerp( "g_crosshairLerp", "0.5", CVAR_GAME | CVAR_NOCHEA
|
|||
// <---sikk
|
||||
|
||||
// sikk---> Dynamic Hud system
|
||||
idCVar g_useDynamicHud( "g_useDynamicHud", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "enables dynamic hud" );
|
||||
idCVar g_hudType( "g_hudType", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "toggles between default and custom hud" );
|
||||
idCVar g_useDynamicHud( "g_useDynamicHud", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "enables dynamic hud (g_hudType == 1 only)" );
|
||||
idCVar g_dynamicHudTime( "g_dynamicHudTime", "10.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "time (in sec) before the hud fades out" );
|
||||
// <---sikk
|
||||
|
||||
// sikk---> IR Goggles/Headlight Mod
|
||||
idCVar g_goggleType( "g_goggleType", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "sets the goggle's type: 0 = Infrared; 1 = Thermal" );
|
||||
idCVar g_batteryLife( "g_batteryLife", "60", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "how long the battery lasts (in seconds) for ir goggles/headlight" );
|
||||
idCVar g_batteryRechargeRate( "g_batteryRechargeRate", "120", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "how long it takes the battery to fully recharge (in seconds) for ir goggles/headlight" );
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Global Ambient Light
|
||||
idCVar g_useAmbientLight( "g_useAmbientLight", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "enable a global ambient light bound to player" );
|
||||
idCVar g_ambientLightRadius( "g_ambientLightRadius", "1024 1024 1024", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE, "sets the ambient light's radius (XYZ = 0 to 65536)" );
|
||||
idCVar g_ambientLightColor( "g_ambientLightColor", "0.03125 0.03125 0.03125", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE, "sets the ambient light's color (RGB = 0.0 to 1.0)" );
|
||||
|
||||
// sikk---> Explosion FX
|
||||
idCVar g_useExplosionFX( "g_useExplosionFX", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "enables explosion screen effects" );
|
||||
idCVar g_explosionFXTime( "g_explosionFXTime", "2.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "time (in secs) the effect lasts" );
|
||||
idCVar g_explosionFXScale( "g_explosionFXScale", "32.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "explosion effect scale" );
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Blood Spray Screen Effect
|
||||
idCVar g_showBloodSpray( "g_showBloodSpray", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "show blood spray effect on screen when inflicting damage up close" );
|
||||
idCVar g_bloodSprayTime( "g_bloodSprayTime", "5.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "how long blood spray effect lasts (in seconds)" );
|
||||
|
@ -355,48 +381,26 @@ idCVar g_bloodSprayDistance( "g_bloodSprayDistance", "96", CVAR_GAME | CVAR_
|
|||
idCVar g_bloodSprayFrequency( "g_bloodSprayFrequency", "0.5", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "how often the blood spray effect can occur. Value Range: 0.0 (never) - 1.0 (always)" );
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Explosion FX
|
||||
idCVar g_useExplosionFX( "g_useExplosionFX", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "enables explosion screen effects" );
|
||||
idCVar g_explosionFXTime( "g_explosionFXTime", "2.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "time (in secs) the effect lasts" );
|
||||
idCVar g_explosionFXScale( "g_explosionFXScale", "16.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "explosion effect scale" );
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Screen Frost
|
||||
idCVar g_screenFrostTime( "g_screenFrostTime", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "time (in secs) for frost to fully build on the screen. 0 = disables effect" );
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Tracer Frequency
|
||||
idCVar g_tracerFrequency( "g_tracerFrequency", "0.5", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "how frequent a fired shot will be a tracer. Value Range: 0.0 (no tracers) - 1.0 (all tracers)" );
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Player Head Type
|
||||
idCVar g_playerHeadType( "g_playerHeadType", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "sets which head def to use for the player. 0 = Default Player Head; 1 = Marine Helmet" );
|
||||
// <---sikk
|
||||
|
||||
// sikk---> First Person Body
|
||||
idCVar g_showFirstPersonBody( "g_showFirstPersonBody", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "draws the player body in first person view mode" );
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Portal Sky Box
|
||||
idCVar g_enablePortalSky( "g_enablePortalSky", "1", CVAR_GAME | CVAR_BOOL, "enables portal sky box support" );
|
||||
idCVar g_enablePortalSky( "g_enablePortalSky", "1", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "enables portal sky box support" );
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Monster Burn Away Delay
|
||||
idCVar g_burnAwayDelay( "g_burnAwayDelay", "0.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "enemy burn away delay. 0.0 = use default value" );
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Enemy Health Management
|
||||
idCVar g_enemyHealthType( "g_enemyHealthType", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "sets enemy health type: 0 = normal; 1 = random" );
|
||||
idCVar g_enemyHealthScale( "g_enemyHealthScale", "1.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "sets the health scale for enemies" );
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Inter Rank Aggression
|
||||
idCVar g_interRankAggression( "g_interRankAggression", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "sets whether enemies of the same rank will fight each other" );
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Cyberdemon Damage Type
|
||||
idCVar g_cyberdemonDamageType( "g_cyberdemonDamageType", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "sets how the Cyberdemon can be damaged: 0 = Soul Cube only; 1 = All weapons" );
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Zombie Resurrection
|
||||
idCVar g_zombieResurrectionLimit( "g_zombieResurrectionLimit", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "sets the total number of times a zombie can resurrect. The chance for a zombie to resurrect is still randomized. 0 = Off" );
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Random Encounters System
|
||||
idCVar g_useRandomEncounters( "g_useRandomEncounters", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "enables random encounters" );
|
||||
idCVar g_randomEncountersMaxSpawns( "g_randomEncountersMaxSpawns", "5", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "number of random enemies that can be alive at one time" );
|
||||
idCVar g_randomEncountersMinTime( "g_randomEncountersMinTime", "30", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "minimum time (in secs) to wait before spawning another random enemy" );
|
||||
idCVar g_randomEncountersMaxTime( "g_randomEncountersMaxTime", "60", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "maximum time (in secs) to wait before spawning another random enemy" );
|
||||
idCVar g_randomEncountersDormantTime( "g_randomEncountersDormantTime", "10", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "maximum time (in secs) a random enemy can be dormant before it is removed" );
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Health Management System
|
||||
idCVar g_healthManagementType( "g_healthManagementType", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "selects which health management system to use. 0 = default; 1 = carriable health pack; 2 = regenerating health" );
|
||||
|
@ -413,57 +417,96 @@ idCVar g_healthRegenFeedback( "g_healthRegenFeedback", "50", CVAR_GAME | CVAR
|
|||
|
||||
// sikk---> Item Management
|
||||
idCVar g_itemPickupType( "g_itemPickupType", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "toggles whether items need to be picked up manually with the 'Use' key." );
|
||||
idCVar g_itemRemovalFactor( "g_itemRemovalFactor", "0.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "sets the factor for which items are randomly removed from the map. Value Range: 0.0 (no items are removed) - 1.0 (all items are removed)" );
|
||||
idCVar g_itemValueFactor( "g_itemValueFactor", "0.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "sets the factor for which the value for items are randomly set. Value Range: 0.0 (items have full value) - 1.0 (items have anywhere from one to full value)" );
|
||||
idCVar g_itemMaxArmorType( "g_itemMaxArmorType", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "sets armor capacity type: 0 = Doom 3; 1 = Doom 1/2; 2 = Custom" );
|
||||
idCVar g_itemHelmetFactor( "g_itemHelmetFactor", "0.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "sets the factor for which security armor is randomly replaced with a marine helmet. Value Range: 0.0 (no replacement) - 1.0 (full replacement)" );
|
||||
idCVar g_itemValueFactor( "g_itemValueFactor", "0.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "sets the factor for which the value for items are randomly set. Value Range: 0.0 (items have full value) - 1.0 (items have anywhere from one to full value)" );
|
||||
idCVar g_itemRemovalFactor( "g_itemRemovalFactor", "0.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "sets the factor for which items are randomly removed from the map. Value Range: 0.0 (no items are removed) - 1.0 (all items are removed)" );
|
||||
idCVar g_itemSearchFactor( "g_itemSearchFactor", "0.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "sets the factor for which items can be found on dead bodies. Value Range: 0.0 (dead bodies contain no items) - 1.0 (dead bodies always contain items)" );
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Ammo Management
|
||||
idCVar g_ammoDamageType( "g_ammoDamageType", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "toggles between the use of normal or custom damage values" );
|
||||
idCVar g_ammoCapacityType( "g_ammoCapacityType", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "toggles between the use of normal or custom max ammo/clip size values" );
|
||||
idCVar g_ammoCapacityType( "g_ammoCapacityType", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "sets ammo capacity type: 0 = Doom 3; 1 = Doom 1/2; 2 = Custom" );
|
||||
idCVar g_ammoClipSizeType( "g_ammoClipSizeType", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "sets ammo clip size type: 0 = Doom 3; 1 = Doom 1/2; 2 = Custom" );
|
||||
idCVar g_ammoUsageType( "g_ammoUsageType", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "enables realistic ammo usage when reloading and collecting ammo" );
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Weapon Handling System
|
||||
idCVar g_weaponHandlingType( "g_weaponHandlingType", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "toggles between normal and realistic weapon handling" );
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Tracer Frequency
|
||||
idCVar g_tracerFrequency( "g_tracerFrequency", "0.5", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "how frequent a fired shot will be a tracer. Value Range: 0.0 (no tracers) - 1.0 (all tracers)" );
|
||||
// sikk---> Weapon Management
|
||||
idCVar g_weaponAwareness( "g_weaponAwareness", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "toggles weapon awareness" );
|
||||
idCVar g_weaponHandlingType( "g_weaponHandlingType", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "sets the weapon handling type: 0 = spread (fixed); 1 = spread (variable); 2 spread (fixed) + recoil; 2 spread (variable) + recoil" );
|
||||
idCVar g_weaponProjectileOrigin( "g_weaponProjectileOrigin", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "sets whether projectiles are launched from their def defined origin or to launch all projectiles from the weapon's barrel: 0 = Default; 1 = Weapon Barrel" );
|
||||
// <---sikk
|
||||
|
||||
// sikk---> First Person Body
|
||||
idCVar g_grabMode( "g_grabMode", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "enables the ability to grab moveable objects" );
|
||||
// <---sikk
|
||||
|
||||
// sikk---> IR Goggles/Headlight Mod
|
||||
idCVar g_goggleType( "g_goggleType", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "sets the goggle's type: 0 = Infrared; 1 = Thermal" );
|
||||
idCVar g_batteryLife( "g_batteryLife", "60", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "how long the battery lasts (in seconds) for ir goggles/headlight" );
|
||||
idCVar g_batteryRechargeRate( "g_batteryRechargeRate", "120", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "how long it takes the battery to fully recharge (in seconds) for ir goggles/headlight" );
|
||||
|
||||
// sikk---> Disable Fall Damage
|
||||
idCVar g_disableFallDamage( "g_disableFallDamage", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "disables fall damage" );
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Global Ambient Light
|
||||
idCVar g_useAmbientLight( "g_useAmbientLight", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "enable a global ambient light bound to player" );
|
||||
idCVar g_ambientLightRadius( "g_ambientLightRadius", "1024 1024 1024", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE, "sets the ambient light's radius (XYZ = 0 to 65536)" );
|
||||
idCVar g_ambientLightColor( "g_ambientLightColor", "0.03125 0.03125 0.03125", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE, "sets the ambient light's color (RGB = 0.0 to 1.0)" );
|
||||
// sikk---> Player Speed Type
|
||||
idCVar g_playerSpeedType( "g_playerSpeedType", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "sets the player's speed configuration: 0 = Doom 3; 1 = Doom 1/2; 2 = Custom" );
|
||||
// <---sikk
|
||||
|
||||
// sikk---> First Person Body
|
||||
idCVar g_showFirstPersonBody( "g_showFirstPersonBody", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "draws the player body in first person view mode" );
|
||||
// sikk---> Locational Damage Type
|
||||
idCVar g_damageType( "g_damageType", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "sets damage value type: 0 = Doom 3; 1 = Doom 1/2; 2 = Custom" );
|
||||
idCVar g_damageZoneType( "g_damageZoneType", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "sets locational damage type: 0 = Doom 3; 1 = Doom 1/2; 2 = Custom" );
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Enemy Health Management
|
||||
idCVar g_enemyHealthType( "g_enemyHealthType", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "sets enemy health type: 0 = Doom 3; 1 = Doom 1/2; 2 = Custom" );
|
||||
idCVar g_enemyHealthScale( "g_enemyHealthScale", "1.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "sets the health scale for enemies" );
|
||||
idCVar g_enemyHealthRandom( "g_enemyHealthRandom", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "sets whether to randomize enemy health values" );
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Spectre Factor
|
||||
idCVar g_enemySpectreFactor( "g_enemySpectreFactor", "0.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "sets the factor that a Pinky demon will spawn as a Spectre" );
|
||||
// <---sikk
|
||||
// sikk---> Pain Elemental Factor
|
||||
idCVar g_enemyPainElementalFactor( "g_enemyPainElementalFactor", "0.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "sets the factor that a Cacodemon will spawn as a Pain Elemental" );
|
||||
// <---sikk
|
||||
// sikk---> Baron of Hell Factor
|
||||
idCVar g_enemyBaronFactor( "g_enemyBaronFactor", "0.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "sets the factor that a Hellknight will spawn as a Baron of Hell" );
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Monster Burn Away Delay
|
||||
idCVar g_burnAwayDelay( "g_burnAwayDelay", "0.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "enemy burn away delay. 0.0 = use default value" );
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Cyberdemon Damage Type
|
||||
idCVar g_cyberdemonDamageType( "g_cyberdemonDamageType", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "sets how the Cyberdemon can be damaged: 0 = Soul Cube only; 1 = All weapons" );
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Inter Rank Aggression
|
||||
idCVar g_interRankAggression( "g_interRankAggression", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "sets whether enemies of the same rank will fight each other" );
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Zombie Resurrection
|
||||
idCVar g_zombieResurrectionLimit( "g_zombieResurrectionLimit", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "sets the total number of times a zombie can resurrect. The chance for a zombie to resurrect is still randomized. 0 = Off" );
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Random Encounters System
|
||||
idCVar g_useRandomEncounters( "g_useRandomEncounters", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "enables random encounters" );
|
||||
idCVar g_randomEncountersMaxSpawns( "g_randomEncountersMaxSpawns", "5", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "number of random enemies that can be alive at one time" );
|
||||
idCVar g_randomEncountersMinTime( "g_randomEncountersMinTime", "30", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "minimum time (in secs) to wait before spawning another random enemy" );
|
||||
idCVar g_randomEncountersMaxTime( "g_randomEncountersMaxTime", "60", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "maximum time (in secs) to wait before spawning another random enemy" );
|
||||
idCVar g_randomEncountersDormantTime( "g_randomEncountersDormantTime", "10", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "maximum time (in secs) a random enemy can be dormant before it is removed" );
|
||||
// <---sikk
|
||||
|
||||
|
||||
// sikk---> Thirdperson Camera
|
||||
idCVar pm_thirdPersonOffest( "pm_thirdPersonOffset", "0", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_FLOAT, "camera offest from player in 3rd person (-n = left, +n = right)" );
|
||||
idCVar pm_thirdPersonOffset( "pm_thirdPersonOffset", "0", CVAR_GAME | CVAR_NETWORKSYNC | CVAR_ARCHIVE | CVAR_FLOAT, "camera offset from player in 3rd person (-n = left, +n = right)" );
|
||||
// <---sikk
|
||||
|
||||
|
||||
// sikk---> PostProcess Effects
|
||||
idCVar r_useSoftShadows( "r_useSoftShadows", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "Enable Soft Shadows postprocessing effect" );
|
||||
idCVar r_softShadowsBlurFilter( "r_softShadowsBlurFilter", "1", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "Blur method used for the shadow mask:\n0 = No Filter\n1 = Box Filter\n2 = Poisson Filter\n3 = Gaussian Filter" );
|
||||
idCVar r_softShadowsBlurScale( "r_softShadowsBlurScale", "1.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Sample offset scale for the blur filter" );
|
||||
idCVar r_softShadowsBlurScale( "r_softShadowsBlurScale", "8.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Sample offset scale for the blur filter" );
|
||||
idCVar r_softShadowsBlurEpsilon( "r_softShadowsBlurEpsilon", "4.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "Set the blur depth difference factor for the blur filter" );
|
||||
|
||||
idCVar r_useEdgeAA( "r_useEdgeAA", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "Enable edge anti-aliasing" );
|
||||
idCVar r_useEdgeAA( "r_useEdgeAA", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "Enable edge anti-aliasing: 0 = RGB edge AA; 1 = FXAA" );
|
||||
idCVar r_edgeAASampleScale( "r_edgeAASampleScale", "1.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Set the sample offset scale for edge detection" );
|
||||
idCVar r_edgeAAFilterScale( "r_edgeAAFilterScale", "1.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Set the filter offset scale for blurring" );
|
||||
|
||||
|
@ -520,9 +563,9 @@ idCVar r_ssaoBlendPower( "r_ssaoBlendPower", "2.0", CVAR_GAME | CVAR_NOCHE
|
|||
idCVar r_ssaoBlendScale( "r_ssaoBlendScale", "2.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Set the blend scale for the ssao to scene final combine" );
|
||||
|
||||
idCVar r_useSunShafts( "r_useSunShafts", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "Enable Screen-Space Volumetric Lighting (Sun Shafts) postprocessing effect" );
|
||||
idCVar r_sunShaftsSize( "r_sunShaftsSize", "8.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Set the sun shafts size" );
|
||||
idCVar r_sunShaftsStrength( "r_sunShaftsStrength", "0.5", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Set the sun shafts strength" );
|
||||
idCVar r_sunShaftsMaskStrength( "r_sunShaftsMaskStrength", "0.5", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Set the sun shafts mask strength" );
|
||||
idCVar r_sunShaftsSize( "r_sunShaftsSize", "16.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Set the sun shafts size" );
|
||||
idCVar r_sunShaftsStrength( "r_sunShaftsStrength", "2.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Set the sun shafts strength" );
|
||||
idCVar r_sunShaftsMaskStrength( "r_sunShaftsMaskStrength", "1.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Set the sun shafts mask strength" );
|
||||
idCVar r_sunShaftsQuality( "r_sunShaftsQuality", "4", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "Set the sun shafts quality" );
|
||||
idCVar r_sunOriginX( "r_sunOriginX", "0.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Set the sun's origin along the X axis (used for sun shafts & lens flare)" );
|
||||
idCVar r_sunOriginY( "r_sunOriginY", "0.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Set the sun's origin along the Y axis (used for sun shafts & lens flare)" );
|
||||
|
@ -531,7 +574,7 @@ idCVar r_useLensFlare( "r_useLensFlare", "0", CVAR_GAME | CVAR_NOCHEAT |
|
|||
idCVar r_lensFlareStrength( "r_lensFlareStrength", "1.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Set the lens flare strength" );
|
||||
|
||||
idCVar r_useDepthOfField( "r_useDepthOfField", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "Enable depth of field postprocessing effect. Value range: 0 - 2 \n0 = Off\n1 = Automatic Focus\n2 = Manual Focus" );
|
||||
idCVar r_dofBlurScale( "r_dofBlurScale", "1.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Set the blur scale for depth of field postprocessing effect" );
|
||||
idCVar r_dofBlurScale( "r_dofBlurScale", "4.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Set the blur scale for depth of field postprocessing effect" );
|
||||
idCVar r_dofBlurQuality( "r_dofBlurQuality", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "Set the blur quality for depth of field postprocessing effect:\n0 = Box Filter\n1 = Poisson Filter\n2 = Gaussian Filter\n3 = Bokeh!" );
|
||||
idCVar r_dofNear( "r_dofNear", "-128", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "Set the near distance for depth of field postprocessing effect (r_useDepthOfField = 2 only)" );
|
||||
idCVar r_dofFar( "r_dofFar", "1024", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "Set the far distance for depth of field postprocessing effect (r_useDepthOfField = 2 only)" );
|
||||
|
|
|
@ -254,18 +254,39 @@ extern const char *si_gameTypeArgs[];
|
|||
|
||||
extern const char *ui_skinArgs[];
|
||||
|
||||
|
||||
// sikk - New Cvars -
|
||||
//-------------------------------------------------
|
||||
// sikk---> Crosshair Cvars
|
||||
extern idCVar g_crosshair;
|
||||
extern idCVar g_crosshairType;
|
||||
extern idCVar g_crosshairLerp;
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Dynamic Hud system
|
||||
// sikk---> Hud management
|
||||
extern idCVar g_hudType;
|
||||
extern idCVar g_useDynamicHud;
|
||||
extern idCVar g_dynamicHudTime;
|
||||
// <---sikk
|
||||
|
||||
// sikk---> IR Goggles/Headlight Mod
|
||||
extern idCVar g_goggleType;
|
||||
extern idCVar g_batteryLife;
|
||||
extern idCVar g_batteryRechargeRate;
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Global Ambient Light
|
||||
extern idCVar g_useAmbientLight;
|
||||
extern idCVar g_ambientLightRadius;
|
||||
extern idCVar g_ambientLightColor;
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Explosion FX
|
||||
extern idCVar g_useExplosionFX;
|
||||
extern idCVar g_explosionFXTime;
|
||||
extern idCVar g_explosionFXScale;
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Blood Spray Screen Effect
|
||||
extern idCVar g_showBloodSpray;
|
||||
extern idCVar g_bloodSprayTime;
|
||||
|
@ -273,37 +294,15 @@ extern idCVar g_bloodSprayDistance;
|
|||
extern idCVar g_bloodSprayFrequency;
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Explosion FX
|
||||
extern idCVar g_useExplosionFX;
|
||||
extern idCVar g_explosionFXTime;
|
||||
extern idCVar g_explosionFXScale;
|
||||
// <---sikk
|
||||
extern idCVar g_screenFrostTime; // sikk - Screen Frost
|
||||
|
||||
extern idCVar g_screenFrostTime; // sikk - Screen Frost
|
||||
extern idCVar g_tracerFrequency; // sikk - Tracer Frequency
|
||||
|
||||
extern idCVar g_enablePortalSky; // sikk - Portal Sky Box
|
||||
extern idCVar g_playerHeadType; // sikk - Player Head Type
|
||||
|
||||
extern idCVar g_showFirstPersonBody; // sikk - First Person Body
|
||||
|
||||
extern idCVar g_burnAwayDelay; // sikk - Monster Burn Away Delay
|
||||
|
||||
// sikk---> Enemy Health Management
|
||||
extern idCVar g_enemyHealthType;
|
||||
extern idCVar g_enemyHealthScale;
|
||||
// <---sikk
|
||||
|
||||
extern idCVar g_interRankAggression; // sikk - Inter Rank Aggression
|
||||
|
||||
extern idCVar g_cyberdemonDamageType; // sikk - Cyberdemon Damage Type
|
||||
|
||||
extern idCVar g_zombieResurrectionLimit; // sikk - Zombie Resurrection
|
||||
|
||||
// sikk---> Random Encounters System
|
||||
extern idCVar g_useRandomEncounters;
|
||||
extern idCVar g_randomEncountersMaxSpawns;
|
||||
extern idCVar g_randomEncountersMinTime;
|
||||
extern idCVar g_randomEncountersMaxTime;
|
||||
extern idCVar g_randomEncountersDormantTime;
|
||||
// <---sikk
|
||||
extern idCVar g_enablePortalSky; // sikk - Portal Sky Box
|
||||
|
||||
|
||||
// sikk---> Health Management System
|
||||
|
@ -321,39 +320,63 @@ extern idCVar g_healthRegenFeedback;
|
|||
|
||||
// sikk---> Item Management
|
||||
extern idCVar g_itemPickupType;
|
||||
extern idCVar g_itemRemovalFactor;
|
||||
extern idCVar g_itemValueFactor;
|
||||
extern idCVar g_itemMaxArmorType;
|
||||
extern idCVar g_itemHelmetFactor;
|
||||
extern idCVar g_itemValueFactor;
|
||||
extern idCVar g_itemRemovalFactor;
|
||||
extern idCVar g_itemSearchFactor;
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Ammo Management
|
||||
extern idCVar g_ammoDamageType;
|
||||
extern idCVar g_ammoCapacityType;
|
||||
extern idCVar g_ammoClipSizeType;
|
||||
extern idCVar g_ammoUsageType;
|
||||
// <---sikk
|
||||
|
||||
extern idCVar g_weaponHandlingType; // sikk - Weapon Handling
|
||||
|
||||
extern idCVar g_tracerFrequency; // sikk - Tracer Frequency
|
||||
// sikk---> Weapon Management
|
||||
extern idCVar g_weaponAwareness;
|
||||
extern idCVar g_weaponHandlingType;
|
||||
extern idCVar g_weaponProjectileOrigin;
|
||||
// <---sikk
|
||||
|
||||
extern idCVar g_grabMode; // sikk - Object Manipulation
|
||||
|
||||
// sikk---> IR Goggles/Headlight Mod
|
||||
extern idCVar g_goggleType;
|
||||
extern idCVar g_batteryLife;
|
||||
extern idCVar g_batteryRechargeRate;
|
||||
extern idCVar g_disableFallDamage; // sikk - Disable Fall Damage
|
||||
|
||||
extern idCVar g_playerSpeedType; // sikk - Player Speed Type
|
||||
|
||||
extern idCVar g_damageType; // sikk - Damage Type
|
||||
extern idCVar g_damageZoneType; // sikk - Locational Damage Type
|
||||
|
||||
// sikk---> Enemy Health Management
|
||||
extern idCVar g_enemyHealthType;
|
||||
extern idCVar g_enemyHealthScale;
|
||||
extern idCVar g_enemyHealthRandom;
|
||||
// <---sikk
|
||||
|
||||
// sikk---> Global Ambient Light
|
||||
extern idCVar g_useAmbientLight;
|
||||
extern idCVar g_ambientLightRadius;
|
||||
extern idCVar g_ambientLightColor;
|
||||
extern idCVar g_enemySpectreFactor; // sikk - Spectre Factor
|
||||
extern idCVar g_enemyPainElementalFactor; // sikk - Pain Elemental Factor
|
||||
extern idCVar g_enemyBaronFactor; // sikk - Baron of Hell Factor
|
||||
|
||||
extern idCVar g_burnAwayDelay; // sikk - Monster Burn Away Delay
|
||||
|
||||
extern idCVar g_cyberdemonDamageType; // sikk - Cyberdemon Damage Type
|
||||
|
||||
extern idCVar g_interRankAggression; // sikk - Inter Rank Aggression
|
||||
|
||||
extern idCVar g_zombieResurrectionLimit; // sikk - Zombie Resurrection
|
||||
|
||||
// sikk---> Random Encounters System
|
||||
extern idCVar g_useRandomEncounters;
|
||||
extern idCVar g_randomEncountersMaxSpawns;
|
||||
extern idCVar g_randomEncountersMinTime;
|
||||
extern idCVar g_randomEncountersMaxTime;
|
||||
extern idCVar g_randomEncountersDormantTime;
|
||||
// <---sikk
|
||||
|
||||
extern idCVar g_showFirstPersonBody; // sikk - First Person Body
|
||||
|
||||
extern idCVar pm_thirdPersonOffest; // sikk - Thirdpesron Camera
|
||||
extern idCVar pm_thirdPersonOffset; // sikk - Thirdpesron Camera
|
||||
|
||||
|
||||
// sikk---> PostProcess Effects
|
||||
extern idCVar r_useSoftShadows;
|
||||
|
|
Loading…
Reference in a new issue