-
Notifications
You must be signed in to change notification settings - Fork 19
Improve the behavior of death planes #257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
99aa6e7
Add ObjectScript for death planes
Frozenreflex 28ef53a
Fix size of death barrier objects
Frozenreflex 4e451f8
Switch death plane to use SmashAsync
Frozenreflex fc22164
Merge branch 'dev' of https://github.com/UchuServer/Uchu into enhance…
Frozenreflex 78bd598
Add initial water death plane script
Frozenreflex b63934d
Switch smasher for death planes to death plane
Frozenreflex 172a31a
Remove comment in DeathPlane
Frozenreflex 4142353
Merge branch 'dev' of github.com:UchuServer/Uchu into enhancement/dea…
TheNexusAvenger 62d1b41
Merge and improve object script loading for LuaScriptComponent and cu…
TheNexusAvenger 58a9671
Add player fall death script.
TheNexusAvenger 831709b
Move death plane scripts.
TheNexusAvenger 2970ac0
Add death (teleport) plane for properties.
TheNexusAvenger c3a4370
Correct player sphere physics to be at center instead of bottom. (Fix…
TheNexusAvenger d5c43d5
Disable check for hasCustomClientScript
Frozenreflex bed88fe
Disable fallback, replace FV death plane objectscript with nativescript
Frozenreflex 3bef1b2
Reformatting
Frozenreflex 4366f2d
Add CapsuleBody (for cylinders)
enteryournamehere b8dc90e
Capsule-sphere collision test
enteryournamehere a85a3e4
Clean up some code
enteryournamehere bd96217
Replace client script names with server ones
enteryournamehere 73c1174
Run native DeathPlane script in multiple worlds
Frozenreflex 234c322
Move PrimitiveModel cube origins from center to bottom
Frozenreflex 5a43b05
Fix scripts linked to client script names
enteryournamehere 9478fe9
Merge branch 'enhancement/death-planes' of github.com:UchuServer/Uchu…
enteryournamehere 28ca057
Merge branch 'dev' of github.com:UchuServer/Uchu into enhancement/dea…
enteryournamehere fd0aeaf
Correctly split PATH env variable on *nix systems
enteryournamehere a1ac3fe
Apply binoculars script to all binoculars
enteryournamehere 254d67b
Always give all rewards for achievements
enteryournamehere 7de8b6d
Fix for ghost players after dying to death plane
Frozenreflex 12226ae
Merge branch 'enhancement/death-planes' of https://github.com/UchuSer…
Frozenreflex 66449bb
Fix Instantiate when item is not in Objects table
enteryournamehere 6cd4f5d
Fix not dying after falling near Tortoise Terrace
Frozenreflex fb70e80
Add LOT-specific scripts.
TheNexusAvenger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,35 @@ | ||
using System; | ||
using System.Numerics; | ||
using System.Threading.Tasks; | ||
using InfectedRose.Core; | ||
using InfectedRose.Lvl; | ||
using Uchu.Physics; | ||
using Uchu.World; | ||
using Uchu.World.Scripting.Native; | ||
|
||
namespace Uchu.StandardScripts.General | ||
{ | ||
/// <summary> | ||
/// Native implementation of scripts/ai/act/l_act_player_death_trigger.lua | ||
/// </summary> | ||
[ScriptName("l_act_player_death_trigger.lua")] | ||
public class DeathPlane : ObjectScript | ||
{ | ||
/// <summary> | ||
/// Creates the object script. | ||
/// </summary> | ||
/// <param name="gameObject">Game object to control with the script.</param> | ||
public DeathPlane(GameObject gameObject) : base(gameObject) | ||
{ | ||
//Console.WriteLine("Death barrier positioned at " + gameObject.Transform.Position + ", Scale of GameObject is " + gameObject.Transform.Scale); | ||
|
||
var physics = gameObject.GetComponent<PhysicsComponent>(); | ||
if (physics == null || physics == default) return; | ||
TheNexusAvenger marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Listen(physics.OnEnter, other => | ||
{ | ||
if (!(other.GameObject is Player player)) return; | ||
player.GetComponent<DestroyableComponent>().Health = 0; | ||
TheNexusAvenger marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}); | ||
} | ||
} | ||
} |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.