-
-
Notifications
You must be signed in to change notification settings - Fork 151
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
Implementing EntityKeyValues #615
Open
KillStr3aK
wants to merge
43
commits into
roflmuffin:main
Choose a base branch
from
KillStr3aK:feature/entitykeyvalues
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
d9ad31c
feat: `CBaseEntity_DispatchSpawn` in unmanaged
KillStr3aK 34a4b4b
feat: entity keyvalues unmanaged implementation
KillStr3aK 787809b
feat: entity keyvalues managed implementation
KillStr3aK 4b10307
feat: overload `DispatchSpawn`
KillStr3aK 10768f6
chore: adjusted codestyle
KillStr3aK ffc0320
chore: adjusted codestyle and cleanup
KillStr3aK 7ed06c4
feat: inherit from dictionary to use indexing, adjustments
KillStr3aK a279da3
chore: edit summary
KillStr3aK 548c76d
fix: reimplement getter/setter natives and fully expose `CEntityKeyVa…
KillStr3aK e1225ba
chore: FIX GETTER REGION
KillStr3aK 71de499
feat: default implementations for `Vector2D`, `Vector4D`, `Quaternion…
KillStr3aK 62089d2
tweak: adjust changes
KillStr3aK 4c09221
fix: adjusted natives
KillStr3aK 321782f
feat: overload `SetVector`
KillStr3aK 84fe54c
feat: overloaded `ToString` method
KillStr3aK 1fb3803
tweak: replaced with `CUtlStringToken`
KillStr3aK 78e1bf2
fix: Added `Color` to `ScriptContext.GetResult`
KillStr3aK f064354
fix: these should return a pointer instead
KillStr3aK c42319c
fix: *GetInt64
KillStr3aK 13fb3af
feat: `CEntityKeyValues`.`HasValue`
KillStr3aK aa1dc6b
feat: indexing operator
KillStr3aK a9085b7
fix: wrong types
KillStr3aK 8261147
fix: indentation
KillStr3aK 9d03cea
fix: now works with CEntityHandle
KillStr3aK 79cdd92
chore: added text
KillStr3aK 76d48c1
fix: matrix3x4_t being passed correctly
KillStr3aK 8b5dc87
feat: properties for accessing values
KillStr3aK b684fef
tweak: adjusted matrix3x4_t changes
KillStr3aK 7d346df
fix: changed from `CUtlStringToken` to `uint`
KillStr3aK d9fcb7e
Merge branch 'main' into feature/entitykeyvalues
KillStr3aK 6812f62
Merge branch 'main' into feature/entitykeyvalues
KillStr3aK 817a158
Merge branch 'main' into feature/entitykeyvalues
KillStr3aK d81c8f0
Merge branch 'main' into feature/entitykeyvalues
KillStr3aK eb52035
Merge branch 'main' into feature/entitykeyvalues
KillStr3aK 7a83255
Merge branch 'main' into feature/entitykeyvalues
KillStr3aK d3209cb
Merge branch 'main' into feature/entitykeyvalues
KillStr3aK 0697b7c
Merge branch 'main' into feature/entitykeyvalues
KillStr3aK e210a27
Merge branch 'main' into feature/entitykeyvalues
KillStr3aK b517713
Merge branch 'main' into feature/entitykeyvalues
KillStr3aK 59dffad
Merge branch 'main' into feature/entitykeyvalues
KillStr3aK 58f1f4c
Merge branch 'main' into feature/entitykeyvalues
KillStr3aK 51020e4
Merge branch 'main' into feature/entitykeyvalues
KillStr3aK 2dda73a
Merge branch 'main' into feature/entitykeyvalues
KillStr3aK 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 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 |
---|---|---|
|
@@ -23,8 +23,8 @@ | |
* under GNU Lesser General Public License, version 2. | ||
*/ | ||
|
||
using System; | ||
using System.Collections.Concurrent; | ||
using System.Drawing; | ||
using System.Runtime.InteropServices; | ||
using System.Security; | ||
using System.Text; | ||
|
@@ -449,6 +449,19 @@ internal unsafe object GetResult(Type type, byte* ptr) | |
return Activator.CreateInstance(type, pointer); | ||
} | ||
|
||
if (type == typeof(Color)) | ||
{ | ||
var pointer = (IntPtr)GetResult(typeof(IntPtr), ptr); | ||
return Marshaling.ColorMarshaler.NativeToManaged(pointer); | ||
} | ||
|
||
// this one only works if the 'Raw'/uint is passed, otherwise big bum | ||
// maybe do this with a marshaler?! | ||
if (type == typeof(CEntityHandle)) | ||
{ | ||
return new CEntityHandle((uint)GetResult(typeof(uint), ptr)); | ||
} | ||
Comment on lines
+460
to
+463
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I hope this one fits? |
||
|
||
if (type == typeof(object)) | ||
{ | ||
// var dataPtr = *(IntPtr*)&ptr[0]; | ||
|
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one should be there since the beginning I believe haha