Sikkmod v1.1 RoE (d3xp/)

This commit is contained in:
Daniel Gibson 2024-06-21 02:24:41 +02:00
parent e4f953b523
commit ac07261d2f
34 changed files with 4454 additions and 530 deletions

View file

@ -969,6 +969,7 @@ idAFEntity_Gibbable::idAFEntity_Gibbable( void ) {
#ifdef _D3XP
wasThrown = false;
#endif
searchable = false; // sikk - Searchable Corpses
}
/*
@ -994,6 +995,8 @@ void idAFEntity_Gibbable::Save( idSaveGame *savefile ) const {
#ifdef _D3XP
savefile->WriteBool( wasThrown );
#endif
savefile->WriteBool( searchable ); // sikk - Searchable Corpses
}
/*
@ -1010,6 +1013,8 @@ void idAFEntity_Gibbable::Restore( idRestoreGame *savefile ) {
savefile->ReadBool( wasThrown );
#endif
savefile->ReadBool( searchable ); // sikk - Searchable Corpses
InitSkeletonModel();
if ( hasCombatModel ) {
@ -1030,6 +1035,8 @@ void idAFEntity_Gibbable::Spawn( void ) {
#ifdef _D3XP
wasThrown = false;
#endif
spawnArgs.GetBool( "searchable", "0", searchable ); // sikk - Searchable Corpses
}
/*
@ -1249,14 +1256,19 @@ void idAFEntity_Gibbable::Gib( const idVec3 &dir, const char *damageDefName ) {
UnlinkCombat();
if ( g_bloodEffects.GetBool() ) {
if ( gameLocal.time > gameLocal.GetGibTime() ) {
// sikk - Since "nextGibTime" is a member of idGameLocal and not idAFEntity||idAFEntity_Gibbable
// the folloing if statement is only true once per damage event instead of per entity being damaged.
// This is why only one entity will get gibbed while the rest just disappear after a few seconds.
// I commented this out instead of moving the variable to the proper class because it's easier and
// the delay is only 200ms so the difference should be unnoticable.
// if ( gameLocal.time > gameLocal.GetGibTime() ) {
gameLocal.SetGibTime( gameLocal.time + GIB_DELAY );
SpawnGibs( dir, damageDefName );
renderEntity.noShadow = true;
renderEntity.shaderParms[ SHADERPARM_TIME_OF_DEATH ] = gameLocal.time * 0.001f;
StartSound( "snd_gibbed", SND_CHANNEL_ANY, 0, false, NULL );
gibbed = true;
}
// }
} else {
gibbed = true;
}

View file

@ -236,6 +236,8 @@ public:
bool IsGibbed() { return gibbed; };
#endif
bool searchable; // sikk - Searchable Corpses
protected:
idRenderModel * skeletonModel;
int skeletonModelDefHandle;

View file

@ -645,7 +645,7 @@ void idActor::Spawn( void ) {
}
}
finalBoss = spawnArgs.GetBool( "finalBoss" );
finalBoss = g_cyberdemonDamageType.GetBool() ? false : spawnArgs.GetBool( "finalBoss" ); // sikk - Cyberdemon Damage Type
FinishSetup();
}
@ -2242,7 +2242,13 @@ void idActor::Damage( idEntity *inflictor, idEntity *attacker, const idVec3 &dir
gameLocal.Error( "Unknown damageDef '%s'", damageDefName );
}
int damage = damageDef->GetInt( "damage" ) * damageScale;
// sikk---> Ammo Management: Custom Ammo Damage
int damage;
if ( g_ammoDamageType.GetBool() && damageDef->GetInt( "custom_damage" ) )
damage = damageDef->GetInt( "custom_damage" ) * damageScale;
else
damage = damageDef->GetInt( "damage" ) * damageScale;
// <---sikk
damage = GetDamageForLocation( damage, location );
// inform the attacker that they hit someone

View file

@ -3094,7 +3094,13 @@ void idEntity::Damage( idEntity *inflictor, idEntity *attacker, const idVec3 &di
gameLocal.Error( "Unknown damageDef '%s'\n", damageDefName );
}
int damage = damageDef->GetInt( "damage" );
// sikk---> Ammo Management: Custom Ammo Damage
int damage;
if ( g_ammoDamageType.GetBool() && damageDef->GetInt( "custom_damage" ) )
damage = damageDef->GetInt( "custom_damage" );
else
damage = damageDef->GetInt( "damage" );
// <---sikk
// inform the attacker that they hit someone
attacker->DamageFeedback( this, inflictor, damage );

View file

@ -509,6 +509,9 @@ void idEntityFx::Run( int time ) {
useAction->renderEntity.shaderParms[ SHADERPARM_TIMEOFFSET ] = -MS2SEC( time );
useAction->renderEntity.shaderParms[3] = 1.0f;
useAction->renderEntity.shaderParms[5] = 0.0f;
useAction->renderEntity.suppressSurfaceInViewID = -8; // sikk - depth render
if ( useAction->renderEntity.hModel ) {
useAction->renderEntity.bounds = useAction->renderEntity.hModel->Bounds( &useAction->renderEntity );
}
@ -623,6 +626,9 @@ void idEntityFx::Spawn( void ) {
PostEventMS( &EV_Activate, 0, this );
}
}
// We don't want particles in depth render.
renderEntity.suppressSurfaceInViewID = -8; // sikk - Depth Render
}
/*

View file

@ -298,6 +298,15 @@ void idGameLocal::Clear( void ) {
ResetSlowTimeVars();
#endif
currentLights.Clear(); // sikk - Soft Shadows PostProcess
// sikk---> Random Encounters System
randomEnemyListNum = 0;
randomEnemyTime = 0;
randomEnemyTally = 0;
randomEnemyList.Clear();
// <---sikk
}
/*
@ -672,6 +681,14 @@ void idGameLocal::SaveGame( idFile *f ) {
savegame.WriteBool( influenceActive );
savegame.WriteInt( nextGibTime );
// sikk---> Random Encounters System
savegame.WriteInt( randomEnemyTally );
savegame.WriteInt( randomEnemyList.Num() );
for( i = 0; i < randomEnemyList.Num(); i++ ) {
savegame.WriteInt( randomEnemyList[ i ] );
}
// <---sikk
// spawnSpots
// initialSpots
// currentInitialSpot
@ -1043,6 +1060,15 @@ void idGameLocal::LoadMap( const char *mapName, int randseed ) {
playerPVS.i = -1;
playerConnectedAreas.i = -1;
currentLights.Clear(); // sikk - Soft Shadows PostProcess
// sikk---> Random Encounters System
randomEnemyListNum = 0;
randomEnemyTime = 0;
randomEnemyTally = 0;
//randomEnemyList.Clear();
// <---sikk
// load navigation system for all the different monster sizes
for( i = 0; i < aasNames.Num(); i++ ) {
aasList[ i ]->Init( idStr( mapFileName ).SetFileExtension( aasNames[ i ] ).c_str(), mapFile->GetGeometryCRC() );
@ -1601,6 +1627,17 @@ bool idGameLocal::InitFromSaveGame( const char *mapName, idRenderWorld *renderWo
savegame.ReadBool( influenceActive );
savegame.ReadInt( nextGibTime );
// sikk---> Random Encounters System
savegame.ReadInt( randomEnemyTally );
savegame.ReadInt( randomEnemyListNum );
randomEnemyList.Clear();
for( i = 0; i < randomEnemyListNum; i++ ) {
int j;
savegame.ReadInt( j );
randomEnemyList.Append( j );
}
// <---sikk
// spawnSpots
// initialSpots
// currentInitialSpot
@ -3465,8 +3502,21 @@ bool idGameLocal::InhibitEntitySpawn( idDict &spawnArgs ) {
// _D3XP :: remove moveable medkit packs also
if ( idStr::Icmp( name, "item_medkit" ) == 0 || idStr::Icmp( name, "item_medkit_small" ) == 0 ||
idStr::Icmp( name, "moveable_item_medkit" ) == 0 || idStr::Icmp( name, "moveable_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" ) != "" ) {
idEntity *ent;
idDict args;
args.Set( "classname", "moveable_powerup_adrenaline" );
// args.Set( "name", spawnArgs.GetString( "name" ) );
args.Set( "target", spawnArgs.GetString( "target" ) );
args.Set( "origin", spawnArgs.GetString( "origin" ) );
args.Set( "rotation", spawnArgs.GetString( "rotation" ) );
gameLocal.SpawnEntityDef( args, &ent );
}
// <---sikk
}
}
@ -3909,6 +3959,13 @@ void idGameLocal::RadiusDamage( const idVec3 &origin, idEntity *inflictor, idEnt
radius = 1;
}
// sikk---> Explosion FX PostProcess
explosionOrigin = origin;
explosionRadius = radius;
explosionDamage = damage;
explosionTime = time + g_explosionFXTime.GetInteger() * 1000;
// <---sikk
bounds = idBounds( origin ).Expand( radius );
// get all entities touching the bounds
@ -5027,3 +5084,263 @@ idGameLocal::GetMapLoadingGUI
===============
*/
void idGameLocal::GetMapLoadingGUI( char gui[ MAX_STRING_CHARS ] ) { }
// sikk---> Random Encounters System
/*
===============
idGameLocal::SpawnRandomEnemy
===============
*/
bool idGameLocal::SpawnRandomEnemy()
{
if ( !g_useRandomEncounters.GetBool() )
return false;
if ( !randomEnemyList.Num() )
return false;
if ( randomEnemyTally >= g_randomEncountersMaxSpawns.GetInteger() )
return false;
const char* map = GetLevelMap()->GetName();
// we don't want random spawns in first or last level
//if ( map == "map_hellhole::main" || mapscript == "map_marscity1::main" )
// return false;
idAAS *pAAS48 = gameLocal.GetAAS( "aas48" );
idAAS *pAAS96 = gameLocal.GetAAS( "aas96" );
idAAS *pAASMan = gameLocal.GetAAS( "aas_mancubus" );
if ( pAAS48 ) {
idEntity *ent;
idDict args;
idVec3 origin;
idVec3 playerPos, enemyPos;
int /*playerAreaNum,*/ enemyAreaNum;
aasPath_t aaspath;
float randFloat = gameLocal.random.RandomFloat();
int randNum = gameLocal.random.RandomInt( randomEnemyList.Num() );
idStr defName = GetEnemyNameFromNum( randomEnemyList[ randNum ] );
if ( !idStr::Icmp( defName, "monster_zombie_maint" ) )
defName += ( 0.5f < randFloat ) ? "" : "2";
int num = GetEnemyNumFromName( defName );
if ( !num || defName == "" )
return false;
// we only want demons or monster_zombie_boney in Hell
if ( !idStr::Icmp( map, "maps/game/hell" ) && ( num > 1 && num < 31 ) )
return false;
if ( num >= 40 && pAAS96 ) {
if ( num == 43 && pAASMan ) {
enemyAreaNum = randFloat * pAASMan->GetNumAreas( 3 );
origin = pAASMan->AreaCenter( enemyAreaNum ) + idVec3( 0.0f, 0.0f, 1.0f );
} else {
enemyAreaNum = randFloat * pAAS96->GetNumAreas( 1 );
origin = pAAS96->AreaCenter( enemyAreaNum ) + idVec3( 0.0f, 0.0f, 1.0f );
}
} else if ( num < 40 && pAAS48 ) {
enemyAreaNum = randFloat * pAAS48->GetNumAreas( 0 );
origin = pAAS48->AreaCenter( enemyAreaNum ) + idVec3( 0.0f, 0.0f, 1.0f );
if ( num < 31 ) {
trace_t trace;
idVec3 start = GetLocalPlayer()->GetEyePosition();
idVec3 end = origin + idVec3( 0.0f, 0.0f, 64.0f );
clip.TracePoint( trace, start, end, MASK_OPAQUE, NULL );
idVec3 viewVector = GetLocalPlayer()->viewAngles.ToForward();
idVec3 dir = end - start;
dir.Normalize();
float cos = viewVector * dir;
float fov = idMath::Cos( g_fov.GetFloat() * 0.5f );
// for enemies that don't teleport, if we can "see" it spawn, don't spawn
if ( trace.fraction >= 1.0f && cos >= fov )
return false;
}
} else {
return false;
}
trace_t t;
idBounds b = idBounds( idVec3( -32.0f, -32.0f, 0.0f ), idVec3( 32.0f, 32.0f, 63.0f ) );
if ( clip.TraceBounds( t, origin, origin, b, MASK_ALL, NULL ) )
return false;
args.Set( "classname", defName );
args.SetInt( "isRandom", 1 );
args.SetVector( "origin", origin );
args.SetInt( "angle", gameLocal.random.RandomInt( 359 ) );
// teleport in if it's a demon
if ( num >= 31 )
args.Set( "teleport", "1" );
// use Hell skin if we're in Hell
if ( !idStr::Icmp( map, "maps/game/hell" ) && ( num == 1 || num == 31 || num == 41 ) ) {
args.Set( "skin", GetHellSkin( num ) );
}
SpawnEntityDef( args, &ent );
ent->Signal( SIG_TRIGGER );
ent->ProcessEvent( &EV_Activate, GetLocalPlayer() );
program.ReturnEntity( ent );
args.Clear();
return true;
}
return false;
}
/*
===============
idGameLocal::GetEnemyNumFromName
===============
*/
int idGameLocal::GetEnemyNumFromName( idStr name )
{
int num = 0;
// Zombies
if ( name == "monster_zombie_boney" ) num = 1;
else if ( name == "monster_zombie_bernie" ) num = 2;
else if ( name == "monster_zombie_fat" ) num = 3;
else if ( name == "monster_zombie_fat2" ) num = 4;
else if ( name == "monster_zombie_fat_wrench" ) num = 5;
else if ( name == "monster_zombie_jumpsuit" ) num = 6;
else if ( name == "monster_zombie_labcoat_limb" ) num = 7;
else if ( name == "monster_zombie_labcoat_neckstump" ) num = 8;
else if ( name == "monster_zombie_labcoat_pipe" ) num = 9;
else if ( name == "monster_zombie_labcoat_skinny" ) num = 10;
else if ( name == "monster_zombie_maint" ) num = 11;
else if ( name == "monster_zombie_maint2" ) num = 12;
else if ( name == "monster_zombie_maint_bald" ) num = 13;
else if ( name == "monster_zombie_maint_fast" ) num = 14;
else if ( name == "monster_zombie_maint_flashlight" ) num = 15;
else if ( name == "monster_zombie_maint_no_jaw" ) num = 16;
else if ( name == "monster_zombie_maint_nojaw" ) num = 17;
else if ( name == "monster_zombie_maint_skinny" ) num = 18;
else if ( name == "monster_zombie_maint_wrench" ) num = 19;
else if ( name == "monster_zombie_morgue" ) num = 20;
else if ( name == "monster_zombie_suit_bloodymouth" ) num = 21;
else if ( name == "monster_zombie_suit_neckstump" ) num = 22;
else if ( name == "monster_zombie_suit_skinny" ) num = 23;
else if ( name == "monster_zombie_tshirt_bald" ) num = 24;
else if ( name == "monster_zombie_tshirt_blown" ) num = 25;
else if ( name == "monster_zombie_sawyer" ) num = 26;
// ZSecs
else if ( name == "monster_zsec_pistol" ) num = 27;
else if ( name == "monster_zsec_machinegun" ) num = 28;
else if ( name == "monster_zsec_shotgun" ) num = 29;
else if ( name == "monster_zsec_shield" ) num = 30;
// Demons (aas48)
else if ( name == "monster_demon_imp" ) num = 31;
else if ( name == "monster_demon_maggot" ) num = 32;
else if ( name == "monster_demon_wraith" ) num = 33;
else if ( name == "monster_demon_cherub" ) num = 34;
else if ( name == "monster_demon_revenant" ) num = 35;
else if ( name == "monster_zombie_commando" ) num = 36;
else if ( name == "monster_zombie_commando_cgun" ) num = 37;
else if ( name == "monster_demon_archvile" ) num = 38;
else if ( name == "monster_demon_vulgar" ) num = 39;
// Demons (aas96)
else if ( name == "monster_demon_pinky" ) num = 40;
else if ( name == "monster_demon_hellknight" ) num = 41;
else if ( name == "monster_demon_d3xp_bruiser" ) num = 42;
// Demons (aas_mancubus)
else if ( name == "monster_demon_mancubus" ) num = 43;
return num;
}
/*
===============
idGameLocal::GetEnemyNameFromNum
===============
*/
idStr idGameLocal::GetEnemyNameFromNum( int num )
{
idStr name = "";
switch ( num ) {
// Zombies
case 1: name = "monster_zombie_boney"; break;
case 2: name = "monster_zombie_bernie"; break;
case 3: name = "monster_zombie_fat"; break;
case 4: name = "monster_zombie_fat2"; break;
case 5: name = "monster_zombie_fat_wrench"; break;
case 6: name = "monster_zombie_jumpsuit"; break;
case 7: name = "monster_zombie_labcoat_limb"; break;
case 8: name = "monster_zombie_labcoat_neckstump"; break;
case 9: name = "monster_zombie_labcoat_pipe"; break;
case 10: name = "monster_zombie_labcoat_skinny"; break;
case 11: name = "monster_zombie_maint"; break;
case 12: name = "monster_zombie_maint2"; break;
case 13: name = "monster_zombie_maint_bald"; break;
case 14: name = "monster_zombie_maint_fast"; break;
case 15: name = "monster_zombie_maint_flashlight"; break;
case 16: name = "monster_zombie_maint_no_jaw"; break;
case 17: name = "monster_zombie_maint_nojaw"; break;
case 18: name = "monster_zombie_maint_skinny"; break;
case 19: name = "monster_zombie_maint_wrench"; break;
case 20: name = "monster_zombie_morgue"; break;
case 21: name = "monster_zombie_suit_bloodymouth"; break;
case 22: name = "monster_zombie_suit_neckstump"; break;
case 23: name = "monster_zombie_suit_skinny"; break;
case 24: name = "monster_zombie_tshirt_bald"; break;
case 25: name = "monster_zombie_tshirt_blown"; break;
case 26: name = "monster_zombie_sawyer"; break;
// ZSecs
case 27: name = "monster_zsec_pistol"; break;
case 28: name = "monster_zsec_machinegun"; break;
case 29: name = "monster_zsec_shotgun"; break;
case 30: name = "monster_zsec_shield"; break;
// Demons (aas48)
case 31: name = "monster_demon_imp"; break;
case 32: name = "monster_demon_maggot"; break;
case 33: name = "monster_demon_wraith"; break;
case 34: name = "monster_demon_cherub"; break;
case 35: name = "monster_demon_revenant"; break;
case 36: name = "monster_zombie_commando"; break;
case 37: name = "monster_zombie_commando_cgun"; break;
case 38: name = "monster_demon_archvile"; break;
case 39: name = "monster_demon_vulgar"; break;
// Demons (aas96)
case 40: name = "monster_demon_pinky"; break;
case 41: name = "monster_demon_hellknight"; break;
case 42: name = "monster_demon_d3xp_bruiser"; break;
// Demons (aas_mancubus)
case 43: name = "monster_demon_mancubus"; break;
default: name = ""; break;
}
return name;
}
/*
===============
idGameLocal::GetHellSkin
===============
*/
idStr idGameLocal::GetHellSkin( int num )
{
idStr name = "";
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;
default: name = ""; break;
}
return name;
}
// <---sikk

