-
-
Notifications
You must be signed in to change notification settings - Fork 490
Editing collisions #730
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
Closed
Closed
Editing collisions #730
Changes from all commits
Commits
Show all changes
81 commits
Select commit
Hold shift + click to select a range
22a476c
Merge pull request #2 from multitheftauto/master
CrosRoad95 d9229bc
Merge pull request #3 from multitheftauto/master
CrosRoad95 6e3ea50
Merge pull request #4 from multitheftauto/master
CrosRoad95 ec62964
Merge pull request #5 from multitheftauto/master
CrosRoad95 ad8eb2f
test 1
CrosRoad95 6591fc1
Merge pull request #7 from multitheftauto/master
CrosRoad95 fb084fc
Merge pull request #9 from multitheftauto/master
CrosRoad95 3055613
Merge pull request #10 from multitheftauto/master
CrosRoad95 f5dd372
Merge pull request #10 from multitheftauto/master
CrosRoad95 86baf91
removed pathfinding from master
CrosRoad95 9258936
Merge remote-tracking branch 'origin/master'
CrosRoad95 6fd451b
Merge remote-tracking branch 'origin/master'
CrosRoad95 f71c7b0
Merge pull request #11 from multitheftauto/master
CrosRoad95 ef48974
Merge remote-tracking branch 'origin/master'
CrosRoad95 46104d1
Merge branch 'master' into test
CrosRoad95 f29ae6d
engineGetModelCollisionProperties and engineGetModelCollisionData
CrosRoad95 af03ec5
set and get function almost done, beginnings of creating new shapes
CrosRoad95 85aecc8
updating bounding box, for now only box collisions
CrosRoad95 ebf9905
bounding box function improved
CrosRoad95 4ea64d4
a bit refactor
CrosRoad95 dccdec2
creating triangle
CrosRoad95 1037be4
update
CrosRoad95 9c58e52
index argument for engineGetModelCollisionData
CrosRoad95 a6a2ce4
upgraded, added many check for arguments
CrosRoad95 bada30a
added function for getting model collision
CrosRoad95 55eacc9
engineModelIsCollisionLoaded function
CrosRoad95 9ce7e11
renemed function for checking collision
CrosRoad95 08bb127
removed unnecessary condition
CrosRoad95 74233e1
a bit refactor, and test of restoring collision
CrosRoad95 03ca694
removing collision boxes
CrosRoad95 acf7efa
removing triangles and vertices test
CrosRoad95 b940020
almost finished restoring, test for removing collision
CrosRoad95 b8f8e00
Merge pull request #15 from multitheftauto/master
CrosRoad95 5e98d3c
fix and removed create & destroy functions for future pr
CrosRoad95 82f9dfa
refactor, updated each function, removed create/remove functions
CrosRoad95 a4301fb
Merge remote-tracking branch 'origin/master' into test
CrosRoad95 454fb1f
removed unneded declaration
CrosRoad95 82aa84c
updated
CrosRoad95 061b858
Merge remote-tracking branch 'upstream/master' into test
patrikjuvonen 0873320
Merge remote-tracking branch 'upstream/master' into test
patrikjuvonen 4547c91
Fix formatting
patrikjuvonen f4a7069
Add missing return on error
patrikjuvonen b65846c
Return nullptr instead
patrikjuvonen 5d8187f
Fix formatting, addendum to 4547c91844b81d31a1643e6bccd1dabef5166284
patrikjuvonen 50376a8
Use const where possible
patrikjuvonen 6f2ea46
Use range-based loop
patrikjuvonen f896206
Merge branch 'test' of https://github.com/CrosRoad95/mtasa-blue into …
patrikjuvonen f3d5bc8
Fix formatting, addendum to 5d8187ff71ebbe7bf68678ee48892fb8aa03e879
patrikjuvonen 4c151d9
Get rid of lua_pushtablevalue
patrikjuvonen 9529a0b
Merge branch 'master' into test
CrosRoad95 4a33097
Merge branch 'master' into test
qaisjp c487e0e
Merge branch 'master' into test
qaisjp c63b525
Update Client/mods/deathmatch/logic/CClientColModel.h
CrosRoad95 f46f529
Update Client/mods/deathmatch/logic/CClientColModel.h
CrosRoad95 8825887
Update Client/mods/deathmatch/logic/CClientColModel.h
CrosRoad95 9ff0ca6
Update Client/mods/deathmatch/logic/CClientColModel.h
CrosRoad95 e736462
Merge remote-tracking branch 'mta/master' into test
CrosRoad95 f2678a5
Merge remote-tracking branch 'origin/test' into test
CrosRoad95 31b51a7
fixing conflicts
CrosRoad95 ad31524
try to change to enumclass
CrosRoad95 d1c36e8
not working
CrosRoad95 9327756
Merge remote-tracking branch 'origin/master' into test
CrosRoad95 c53ab6b
Merge remote-tracking branch 'origin/master' into test
CrosRoad95 10ddd8f
Merge branch 'master' into test
StrixG e2d7493
Merge branch 'master' into test
StrixG c508ac3
Fix eCollisionShape enum
StrixG 439a174
Merge remote-tracking branch 'origin/master' into test
CrosRoad95 236bc91
use new parser
CrosRoad95 41e7ef3
Fix arg parser compilation
sbx320 505c11d
fix compilation
CrosRoad95 6c3ba18
rename variables
CrosRoad95 ddc7259
Merge branch 'master' into test
2898a50
Merge branch 'master' into test
CrosRoad95 671268b
revert some unnecessary changes
CrosRoad95 d6fd63b
remove even more unnecessary changes
CrosRoad95 d430db0
refactor getData to use new parser
CrosRoad95 a3572b1
Merge branch 'master' into test
patrikjuvonen 75e1d8d
Update CColModelSA.h
patrikjuvonen ac881de
Update CClientColModel.cpp
patrikjuvonen eb8557e
Update CLuaEngineDefs.cpp
patrikjuvonen b094621
Update CLuaEngineDefs.cpp
patrikjuvonen 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
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 |
---|---|---|
@@ -1,14 +1,15 @@ | ||
/***************************************************************************** | ||
* | ||
* PROJECT: Multi Theft Auto v1.0 | ||
* (Shared logic for modifications) | ||
* PROJECT: Multi Theft Auto | ||
* LICENSE: See LICENSE in the top level directory | ||
* FILE: mods/shared_logic/CClientColModel.cpp | ||
* FILE: mods/deathmatch/logic/CClientColModel.cpp | ||
* PURPOSE: Model collision (.col file) entity class | ||
* | ||
*****************************************************************************/ | ||
|
||
#include "StdInc.h" | ||
#include "../Client/game_sa/CModelInfoSA.h" | ||
#include "../Client/game_sa/CColModelSA.h" | ||
Comment on lines
+11
to
+12
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 don't think we are allowed to include stuff from |
||
|
||
CClientColModel::CClientColModel(CClientManager* pManager, ElementID ID) : ClassInit(this), CClientEntity(ID) | ||
{ | ||
|
@@ -158,3 +159,19 @@ bool CClientColModel::IsCOLData(const SString& strData) | |
{ | ||
return strData.length() > 32 && memcmp(strData, "COL", 3) == 0 && strData[7] == 0; | ||
} | ||
|
||
CColModelSAInterface* CClientColModel::GetColModelInterface() | ||
{ | ||
if (m_pColModel) | ||
return m_pColModel->GetInterface(); | ||
return nullptr; | ||
} | ||
|
||
void CClientColModel::UpdateVerticesCount() | ||
{ | ||
CColModelSAInterface* pInterface = GetColModelInterface(); | ||
CColDataSA* pColData = pInterface->pColData; | ||
|
||
if (pColData) | ||
m_iVerticesCount = static_cast<unsigned short>(pColData->getNumVertices()); | ||
} |
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
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
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
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.
why not use
std::int16_t
? You'll need to include the header#include <cstdint>
.