1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: A gib is a chunk of a body, or a piece of wood/metal/rocks/etc.
//
// $Workfile: $
// $Date: $
// $NoKeywords: $
//===========================================================================//
#include "cbase.h"
#include "gib.h"
#include "soundent.h"
#include "func_break.h" // For materials
#include "player.h"
#include "vstdlib/random.h"
#include "ai_utils.h"
#include "EntityFlame.h"
// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"
extern Vector g_vecAttackDir; // In globals.cpp
BEGIN_DATADESC( CGib )
// gibs are not saved/restored
// DEFINE_FIELD( m_bloodColor, FIELD_INTEGER ),
// DEFINE_FIELD( m_hSprite, FIELD_EHANDLE ),
// DEFINE_FIELD( m_cBloodDecals, FIELD_INTEGER ),
// DEFINE_FIELD( m_material, FIELD_INTEGER ),
// DEFINE_FIELD( m_lifeTime, FIELD_TIME ),
// DEFINE_FIELD( m_pSprite, CSprite ),
// DEFINE_FIELD( m_hFlame, FIELD_EHANDLE ),
// DEFINE_FIELD( m_hPhysicsAttacker, FIELD_EHANDLE ),
// DEFINE_FIELD( m_flLastPhysicsInfluenceTime, FIELD_TIME ),
// DEFINE_FIELD( m_bForceRemove, FIELD_BOOLEAN ),
// Function pointers
DEFINE_ENTITYFUNC( BounceGibTouch ),
DEFINE_ENTITYFUNC( StickyGibTouch ),
DEFINE_THINKFUNC( WaitTillLand ),
DEFINE_THINKFUNC( DieThink ),
END_DATADESC()
// HACKHACK -- The gib velocity equations don't work
void CGib::LimitVelocity( void )
{
Vector vecNewVelocity = GetAbsVelocity();
float length = VectorNormalize( vecNewVelocity );
// ceiling at 1500. The gib velocity equation is not bounded properly. Rather than tune it
// in 3 separate places again, I'll just limit it here.
if ( length > 1500.0 )
{
vecNewVelocity *= 1500; // This should really be sv_maxvelocity * 0.75 or something
SetAbsVelocity( vecNewVelocity );
}
}
void CGib::SpawnStickyGibs( CBaseEntity *pVictim, Vector vecOrigin, int cGibs )
{
int i;
if ( g_Language.GetInt() == LANGUAGE_GERMAN )
{
// no sticky gibs in germany right now!
return;
}
for ( i = 0 ; i < cGibs ; i++ )
{
CGib *pGib = (CGib *)CreateEntityByName( "gib" );
pGib->Spawn( "models/stickygib.mdl" );
pGib->m_nBody = random->RandomInt(0,2);
if ( pVictim )
{
pGib->SetLocalOrigin(
Vector( vecOrigin.x + random->RandomFloat( -3, 3 ),
vecOrigin.y + random->RandomFloat( -3, 3 ),
vecOrigin.z + random->RandomFloat( -3, 3 ) ) );
// make the gib fly away from the attack vector
Vector vecNewVelocity = g_vecAttackDir * -1;
// mix in some noise
vecNewVelocity.x += random->RandomFloat ( -0.15, 0.15 );
vecNewVelocity.y += random->RandomFloat ( -0.15, 0.15 );
vecNewVelocity.z += random->RandomFloat ( -0.15, 0.15 );
vecNewVelocity *= 900;
QAngle vecAngVelocity( random->RandomFloat ( 250, 400 ), random->RandomFloat ( 250, 400 ), 0 );
pGib->SetLocalAngularVelocity( vecAngVelocity );
// copy owner's blood color
pGib->SetBloodColor( pVictim->BloodColor() );
pGib->AdjustVelocityBasedOnHealth( pVictim->m_iHealth, vecNewVelocity );
pGib->SetAbsVelocity( vecNewVelocity );
pGib->SetMoveType( MOVETYPE_FLYGRAVITY );
pGib->RemoveSolidFlags( FSOLID_NOT_SOLID );
pGib->SetCollisionBounds( vec3_origin, vec3_origin );
pGib->SetTouch ( &CGib::StickyGibTouch );
pGib->SetThink (NULL);
}
pGib->LimitVelocity();
}
}
void CGib::SpawnHeadGib( CBaseEntity *pVictim )
{
CGib *pGib = CREATE_ENTITY( CGib, "gib" );
if ( g_Language.GetInt() == LANGUAGE_GERMAN )
{
pGib->Spawn( "models/germangibs.mdl" );// throw one head
pGib->m_nBody = 0;
}
else
{
pGib->Spawn( "models/gibs/hgibs.mdl" );// throw one head
pGib->m_nBody = 0;
}
if ( pVictim )
{
Vector vecNewVelocity = pGib->GetAbsVelocity();
pGib->SetLocalOrigin( pVictim->EyePosition() );
edict_t *pentPlayer = UTIL_FindClientInPVS( pGib->edict() );
if ( random->RandomInt ( 0, 100 ) <= 5 && pentPlayer )
{
// 5% chance head will be thrown at player's face.
CBasePlayer *player = (CBasePlayer *)CBaseEntity::Instance( pentPlayer );
if ( player )
{
vecNewVelocity = ( player->EyePosition() ) - pGib->GetAbsOrigin();
VectorNormalize(vecNewVelocity);
vecNewVelocity *= 300;
vecNewVelocity.z += 100;
}
}
else
{
vecNewVelocity = Vector (random->RandomFloat(-100,100), random->RandomFloat(-100,100), random->RandomFloat(200,300));
}
QAngle vecNewAngularVelocity = pGib->GetLocalAngularVelocity();
vecNewAngularVelocity.x = random->RandomFloat ( 100, 200 );
vecNewAngularVelocity.y = random->RandomFloat ( 100, 300 );
pGib->SetLocalAngularVelocity( vecNewAngularVelocity );
// copy owner's blood color
pGib->SetBloodColor( pVictim->BloodColor() );
pGib->AdjustVelocityBasedOnHealth( pVictim->m_iHealth, vecNewVelocity );
pGib->SetAbsVelocity( vecNewVelocity );
}
pGib->LimitVelocity();
}
//-----------------------------------------------------------------------------
// Blood color (see BLOOD_COLOR_* macros in baseentity.h)
//-----------------------------------------------------------------------------
void CGib::SetBloodColor( int nBloodColor )
{
m_bloodColor = nBloodColor;
}
//------------------------------------------------------------------------------
// A little piece of duplicated code
//------------------------------------------------------------------------------
void CGib::AdjustVelocityBasedOnHealth( int nHealth, Vector &vecVelocity )
{
if ( nHealth > -50)
{
vecVelocity *= 0.7;
}
else if ( nHealth > -200)
{
vecVelocity *= 2;
}
else
{
vecVelocity *= 4;
}
}
//------------------------------------------------------------------------------
// Purpose : Initialize a gibs position and velocity
// Input :
// Output :
//------------------------------------------------------------------------------
void CGib::InitGib( CBaseEntity *pVictim, float fMinVelocity, float fMaxVelocity )
{
// ------------------------------------------------------------------------
// If have a pVictim spawn the gib somewhere in the pVictim's bounding volume
// ------------------------------------------------------------------------
if ( pVictim )
{
// Find a random position within the bounding box (add 1 to Z to get it out of the ground)
Vector vecOrigin;
pVictim->CollisionProp()->RandomPointInBounds( vec3_origin, Vector( 1, 1, 1 ), &vecOrigin );
vecOrigin.z += 1.0f;
SetAbsOrigin( vecOrigin );
// make the gib fly away from the attack vector
Vector vecNewVelocity = g_vecAttackDir * -1;
// mix in some noise
vecNewVelocity.x += random->RandomFloat ( -0.25, 0.25 );
vecNewVelocity.y += random->RandomFloat ( -0.25, 0.25 );
vecNewVelocity.z += random->RandomFloat ( -0.25, 0.25 );
vecNewVelocity *= random->RandomFloat ( fMaxVelocity, fMinVelocity );
QAngle vecNewAngularVelocity = GetLocalAngularVelocity();
vecNewAngularVelocity.x = random->RandomFloat ( 100, 200 );
vecNewAngularVelocity.y = random->RandomFloat ( 100, 300 );
SetLocalAngularVelocity( vecNewAngularVelocity );
// copy owner's blood color
SetBloodColor( pVictim->BloodColor() );
AdjustVelocityBasedOnHealth( pVictim->m_iHealth, vecNewVelocity );
// Attempt to be physical if we can
if ( VPhysicsInitNormal( SOLID_BBOX, 0, false ) )
{
IPhysicsObject *pObj = VPhysicsGetObject();
if ( pObj != NULL )
{
AngularImpulse angImpulse = RandomAngularImpulse( -500, 500 );
pObj->AddVelocity( &vecNewVelocity, &angImpulse );
}
}
else
{
SetSolid( SOLID_BBOX );
SetCollisionBounds( vec3_origin, vec3_origin );
SetAbsVelocity( vecNewVelocity );
}
SetCollisionGroup( COLLISION_GROUP_DEBRIS );
}
LimitVelocity();
}
//------------------------------------------------------------------------------
// Purpose : Given an .mdl file with gibs and the number of gibs in the file
// spawns them in pVictim's bounding box
// Input :
// Output :
//------------------------------------------------------------------------------
void CGib::SpawnSpecificGibs( CBaseEntity* pVictim,
int nNumGibs,
float vMinVelocity,
float vMaxVelocity,
const char* cModelName,
float flLifetime)
{
for (int i=0;i<nNumGibs;i++)
{
CGib *pGib = CREATE_ENTITY( CGib, "gib" );
pGib->Spawn( cModelName );
pGib->m_nBody = i;
pGib->InitGib( pVictim, vMinVelocity, vMaxVelocity );
pGib->m_lifeTime = flLifetime;
if ( pVictim != NULL )
{
pGib->SetOwnerEntity( pVictim );
}
}
}
//------------------------------------------------------------------------------
// Purpose : Spawn random gibs of the given gib type
// Input :
// Output :
//------------------------------------------------------------------------------
void CGib::SpawnRandomGibs( CBaseEntity *pVictim, int cGibs, GibType_e eGibType )
{
int cSplat;
for ( cSplat = 0 ; cSplat < cGibs ; cSplat++ )
{
CGib *pGib = CREATE_ENTITY( CGib, "gib" );
if ( g_Language.GetInt() == LANGUAGE_GERMAN )
{
pGib->Spawn( "models/germangibs.mdl" );
pGib->m_nBody = random->RandomInt(0,GERMAN_GIB_COUNT-1);
}
else
{
switch (eGibType)
{
case GIB_HUMAN:
// human pieces
pGib->Spawn( "models/gibs/hgibs.mdl" );
pGib->m_nBody = random->RandomInt(1,HUMAN_GIB_COUNT-1);// start at one to avoid throwing random amounts of skulls (0th gib)
break;
case GIB_ALIEN:
// alien pieces
pGib->Spawn( "models/gibs/agibs.mdl" );
pGib->m_nBody = random->RandomInt(0,ALIEN_GIB_COUNT-1);
break;
}
}
pGib->InitGib( pVictim, 300, 400);
}
}
//=========================================================
// WaitTillLand - in order to emit their meaty scent from
// the proper location, gibs should wait until they stop
// bouncing to emit their scent. That's what this function
// does.
//=========================================================
void CGib::WaitTillLand ( void )
{
if (!IsInWorld())
{
UTIL_Remove( this );
return;
}
if ( GetAbsVelocity() == vec3_origin )
{
SetRenderColorA( 255 );
m_nRenderMode = kRenderTransTexture;
if ( GetMoveType() != MOVETYPE_VPHYSICS )
{
AddSolidFlags( FSOLID_NOT_SOLID );
}
SetLocalAngularVelocity( vec3_angle );
SetNextThink( gpGlobals->curtime + m_lifeTime );
SetThink ( &CGib::SUB_FadeOut );
if ( GetSprite() )
{
CSprite *pSprite = dynamic_cast<CSprite*>( GetSprite() );
if ( pSprite )
{
//Adrian - Why am I doing this? Check InitPointGib for the answer!
if ( m_lifeTime == 0 )
m_lifeTime = random->RandomFloat( 1, 3 );
pSprite->FadeAndDie( m_lifeTime );
}
}
if ( GetFlame() )
{
CEntityFlame *pFlame = dynamic_cast< CEntityFlame*>( GetFlame() );
if ( pFlame )
{
pFlame->SetLifetime( 1.0f );
}
}
// If you bleed, you stink!
if ( m_bloodColor != DONT_BLEED )
{
// ok, start stinkin!
// FIXME: It's too easy to fill up the sound queue with all these meat sounds
// CSoundEnt::InsertSound ( SOUND_MEAT, GetAbsOrigin(), 384, 25 );
}
}
else
{
// wait and check again in another half second.
SetNextThink( gpGlobals->curtime + 0.5f );
}
}
bool CGib::SUB_AllowedToFade( void )
{
if( VPhysicsGetObject() )
{
if( VPhysicsGetObject()->GetGameFlags() & FVPHYSICS_PLAYER_HELD || GetEFlags() & EFL_IS_BEING_LIFTED_BY_BARNACLE )
return false;
}
CBasePlayer *pPlayer = ( AI_IsSinglePlayer() ) ? UTIL_GetLocalPlayer() : NULL;
if ( pPlayer && pPlayer->FInViewCone( this ) && m_bForceRemove == false )
{
return false;
}
return true;
}
void CGib::DieThink ( void )
{
if ( GetSprite() )
{
CSprite *pSprite = dynamic_cast<CSprite*>( GetSprite() );
if ( pSprite )
{
pSprite->FadeAndDie( 0.0 );
}
}
if ( GetFlame() )
{
CEntityFlame *pFlame = dynamic_cast< CEntityFlame*>( GetFlame() );
if ( pFlame )
{
pFlame->SetLifetime( 1.0f );
}
}
if ( g_pGameRules->IsMultiplayer() )
{
UTIL_Remove( this );
}
else
{
SetThink ( &CGib::SUB_FadeOut );
SetNextThink( gpGlobals->curtime );
}
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CGib::Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value )
{
CBasePlayer *pPlayer = ToBasePlayer( pActivator );
if ( pPlayer )
{
pPlayer->PickupObject( this );
}
}
//-----------------------------------------------------------------------------
// Physics Attacker
//-----------------------------------------------------------------------------
void CGib::SetPhysicsAttacker( CBasePlayer *pEntity, float flTime )
{
m_hPhysicsAttacker = pEntity;
m_flLastPhysicsInfluenceTime = flTime;
}
//-----------------------------------------------------------------------------
// Purpose: Keep track of physgun influence
//-----------------------------------------------------------------------------
void CGib::OnPhysGunPickup( CBasePlayer *pPhysGunUser, PhysGunPickup_t reason )
{
SetPhysicsAttacker( pPhysGunUser, gpGlobals->curtime );
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CGib::OnPhysGunDrop( CBasePlayer *pPhysGunUser, PhysGunDrop_t Reason )
{
SetPhysicsAttacker( pPhysGunUser, gpGlobals->curtime );
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
CBasePlayer *CGib::HasPhysicsAttacker( float dt )
{
if (gpGlobals->curtime - dt <= m_flLastPhysicsInfluenceTime)
{
return m_hPhysicsAttacker;
}
return NULL;
}
//
// Gib bounces on the ground or wall, sponges some blood down, too!
//
void CGib::BounceGibTouch ( CBaseEntity *pOther )
{
Vector vecSpot;
trace_t tr;
IPhysicsObject *pPhysics = VPhysicsGetObject();
if ( pPhysics )
return;
//if ( random->RandomInt(0,1) )
// return;// don't bleed everytime
if (GetFlags() & FL_ONGROUND)
{
SetAbsVelocity( GetAbsVelocity() * 0.9 );
QAngle angles = GetLocalAngles();
angles.x = 0;
angles.z = 0;
SetLocalAngles( angles );
QAngle angVel = GetLocalAngularVelocity();
angVel.x = 0;
angVel.z = 0;
SetLocalAngularVelocity( vec3_angle );
}
else
{
if ( g_Language.GetInt() != LANGUAGE_GERMAN && m_cBloodDecals > 0 && m_bloodColor != DONT_BLEED )
{
vecSpot = GetAbsOrigin() + Vector ( 0 , 0 , 8 );//move up a bit, and trace down.
UTIL_TraceLine ( vecSpot, vecSpot + Vector ( 0, 0, -24 ), MASK_SOLID_BRUSHONLY, this, COLLISION_GROUP_NONE, &tr);
UTIL_BloodDecalTrace( &tr, m_bloodColor );
m_cBloodDecals--;
}
if ( m_material != matNone && random->RandomInt(0,2) == 0 )
{
float volume;
float zvel = fabs(GetAbsVelocity().z);
volume = 0.8f * MIN(1.0, ((float)zvel) / 450.0f);
CBreakable::MaterialSoundRandom( entindex(), (Materials)m_material, volume );
}
}
}
//
// Sticky gib puts blood on the wall and stays put.
//
void CGib::StickyGibTouch ( CBaseEntity *pOther )
{
Vector vecSpot;
trace_t tr;
SetThink ( &CGib::SUB_Remove );
SetNextThink( gpGlobals->curtime + 10 );
if ( !FClassnameIs( pOther, "worldspawn" ) )
{
SetNextThink( gpGlobals->curtime );
return;
}
UTIL_TraceLine ( GetAbsOrigin(), GetAbsOrigin() + GetAbsVelocity() * 32, MASK_SOLID_BRUSHONLY, this, COLLISION_GROUP_NONE, &tr);
UTIL_BloodDecalTrace( &tr, m_bloodColor );
Vector vecForward = tr.plane.normal * -1;
QAngle angles;
VectorAngles( vecForward, angles );
SetLocalAngles( angles );
SetAbsVelocity( vec3_origin );
SetLocalAngularVelocity( vec3_angle );
SetMoveType( MOVETYPE_NONE );
}
//
// Throw a chunk
//
void CGib::Spawn( const char *szGibModel )
{
SetMoveType( MOVETYPE_FLYGRAVITY, MOVECOLLIDE_FLY_BOUNCE );
SetFriction(0.55); // deading the bounce a bit
// sometimes an entity inherits the edict from a former piece of glass,
// and will spawn using the same render FX or m_nRenderMode! bad!
SetRenderColorA( 255 );
m_nRenderMode = kRenderNormal;
m_nRenderFX = kRenderFxNone;
// hopefully this will fix the VELOCITY TOO LOW crap
m_takedamage = DAMAGE_EVENTS_ONLY;
SetSolid( SOLID_BBOX );
AddSolidFlags( FSOLID_NOT_STANDABLE );
SetCollisionGroup( COLLISION_GROUP_DEBRIS );
SetModel( szGibModel );
#ifdef HL1_DLL
SetElasticity( 1.0 );
UTIL_SetSize( this, vec3_origin, vec3_origin );
#endif//HL1_DLL
SetNextThink( gpGlobals->curtime + 4 );
m_lifeTime = 25;
SetTouch ( &CGib::BounceGibTouch );
m_bForceRemove = false;
m_material = matNone;
m_cBloodDecals = 5;// how many blood decals this gib can place (1 per bounce until none remain).
}
//-----------------------------------------------------------------------------
// Spawn a gib with a finite lifetime, after which it will fade out.
//-----------------------------------------------------------------------------
void CGib::Spawn( const char *szGibModel, float flLifetime )
{
Spawn( szGibModel );
m_lifeTime = flLifetime;
SetThink ( &CGib::SUB_FadeOut );
SetNextThink( gpGlobals->curtime + m_lifeTime );
}
LINK_ENTITY_TO_CLASS( gib, CGib );
CBaseEntity *CreateRagGib( const char *szModel, const Vector &vecOrigin, const QAngle &vecAngles, const Vector &vecForce, float flFadeTime, bool bShouldIgnite )
{
CRagGib *pGib;
pGib = (CRagGib*)CreateEntityByName( "raggib" );
pGib->SetLocalAngles( vecAngles );
if ( !pGib )
{
Msg( "**Can't create ragdoll gib!\n" );
return NULL;
}
if ( bShouldIgnite )
{
CBaseAnimating *pAnimating = pGib->GetBaseAnimating();
if (pAnimating != NULL )
{
pAnimating->Ignite( random->RandomFloat( 8.0, 12.0 ), false );
}
}
pGib->Spawn( szModel, vecOrigin, vecForce, flFadeTime );
return pGib;
}
void CRagGib::Spawn( const char *szModel, const Vector &vecOrigin, const Vector &vecForce, float flFadeTime = 0.0 )
{
SetSolid( SOLID_BBOX );
AddSolidFlags( FSOLID_NOT_SOLID );
SetModel( szModel );
UTIL_SetSize(this, vec3_origin, vec3_origin);
UTIL_SetOrigin( this, vecOrigin );
if ( !BecomeRagdollOnClient( vecForce ) )
{
AddSolidFlags( FSOLID_NOT_STANDABLE );
RemoveSolidFlags( FSOLID_NOT_SOLID );
if( flFadeTime > 0.0 )
{
SUB_StartFadeOut( flFadeTime );
}
}
}
LINK_ENTITY_TO_CLASS( raggib, CRagGib );
|