View file

@ -351,6 +351,27 @@ public:
void Tokenize( idStrList &out, const char *in );
idList<int> currentLights; // sikk - Soft Shadows PostProcess
// sikk---> Explosion FX PostProcess
idVec3 explosionOrigin;
int explosionRadius;
int explosionDamage;
int explosionTime;
// <---sikk
// sikk---> Random Encounters System
idList<int> randomEnemyList; // current list of eligible enemies
int randomEnemyListNum; // holds the size of the list for when loading a save game
int randomEnemyTime; // holds next spawn time
int randomEnemyTally; // holds number of random enemies that are active
int GetEnemyNumFromName( idStr name );
idStr GetEnemyNameFromNum( int num );
idStr GetHellSkin( int num );
bool SpawnRandomEnemy( void );
// <---sikk
// ---------------------- Public idGame Interface -------------------
idGameLocal();
@ -716,4 +737,13 @@ extern const float DEFAULT_GRAVITY;
extern const idVec3 DEFAULT_GRAVITY_VEC3;
extern const int CINEMATIC_SKIP_DELAY;
#if 0 // TODO: DG: ???
#include "Entity.h"
#include "GameEdit.h"
#include "Grab.h" // sikk - Object Manipulation
#ifdef _D3XP
#include "Grabber.h"
#endif
#endif // 0
#endif /* !__GAME_LOCAL_H__ */

213
d3xp/Grab.cpp Normal file
View file

