nyuuzyou/wikis huggingface dataset:
FireBullets()

FireBullets() is a method which handles damage for any hitscan weapon. It is passed FireBulletsInfo_t as its required parameter, which describes the bullet in question.
== Members ==
info
:Name given to the FireBulletsInfo struct that is passed into method.
pAmmoDef 
:Stores the ammo definition in a pointer.
flActualDamage
:Used to store the actual damage to be done to entity.
iPlayerDamage
:If it's deemed we are damaging a player, this is used instead of flActualDamage
tr
:TraceLine used when the weapon fired. tr.m_pEnt is the entity that was intersected e.g. NPC, crate, wall.
== Damage ==
This is the core function where the damage is done to the entity. DispatchTraceAttack is passed dmgInfo which contains the attacker, damage value and damage type.
 CTakeDamageInfo dmgInfo( this, pAttacker, flActualDamage, nActualDamageType );
 CalculateBulletDamageForce( &dmgInfo, info.m_iAmmoType, vecDir, tr.endpos );
 dmgInfo.ScaleDamageForce( info.m_flDamageForceScale );
 dmgInfo.SetAmmoType( info.m_iAmmoType );
 tr.m_pEnt->DispatchTraceAttack( dmgInfo, vecDir, &tr );
== See also ==
* AmmoDef
* FireBulletsInfo t
* TraceLine
Category:Weapons programming
FireBulletsInfo t

FireBulletsInfo_t is a struct that describes a batch of hitscan bullets. An object of this type is normally created by a weapon before being passed, as a required parameter, to CBaseEntity::FireBullets(). 
== Members ==
; int m_iShots
: Number of bullets in this batch. Rapid-fire weapons should be able to queue up several bullets at once if the framerate is low, like this: 
: while (NextPrimaryAttack <= curtime) { mybullets.m_iShots++; NextPrimaryAttack += fireRate; }
; Vector m_vecSrc
; Vector m_vecDirShooting
: Location to shoot from and direction to shoot in. Normally assigned CBasePlayer::Weapon_ShootPosition() and CBasePlayer::GetAutoaimVector(AUTOAIM_SCALE_DEFAULT) respectively.
; Vector m_vecSpread
: A "cone of fire" within which bullets will be spread at random (but see m_nFlags). You can use the various VECTOR_CONE_ #defines to avoid maths.
; float m_flDistance
: Maximum trace length. Bullets travel this far then disappear.
; int m_iAmmoType
: AmmoDef index for the type of bullet being fired.
; int m_iTracerFreq
: How often visible tracers should be created. 
; int m_iDamage
; int m_iPlayerDamage
: Amount of damage to do. PlayerDamage is a special override that determines how much damage should be done if a player is hit.
; int m_nFlags
: Generic flag bitstring - see FireBulletsFlags_t. Stock choices are:
:; FIRE_BULLETS_FIRST_SHOT_ACCURATE
:: Fire the first shot with perfect accuracy.
:; FIRE_BULLETS_DONT_HIT_UNDERWATER
:: If the shot hits its target underwater, don't damage it.
:; FIRE_BULLETS_ALLOW_WATER_SURFACE_IMPACTS
:: If the shot hits water surface, still call DoImpactEffect().
:; FIRE_BULLETS_TEMPORARY_DANGER_SOUND
:: Danger sounds added from this impact can be stomped immediately if another is queued.
; float m_flDamageForceScale
: Multiplier for VPhysics forces created by the bullets.
; CBaseEntity* m_pAttacker
: The entity which is attacking. Defaults to the one which FireBullets().
; CBaseEntity* m_pAdditionalIgnoreEnt
: The gun and its owner are ignored when tracing the path of the bullets. This allows another entity to be ignored also.
; bool m_bPrimaryAttack
: Whether the attack is primary fire or not. Only checked by the game stats system.
== See also ==
* TraceLine
* AmmoDef
Category:Weapons programmingCategory:Structures
FireSoft Half-Life MDL Converter

