This repository was archived by the owner on Jun 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +16
-25
lines changed
EssentialsPlugin/ProcessHandlers Expand file tree Collapse file tree 1 file changed +16
-25
lines changed Original file line number Diff line number Diff line change 11namespace EssentialsPlugin . ProcessHandlers
22{
3- using System ;
43 using System . Linq ;
5- using Entities . Blocks ;
6- using EssentialsPlugin ;
7- using EssentialsPlugin . ChatHandlers ;
8- using EssentialsPlugin . EntityManagers ;
94 using Sandbox . Game . Entities ;
10- using Sandbox . Game . Entities . Blocks ;
115 using Sandbox . Game . Entities . Character ;
126 using Sandbox . Game . Entities . Character . Components ;
137 using Utility ;
148 using VRage . Game . Entity ;
159
1610 public class ProcessRagdoll : ProcessHandlerBase
17- {
18- public override int GetUpdateResolution ( )
11+ {
12+ public override int GetUpdateResolution ( )
1913 {
20- return 1000 ;
14+ return 1000 ;
2115 }
2216
23- public override void Handle ( )
24- {
25- if ( ! PluginSettings . Instance . DisableRagdoll )
26- return ;
17+ public override void Handle ( )
18+ {
19+ if ( ! PluginSettings . Instance . DisableRagdoll )
20+ return ;
2721
2822 MyEntity [ ] entities = new MyEntity [ 0 ] ;
29- Wrapper . GameAction ( ( ) => entities = MyEntities . GetEntities ( ) . ToArray ( ) ) ;
30-
31- foreach ( var entity in entities )
32- {
33- var character = entity as MyCharacter ;
23+ Wrapper . GameAction ( ( ) => entities = MyEntities . GetEntities ( ) . ToArray ( ) ) ;
3424
35- character ? . Components . Remove < MyCharacterRagdollComponent > ( ) ;
36- }
25+ foreach ( MyEntity entity in entities )
26+ {
27+ MyCharacter character = entity as MyCharacter ;
3728
38- base . Handle ( ) ;
39- }
40-
29+ character ? . Components . Remove < MyCharacterRagdollComponent > ( ) ;
30+ }
4131
42- }
32+ base . Handle ( ) ;
33+ }
34+ }
4335}
44-
You can’t perform that action at this time.
0 commit comments