-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring entities/base, RPG-7 weapon, fixed several bugs, BlastUti…
…l explosion helper class, other improvements
- Loading branch information
Showing
155 changed files
with
129,750 additions
and
199 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using Sandbox; | ||
using Sandbox.UI; | ||
using System; | ||
|
||
namespace SWB_Base | ||
{ | ||
/// <summary> | ||
/// An entity that can be carried in the player's inventory and hands. | ||
/// </summary> | ||
public class CarriableBase : BaseCarriable | ||
{ | ||
public override void ActiveStart( Entity ent ) | ||
{ | ||
//base.ActiveStart( ent ); | ||
|
||
EnableDrawing = true; | ||
|
||
if ( ent is Player player ) | ||
{ | ||
var animator = player.GetActiveAnimator(); | ||
if ( animator != null ) | ||
{ | ||
SimulateAnimator( animator ); | ||
} | ||
} | ||
|
||
// | ||
// If we're the local player (clientside) create viewmodel | ||
// and any HUD elements that this weapon wants | ||
// | ||
if ( IsLocalPawn ) | ||
{ | ||
DestroyViewModel(); | ||
DestroyHudElements(); | ||
|
||
CreateViewModel(); | ||
CreateHudElements(); | ||
} | ||
} | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.