FireSoft Half-Life MDL Converter (FMC) is a semi-automatic converter to convert a model made for the Source Engine to a format understandable for the GoldSRC Engine.
The model should be put in the folder modelsrc\models.
Run mdldecompiler.exe and decompile the model.
Then start compiler.bat and if you're lucky you get a model ready for use in the GoldSRC Engine.
One of the features of this compiler is that it can compile a model even if it has no texture. If necessary, it makes one.
== Changelog ==
Fixed compilation ragdoll and animations with simple parameters.
Fixed bug with attached sometimes arises because of defects decompilation.
Optimised code handler textures.
Fixed a bug with the size of textures.
== Download ==
* FMC 0.7b - Download mirror for the latest version.
Category:Fire Soft
Category:Third Party Tools
Category:Tools
Category:Modeling
FireSoft MS3D to SMD converter

FireSoft MS3D to SMD (FSMS) is a converter of 3D models, allowing to convert the MS3D model used by the program MilkShape 3D into the format used by the SMD models compiler Studiomdl.
== See also ==
* FSMS 0.53b - download mirror for the latest version.
Category:Fire Soft
Category:Third Party Tools
Category:Tools
Category:Modeling
Firesmoke

This is the group of particle effects created by an , including the flames. It does no damage. The entity is not intended to be used directly, so it lacks the keyvalues from env_fire used to configure the flame, as these parameters are normally set through code. It is otherwise functional on its own, though.
If a fire shouldn't damage things, or is unable to, this entity could be used directly to save an edict (as normally this plus the source env_fire would be 2). That being said, an set to display the corresponding env_fire particles may be a better alternative to this, as it allows choosing the size of the fire and toggling it, although this will not respect the classic effects setting in .
env_fire_modern.png|The modern particle-based fire effects, used in current versions of most games.
env_fire_classic.png|The classic sprite-based fire effects, used prior to and in modern HL2 if the "classic effects" setting is enabled.
== Keyvalues ==
==FGD Code==
 point class. In-editor sprite is based upon "classic" (pre-Orange Box) flame effect.
_
_
_
First Person Fix

The following fix is for angles on first person spectating not updating, especially when you have followed the spectator-tutorial at Wavelength.
This fix was taken from the HL Coders mail list.
The original text was writen by Ben "Obike" Everett 
Hah, thanks for giving me a reason to hunt this one down.
The Forsaken testers have been after me a while to fix it...
anyways... here you go. A fix.
Enjoy!
P.S. The cause of this is in baseplayer_shared when calling EyeAngles.
It returns pl.v_angle which is initialized to a zero-vector.
By enabling it to be sent over the network this resolves the issue.
----
Step 1
In PlayerState.h around line 34 change:
 QAngle v_angle;
to
 CNetworkQAngle(v_angle);
Step 2
In player.cpp around line 6484 add in after sending the dead flag:
 SendPropQAngles (SENDINFO(v_angle), 13),
Step 3
In c_baseplayer.cpp around line 85 add in after receiving the dead flag:
 RecvPropQAngles (RECVINFO(v_angle)),
Step 4
You must make all calls to v_angle safe. In baseplayer_shared.cpp around line 211 add in:
 if (!pMoveParent)
 {
 return pl.v_angle.Get();
 }
Around line 216 change AngleMatrix to use 
 pl.v_angle.Get()
Around line 227 change the return value of LocalEyeAngles to 
 pl.v_angle.Get()
Step 5
In prediction.cpp around line 1700 in GetLocalViewAngles change the else portion to:
 else
 {
 ang = player->pl.v_angle.Get();
 }
Step 6
In c_baseplayer.cpp around line 437 in the function SetLocalViewAngles change that to:
 pl.v_angle.GetForModify() = viewAngles;
Step 7
In player.cpp around line 598 in SnapEyeAngles change 
 pl.v_angle = viewAngles; 
to 
 pl.v_angle.GetForModify() = viewAngles;
Around line 2914 in the function PhysicsSimulate change 
 VectorCopy ( pl.v_angle, ctx->cmds[ i ].viewangles ); 
