forked from ReactiveDrop/reactivedrop_public_src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
shield bubble visuals WIP; not yet ready, even for beta
- Loading branch information
Showing
31 changed files
with
7,513 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
$modelname "items/shield_bubble/rifle_shield.mdl" | ||
|
||
$scale 0.5 | ||
$body default "rifle_shield.smd" | ||
$surfaceprop "no_decal" | ||
$contents "solid" | ||
$cdmaterials "models/items/shield_bubble" | ||
|
||
$sequence "BindPose" "rifle_shield.smd" | ||
|
||
$collisionmodel "rifle_shield_physics.smd" | ||
{ | ||
$concave | ||
$maxconvexpieces 13 | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
$modelname "items/shield_bubble/shield_bubble_arena.mdl" | ||
$cdmaterials "models/items/shield_bubble" | ||
$body default "shield_bubble_arena.dmx" | ||
$sequence BindPose "shield_bubble_arena.dmx" | ||
$illumposition 0 0 64 | ||
$mostlyopaque | ||
$staticprop | ||
$surfaceprop "metal" |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
$modelname "items/shield_bubble/shield_bubble_arena_low.mdl" | ||
$cdmaterials "models/items/shield_bubble" | ||
$body default "shield_bubble_arena_low.dmx" | ||
$sequence BindPose "shield_bubble_arena_low.dmx" | ||
$illumposition 0 0 64 | ||
$opaque | ||
$staticprop | ||
$surfaceprop "metal" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#include "cbase.h" | ||
#include "c_asw_shieldgrenade_projectile.h" | ||
|
||
// memdbgon must be the last include file in a .cpp file!!! | ||
#include "tier0/memdbgon.h" | ||
|
||
|
||
#define BUBBLE_MODEL "models/items/shield_bubble/shield_bubble_arena.mdl" | ||
#define BUBBLE_MODEL_LOW "models/items/shield_bubble/shield_bubble_arena_low.mdl" | ||
|
||
extern ConVar rd_simple_beacons; | ||
|
||
IMPLEMENT_CLIENTCLASS_DT( C_ASW_ShieldGrenade_Projectile, DT_ASW_ShieldGrenade_Projectile, CASW_ShieldGrenade_Projectile ) | ||
END_RECV_TABLE() | ||
|
||
static bool UseLowBubbleModel() | ||
{ | ||
return rd_simple_beacons.GetBool() || ( g_pMaterialSystemHardwareConfig->GetDXSupportLevel() < 92 ); | ||
} | ||
|
||
void C_ASW_ShieldGrenade_Projectile::Precache() | ||
{ | ||
BaseClass::Precache(); | ||
|
||
PrecacheModel( BUBBLE_MODEL ); | ||
PrecacheModel( BUBBLE_MODEL_LOW ); | ||
} | ||
|
||
void C_ASW_ShieldGrenade_Projectile::UpdatePingEffects() | ||
{ | ||
BaseClass::UpdatePingEffects(); | ||
|
||
// Spawn a sphere that is different from the default aoegrenade sphere. | ||
if ( m_bSettled && m_hSphereModel.Get() == NULL ) | ||
{ | ||
C_BaseAnimating *pEnt = new C_BaseAnimating; | ||
if ( !pEnt ) | ||
{ | ||
Warning( "Error, couldn't create new C_BaseAnimating\n" ); | ||
return; | ||
} | ||
if ( !pEnt->InitializeAsClientEntity( UseLowBubbleModel() ? BUBBLE_MODEL_LOW : BUBBLE_MODEL, false ) ) | ||
{ | ||
Warning( "Error, couldn't InitializeAsClientEntity\n" ); | ||
pEnt->Release(); | ||
return; | ||
} | ||
|
||
pEnt->SetParent( this ); | ||
pEnt->SetLocalOrigin( Vector( 0, 0, 0 ) ); | ||
pEnt->SetLocalAngles( QAngle( 0, 0, 0 ) ); | ||
pEnt->SetSolid( SOLID_NONE ); | ||
pEnt->SetSkin( GetSphereSkin() ); | ||
pEnt->RemoveEFlags( EFL_USE_PARTITION_WHEN_NOT_SOLID ); | ||
|
||
m_hSphereModel = pEnt; | ||
m_flTimeCreated = gpGlobals->curtime; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#pragma once | ||
|
||
#include "c_asw_aoegrenade_projectile.h" | ||
|
||
class C_ASW_ShieldGrenade_Projectile : public C_ASW_AOEGrenade_Projectile | ||
{ | ||
public: | ||
DECLARE_CLASS( C_ASW_ShieldGrenade_Projectile, C_ASW_AOEGrenade_Projectile ); | ||
DECLARE_CLIENTCLASS(); | ||
|
||
void Precache() override; | ||
|
||
void UpdatePingEffects() override; | ||
bool ShouldSpawnSphere() override { return false; } // we spawn our own | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include "cbase.h" | ||
#include "asw_shieldgrenade_projectile.h" | ||
|
||
// memdbgon must be the last include file in a .cpp file!!! | ||
#include "tier0/memdbgon.h" | ||
|
||
|
||
#define SHIELD_GRENADE_MODEL "models/items/shield_generator/shield_generator.mdl" | ||
|
||
LINK_ENTITY_TO_CLASS( asw_shieldgrenade_projectile, CASW_ShieldGrenade_Projectile ); | ||
|
||
IMPLEMENT_SERVERCLASS_ST( CASW_ShieldGrenade_Projectile, DT_ASW_ShieldGrenade_Projectile ) | ||
END_SEND_TABLE() | ||
|
||
BEGIN_DATADESC( CASW_ShieldGrenade_Projectile ) | ||
END_DATADESC() | ||
|
||
CASW_ShieldGrenade_Projectile::CASW_ShieldGrenade_Projectile() | ||
{ | ||
SetModelName( MAKE_STRING( SHIELD_GRENADE_MODEL ) ); | ||
} | ||
|
||
void CASW_ShieldGrenade_Projectile::Precache() | ||
{ | ||
BaseClass::Precache(); | ||
|
||
PrecacheModel( "models/items/shield_bubble/shield_bubble_arena.mdl" ); | ||
PrecacheModel( "models/items/shield_bubble/shield_bubble_arena_low.mdl" ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#pragma once | ||
|
||
#include "asw_buffgrenade_projectile.h" | ||
|
||
class CASW_ShieldGrenade_Projectile : public CASW_AOEGrenade_Projectile | ||
{ | ||
public: | ||
DECLARE_CLASS( CASW_ShieldGrenade_Projectile, CASW_AOEGrenade_Projectile ); | ||
DECLARE_SERVERCLASS(); | ||
DECLARE_DATADESC(); | ||
|
||
CASW_ShieldGrenade_Projectile(); | ||
|
||
void Precache() override; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.