@ -0,0 +1,213 @@
// sikk---> Object Manipulation
#include "../idlib/precompiled.h"
#pragma hdrstop
#include "Game_local.h"
#include "Misc.h"
#define MAX_DRAG_TRACE_DISTANCE 80.0f
#define TRACE_BOUNDS_SIZE 3.0f
#define MAX_HOLD_DISTANCE 96.0f
#define MIN_HOLD_DISTANCE 48.0f
#define DRAG_FAIL_LEN 64.0f
#define FAIL_TIME 1000
#define THROW_TIME 500
#define THROW_SCALE 20000
#define MAX_PICKUP_VELOCITY 1000 * 1000
#define MAX_PICKUP_SIZE 96.0f
/*
===============================================================================
Allows entities to be dragged through the world with physics.
===============================================================================
*/
CLASS_DECLARATION( idEntity, idGrabEntity )
END_CLASS
/*
==============
idGrabEntity::idGrabEntity
==============
*/
idGrabEntity::idGrabEntity( void ) {
Clear();
}
/*
==============
idGrabEntity::~idGrabEntity
==============
*/
idGrabEntity::~idGrabEntity( void ) {
StopDrag( owner, true );
}
/*
==============
idGrabEntity::Clear
==============
*/
void idGrabEntity::Clear() {
dragEnt = NULL;
owner = NULL;
id = 0;
oldUcmdFlags = 0;
dragFailTime = 0;
lastThrownTime = 0;
localPlayerPoint.Zero();
saveGravity.Zero();
}
/*
==============
idGrabEntity::StartDrag
==============
*/
void idGrabEntity::StartDrag( idPlayer *player, idEntity *grabEnt, int id ) {
if ( grabEnt && grabEnt->GetPhysics()->GetBounds().GetRadius() < MAX_PICKUP_SIZE &&
grabEnt->GetPhysics()->GetLinearVelocity().LengthSqr() < MAX_PICKUP_VELOCITY ) {
dragFailTime = gameLocal.time + FAIL_TIME;
oldUcmdFlags = player->usercmd.flags;
// This is the new object to drag around
dragEnt = grabEnt;
// Get the current physics object to manipulate
idPhysics *phys = grabEnt->GetPhysics();
// Turn off gravity on object
saveGravity = phys->GetGravity();
phys->SetGravity( vec3_origin );
// hold it directly in front of player, distance depends on object size
float lerp = 1.0f - ( grabEnt->GetPhysics()->GetBounds().GetRadius() / MAX_HOLD_DISTANCE );
lerp *= lerp;
float holdDist = lerp * MIN_HOLD_DISTANCE + ( 1.0f - lerp ) * MAX_HOLD_DISTANCE;
localPlayerPoint = ( player->firstPersonViewAxis[0] * holdDist ) * player->firstPersonViewAxis.Transpose();
// Start up the Force_Drag to bring it in
drag.Init( g_dragDamping.GetFloat() );
drag.SetPhysics( phys, id, player->firstPersonViewOrigin + localPlayerPoint * player->firstPersonViewAxis );
player->StartSoundShader( declManager->FindSound( "use_grab" ), SND_CHANNEL_VOICE, 0, false, NULL );
}
}
/*
==============
idGrabEntity::StopDrag
==============
*/
void idGrabEntity::StopDrag( idPlayer *player, bool drop ) {
if ( dragEnt.IsValid() ) {
idEntity *ent = dragEnt.GetEntity();
// If a cinematic has started, allow dropped object to think in cinematics
if ( gameLocal.inCinematic )
ent->cinematic = true;
// Restore Gravity
ent->GetPhysics()->SetGravity( saveGravity );
// If the object isn't near its goal, just drop it in place.
if ( drop || drag.GetDistanceToGoal() > DRAG_FAIL_LEN ) {
ent->GetPhysics()->SetLinearVelocity( vec3_origin );
} else { // throw the object forward
ent->ApplyImpulse( player, 0, ent->GetPhysics()->GetOrigin(), player->firstPersonViewAxis[0] * THROW_SCALE );
player->StartSoundShader( declManager->FindSound( "use_throw" ), SND_CHANNEL_VOICE, 0, false, NULL );
}
// Remove the Force_Drag's control of the entity
drag.RemovePhysics( ent->GetPhysics() );
lastThrownTime = gameLocal.time + THROW_TIME;
}
dragEnt = NULL;
}
/*
==============
idGrabEntity::Update
==============
*/
void idGrabEntity::Update( idPlayer *player ) {
owner = player;
if ( lastThrownTime > gameLocal.time ) {
prevViewAngles = player->viewAngles;
return;
}
bool valid = dragEnt.IsValid();
// Check if object being held has been removed or player is dead
if ( valid && dragEnt.GetEntity()->IsHidden() || player->health <= 0 ) {
StopDrag( player, true );
prevViewAngles = player->viewAngles;
return;
}
// attack throws object
if ( valid && player->usercmd.buttons & BUTTON_ATTACK ) {
StopDrag( player, false );
prevViewAngles = player->viewAngles;
return;
}
// if there is an entity selected for dragging
if ( dragEnt.GetEntity() ) {
idPhysics *entPhys = dragEnt.GetEntity()->GetPhysics();
idVec3 goalPos;
// Check if the player is standing on the object
idBounds playerBounds;
idBounds objectBounds = entPhys->GetAbsBounds();
idVec3 newPoint = player->GetPhysics()->GetOrigin();
// create a bounds at the players feet
playerBounds.Clear();
playerBounds.AddPoint( newPoint );
newPoint.z -= 1.0f;
playerBounds.AddPoint( newPoint );
playerBounds.ExpandSelf( 8.0f );
// If it intersects the object bounds, then drop it
if ( playerBounds.IntersectsBounds( objectBounds ) ) {
StopDrag( player, true );
prevViewAngles = player->viewAngles;
return;
}
idAngles ang = entPhys->GetAxis().ToAngles();
ang.yaw += player->viewAngles.yaw - prevViewAngles.yaw;
if ( ang.yaw > 180.0f )
ang.yaw -= 360.0f;
else if ( ang.yaw < -180.0f )
ang.yaw += 360.0f;
entPhys->SetAxis( ang.ToMat3() );
// Set and evaluate drag force
goalPos = player->firstPersonViewOrigin + localPlayerPoint * player->firstPersonViewAxis;
drag.SetGoalPosition( goalPos );
drag.Evaluate( gameLocal.time, false );
// If the object is stuck away from its intended position for more than 500ms, let it go.
if ( drag.GetDistanceToGoal() > DRAG_FAIL_LEN ) {
if ( dragFailTime < gameLocal.time ) {
StopDrag( player, true );
prevViewAngles = player->viewAngles;
return;
}
} else {
dragFailTime = gameLocal.time + 1000;
}
}
prevViewAngles = player->viewAngles;
}
// <---sikk

43
d3xp/Grab.h Normal file
View file

@ -0,0 +1,43 @@
// sikk---> Object Manipulation
/*
===============================================================================
Grab Object - Class to extend idWeapon to include functionality for
manipulating physics objects.
===============================================================================
*/
class idGrabEntity : public idEntity {
public:
CLASS_PROTOTYPE( idGrabEntity );
idGrabEntity( void );
~idGrabEntity( void );
void Clear();
void Update( idPlayer *player );
void StartDrag( idPlayer *player, idEntity *grabEnt, int id );
void StopDrag( idPlayer *player, bool drop );
idEntity * GetGrabEntity( void ) const { return dragEnt.GetEntity(); }
int GetThrownTime( void ) const { return lastThrownTime; }
int SetThrownTime( int time ) { lastThrownTime = time; }
private:
idEntityPtr<idEntity> dragEnt; // entity being dragged
idForce_Grab drag;
idPlayer* owner;
idVec3 saveGravity;
idVec3 localPlayerPoint; // dragged point in player space
idAngles prevViewAngles; // Holds previous frame's player view angles
int id; // id of body being dragged
int oldUcmdFlags;
int dragFailTime;
int lastThrownTime;
};
// <---sikk

View file