to 
 VectorCopy ( pl.v_angle.GetForModify(), ctx->cmds[ i ].viewangles );
Around line 3052 in PlayerRunCommand change 
 VectorCopy ( ucmd->viewangles, pl.v_angle ); 
to 
 VectorCopy ( ucmd->viewangles, (QAngle)pl.v_angle.Get() );
Around line 3056 in the same function change 
 VectorCopy ( pl.v_angle, ucmd->viewangles ); 
to 
 VectorCopy ( pl.v_angle.GetForModify(), ucmd->viewangles );
Around line 4427 in the function Restore change 
 QAngle newViewAngles = pl.v_angle; 
to 
 QAngle newViewAngles = pl.v_angle.Get();
Step 8
In player_command.cpp around line 177 in SetupMove change 
 move->m_vecAngles = player->pl.v_angle; 
to 
 move->m_vecAngles = player->pl.v_angle.Get();
Around line 362 in RunCommand change 
 g_pMoveData->m_vecOldAngles = player->pl.v_angle; 
to 
 g_pMoveData->m_vecOldAngles = player->pl.v_angle.Get();
Around line 367 in RunCommand change 
 player->pl.v_angle = ucmd->viewangles; 
to 
 player->pl.v_angle.GetForModify() = ucmd->viewangles;
Around line 371 in RunCommand change 
 player->pl.v_angle = ucmd->viewangles + player->pl.anglechange; 
to 
 player->pl.v_angle.GetForModify() = ucmd->viewangles + player->pl.anglechange;
Category:Programming
First Strike

First Strike is an action FPS set in the Half-Life 2 universe six days after the destruction of Nova Prospekt.
==Storyline==
The player will travel back from the Lighthouse, where Gordon Freeman leaves his jeep, to City 17 in order to lead the uprising against the Combine. Matt (last name not decided yet), the main character who was a rebel leader before being captured by the Combine, was put on a train outbound from Nova Prospekt by Alyx shortly before Gordon meets up with Alyx. He is on the train heading away from Nova Prospekt when it explodes and causes his train to crash. 
*There is an intro movie that shows all of this.
==History==
This storyline was put together by Colin Bissbort and Matt Webster (the main character is named after him) in mid December 2009.
==Team==
Colin Bissbort - Mapping, Face Poser, Team Leader
Matt Webster - Voice Actor
Hunter Short - Composer and Musician.
==News==
The mod is currently on hold until I can figure out why the hell Face Poser will not display/locate/recognize my sound files.
Fistful of Frags

is a multiplayer game using the engine branch.
== Overview ==
First person shooter set in the Old West times. Take part in frenzy team versus shootouts or play cooperative games against AI managed enemies. Most of the classic black powder guns are available, in single or dual wield setup.
== Features ==
* Fistful of Dollars/Few Dollars More modes: capture loot up to a maximum amount of cash required to win the round. Protect friendly carriers and try to steal loot from enemies. Teamplay, coordination and timing are a must.
* Additional team vs modes featuring classic gameplay such as territorial control or train robbery.
* Cooperative/singleplayer missions: push the cart, escort, last stand, etc. Up to 8 players supported.
* Deathmatch, includes bots to improve your skills off-line.
* Duel tournament with free aim revolvers for enhanced realism.
* Notoriety player progression system: measures player contribution in several areas (combat, objectives and teamplay).
* Equipment and player full customization: spend your notoriety points in the exact weaponry, skills and visual customization you want.
* Dual wield guns: any of our 6 hand guns can be combined in any way you want.
* Available weapons: fists, knife, axe, Colt Navy 1851, Colt SAA "Peacemaker", S&W Schofield, Colt Walker 1847, Mare's Leg (sawed off Winchester rifle), Deringer .41, double barrel shotgun, Henry repeating rifle 1860, Smith carbine 1857, Winchester 1893 pump shotgun, Sharps rifle 1874, dynamite, and bow with normal/fiery arrows! 
* Heal your teammates using whiskey
== Media ==
== See also ==
* , a mod with similar concept for 
== External links ==
* YouTube - official channel
* Fistful of Frags - official website (archived).
* 
Category:Multiplayer Mods
FixVTF

FixVTF is a program written by Snakez. It converts format (VTF 7.3/7.4) materials to the previous (VTF 7.2 and older) format. used format materials, models and maps until the official release of on October 10, 2007, after which point FixVTF became essentially obsolete. For some years this program was not available for direct download.
== External links ==
* FixVTF at Google Drive
Category:Third Party Tools
Fix Missing Player Animations

By default, the Source 2009 SDK includes source code that makes several calls to swimming animations that do not yet exist with the current player animations. As a result, whenever water goes above a player's waist, the models go into their reference pose.
To fix this issue, open and in the function, 
Change:
idealActivity = ACT_MP_SWIM;
...to...
idealActivity = ACT_MP_RUN;
Now, whenever water goes up to a player's waist, the code will call for the run animation, which is a good alternative because it already exists and makes the player look like they are swimming and wading through the water.
Category:Tutorials
Category:Programming
Category:Bug fixes
Fix Visual Studio Warning Level Error

==What is it?==
If your warning level is set too high when building Source 2013 SDK under Visual Studio 2013, some negligible errors will be taken seriously by the compiler. 
These errors can be ignored, but Visual Studio doesn't think so.
If your warning level is set to Level 3 (/W3), which is the default, Visual Studio will not let VPC continue to generate client.dll or server.dll when building. 
Although all the .obj files in the project will be generated, the compiler will still not call VPC to generate the final files we want because it thinks these errors are serious and cannot be ignored.
Microsoft has also published articles explaining this. Please click this link to visit the official Microsoft article [Compiler Warning (level 3) C4800]
Fixing CSGO particle editor