@ -574,7 +574,7 @@ int idGrabber::Update( idPlayer *player, bool hide ) {
goalPos = player->firstPersonViewOrigin + localPlayerPoint * player->firstPersonViewAxis;
drag.SetGoalPosition( goalPos );
drag.Evaluate( gameLocal.time );
drag.Evaluate( gameLocal.time, true ); // sikk - Use Function: Object Manipualtion - Added the grabber arg
// If an object is flying too fast toward the player, stop it hard
if ( g_grabberHardStop.GetBool() ) {
@ -725,11 +725,12 @@ bool idGrabber::grabbableAI( const char *aiName ) {
// skip "monster_"
aiName += 8;
if (!idStr::Cmpn( aiName, "flying_lostsoul", 15 ) ||
!idStr::Cmpn( aiName, "demon_trite", 11 ) ||
!idStr::Cmp( aiName, "flying_forgotten" ) ||
!idStr::Cmp( aiName, "demon_cherub" ) ||
!idStr::Cmp( aiName, "demon_tick" )) {
if ( ( !idStr::Cmpn( aiName, "flying_lostsoul", 15 ) ||
!idStr::Cmpn( aiName, "demon_trite", 11 ) ||
!idStr::Cmp( aiName, "flying_forgotten" ) ||
!idStr::Cmp( aiName, "demon_cherub" ) ||
!idStr::Cmp( aiName, "demon_tick" ) ) &&
g_grabbableAI.GetBool() ) { // sikk - Grabbable Enemy Toggle
return true;
}

View file

@ -59,6 +59,8 @@ public:
void SetDragDistance( float dist );
int Update( idPlayer *player, bool hide );
int GetLastFiredTime( void ) { return lastFiredTime; }; // sikk - Object Manipulation
private:
idEntityPtr<idEntity> dragEnt; // entity being dragged
idForce_Grab drag;

View file

@ -76,6 +76,9 @@ idItem::idItem() {
orgOrigin.Zero();
canPickUp = true;
fl.networkSync = true;
removeable = true; // sikk - Item Management: Random Item Removal
noPickup = false; // sikk - Item Management: Manual Item Pickup
}
/*
@ -108,6 +111,8 @@ void idItem::Save( idSaveGame *savefile ) const {
savefile->WriteInt( inViewTime );
savefile->WriteInt( lastCycle );
savefile->WriteInt( lastRenderViewTime );
savefile->WriteBool( removeable ); // sikk - Item Management: Random Item Removal
}
/*
@ -129,6 +134,8 @@ void idItem::Restore( idRestoreGame *savefile ) {
savefile->ReadInt( lastCycle );
savefile->ReadInt( lastRenderViewTime );
savefile->ReadBool( removeable ); // sikk - Item Management: Random Item Removal
itemShellHandle = -1;
}
@ -266,6 +273,19 @@ void idItem::Present( void ) {
}
}
// sikk---> Item Management: Random Item Value
/*
================
idItem::GetRandomValue
================
*/
int idItem::GetRandomValue( const char* invName ) {
int n = spawnArgs.GetInt( invName ) * ( 1.0f - g_itemValueFactor.GetFloat() * gameLocal.random.RandomFloat() );
n = ( n < 1 ) ? 1 : n;
return n;
}
// <---sikk
/*
================
idItem::Spawn
@ -325,6 +345,54 @@ void idItem::Spawn( void ) {
lastCycle = -1;
itemShellHandle = -1;
shellMaterial = declManager->FindMaterial( "itemHighlightShell" );
// sikk---> Item Management: Random Item Value
if ( g_itemValueFactor.GetFloat() ) {
// random ammo values
if ( spawnArgs.GetInt( "inv_ammo_shells" ) )
spawnArgs.SetInt( "inv_ammo_shells", GetRandomValue( "inv_ammo_shells" ) );
if ( spawnArgs.GetInt( "inv_ammo_bullets" ) )
spawnArgs.SetInt( "inv_ammo_bullets", GetRandomValue( "inv_ammo_bullets" ) );
if ( spawnArgs.GetInt( "inv_ammo_rockets" ) )
spawnArgs.SetInt( "inv_ammo_rockets", GetRandomValue( "inv_ammo_rockets" ) );
if ( spawnArgs.GetInt( "inv_ammo_cells" ) )
spawnArgs.SetInt( "inv_ammo_cells", GetRandomValue( "inv_ammo_cells" ) );
if ( spawnArgs.GetInt( "inv_ammo_grenades" ) )
spawnArgs.SetInt( "inv_ammo_grenades", GetRandomValue( "inv_ammo_grenades" ) );
if ( spawnArgs.GetInt( "inv_ammo_bfg" ) )
spawnArgs.SetInt( "inv_ammo_bfg", GetRandomValue( "inv_ammo_bfg" ) );
if ( spawnArgs.GetInt( "inv_ammo_clip" ) )
spawnArgs.SetInt( "inv_ammo_clip", GetRandomValue( "inv_ammo_clip" ) );
if ( spawnArgs.GetInt( "inv_ammo_belt" ) )
spawnArgs.SetInt( "inv_ammo_belt", GetRandomValue( "inv_ammo_belt" ) );
// random health values
if ( spawnArgs.GetInt( "inv_health" ) )
spawnArgs.SetInt( "inv_health", GetRandomValue( "inv_health" ) );
// random armor values
if ( spawnArgs.GetInt( "inv_armor" ) )
spawnArgs.SetInt( "inv_armor", GetRandomValue( "inv_armor" ) );
// random air values
if ( spawnArgs.GetInt( "inv_air" ) )
spawnArgs.SetInt( "inv_air", GetRandomValue( "inv_air" ) );
// random envirosuit air values
if ( spawnArgs.GetInt( "inv_enviroTime" ) )
spawnArgs.SetInt( "inv_enviroTime", GetRandomValue( "inv_enviroTime" ) );
}
// <---sikk
// 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
}
/*
@ -354,6 +422,11 @@ bool idItem::GiveToPlayer( idPlayer *player ) {
return false;
}
// sikk---> Item Management: Manual Item Pickup
if ( noPickup )
return false;
// <---sikk
if ( spawnArgs.GetBool( "inv_carry" ) ) {
return player->GiveInventoryItem( &spawnArgs );
}
@ -416,6 +489,8 @@ bool idItem::Pickup( idPlayer *player ) {
}
}
noPickup = true; // sikk - Item Management: Manual Item Pickup
BecomeInactive( TH_THINK );
return true;
}
@ -524,7 +599,10 @@ void idItem::Event_Touch( idEntity *other, trace_t *trace ) {
return;
}
Pickup( static_cast<idPlayer *>(other) );
// sikk---> Manual Item Pickup
if ( !g_itemPickupType.GetBool() || spawnArgs.GetBool( "autopickup" ) )
Pickup( static_cast<idPlayer *>(other) );
// <---sikk
}
/*
@ -644,8 +722,12 @@ bool idItemPowerup::GiveToPlayer( idPlayer *player ) {
if ( player->spectating ) {
return false;
}
player->GivePowerUp( type, time * 1000 );
return true;
// sikk---> Adrenaline Pack System
// player->GivePowerUp( type, time * 1000 );
// return true;
return player->GivePowerUp( type, time * 1000 );
// <---sikk
}
#ifdef CTF
@ -1727,10 +1809,13 @@ void idMoveableItem::Spawn( void ) {
physicsObj.SetBouncyness( bouncyness );
physicsObj.SetFriction( 0.6f, 0.6f, friction );
physicsObj.SetGravity( gameLocal.GetGravity() );
physicsObj.SetContents( CONTENTS_RENDERMODEL );
physicsObj.SetClipMask( MASK_SOLID | CONTENTS_MOVEABLECLIP );
// sikk---> We want moveable items to clip with other items and we also want ragdolls to clip with items
//physicsObj.SetContents( CONTENTS_RENDERMODEL );
//physicsObj.SetClipMask( MASK_SOLID | CONTENTS_MOVEABLECLIP );
physicsObj.SetContents( CONTENTS_RENDERMODEL | CONTENTS_CORPSE );
physicsObj.SetClipMask( MASK_SOLID | CONTENTS_CORPSE | CONTENTS_MOVEABLECLIP | CONTENTS_RENDERMODEL );
// <---sikk
SetPhysics( &physicsObj );
smoke = NULL;
smokeTime = 0;
#ifdef _D3XP
@ -1746,6 +1831,41 @@ void idMoveableItem::Spawn( void ) {
#ifdef CTF
repeatSmoke = spawnArgs.GetBool( "repeatSmoke", "0" );
#endif
// sikk---> Item Management: Helmet factor (replaces security armor)
bool bRemoved = false;
idStr defName = GetEntityDefName();
if ( !idStr::Icmp( defName, "moveable_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 );
ent->SetOrigin( spawnArgs.GetVector( "origin" ) + idVec3( 0.0f, 0.0f, 8.0f ) );
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
}
/*
@ -1851,7 +1971,7 @@ idEntity *idMoveableItem::DropItem( const char *classname, const idVec3 &origin,
removeDelay = 5 * 60 * 1000;
}
// always remove a dropped item after 5 minutes in case it dropped to an unreachable location
item->PostEventMS( &EV_Remove, removeDelay );
// item->PostEventMS( &EV_Remove, removeDelay ); // sikk - Dropped moveable items no longer are removed
}
return item;
}
@ -2011,6 +2131,116 @@ bool idMoveablePDAItem::GiveToPlayer(idPlayer *player) {
return true;
}
// sikk---> Moveable Video CD
/*
===============================================================================
idMoveableVideoCDItem
===============================================================================
*/
CLASS_DECLARATION( idMoveableItem, idMoveableVideoCDItem )
END_CLASS
/*
================
idMoveableVideoCDItem::Spawn
================
*/
void idMoveableVideoCDItem::Spawn( void ) {
}
/*
================
idMoveableVideoCDItem::GiveToPlayer
================
*/
bool idMoveableVideoCDItem::GiveToPlayer( idPlayer *player ) {
idStr str = spawnArgs.GetString( "video" );
if ( player && str.Length() ) {
player->GiveVideo( str, &spawnArgs );
}
return true;
}
// <---sikk
// sikk---> Moveable Powerup
/*
===============================================================================
idMoveableItemPowerup
===============================================================================
*/
/*
===============
idMoveableItemPowerup
===============
*/
CLASS_DECLARATION( idMoveableItem, idMoveableItemPowerup )
END_CLASS
/*
================
idMoveableItemPowerup::idMoveableItemPowerup
================
*/
idMoveableItemPowerup::idMoveableItemPowerup() {
time = 0;
type = 0;
}
/*
================
idMoveableItemPowerup::Save
================
*/
void idMoveableItemPowerup::Save( idSaveGame *savefile ) const {
savefile->WriteInt( time );
savefile->WriteInt( type );
}
/*
================
idMoveableItemPowerup::Restore
================
*/
void idMoveableItemPowerup::Restore( idRestoreGame *savefile ) {
savefile->ReadInt( time );
savefile->ReadInt( type );
}
/*
================
idMoveableItemPowerup::Spawn
================
*/
void idMoveableItemPowerup::Spawn( void ) {
time = spawnArgs.GetInt( "time", "30" );
type = spawnArgs.GetInt( "type", "0" );
}
/*
================
idMoveableItemPowerup::GiveToPlayer
================
*/
bool idMoveableItemPowerup::GiveToPlayer( idPlayer *player ) {
if ( player->spectating ) {
return false;
}
// sikk---> Adrenaline Pack System
// player->GivePowerUp( type, time * 1000 );
// return true;
return player->GivePowerUp( type, time * 1000 );
// <---sikk
}
// <---sikk
/*
===============================================================================

View file

@ -77,6 +77,12 @@ 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
// <---sikk
private:
idVec3 orgOrigin;
bool spin;
@ -275,6 +281,35 @@ public:
virtual bool GiveToPlayer( idPlayer *player );
};
// sikk---> Moveable Video CD
class idMoveableVideoCDItem : public idMoveableItem {
public:
CLASS_PROTOTYPE( idMoveableVideoCDItem );
void Spawn();
virtual bool GiveToPlayer( idPlayer *player );
};
// <---sikk
// sikk---> Moveable Powerup
class idMoveableItemPowerup : public idMoveableItem {
public:
CLASS_PROTOTYPE( idMoveableItemPowerup );
idMoveableItemPowerup();
void Save( idSaveGame *savefile ) const;
void Restore( idRestoreGame *savefile );
void Spawn();
virtual bool GiveToPlayer( idPlayer *player );
private:
int time;
int type;
};
// <---sikk
/*
===============================================================================

View file

@ -300,6 +300,13 @@ void idLight::Restore( idRestoreGame *savefile ) {
lightDefHandle = -1;
// sikk---> Soft Shadows PostProcess
// only put lights that cast shadows into the list
if ( spawnArgs.GetInt( "noshadows" ) == 0 ) {
gameLocal.currentLights.Append( entityNumber );
}
// <---sikk
SetLightLevel();
}
@ -424,6 +431,13 @@ void idLight::Spawn( void ) {
PostEventMS( &EV_PostSpawn, 0 );
// sikk---> Soft Shadows PostProcess
// only put lights that cast shadows into the list
if ( spawnArgs.GetInt( "noshadows" ) == 0 ) {
gameLocal.currentLights.Append( entityNumber );
}
// <---sikk
UpdateVisuals();
}
@ -1163,3 +1177,19 @@ bool idLight::ClientReceiveEvent( int event, int time, const idBitMsg &msg ) {
return idEntity::ClientReceiveEvent( event, time, msg );
}
// sikk---> Soft Shadows PostProcess
/*
================
idLight::UpdateShadowState
================
*/
void idLight::UpdateShadowState( void ) {
// let the renderer apply it to the world
if ( ( lightDefHandle != -1 ) ) {
gameRenderWorld->UpdateLightDef( lightDefHandle, &renderLight );
} else {
lightDefHandle = gameRenderWorld->AddLightDef( &renderLight );
}
}
// <---sikk

View file

@ -97,6 +97,11 @@ public:
virtual void ReadFromSnapshot( const idBitMsgDelta &msg );
virtual bool ClientReceiveEvent( int event, int time, const idBitMsg &msg );
// sikk---> Soft Shadows PostProcess
renderLight_t* GetRenderLight( void ) { return &renderLight; };
void UpdateShadowState( void );
// <---sikk
private:
renderLight_t renderLight; // light presented to the renderer
idVec3 localLightOrigin; // light origin relative to the physics origin

View file

@ -1489,6 +1489,11 @@ void idStaticEntity::Spawn( void ) {
if ( model.Find( ".prt" ) >= 0 ) {
// we want the parametric particles out of sync with each other
renderEntity.shaderParms[ SHADERPARM_TIMEOFFSET ] = gameLocal.random.RandomInt( 32767 );
// sikk---> Depth Render
renderEntity.suppressSurfaceInViewID = -8;
renderEntity.noShadow = 1;
// <---sikk
}
fadeFrom.Set( 1, 1, 1, 1 );

View file

@ -1059,6 +1059,9 @@ void idExplodingBarrel::AddParticles( const char *name, bool burn ) {
particleRenderEntity.shaderParms[ SHADERPARM_ALPHA ] = rgb;
particleRenderEntity.shaderParms[ SHADERPARM_TIMEOFFSET ] = -MS2SEC( gameLocal.realClientTime );
particleRenderEntity.shaderParms[ SHADERPARM_DIVERSITY ] = ( burn ) ? 1.0f : gameLocal.random.RandomInt( 90 );
particleRenderEntity.suppressSurfaceInViewID = -8; // sikk - Depth Render
#ifdef _D3XP
particleRenderEntity.timeGroup = explicitTimeGroup;
#endif

File diff suppressed because it is too large Load diff

View file

@ -233,6 +233,9 @@ public:
void RechargeAmmo(idPlayer *owner);
bool CanGive( idPlayer *owner, const idDict &spawnArgs, const char *statname, const char *value, int *idealWeapon );
#endif
int healthPackAmount; // sikk - Health Management System (Health Pack)
int adrenalineAmount; // sikk - Adrenaline Pack System
};
typedef struct {
@ -333,7 +336,6 @@ public:
bool healthTake;
int nextHealthTake;
bool hiddenWeapon; // if the weapon is hidden ( in noWeapons maps )
idEntityPtr<idProjectile> soulCubeProjectile;
@ -619,6 +621,83 @@ public:
bool SelfSmooth( void );
void SetSelfSmooth( bool b );
int nScreenFrostAlpha; // sikk - Screen Frost
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)
// sikk---> Manual Item Pickup
idItem* focusItem;
int itemPickupTime;
// <---sikk
// sikk---> Searchable Corpses
void SearchCorpse( idAFEntity_Gibbable* corpse );
idAFEntity_Gibbable* focusCorpse;
int searchTimer;
// <---sikk
// sikk---> Object Manipulation
idGrabEntity grabEntity;
idEntity* focusMoveable;
int focusMoveableId;
int focusMoveableTimer;
// <---sikk
// sikk---> Adrenaline Pack System
void UseAdrenaline( void );
int adrenalineAmount;
// <---sikk
// sikk---> Health Management System
void UseHealthPack( void );
int healthPackAmount;
int healthPackTimer;
int nextHealthRegen;
int prevHeatlh; // sikk - holds player health after Health station has been used
// <---sikk
// sikk---> Crosshair Positioning
int GetCurrentWeaponNum( void ) { return currentWeapon; };
idVec3 v3CrosshairPos;
// <---sikk
// sikk---> Weapon Handling System
bool GetWeaponHandling( void );
bool bWATrace;
bool bWAIsSprinting;
// <---sikk
// sikk---> Depth Render
void ToggleSuppression( bool bSuppress );
bool bViewModelsModified;
// <---sikk
// sikk---> Depth of Field PostProcess
int GetTalkCursor( void ) { return talkCursor; }; // used to check if character has focus
bool bIsZoomed;
// <---sikk
// sikk---> Global Ambient Light
void ToggleAmbientLight( bool bOn );
bool bAmbientLightOn;
idStr szAmbientLightColor;
idStr szAmbientLightRadius;
// <---sikk
// sikk---> Infrared Goggles/Headlight Mod
void UpdateBattery( void );
void ToggleIRGoggles( void );
void ToggleHeadlight( void );
bool bIRGogglesOn;
bool bHeadlightOn;
int nIRGogglesTime;
int nHeadlightTime;
int nBattery;
float fIntensity;
float fIRBloomParms[ 7 ];
// <---sikk
private:
jointHandle_t hipJoint;
jointHandle_t chestJoint;
@ -782,7 +861,7 @@ private:
bool WeaponAvailable( const char* name );
#endif
void UseVehicle( void );
void UseVehicle( bool drive ); // sikk - function modified to support use function
void Event_GetButtons( void );
void Event_GetMove( void );

File diff suppressed because it is too large Load diff

View file

@ -55,11 +55,7 @@ typedef struct {
float driftAmount;
} screenBlob_t;
#define MAX_SCREEN_BLOBS 8
#define MAX_SCREEN_BLOBS 4 //8 // sikk - decreased max screen blobs value
#ifdef _D3XP
class WarpPolygon_t {
@ -86,18 +82,11 @@ public:
};
#endif
#ifdef _D3XP
class idPlayerView;
class FullscreenFXManager;
/*
==================
FxFader
@ -133,7 +122,6 @@ public:
float GetAlpha() { return alpha; };
};
/*
==================
FullscreenFX
@ -305,8 +293,6 @@ public:
virtual void Restore( idRestoreGame *savefile );
};
/*
==================
FullscreenFXManager
@ -343,17 +329,8 @@ public:
void Save( idSaveGame *savefile );
void Restore( idRestoreGame *savefile );
};
#endif
class idPlayerView {
public:
idPlayerView();
@ -432,6 +409,95 @@ public:
int AddWarp( idVec3 worldOrigin, float centerx, float centery, float initialRadius, float durationMsec );
void FreeWarp( int id );
#endif
// sikk---> PostProcess Effects
void DoPostFX( void );
void PostFX_SoftShadows( void );
void PostFX_EdgeAA( void );
void PostFX_HDR( void );
void PostFX_Bloom( void );
void PostFX_MotionBlur( void );
void PostFX_DoF( void );
void PostFX_SSIL( void );
void PostFX_SSAO( void );
void PostFX_SunShafts( void );
void PostFX_LensFlare( void );
void PostFX_ColorGrading( void );
void PostFX_ExplosionFX( void );
void PostFX_IRGoggles( void );
void PostFX_ScreenFrost( void );
void PostFX_CelShading( void );
void PostFX_Filmgrain( void );
void PostFX_Vignetting( void );
void PostFX_AdrenalineVision( void );
//void PostFX_DoubleVision( void );
//void PostFX_BerserkVision( void );
//void PostFX_InfluenceVision( void );
void PostFX_BFGVision( void );
void PostFX_TunnelVision( void );
void PostFX_ScreenBlobs( void );
void PostFX_ArmorPulse( void );
void RenderDepth( bool bCrop );
void RenderNormals( bool bFace );
void ToggleShadows( bool noShadows );
void ResetShadows( void );
bool DoFConditionCheck( void );
bool MBConditionCheck( void );
const idMaterial * blackMaterial; // Black material (for general use)
const idMaterial * whiteMaterial; // White material (for general use)
const idMaterial * currentRenderMaterial; // Current Render material (for general use)
const idMaterial * scratchMaterial; // Scratch material (for general use)
const idMaterial * depthMaterial; // Depth material (for general use)
const idMaterial * normalsMaterial; // View Space Normals material (for general use)
const idMaterial * softShadowsMaterial; // Soft Shadow material
const idMaterial * edgeAAMaterial; // Edge AA material
const idMaterial * hdrLumBaseMaterial; // HDR Luminance Base material
const idMaterial * hdrLumAverageMaterial; // HDR Luminance Average material
const idMaterial * hdrLumAdaptedMaterial; // HDR Luminance Adapted material
const idMaterial * hdrBrightPass1Material; // HDR Bright Pass Filter material (Reinhard RGB)
const idMaterial * hdrBrightPass2Material; // HDR Bright Pass Filter material (Reinhard Yxy)
const idMaterial * hdrBrightPass3Material; // HDR Bright Pass Filter material (Exp)
const idMaterial * hdrBrightPass4Material; // HDR Bright Pass Filter material (Filmic simple)
const idMaterial * hdrBrightPass5Material; // HDR Bright Pass Filter material (Filmic complex)
const idMaterial * hdrBloomMaterial; // HDR Bloom material
const idMaterial * hdrFlareMaterial; // HDR Lens Flare material
const idMaterial * hdrGlareMaterial; // HDR Glare material
const idMaterial * hdrFinalMaterial; // HDR Final Tone Mapping material
const idMaterial * bloomMaterial; // Bloom material
const idMaterial * ssilMaterial; // SSIL material
const idMaterial * ssaoMaterial; // SSAO material
const idMaterial * sunShaftsMaterial; // Sun Shafts material
const idMaterial * lensFlareMaterial; // Lens Flare material
const idMaterial * dofMaterial; // DoF material
const idMaterial * motionBlurMaterial; // Motion Blur material
const idMaterial * colorGradingMaterial; // Color Grading material
const idMaterial * screenFrostMaterial; // Screen Frost material
const idMaterial * celShadingMaterial; // Cel Shading material
const idMaterial * filmgrainMaterial; // Filmgrain material
const idMaterial * vignettingMaterial; // Vignetting material
const idMaterial * tunnel2Material; // health tunnel vision for Health Management System (Health Regen)
const idMaterial * adrenalineMaterial; // Adrenaline Vision material
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
// sikk---> PostProccess Scaling Fix
int screenHeight;
int screenWidth;
idVec2 shiftScale;
// <---sikk
};
#endif /* !__GAME_PLAYERVIEW_H__ */

View file

@ -275,6 +275,8 @@ void idProjectile::Create( idEntity *owner, const idVec3 &start, const idVec3 &d
}
#endif
renderEntity.suppressSurfaceInViewID = -8; // sikk - Depth Render
UpdateVisuals();
state = CREATED;
@ -402,7 +404,7 @@ void idProjectile::Launch( const idVec3 &start, const idVec3 &dir, const idVec3
#endif
// don't do tracers on client, we don't know origin and direction
if ( spawnArgs.GetBool( "tracers" ) && gameLocal.random.RandomFloat() > 0.5f ) {
if ( spawnArgs.GetBool( "tracers" ) && gameLocal.random.RandomFloat() < g_tracerFrequency.GetFloat() ) { // sikk - Tracer Frequency
SetModel( spawnArgs.GetString( "model_tracer" ) );
projectileFlags.isTracer = true;
}
@ -628,6 +630,14 @@ bool idProjectile::Collide( const trace_t &collision, const idVec3 &velocity ) {
idPlayer *player = static_cast<idPlayer *>( owner.GetEntity() );
player->AddProjectileHits( 1 );
damageScale *= player->PowerUpModifier( PROJECTILE_DAMAGE );
// sikk---> Blood Spray Screen Effect
if ( g_showBloodSpray.GetBool() && !player->PowerUpActive( HELLTIME ) ) {
idVec3 vLength = player->GetEyePosition() - ent->GetPhysics()->GetOrigin();
if ( vLength.Length() < g_bloodSprayDistance.GetFloat() && gameLocal.random.RandomFloat() < g_bloodSprayFrequency.GetFloat() )
player->playerView.AddBloodSpray( g_bloodSprayTime.GetFloat() );
}
// <---sikk
}
}
@ -907,6 +917,9 @@ void idProjectile::Explode( const trace_t &collision, idEntity *ignore ) {
renderEntity.shaderParms[SHADERPARM_ALPHA] = 1.0f;
renderEntity.shaderParms[SHADERPARM_TIMEOFFSET] = -MS2SEC( gameLocal.time );
renderEntity.shaderParms[SHADERPARM_DIVERSITY] = gameLocal.random.CRandomFloat();
renderEntity.suppressSurfaceInViewID = -8; // sikk - Depth Render
Show();
removeTime = ( removeTime > 3000 ) ? removeTime : 3000;
}

View file

@ -82,6 +82,8 @@ void idSmokeParticles::Init( void ) {
renderEntity.hModel = renderModelManager->AllocModel();
renderEntity.hModel->InitEmpty( smokeParticle_SnapshotName );
renderEntity.suppressSurfaceInViewID = -8; // sikk - Depth Render
// we certainly don't want particle shadows
renderEntity.noShadow = 1;

View file

@ -443,6 +443,7 @@ void idWeapon::Save( idSaveGame *savefile ) const {
}
#endif
savefile->WriteFloat( wh_hide_distance ); // sikk - Weapon Handling System
}
/*
@ -670,6 +671,8 @@ void idWeapon::Restore( idRestoreGame *savefile ) {
weaponLights.Set(newLight.name, newLight);
}
#endif
savefile->ReadFloat( wh_hide_distance ); // sikk - Weapon Handling System
}
/***********************************************************************
@ -878,6 +881,8 @@ void idWeapon::Clear( void ) {
projectileEnt = NULL;
isFiring = false;
wh_hide_distance = -15; // sikk - Weapon Handling System
}
/*
@ -953,7 +958,7 @@ void idWeapon::GetWeaponDef( const char *objectname, int ammoinclip ) {
ammoType = GetAmmoNumForName( weaponDef->dict.GetString( "ammoType" ) );
ammoRequired = weaponDef->dict.GetInt( "ammoRequired" );
clipSize = weaponDef->dict.GetInt( "clipSize" );
clipSize = g_ammoCapacityType.GetBool() ? weaponDef->dict.GetInt( "custom_clipSize" ) : weaponDef->dict.GetInt( "clipSize" ); // sikk---> Ammo Management: Ammo Capacity Type
lowAmmo = weaponDef->dict.GetInt( "lowAmmo" );
icon = weaponDef->dict.GetString( "icon" );
@ -968,6 +973,8 @@ 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
// muzzle smoke
smokeName = weaponDef->dict.GetString( "smoke_muzzle" );
if ( *smokeName != '\0' ) {
@ -1572,7 +1579,7 @@ idWeapon::LowerWeapon
void idWeapon::LowerWeapon( void ) {
if ( !hide ) {
hideStart = 0.0f;
hideEnd = hideDistance;
hideEnd = ( owner->GetWeaponHandling() && !owner->OnLadder() ) ? wh_hide_distance : hideDistance; // sikk - Weapon Handling System
if ( gameLocal.time - hideStartTime < hideTime ) {
hideStartTime = gameLocal.time - ( hideTime - ( gameLocal.time - hideStartTime ) );
} else {
@ -2942,6 +2949,10 @@ void idWeapon::Event_AddToClip( int amount ) {
#ifdef _D3XP
// for shared ammo we need to use the ammo when it is moved into the clip
int usedAmmo = ammoClip - oldAmmo;
// sikk---> Ammo Usage Type
if ( g_ammoUsageType.GetBool() && ammoType != 1 )
usedAmmo = clipSize;
// <---sikk
owner->inventory.UseAmmo(ammoType, usedAmmo);
#endif
}
@ -3388,14 +3399,18 @@ void idWeapon::Event_LaunchProjectiles( int num_projectiles, float spread, float
kick_endtime = gameLocal.realClientTime + muzzle_kick_maxtime;
}
if ( gameLocal.isClient ) {
// sikk---> Zoom Spread Reduction
if ( g_weaponHandlingType.GetBool() )
spread = spawnArgs.GetFloat( "wh_spread", "0" );
// <---sikk
if ( gameLocal.isClient ) {
// predict instant hit projectiles
if ( projectileDict.GetBool( "net_instanthit" ) ) {
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() );
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
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();
@ -3407,14 +3422,13 @@ void idWeapon::Event_LaunchProjectiles( int num_projectiles, float spread, float
}
} else {
ownerBounds = owner->GetPhysics()->GetAbsBounds();
owner->AddProjectilesFired( num_projectiles );
float spreadRad = DEG2RAD( spread );
for( i = 0; i < num_projectiles; i++ ) {
ang = idMath::Sin( spreadRad * gameLocal.random.RandomFloat() );
ang = idMath::Sin( spreadRad * gameLocal.random.RandomFloat() * ( ( owner->bIsZoomed && g_weaponHandlingType.GetBool() ) ? 0.25f : 1.0f ) ); // sikk - Weapon Handling System: Zoom Spread Reduction
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();
@ -3857,6 +3871,14 @@ void idWeapon::Event_Melee( void ) {
idThread::ReturnInt( hit );
owner->WeaponFireFeedback( &weaponDef->dict );
// sikk---> Blood Spray Screen Effect **No Chainsaw in D3XP SP**
// if ( g_showBloodSpray.GetBool() ) {
// if ( GetOwner()->GetCurrentWeaponNum() == 10 && gameLocal.random.RandomFloat() < g_bloodSprayFrequency.GetFloat() && hit )
// GetOwner()->playerView.AddBloodSpray( g_bloodSprayTime.GetFloat() );
// }
// <---sikk
return;
}

View file

@ -196,6 +196,26 @@ public:
virtual void ClientPredictionThink( void );
float wh_hide_distance; // sikk - Weapon Handling System
idGrabber* GetGrabber( void ) { return &grabber; }; // sikk - Object Manipulation
idEntityPtr<idAnimatedEntity>* GetWorldModel( void ) { return &worldModel; }; // sikk - Depth Render
// sikk---> Crosshair Positioning
idVec3 GetMuzzleOrigin( void ) { return muzzleOrigin; };
idMat3 GetMuzzleAxis( void ) { return muzzleAxis; };
jointHandle_t GetBarrelJointView( void ) { return barrelJointView; };
idDict GetProjectileDict( void ) { return projectileDict; };
// <---sikk
// sikk---> Soft Shadows PostProcess
renderLight_t* GetMuzzleFlash( void ) { return &muzzleFlash; };
renderLight_t* GetWorldMuzzleFlash( void ) { return &worldMuzzleFlash; };
int GetMuzzleFlashHandle( void ) { return muzzleFlashHandle; };
int GetWorldMuzzleFlashHandle( void ) { return worldMuzzleFlashHandle; };
// <---sikk
private:
// script control
idScriptBool WEAPON_ATTACK;

View file

@ -274,3 +274,17 @@ void idAASLocal::GetEdge( int edgeNum, idVec3 &start, idVec3 &end ) const {
start = file->GetVertex( v[INTSIGNBITSET(edgeNum)] );
end = file->GetVertex( v[INTSIGNBITNOTSET(edgeNum)] );
}
// sikk---> Random Encounters System
/*
============
idAASLocal::GetNumAreas
============
*/
int idAASLocal::GetNumAreas( int aasNum ) const {
if ( !file ) {
return -1;
}
return file->GetNumAreas();
}
// <---sikk

View file

@ -138,6 +138,9 @@ public:
virtual void ShowFlyPath( const idVec3 &origin, int goalAreaNum, const idVec3 &goalOrigin ) const = 0;
// Find the nearest goal which satisfies the callback.
virtual bool FindNearestGoal( aasGoal_t &goal, int areaNum, const idVec3 origin, const idVec3 &target, int travelFlags, aasObstacle_t *obstacles, int numObstacles, idAASCallback &callback ) const = 0;
// Returns the number of areas in the current aas file.
virtual int GetNumAreas( int aasNum ) const = 0; // sikk - Random Encounters System
};
#endif /* !__AAS_H__ */

View file

@ -118,6 +118,8 @@ public:
virtual void ShowFlyPath( const idVec3 &origin, int goalAreaNum, const idVec3 &goalOrigin ) const;
virtual bool FindNearestGoal( aasGoal_t &goal, int areaNum, const idVec3 origin, const idVec3 &target, int travelFlags, aasObstacle_t *obstacles, int numObstacles, idAASCallback &callback ) const;
virtual int GetNumAreas( int aasNum ) const; // sikk - Random Encounters System
private:
idAASFile * file;
idStr name;

View file

@ -392,6 +392,11 @@ idAI::idAI() {
eyeFocusRate = 0.0f;
headFocusRate = 0.0f;
focusAlignTime = 0;
// sikk---> Random Encounters System
dormantTime = 0;
isRandom = false;
// <---sikk
}
/*
@ -557,6 +562,8 @@ void idAI::Save( idSaveGame *savefile ) const {
harvestEnt.Save( savefile);
#endif
savefile->WriteBool( isRandom ); // sikk - Random Encounters System
}
/*
@ -760,6 +767,8 @@ void idAI::Restore( idRestoreGame *savefile ) {
//}
#endif
savefile->ReadBool( isRandom ); // sikk - Random Encounters System
}
/*
@ -781,6 +790,8 @@ void idAI::Spawn( void ) {
return;
}
spawnArgs.GetBool( "isRandom", "0", isRandom ); // sikk - Random Encounters System
spawnArgs.GetInt( "team", "1", team );
spawnArgs.GetInt( "rank", "0", rank );
spawnArgs.GetInt( "fly_offset", "0", fly_offset );
@ -977,6 +988,20 @@ void idAI::Spawn( void ) {
StartSound( "snd_ambient", SND_CHANNEL_AMBIENT, 0, false, NULL );
}
// sikk - Monster Burn Away Delay (this doesn't effect zombies or other non-burning monsters)
if ( g_burnAwayDelay.GetFloat() > 0.0 && spawnArgs.GetFloat( "burnaway" ) > 0.0 )
spawnArgs.SetFloat( "burnaway", g_burnAwayDelay.GetFloat() );
// <---sikk
// sikk---> Enemy Health Management (also modifies friendlies but it doesn't make any difference)
health *= g_enemyHealthScale.GetFloat();
if ( g_enemyHealthType.GetBool() )
health = ( health * 0.5f ) + ( health * gameLocal.random.RandomFloat() );
health = ( health <= 0 ) ? 1 : health;
// <---sikk
if ( health <= 0 ) {
gameLocal.Warning( "entity '%s' doesn't have health set", name.c_str() );
health = 1;
@ -1096,6 +1121,12 @@ void idAI::DormantBegin( void ) {
// remove ourselves from the enemy's enemylist
enemyNode.Remove();
}
// sikk---> Random Encounters System
if ( isRandom )
dormantTime = gameLocal.time;
// <---sikk
idActor::DormantBegin();
}
@ -1118,6 +1149,11 @@ void idAI::DormantEnd( void ) {
}
}
// sikk---> Random Encounters System
if ( spawnArgs.GetInt( "isRandom" ) )
dormantTime = 0;
// <---sikk
idActor::DormantEnd();
}
@ -1232,6 +1268,11 @@ void idAI::Think( void ) {
UpdateDamageEffects();
LinkCombat();
// sikk---> Random Encounters System
if ( isRandom && ( AI_DEST_UNREACHABLE || ( dormantTime && gameLocal.time > ( dormantTime + g_randomEncountersDormantTime.GetInteger() * 1000 ) ) ) )
Damage( gameLocal.world, gameLocal.world, idVec3( 0, 0, 1 ), "damage_moverCrush", 999999, INVALID_JOINT );
// <---sikk
#ifdef _D3XP
if(ai_showHealth.GetBool()) {
idVec3 aboveHead(0,0,20);
@ -3277,7 +3318,7 @@ int idAI::ReactionTo( const idEntity *ent ) {
}
// monsters will fight when attacked by lower ranked monsters. rank 0 never fights back.
if ( rank && ( actor->rank < rank ) ) {
if ( rank && ( actor->rank < rank + g_interRankAggression.GetInteger() ) ) { // sikk - Inter Rank Aggression
return ATTACK_ON_DAMAGE;
}
@ -3416,6 +3457,18 @@ void idAI::Killed( idEntity *inflictor, idEntity *attacker, int damage, const id
return;
}
// sikk---> Random Encounters System
int i = gameLocal.GetEnemyNumFromName( spawnArgs.GetString( "classname" ) );
if ( i ) {
if ( isRandom ) {
gameLocal.randomEnemyTally--;
gameLocal.randomEnemyTally = ( gameLocal.randomEnemyTally < 0 ) ? 0 : gameLocal.randomEnemyTally;
} else {
gameLocal.randomEnemyList.Append( i );
}
}
// <---sikk
// stop all voice sounds
StopSound( SND_CHANNEL_VOICE, false );
if ( head.GetEntity() ) {

View file

@ -297,6 +297,12 @@ public:
virtual void Gib( const idVec3 &dir, const char *damageDefName );
#endif
// 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
protected:
// navigation
idAAS * aas;

View file

@ -152,9 +152,6 @@ idCVar g_useDynamicProtection( "g_useDynamicProtection", "1", CVAR_GAME | CVA
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_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." );
idCVar g_showTriggers( "g_showTriggers", "0", CVAR_GAME | CVAR_BOOL, "draws trigger entities (orange) and their targets (green). disabled triggers are drawn grey." );
@ -401,7 +398,6 @@ idCVar mod_validSkins( "mod_validSkins", "skins/characters/player/marine_mp
idCVar mod_validSkins( "mod_validSkins", "skins/characters/player/marine_mp;skins/characters/player/marine_mp_green;skins/characters/player/marine_mp_blue;skins/characters/player/marine_mp_red;skins/characters/player/marine_mp_yellow", CVAR_GAME | CVAR_ARCHIVE, "valid skins for the game" );
#endif
#ifdef _D3XP
idCVar g_grabberHoldSeconds( "g_grabberHoldSeconds", "3", CVAR_GAME | CVAR_FLOAT | CVAR_CHEAT, "number of seconds to hold object" );
idCVar g_grabberEnableShake( "g_grabberEnableShake", "1", CVAR_GAME | CVAR_BOOL | CVAR_CHEAT, "enable the grabber shake" );
@ -417,3 +413,239 @@ idCVar g_xp_bind_run_once( "g_xp_bind_run_once", "0", CVAR_GAME | CVAR_BOOL | CV
idCVar net_serverDownload( "net_serverDownload", "0", CVAR_GAME | CVAR_INTEGER | CVAR_ARCHIVE, "enable server download redirects. 0: off 1: redirect to si_serverURL 2: use builtin download. see net_serverDl cvars for configuration" );
idCVar net_serverDlBaseURL( "net_serverDlBaseURL", "", CVAR_GAME | CVAR_ARCHIVE, "base URL for the download redirection" );
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" );
idCVar g_crosshairLerp( "g_crosshairLerp", "0.5", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "smoothness for the movement of the crosshair when g_crosshairType = 1" );
// <---sikk
// sikk---> Dynamic Hud system
idCVar g_useDynamicHud( "g_useDynamicHud", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "enables dynamic hud" );
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---> 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)" );
idCVar g_bloodSprayDistance( "g_bloodSprayDistance", "96", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "how close you have to be for blood spray effect to \"hit the camera\". Not relevant for chainsaw." );
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---> 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---> Grabble Enemy Toggle
idCVar g_grabbableAI( "g_grabbableAI", "1", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "sets whether certain enemies can be grabbed with the grabber" );
// <---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" );
idCVar g_healthPackTotal( "g_healthPackTotal", "100", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "total amount of health reserve in the health pack" );
idCVar g_healthPackUses( "g_healthPackUses", "1", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "number of uses in the health pack. g_healthPackTotal divided by this is how much health is given per use." );
idCVar g_healthPackTime( "g_healthPackTime", "3", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "maximum time it takes to heal yourself. " );
idCVar g_healthRegenTime( "g_healthRegenTime", "1", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "how often to regenerate health when using regenerative health system" );
idCVar g_healthRegenDelay( "g_healthRegenDelay", "5", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "delay (in seconds) before health starts to regenerate after taking damage when using regenerative health system" );
idCVar g_healthRegenAmt( "g_healthRegenAmt", "1", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "how much health to regenerate per g_healthRegenTime when using regenerative health system" );
idCVar g_healthRegenLimit( "g_healthRegenLimit", "100", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "total amount of health that can be regenerated when using regenerative health system" );
idCVar g_healthRegenSteps( "g_healthRegenSteps", "4", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "splits g_healthRegenLimit into n number of steps. Value of 1 or less will turn steps off.\nexample1: if g_healthRegenLimit == 100 && g_healthRegenSteps == 4, health regeneration will stop at 25/50/75/100\nexample2: if g_healthRegenLimit == 50 && g_healthRegenSteps == 5, health regeneration will stop at 10/20/30/40/50" );
idCVar g_healthRegenFeedback( "g_healthRegenFeedback", "50", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "how low must health reach before feedback is drawn when using regenerative health system" );
// <---sikk
// 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_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_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_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
// 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
// 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
// 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---> 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)" );
// <---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_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_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" );
idCVar r_useHDR( "r_useHDR", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "Enable High Dynamic Range lighting" );
idCVar r_hdrToneMapper( "r_hdrToneMapper", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "Tone mapping method:\n0 = Reinhard (RGB)\n1 = Reinhard (Yxy)\n2 = Exponential\n3 = Filmic (simple)\n4 = Filmic (complex)" );
idCVar r_hdrAdaptationRate( "r_hdrAdaptationRate", "60.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Eye adaptation rate" );
idCVar r_hdrMiddleGray( "r_hdrMiddleGray", "0.18", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Middle gray value used in HDR tone mapping" );
idCVar r_hdrWhitePoint( "r_hdrWhitePoint", "1.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Smallest luminance value that will be mapped to white" );
idCVar r_hdrBlueShiftFactor( "r_hdrBlueShiftFactor", "0.25", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Blue shift blend factor" );
idCVar r_hdrDither( "r_hdrDither", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "Enable dithering" );
idCVar r_hdrDitherSize( "r_hdrDitherSize", "1.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Sets the size of the dither threshold map" );
idCVar r_hdrLumThresholdMax( "r_hdrLumThresholdMax", "0.3", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Minimum luminance value threshold" );
idCVar r_hdrLumThresholdMin( "r_hdrLumThresholdMin", "0.1", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Maximum luminance value threshold" );
idCVar r_hdrBloomToneMapper( "r_hdrBloomToneMapper", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "Tone mapping method, specific to bloom:\n0 = Reinhard (RGB)\n1 = Reinhard (Yxy)\n2 = Exponential\n3 = Filmic (simple)\n4 = Filmic (complex)" );
idCVar r_hdrBloomMiddleGray( "r_hdrBloomMiddleGray", "0.18", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Middle gray value used in HDR tone mapping, specific to bloom" );
idCVar r_hdrBloomWhitePoint( "r_hdrBloomWhitePoint", "1.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Smallest luminance value that will be mapped to white, specific to bloom" );
idCVar r_hdrBloomThreshold( "r_hdrBloomThreshold", "1.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Bloom luminance threshold" );
idCVar r_hdrBloomOffset( "r_hdrBloomOffset", "3.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Bloom luminance offset" );
idCVar r_hdrBloomScale( "r_hdrBloomScale", "1.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Intensity scale amount for bloom effect" );
idCVar r_hdrBloomSize( "r_hdrBloomSize", "1.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Size of the bloom effect" );
idCVar r_hdrFlareGamma( "r_hdrFlareGamma", "2.2", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Gamma curve for the flare texture" );
idCVar r_hdrFlareScale( "r_hdrFlareScale", "1.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Intensity scale amount for lens flare effect. 0 = Off" );
idCVar r_hdrFlareSize( "r_hdrFlareSize", "1.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Size of the lens flare effect" );
idCVar r_hdrGlareStyle( "r_hdrGlareStyle", "1", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "Glare style to use with HDR lighting. Value range: 0 - 11\n0 = Off\n1 = Natural\n2 = Star\n3 = Cross\n4 = Snow Cross\n5 = Horizontal\n6 = Vertical\n7 = Star (Spectral)\n8 = Cross (Spectral)\n9 = Snow Cross (Spectral)\n10 = Horizontal (Spectral)\n11 = Vertical (Spectral)" );
idCVar r_hdrGlareScale( "r_hdrGlareScale", "1.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Intensity scale amount for glare effect" );
idCVar r_hdrGlareSize( "r_hdrGlareSize", "1.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Size of the glare effect" );
idCVar r_useBloom( "r_useBloom", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "Enable bloom postprocessing effect" );
idCVar r_bloomBufferSize( "r_bloomBufferSize", "3", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "Bloom render target size:\n0 = 32x32\n1 = 64x64\n2 = 128x128\n3 = 256x256\n4 = 512x512\n5 = 1024x1024" );
idCVar r_bloomBlurIterations( "r_bloomBlurIterations", "1", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "Number of times the blur filter is applied" );
idCVar r_bloomBlurScaleX( "r_bloomBlurScaleX", "1.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Amount to scale the X axis sample offsets" );
idCVar r_bloomBlurScaleY( "r_bloomBlurScaleY", "1.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Amount to scale the Y axis sample offsets" );
idCVar r_bloomScale( "r_bloomScale", "1.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Amount to scale the intensity of the bloom effect" );
idCVar r_bloomGamma( "r_bloomGamma", "1.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Gamma curve for the bloom texture" );
idCVar r_useSSIL( "r_useSSIL", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "Enable Screen-Space Indirect Lighting postprocessing effect" );
idCVar r_ssilRadius( "r_ssilRadius", "128", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Set the sample radius for ssil" );
idCVar r_ssilAmount( "r_ssilAmount", "1.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Set the contribution factor for ssil" );
idCVar r_ssilBlurMethod( "r_ssilBlurMethod", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "Blur method used for the ssil buffer:\n0 = Gaussian\n1 = Bilateral" );
idCVar r_ssilBlurScale( "r_ssilBlurScale", "1.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Set the blur scale for the ssil buffer" );
idCVar r_ssilBlurQuality( "r_ssilBlurQuality", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "Set the blur quality for the ssil buffer" );
idCVar r_ssilBlurEpsilon( "r_ssilBlurEpsilon", "4", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "Set the blur depth difference factor for the ssil buffer" );
idCVar r_useSSAO( "r_useSSAO", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "Enable Screen-Space Ambient Occlusion postprocessing effect" );
idCVar r_ssaoMethod( "r_ssaoMethod", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "Set the ssao method:\n0 = Crytek\n1 = HDAO\n2 = ABAO\n3 = PBAO\n4 = HBAO (low)\n5 = HBAO (medium)\n6 = HBAO (high)\n7 = Ray Marching\n8 = Volumetric Obscurance" );
idCVar r_ssaoRadius( "r_ssaoRadius", "16", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Set the sample radius for ssao" );
idCVar r_ssaoBias( "r_ssaoBias", "0.075", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Set the angle bias for ssao (darkening factor for Crytek's)" );
idCVar r_ssaoAmount( "r_ssaoAmount", "1.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Set the contribution factor for ssao" );
idCVar r_ssaoBlurMethod( "r_ssaoBlurMethod", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "Blur method used for the ssao buffer:\n0 = Crytek\n1 = Box\n2 = Gaussian\n3 = Bilateral" );
idCVar r_ssaoBlurScale( "r_ssaoBlurScale", "1.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Set the blur scale for the ssao buffer" );
idCVar r_ssaoBlurQuality( "r_ssaoBlurQuality", "1", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "Set the blur quality for the ssao buffer" );
idCVar r_ssaoBlurEpsilon( "r_ssaoBlurEpsilon", "16", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "Set the blur depth difference factor for the ssao buffer" );
idCVar r_ssaoBlendPower( "r_ssaoBlendPower", "2.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Set the blend exponent for the ssao to scene final combine" );
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_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)" );
idCVar r_sunOriginZ( "r_sunOriginZ", "0.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Set the sun's origin along the Z axis (used for sun shafts & lens flare)" );
idCVar r_useLensFlare( "r_useLensFlare", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "Enable lens flare postprocessing effect" );
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_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)" );
idCVar r_dofFocus( "r_dofFocus", "128", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "Set the focus distance for depth of field postprocessing effect (r_useDepthOfField = 2 only)" );
idCVar r_dofConditionAlways( "r_dofConditionAlways", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "Depth of field condition: Always on" );
idCVar r_dofConditionCinematic( "r_dofConditionCinematic", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "Depth of field condition: Cinematics" );
idCVar r_dofConditionGUI( "r_dofConditionGUI", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "Depth of field condition: GUI Active" );
idCVar r_dofConditionReload( "r_dofConditionReload", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "Depth of field condition: Reloading" );
idCVar r_dofConditionTalk( "r_dofConditionTalk", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "Depth of field condition: Talking" );
idCVar r_dofConditionZoom( "r_dofConditionZoom", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "Depth of field condition: Weapon Zoom" );
idCVar r_useMotionBlur( "r_useMotionBlur", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "Enable motion blur postprocessing effect.\n0 = off\n1 = Camera\n2 = Accumulation\n3 = Camera + Accumulation" );
idCVar r_motionBlurScale( "r_motionBlurScale", "0.1", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Set the motion blur scale. Works similar to shutter speed. Higher values == stronger blurring" );
idCVar r_motionBlurMaskDistance( "r_motionBlurMaskDistance", "32", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "Don't do motion blur if framerate is below this value" );
idCVar r_motionBlurFPSThreshold( "r_motionBlurFPSThreshold", "20", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "Set the motion blur mask distance. Used to mask the view weapon." );
idCVar r_motionBlurMinThreshold( "r_motionBlurMinThreshold", "10", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "Set the motion blur min sensitivity threshold. Screen won't blur until threshold is passed. Lower values == higher sensitivity" );
idCVar r_motionBlurMaxThreshold( "r_motionBlurMaxThreshold", "45", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "Set the motion blur max sensitivity threshold. Blur strength won't pass threshold." );
idCVar r_motionBlurFactor( "r_motionBlurFactor", "1.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Set the motion blur blend factor" );
idCVar r_motionBlurLerp( "r_motionBlurLerp", "0.5", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Set the motion blur blend lerp factor" );
idCVar r_motionBlurQuality( "r_motionBlurQuality", "1", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "Set the motion blur quality. Value range: 1 - 4\n1 = 8 samples\n2 = 64 samples (virtual)\n3 = 512 samples (virtual)\n4 = 4096 samples (virtual)" );
idCVar r_useColorGrading( "r_useColorGrading", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "Enable color grading postprocessing effect. Parameters need to be set manually in the material." );
idCVar r_colorGradingParm( "r_colorGradingParm", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "Parameter to allow specific color grading stage to be used in the material" );
idCVar r_colorGradingType( "r_colorGradingType", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "Color grading type:\n0 = math\n1 = lut" );
idCVar r_colorGradingSharpness( "r_colorGradingSharpness", "1.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Sharpness level when color grading is enabled" );
idCVar r_useCelShading( "r_useCelShading", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "Enable cel shading postprocessing effect" );
idCVar r_celShadingMethod( "r_celShadingMethod", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "Set the cel shading edge detection method. Value range: 0 - 2 \n0 = RGB\n1 = Luminance\n2 = Depth(incomplete)" );
idCVar r_celShadingScale( "r_celShadingScale", "1.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Set the cel shading scale. Higher values == thicker outline" );
idCVar r_celShadingThreshold( "r_celShadingThreshold", "1.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Set the cel shading threshold" );
idCVar r_useFilmgrain( "r_useFilmgrain", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "Enable filmgrain postprocessing effect" );
idCVar r_filmgrainBlendMode( "r_filmgrainBlendMode", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_INTEGER, "Set the grain blending mode. Value range: 0 - 3\n0 = gl_one, gl_one\n1 = gl_zero, gl_one_minus_src_color\n2 = gl_dst_color, gl_one\n3 = gl_one_minus_dst_color, gl_one" );
idCVar r_filmgrainScale( "r_filmgrainScale", "1.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Set the grain scale" );
idCVar r_filmgrainStrength( "r_filmgrainStrength", "1.0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_FLOAT, "Set the grain strength. Value range: 0.0 - 1.0" );
idCVar r_useVignetting( "r_useVignetting", "0", CVAR_GAME | CVAR_NOCHEAT | CVAR_ARCHIVE | CVAR_BOOL, "Enable vignetting postprocessing effect" );
// <---sikk

View file

@ -68,7 +68,6 @@ extern idCVar g_useDynamicProtection;
extern idCVar g_healthTakeTime;
extern idCVar g_healthTakeAmt;
extern idCVar g_healthTakeLimit;
extern idCVar g_showPVS;
extern idCVar g_showTargets;
extern idCVar g_showTriggers;
@ -303,4 +302,217 @@ 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
extern idCVar g_useDynamicHud;
extern idCVar g_dynamicHudTime;
// <---sikk
// sikk---> Blood Spray Screen Effect
extern idCVar g_showBloodSpray;
extern idCVar g_bloodSprayTime;
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_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_grabbableAI; // sikk - Grabbable Enemy Toggle
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
// sikk---> Health Management System
extern idCVar g_healthManagementType;
extern idCVar g_healthPackTotal;
extern idCVar g_healthPackUses;
extern idCVar g_healthPackTime;
extern idCVar g_healthRegenTime;
extern idCVar g_healthRegenDelay;
extern idCVar g_healthRegenAmt;
extern idCVar g_healthRegenLimit;
extern idCVar g_healthRegenSteps;
extern idCVar g_healthRegenFeedback;
// <---sikk
// sikk---> Item Management
extern idCVar g_itemPickupType;
extern idCVar g_itemRemovalFactor;
extern idCVar g_itemValueFactor;
extern idCVar g_itemHelmetFactor;
extern idCVar g_itemSearchFactor;
// <---sikk
// sikk---> Ammo Management
extern idCVar g_ammoDamageType;
extern idCVar g_ammoCapacityType;
extern idCVar g_ammoUsageType;
// <---sikk
extern idCVar g_weaponHandlingType; // sikk - Weapon Handling
extern idCVar g_tracerFrequency; // sikk - Tracer Frequency
extern idCVar g_grabMode; // sikk - Object Manipulation
// 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
//extern idCVar g_showFirstPersonBody; // sikk - First Person Body
extern idCVar pm_thirdPersonOffest; // sikk - Thirdpesron Camera
// sikk---> PostProcess Effects
extern idCVar r_useSoftShadows;
extern idCVar r_softShadowsBlurFilter;
extern idCVar r_softShadowsBlurScale;
extern idCVar r_softShadowsBlurEpsilon;
extern idCVar r_useEdgeAA;
extern idCVar r_edgeAASampleScale;
extern idCVar r_edgeAAFilterScale;
extern idCVar r_useHDR;
extern idCVar r_hdrToneMapper;
extern idCVar r_hdrAdaptationRate;
extern idCVar r_hdrMiddleGray;
extern idCVar r_hdrWhitePoint;
extern idCVar r_hdrBlueShiftFactor;
extern idCVar r_hdrDither;
extern idCVar r_hdrDitherSize;
extern idCVar r_hdrLumThresholdMax;
extern idCVar r_hdrLumThresholdMin;
extern idCVar r_hdrBloomToneMapper;
extern idCVar r_hdrBloomMiddleGray;
extern idCVar r_hdrBloomWhitePoint;
extern idCVar r_hdrBloomThreshold;
extern idCVar r_hdrBloomOffset;
extern idCVar r_hdrBloomScale;
extern idCVar r_hdrBloomSize;
extern idCVar r_hdrFlareGamma;
extern idCVar r_hdrFlareScale;
extern idCVar r_hdrFlareSize;
extern idCVar r_hdrGlareStyle;
extern idCVar r_hdrGlareScale;
extern idCVar r_hdrGlareSize;
extern idCVar r_useBloom;
extern idCVar r_bloomBufferSize;
extern idCVar r_bloomBlurIterations;
extern idCVar r_bloomBlurScaleX;
extern idCVar r_bloomBlurScaleY;
extern idCVar r_bloomScale;
extern idCVar r_bloomGamma;
extern idCVar r_useSSIL;
extern idCVar r_ssilRadius;
extern idCVar r_ssilAmount;
extern idCVar r_ssilBlurMethod;
extern idCVar r_ssilBlurScale;
extern idCVar r_ssilBlurQuality;
extern idCVar r_ssilBlurEpsilon;
extern idCVar r_useSSAO;
extern idCVar r_ssaoMethod;
extern idCVar r_ssaoRadius;
extern idCVar r_ssaoAmount;
extern idCVar r_ssaoBias;
extern idCVar r_ssaoBlurMethod;
extern idCVar r_ssaoBlurScale;
extern idCVar r_ssaoBlurQuality;
extern idCVar r_ssaoBlurEpsilon;
extern idCVar r_ssaoBlendPower;
extern idCVar r_ssaoBlendScale;
extern idCVar r_useSunShafts;
extern idCVar r_sunShaftsSize;
extern idCVar r_sunShaftsStrength;
extern idCVar r_sunShaftsMaskStrength;
extern idCVar r_sunShaftsQuality;
extern idCVar r_sunOriginX;
extern idCVar r_sunOriginY;
extern idCVar r_sunOriginZ;
extern idCVar r_useLensFlare;
extern idCVar r_lensFlareStrength;
extern idCVar r_useMotionBlur;
extern idCVar r_motionBlurScale;
extern idCVar r_motionBlurMaskDistance;
extern idCVar r_motionBlurFPSThreshold;
extern idCVar r_motionBlurMinThreshold;
extern idCVar r_motionBlurMaxThreshold;
extern idCVar r_motionBlurFactor;
extern idCVar r_motionBlurLerp;
extern idCVar r_motionBlurQuality;
extern idCVar r_useDepthOfField;
extern idCVar r_dofBlurScale;
extern idCVar r_dofBlurQuality;
extern idCVar r_dofNear;
extern idCVar r_dofFar;
extern idCVar r_dofFocus;
extern idCVar r_dofConditionAlways;
extern idCVar r_dofConditionCinematic;
extern idCVar r_dofConditionGUI;
extern idCVar r_dofConditionTalk;
extern idCVar r_dofConditionReload;
extern idCVar r_dofConditionZoom;
extern idCVar r_useColorGrading;
extern idCVar r_colorGradingParm;
extern idCVar r_colorGradingType;
extern idCVar r_colorGradingSharpness;
extern idCVar r_useCelShading;
extern idCVar r_celShadingMethod;
extern idCVar r_celShadingScale;
extern idCVar r_celShadingThreshold;
extern idCVar r_useFilmgrain;
extern idCVar r_filmgrainBlendMode;
extern idCVar r_filmgrainScale;
extern idCVar r_filmgrainStrength;
extern idCVar r_useVignetting;
// <---sikk
#endif /* !__SYS_CVAR_H__ */

View file

@ -45,7 +45,6 @@ idForce_Grab::Save
================
*/
void idForce_Grab::Save( idSaveGame *savefile ) const {
savefile->WriteFloat( damping );
savefile->WriteVec3( goalPosition );
savefile->WriteFloat( distanceToGoal );
@ -58,7 +57,6 @@ idForce_Grab::Restore
================
*/
void idForce_Grab::Restore( idRestoreGame *savefile ) {
//Note: Owner needs to call set physics
savefile->ReadFloat( damping );
savefile->ReadVec3( goalPosition );
@ -130,7 +128,7 @@ float idForce_Grab::GetDistanceToGoal( void ) {
idForce_Grab::Evaluate
================
*/
void idForce_Grab::Evaluate( int time ) {
void idForce_Grab::Evaluate( int time, bool grabber ) {
if ( !physics ) {
return;
}
@ -140,7 +138,7 @@ void idForce_Grab::Evaluate( int time ) {
objectCenter = physics->GetAbsBounds(id).GetCenter();
if ( g_grabberRandomMotion.GetBool() && !gameLocal.isMultiplayer ) {
if ( grabber && g_grabberRandomMotion.GetBool() && !gameLocal.isMultiplayer ) { // sikk - Use Function: Object Manipualtion - Added "grabber" arg
// Jitter the objectCenter around so it doesn't remain stationary
float SinOffset = idMath::Sin( (float)(gameLocal.time)/66.f );
float randScale1 = gameLocal.random.RandomFloat();
@ -164,16 +162,29 @@ void idForce_Grab::Evaluate( int time ) {
}
physics->AddForce( id, objectCenter, forceDir * forceAmt );
if ( distanceToGoal < 196.f ) {
// sikk---> Use Function: Object Manipualtion
if ( grabber ) {
if ( distanceToGoal < 196.f ) {
v = physics->GetLinearVelocity( id );
physics->SetLinearVelocity( v * damping, id );
}
if ( distanceToGoal < 16.f ) {
v = physics->GetAngularVelocity(id);
if ( v.LengthSqr() > Square(8) ) {
physics->SetAngularVelocity( v * 0.99999f, id );
}
if ( distanceToGoal < 16.f ) {
v = physics->GetAngularVelocity(id);
if ( v.LengthSqr() > Square(8) ) {
physics->SetAngularVelocity( v * 0.99999f, id );
}
}
} else {
if ( distanceToGoal < 128.0f ) {
v = physics->GetLinearVelocity( id );
if ( distanceToGoal <= 1.0f )
physics->SetLinearVelocity( vec3_origin, id );
else
physics->SetLinearVelocity( v * damping, id );
}
physics->SetAngularVelocity( vec3_origin, id );
}
// <---sikk
}
/*

View file

@ -60,7 +60,7 @@ public:
public: // common force interface
virtual void Evaluate( int time );
virtual void Evaluate( int time, bool grabber ); // sikk - Use Function: Object Manipualtion - Added the grabber arg
virtual void RemovePhysics( const idPhysics *phys );
// Get the distance from object to goal position