This page will go over how to make Particle Editor functionable.
== Preface ==
* This page does not go over how to make custom particles appear in game.
: This page only shows to fix the Particle Editor tool itself.
== The Issue ==
* Particle Editor is a direct port of the Particle Editor.
: This version has a check while loading the file. If the PCF file doesn't have /game/ folder in its full path then it will error out, resulting not being able to open any file.
* It is also missing few translation files so most of the UI is using raw translation keywords.
== The Fix ==
* Download this .zip (Patched .dll by xen#2982) which contains a patched pet_fix.dll so the whole game folder check is skipped, it also contains the necessary resource files for the Particle Editor.
: Simply drop both folders in your Counter-Strike Global Offensive folder and it will put the files in correct place.
== How to open the Particle Editor ==
* Add to your game launch options.
* If Particle Editor is not already open, either use the drop down Tools menu to switch from vmt Editor to Particle Editor or type in console.
==See also==
*Particle System
Category:Particle Effects
Category: Particle System
Fixing DXT Green Tint Compression

In the Source Engine, textures are stored using the Valve Texture Format (VTF), which can store image data in a great variety of formats. The most common and standard ones are the lossy and compression-based DXT1 (used for textures with no alpha channel) and DXT5 (used for textures with an alpha channel). Due to the technical nature of these format’s sampling methods, a slightly green-tinted output is generated whenever sampling colors from these formats. Usually, this altered result would merit no tampering. However, if a project requires both a texture and a modified version to be side by side, differences will inevitably become evident, calling for a workaround to be implemented.
A natural solution would be to store the texture using a different format, such as an uncompressed and, therefore, lossless one, like BGR888 or BGRA8888. However, these formats will considerably increase file size and VRAM usage, demanding for yet another workaround to be implemented.
==Steps==
# Open the original texture in the image editor of your choice.
# Create a blank layer with alpha channel support on top of the original texture.
# Bucket-fill the new layer with RGB 7 3 7 (HTML notation #070307).
# Copy the original texture and paste it into the alpha channel of the new layer.
# Set the layer mode to Legacy Addition (GIMP),[1] Linear Dodge (Add) (Photoshop) or the equivalent addition-based blend mode of your editor.
# Flatten the image if the texture has no transparency. Otherwise, merge all visible layers.
# Export as TGA and convert to VTF using VTFEdit. For the image data format, use either DXT1 or DXT5, depending on your source material.
===Footnotes===
# For GIMP 2.10, the entire program was ported to the GEGL image processing library, which is based around linear RGB color space as opposed to gamma-corrected (perceptual) RGB color space, which modifies the behavior of several blending modes. This is why switching blending modes from Normal to Legacy is required; for pre-2.10 backwards compatibility.
==See also==
* Restoring Texture After DXT Compression
Category:Material System
Category:Technical
Category:Tutorials
Fixing Per-Material Footsteps in HL2MP

The information has been taken from the Prop Footsteps page, as these steps are required before making that fix. But, I have found that in Source SDK 2013 MP, Footsteps are not correct until these steps have been taken.
==Code Changes==
===src\cl_dll\hl2mp\c_hl2mp_player.h===
====Prototype Removal====
* PlayStepSound
* PrecacheFootStepSounds
===src\game_shared\hl2mp\hl2mp_player_shared.cpp===
====Symbol Removal====
* PlayStepSound
* PrecacheFootStepSounds
===src\dlls\hl2mp_dll\hl2mp_player.cpp===
====Precache====
In function CHL2MP_Player::Precache	In function CHL2MP_Player::Precache
Remove 		PrecacheFootStepSounds();
===src\dlls\hl2mp_dll\hl2mp_player.h===
====Prototype Removal====
* PlayStepSound
* PrecacheFootStepSounds
Fixing first time HL2DM compile problems

==The Error==
If this is the first time you compiled a HL2DM project you may get an error that looks like this:
Build: 1 succeeded, 1 failed, 0 up-to-date 0, skipped
And somewhere in the output log, you will may or may-not have something something similar to this:
2>grenade_tripmine.cpp
2>.\hl2mp\grenade_tripmine.cpp(276) : error C2039: 'OnTakeDamage_Alive' : is not a member of 'CBaseGrenade'
2> c:\moddir\src\game\shared\basegrenade_shared.h(34) : see declaration of 'CBaseGrenade'
This is not your fault, it is a code error!
==The Fix==
The problem is to do with this small code block being defined wrongly:
return BaseClass::OnTakeDamage_Alive( info );
It should actually look like this:
return OnTakeDamage_Alive( info );
This will correct all the errors throughout the project.
Then hit build solution, and you will have your mod up and running!
==Notes==
This may be to-do with this fix or not, but the side effect I get is the game window minimises and maximises rapidly, and to stop it, you need to Start+D out of it once it is assumed the menu loads up, then click back on the "Moddnamehere" in the stat bar to get it back up.
If your mod fails you in any aspects, follow this https://developer.valvesoftware.com/wiki/Compiling_under_VS2008#Fix_grenade_tripmine.cpp
Category:Tutorials
Category:Programming
Category:Help
Fixing lighting on a static prop

thumb|right|alt=prop_static settings|The proper compile syntaxLightmapped prop_static entities do not always get lit correctly. If this is the case, you will need to do the following:
# Turn on expert compiling.
# In the "Compile/run commands:" box, click on the $light_exe option.
# Add the following to the command parameters before "-game":
#* -final
#* -both
#* -StaticPropPolys
#* -TextureShadows
#* -staticproplighting
Static props will now give off the correct shadows.
Fixing the "Can't find filesystemopendialog.dll" error

This is an error that occurs when starting the Hammer World Editor, and can be fixed by following the guide below.
== Fixing the Error ==
The error is caused by not having a local copy of this file, and can be fixed by doing the following:
* Play Half-Life 2, Half-Life 2: Deathmatch, or Counter-Strike: Source.
* Play the mod you're mapping/modding for (if you're mapping for a mod).
* Check the GameInfo.txt file. Some mods use a certain game to run, and may not be set up properly.
* In GameInfo.txt, when ToolsAppId is set to AppId, you may also experience this error. Try changing ToolsAppId.
* If you are attempting to run Hammer on The Ship SDK and receive this error, you must execute the batch file to start the Source SDK.
=== SDK Update Fix ===
Since the 7th November (2007) SDK update, you will encounter this error when using games that use the Episode One engine (HL2, CS:S, EP 1, and all mods). To fix this temporarily, you can switch back to the older engine until a fix is released:
# In Steam, right-click on Source SDK and choose Properties.
# Under the General tab, click on the Set launch options… button.
# Type -engine ep1 in the dialog box, and click OK.
# Click on Close to return to the regular Steam window.
To switch back to the new engine, follow the same steps as above, but instead type -engine orangebox into the dialog box.
Category:Source SDK FAQCategory:The Ship
Fixing the Dropship gun

== Introduction ==
In , at launch (2004) to , the Dropship gun rotation was functional, but after Valve ported Half-Life 2 to the New Engine (since /Orange Box), the Dropship gun rotation was completely broken, preventing it from shooting unless the player stands in the front of the Dropship. This issue was fixed on PC in 2022, but remains unfixed on console port (, ), aswell as the SDK itself (, ).
This article explains the process of fixing gun rotation being broken in Source engine.
== Fixing the Gun's Rotation ==
Copy the contents of this page, (courtesy of GRAI+) and use it to replace — You're done! 
Alternatively, if you wish to edit the code, the main change it does is add these two lines at the top of CNPC_CombineDropship::UpdateContainerGunFacing, immediately following the assertion statement:
m_poseWeapon_Pitch = m_hContainer->LookupPoseParameter("weapon_pitch");
m_poseWeapon_Yaw = m_hContainer->LookupPoseParameter("weapon_yaw");
D D
Fixing trigger gravity

=== ===
Currently the trigger_gravity brush entity doesn't actually function properly.
To fix gravity triggers, navigate to triggers.cpp, around line 2651 you should find this:
class CTriggerGravity : public CBaseTrigger
{
public:
	DECLARE_CLASS( CTriggerGravity, CBaseTrigger );
	DECLARE_DATADESC();
	void Spawn( void );
	void GravityTouch( CBaseEntity *pOther );
};
LINK_ENTITY_TO_CLASS( trigger_gravity, CTriggerGravity );
BEGIN_DATADESC( CTriggerGravity )
	// Function Pointers
	DEFINE_FUNCTION(GravityTouch),
END_DATADESC()
void CTriggerGravity::Spawn( void )
{
	BaseClass::Spawn();
	InitTrigger();
	SetTouch( &CTriggerGravity::GravityTouch );
}
void CTriggerGravity::GravityTouch( CBaseEntity *pOther )
{
	// Only save on clients
	if ( !pOther->IsPlayer() )
		return;
	pOther->SetGravity( GetGravity() );
}
replace the whole class, functions and all with this:
class CTriggerGravity : public CTriggerMultiple
{
public:
	DECLARE_CLASS(CTriggerGravity, CTriggerMultiple);
	DECLARE_DATADESC();
	void Spawn( void );
	void StartTouch(CBaseEntity *pOther);
	void EndTouch(CBaseEntity *pOther);
};
LINK_ENTITY_TO_CLASS( trigger_gravity, CTriggerGravity );
BEGIN_DATADESC( CTriggerGravity )
	// Function Pointers
	DEFINE_FUNCTION(StartTouch),
	DEFINE_FUNCTION(EndTouch),
END_DATADESC()
void CTriggerGravity::Spawn( void )
{
	BaseClass::Spawn();
	InitTrigger();
	//SetTouch( &CTriggerGravity::GravityTouch );
}
void CTriggerGravity::StartTouch( CBaseEntity *pOther )
{
	// Only save on clients
	//if ( !pOther->IsPlayer() )
	//	return;
	pOther->SetGravity( GetGravity() );
}
void CTriggerGravity::EndTouch(CBaseEntity *pOther)
{
	// Only save on clients
	//if ( !pOther->IsPlayer() )
	//	return;
	pOther->SetGravity(1);
}
trigger_gravity should work fine now on players, but still won't change a physics object's gravity.
Category:Tutorials